1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk8'
 590 PACKAGE_STRING='OpenJDK jdk8'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CCACHE
 633 USE_PRECOMPILED_HEADER
 634 SJAVAC_SERVER_DIR
 635 ENABLE_SJAVAC
 636 SJAVAC_SERVER_JAVA
 637 JOBS
 638 MEMORY_SIZE
 639 NUM_CORES
 640 ENABLE_INTREE_EC
 641 SALIB_NAME
 642 HOTSPOT_MAKE_ARGS
 643 UCRT_DLL_DIR
 644 MSVCP_DLL
 645 MSVCR_DLL
 646 LIBCXX
 647 LLVM_LIBS
 648 LLVM_LDFLAGS
 649 LLVM_CFLAGS
 650 LLVM_CONFIG
 651 LIBFFI_LIBS
 652 LIBFFI_CFLAGS
 653 STATIC_CXX_SETTING
 654 LIBDL
 655 LIBM
 656 LIBZIP_CAN_USE_MMAP
 657 USE_EXTERNAL_LIBZ
 658 USE_EXTERNAL_LIBGIF
 659 USE_EXTERNAL_LIBJPEG
 660 FONTCONFIG_CFLAGS
 661 ALSA_LIBS
 662 ALSA_CFLAGS
 663 FREETYPE_BUNDLE_LIB_PATH
 664 FREETYPE_LIBS
 665 FREETYPE_CFLAGS
 666 CUPS_CFLAGS
 667 X_EXTRA_LIBS
 668 X_LIBS
 669 X_PRE_LIBS
 670 X_CFLAGS
 671 XMKMF
 672 FIXPATH
 673 ZIP_DEBUGINFO_FILES
 674 DEBUG_BINARIES
 675 STRIP_POLICY
 676 ENABLE_DEBUG_SYMBOLS
 677 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 678 ZERO_ARCHFLAG
 679 LDFLAGS_CXX_JDK
 680 LDFLAGS_JDKEXE_SUFFIX
 681 LDFLAGS_JDKLIB_SUFFIX
 682 LDFLAGS_JDKEXE
 683 LDFLAGS_JDKLIB
 684 CXXFLAGS_JDKEXE
 685 CXXFLAGS_JDKLIB
 686 CFLAGS_JDKEXE
 687 CFLAGS_JDKLIB
 688 MACOSX_VERSION_MIN
 689 FDLIBM_CFLAGS
 690 NO_LIFETIME_DSE_CFLAG
 691 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
 692 LEGACY_EXTRA_ASFLAGS
 693 LEGACY_EXTRA_LDFLAGS
 694 LEGACY_EXTRA_CXXFLAGS
 695 LEGACY_EXTRA_CFLAGS
 696 CXXSTD_CXXFLAG
 697 CXX_O_FLAG_NONE
 698 CXX_O_FLAG_NORM
 699 CXX_O_FLAG_HI
 700 CXX_O_FLAG_HIGHEST
 701 C_O_FLAG_NONE
 702 C_O_FLAG_NORM
 703 C_O_FLAG_HI
 704 C_O_FLAG_HIGHEST
 705 CXXFLAGS_DEBUG_SYMBOLS
 706 CFLAGS_DEBUG_SYMBOLS
 707 ASFLAGS_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 OTOOL
 748 ac_ct_STRIP
 749 MCS
 750 GNM
 751 NM
 752 STRIP
 753 MSBUILD
 754 DUMPBIN
 755 RC
 756 MT
 757 LIPO
 758 ac_ct_OBJC
 759 OBJCFLAGS
 760 OBJC
 761 ac_ct_AR
 762 AR
 763 AS
 764 LDCXX
 765 LD
 766 CXXCPP
 767 CPP
 768 CXX_VERSION_NUMBER
 769 CC_VERSION_NUMBER
 770 ac_ct_CXX
 771 CXXFLAGS
 772 CXX
 773 ac_ct_PROPER_COMPILER_CXX
 774 PROPER_COMPILER_CXX
 775 TOOLCHAIN_PATH_CXX
 776 POTENTIAL_CXX
 777 OBJEXT
 778 EXEEXT
 779 ac_ct_CC
 780 CPPFLAGS
 781 LDFLAGS
 782 CFLAGS
 783 CC
 784 ac_ct_PROPER_COMPILER_CC
 785 PROPER_COMPILER_CC
 786 TOOLCHAIN_PATH_CC
 787 POTENTIAL_CC
 788 SDKPATH
 789 XCODEBUILD
 790 SET_DEVELOPER_DIR
 791 VS_LIB
 792 VS_INCLUDE
 793 VS_PATH
 794 CYGWIN_LINK
 795 EXE_SUFFIX
 796 OBJ_SUFFIX
 797 STATIC_LIBRARY
 798 SHARED_LIBRARY
 799 STATIC_LIBRARY_SUFFIX
 800 SHARED_LIBRARY_SUFFIX
 801 LIBRARY_PREFIX
 802 TOOLCHAIN_TYPE
 803 BUILD_HOTSPOT
 804 HOTSPOT_DIST
 805 BUILD_OUTPUT
 806 OVERRIDE_SRC_ROOT
 807 ADD_SRC_ROOT
 808 JDK_TOPDIR
 809 NASHORN_TOPDIR
 810 HOTSPOT_TOPDIR
 811 JAXWS_TOPDIR
 812 JAXP_TOPDIR
 813 CORBA_TOPDIR
 814 LANGTOOLS_TOPDIR
 815 JAVA_FLAGS_SMALL
 816 JAVA_FLAGS_BIG
 817 JAVA_FLAGS
 818 BOOT_JDK_BITS
 819 JAVAC_FLAGS
 820 BOOT_JDK_SOURCETARGET
 821 BOOT_JDK
 822 BOOT_TOOLSJAR
 823 BOOT_RTJAR
 824 JAVA_CHECK
 825 JAVAC_CHECK
 826 COOKED_BUILD_NUMBER
 827 COOKED_JDK_UPDATE_VERSION
 828 JDK_VERSION
 829 COPYRIGHT_YEAR
 830 VENDOR_URL_VM_BUG
 831 VENDOR_URL_BUG
 832 VENDOR_URL
 833 COMPANY_NAME
 834 MACOSX_BUNDLE_ID_BASE
 835 MACOSX_BUNDLE_NAME_BASE
 836 JDK_RC_PLATFORM_NAME
 837 PRODUCT_SUFFIX
 838 PRODUCT_NAME
 839 LAUNCHER_NAME
 840 MILESTONE
 841 JDK_BUILD_NUMBER
 842 JDK_UPDATE_VERSION
 843 JDK_MICRO_VERSION
 844 JDK_MINOR_VERSION
 845 JDK_MAJOR_VERSION
 846 USER_RELEASE_SUFFIX
 847 ENABLE_JFR
 848 COMPRESS_JARS
 849 UNLIMITED_CRYPTO
 850 CACERTS_FILE
 851 TEST_IN_BUILD
 852 BUILD_HEADLESS
 853 SUPPORT_HEADFUL
 854 SUPPORT_HEADLESS
 855 BDEPS_FTP
 856 BDEPS_UNZIP
 857 OS_VERSION_MICRO
 858 OS_VERSION_MINOR
 859 OS_VERSION_MAJOR
 860 PKG_CONFIG
 861 CODESIGN
 862 XATTR
 863 DSYMUTIL
 864 IS_GNU_TIME
 865 TIME
 866 STAT
 867 HG
 868 READELF
 869 LDD
 870 ZIP
 871 UNZIP
 872 FIND_DELETE
 873 MAKE
 874 CHECK_TOOLSDIR_MAKE
 875 CHECK_TOOLSDIR_GMAKE
 876 CHECK_MAKE
 877 CHECK_GMAKE
 878 PKGHANDLER
 879 OUTPUT_ROOT
 880 CONF_NAME
 881 SPEC
 882 DEVKIT_LIB_DIR
 883 BUILD_VARIANT_RELEASE
 884 DEBUG_CLASSFILES
 885 FASTDEBUG
 886 VARIANT
 887 DEBUG_LEVEL
 888 MACOSX_UNIVERSAL
 889 INCLUDE_SA
 890 JVM_VARIANT_CORE
 891 JVM_VARIANT_ZEROSHARK
 892 JVM_VARIANT_ZERO
 893 JVM_VARIANT_KERNEL
 894 JVM_VARIANT_MINIMAL1
 895 JVM_VARIANT_CLIENT
 896 JVM_VARIANT_SERVER
 897 JVM_VARIANTS
 898 JVM_INTERPRETER
 899 JDK_VARIANT
 900 SET_OPENJDK
 901 BUILD_LOG_WRAPPER
 902 BUILD_LOG_PREVIOUS
 903 BUILD_LOG
 904 TOPDIR
 905 PATH_SEP
 906 ZERO_ARCHDEF
 907 DEFINE_CROSS_COMPILE_ARCH
 908 LP64
 909 OPENJDK_TARGET_OS_EXPORT_DIR
 910 OPENJDK_TARGET_OS_API_DIR
 911 OPENJDK_TARGET_CPU_JLI_CFLAGS
 912 OPENJDK_TARGET_CPU_OSARCH
 913 OPENJDK_TARGET_CPU_ISADIR
 914 OPENJDK_TARGET_CPU_LIBDIR
 915 OPENJDK_TARGET_CPU_LEGACY_LIB
 916 OPENJDK_TARGET_CPU_LEGACY
 917 REQUIRED_OS_VERSION
 918 REQUIRED_OS_NAME
 919 COMPILE_TYPE
 920 OPENJDK_TARGET_CPU_ENDIAN
 921 OPENJDK_TARGET_CPU_BITS
 922 OPENJDK_TARGET_CPU_ARCH
 923 OPENJDK_TARGET_CPU
 924 OPENJDK_TARGET_OS_ENV
 925 OPENJDK_TARGET_OS_API
 926 OPENJDK_TARGET_OS
 927 OPENJDK_BUILD_CPU_ENDIAN
 928 OPENJDK_BUILD_CPU_BITS
 929 OPENJDK_BUILD_CPU_ARCH
 930 OPENJDK_BUILD_CPU
 931 OPENJDK_BUILD_OS_ENV
 932 OPENJDK_BUILD_OS_API
 933 OPENJDK_BUILD_OS
 934 OPENJDK_BUILD_AUTOCONF_NAME
 935 OPENJDK_TARGET_AUTOCONF_NAME
 936 target_os
 937 target_vendor
 938 target_cpu
 939 target
 940 host_os
 941 host_vendor
 942 host_cpu
 943 host
 944 build_os
 945 build_vendor
 946 build_cpu
 947 build
 948 CPIO
 949 SETFILE
 950 DF
 951 READLINK
 952 CYGPATH
 953 SED
 954 FGREP
 955 EGREP
 956 GREP
 957 AWK
 958 XARGS
 959 WHICH
 960 WC
 961 UNIQ
 962 UNAME
 963 TR
 964 TOUCH
 965 TEE
 966 TAR
 967 TAIL
 968 SORT
 969 SH
 970 RM
 971 PRINTF
 972 NAWK
 973 MV
 974 MKTEMP
 975 MKDIR
 976 LS
 977 LN
 978 HEAD
 979 FIND
 980 FILE
 981 EXPR
 982 ECHO
 983 DIRNAME
 984 DIFF
 985 DATE
 986 CUT
 987 CP
 988 COMM
 989 CMP
 990 CHMOD
 991 CAT
 992 BASH
 993 BASENAME
 994 DATE_WHEN_CONFIGURED
 995 CONFIGURE_COMMAND_LINE
 996 CUSTOM_MAKE_DIR
 997 target_alias
 998 host_alias
 999 build_alias
1000 LIBS
1001 ECHO_T
1002 ECHO_N
1003 ECHO_C
1004 DEFS
1005 mandir
1006 localedir
1007 libdir
1008 psdir
1009 pdfdir
1010 dvidir
1011 htmldir
1012 infodir
1013 docdir
1014 oldincludedir
1015 includedir
1016 runstatedir
1017 localstatedir
1018 sharedstatedir
1019 sysconfdir
1020 datadir
1021 datarootdir
1022 libexecdir
1023 sbindir
1024 bindir
1025 program_transform_name
1026 prefix
1027 exec_prefix
1028 PACKAGE_URL
1029 PACKAGE_BUGREPORT
1030 PACKAGE_STRING
1031 PACKAGE_VERSION
1032 PACKAGE_TARNAME
1033 PACKAGE_NAME
1034 PATH_SEPARATOR
1035 SHELL'
1036 ac_subst_files=''
1037 ac_user_opts='
1038 enable_option_checking
1039 with_custom_make_dir
1040 with_target_bits
1041 enable_openjdk_only
1042 with_jdk_variant
1043 with_jvm_interpreter
1044 with_jvm_variants
1045 enable_debug
1046 with_debug_level
1047 with_devkit
1048 with_sys_root
1049 with_sysroot
1050 with_tools_dir
1051 with_toolchain_path
1052 with_extra_path
1053 with_xcode_path
1054 with_conf_name
1055 with_builddeps_conf
1056 with_builddeps_server
1057 with_builddeps_dir
1058 with_builddeps_group
1059 enable_headful
1060 enable_hotspot_test_in_build
1061 with_cacerts_file
1062 enable_unlimited_crypto
1063 enable_jfr
1064 with_milestone
1065 with_update_version
1066 with_user_release_suffix
1067 with_build_number
1068 with_vendor_name
1069 with_vendor_url
1070 with_vendor_bug_url
1071 with_vendor_vm_bug_url
1072 with_copyright_year
1073 with_boot_jdk
1074 with_boot_jdk_jvmargs
1075 with_add_source_root
1076 with_override_source_root
1077 with_adds_and_overrides
1078 with_override_langtools
1079 with_override_corba
1080 with_override_jaxp
1081 with_override_jaxws
1082 with_override_hotspot
1083 with_override_nashorn
1084 with_override_jdk
1085 with_import_hotspot
1086 with_toolchain_type
1087 with_toolchain_version
1088 with_jtreg
1089 with_extra_cflags
1090 with_extra_cxxflags
1091 with_extra_ldflags
1092 with_extra_asflags
1093 enable_debug_symbols
1094 enable_zip_debug_info
1095 with_native_debug_symbols
1096 enable_macosx_runtime_support
1097 with_x
1098 with_cups
1099 with_cups_include
1100 with_freetype
1101 with_freetype_include
1102 with_freetype_lib
1103 with_freetype_src
1104 enable_freetype_bundling
1105 with_alsa
1106 with_alsa_include
1107 with_alsa_lib
1108 with_fontconfig
1109 with_fontconfig_include
1110 with_giflib
1111 with_zlib
1112 with_stdc__lib
1113 with_msvcr_dll
1114 with_msvcp_dll
1115 with_ucrt_dll_dir
1116 with_dxsdk
1117 with_dxsdk_lib
1118 with_dxsdk_include
1119 with_num_cores
1120 with_memory_size
1121 with_jobs
1122 with_sjavac_server_java
1123 enable_sjavac
1124 enable_precompiled_headers
1125 enable_ccache
1126 with_ccache_dir
1127 '
1128       ac_precious_vars='build_alias
1129 host_alias
1130 target_alias
1131 BASENAME
1132 BASH
1133 CAT
1134 CHMOD
1135 CMP
1136 COMM
1137 CP
1138 CUT
1139 DATE
1140 DIFF
1141 DIRNAME
1142 ECHO
1143 EXPR
1144 FILE
1145 FIND
1146 HEAD
1147 LN
1148 LS
1149 MKDIR
1150 MKTEMP
1151 MV
1152 NAWK
1153 PRINTF
1154 RM
1155 SH
1156 SORT
1157 TAIL
1158 TAR
1159 TEE
1160 TOUCH
1161 TR
1162 UNAME
1163 UNIQ
1164 WC
1165 WHICH
1166 XARGS
1167 AWK
1168 GREP
1169 EGREP
1170 FGREP
1171 SED
1172 CYGPATH
1173 READLINK
1174 DF
1175 SETFILE
1176 CPIO
1177 UNZIP
1178 ZIP
1179 LDD
1180 READELF
1181 HG
1182 STAT
1183 TIME
1184 DSYMUTIL
1185 XATTR
1186 CODESIGN
1187 PKG_CONFIG
1188 CC
1189 CFLAGS
1190 LDFLAGS
1191 LIBS
1192 CPPFLAGS
1193 CXX
1194 CXXFLAGS
1195 CCC
1196 CPP
1197 CXXCPP
1198 AS
1199 AR
1200 OBJC
1201 OBJCFLAGS
1202 LIPO
1203 STRIP
1204 NM
1205 GNM
1206 MCS
1207 OBJCOPY
1208 OBJDUMP
1209 BUILD_CC
1210 BUILD_CXX
1211 BUILD_LD
1212 JTREGEXE
1213 XMKMF
1214 FREETYPE_CFLAGS
1215 FREETYPE_LIBS
1216 ALSA_CFLAGS
1217 ALSA_LIBS
1218 LIBFFI_CFLAGS
1219 LIBFFI_LIBS
1220 CCACHE'
1221 
1222 
1223 # Initialize some variables set by options.
1224 ac_init_help=
1225 ac_init_version=false
1226 ac_unrecognized_opts=
1227 ac_unrecognized_sep=
1228 # The variables have the same names as the options, with
1229 # dashes changed to underlines.
1230 cache_file=/dev/null
1231 exec_prefix=NONE
1232 no_create=
1233 no_recursion=
1234 prefix=NONE
1235 program_prefix=NONE
1236 program_suffix=NONE
1237 program_transform_name=s,x,x,
1238 silent=
1239 site=
1240 srcdir=
1241 verbose=
1242 x_includes=NONE
1243 x_libraries=NONE
1244 
1245 # Installation directory options.
1246 # These are left unexpanded so users can "make install exec_prefix=/foo"
1247 # and all the variables that are supposed to be based on exec_prefix
1248 # by default will actually change.
1249 # Use braces instead of parens because sh, perl, etc. also accept them.
1250 # (The list follows the same order as the GNU Coding Standards.)
1251 bindir='${exec_prefix}/bin'
1252 sbindir='${exec_prefix}/sbin'
1253 libexecdir='${exec_prefix}/libexec'
1254 datarootdir='${prefix}/share'
1255 datadir='${datarootdir}'
1256 sysconfdir='${prefix}/etc'
1257 sharedstatedir='${prefix}/com'
1258 localstatedir='${prefix}/var'
1259 runstatedir='${localstatedir}/run'
1260 includedir='${prefix}/include'
1261 oldincludedir='/usr/include'
1262 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1263 infodir='${datarootdir}/info'
1264 htmldir='${docdir}'
1265 dvidir='${docdir}'
1266 pdfdir='${docdir}'
1267 psdir='${docdir}'
1268 libdir='${exec_prefix}/lib'
1269 localedir='${datarootdir}/locale'
1270 mandir='${datarootdir}/man'
1271 
1272 ac_prev=
1273 ac_dashdash=
1274 for ac_option
1275 do
1276   # If the previous option needs an argument, assign it.
1277   if test -n "$ac_prev"; then
1278     eval $ac_prev=\$ac_option
1279     ac_prev=
1280     continue
1281   fi
1282 
1283   case $ac_option in
1284   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1285   *=)   ac_optarg= ;;
1286   *)    ac_optarg=yes ;;
1287   esac
1288 
1289   # Accept the important Cygnus configure options, so we can diagnose typos.
1290 
1291   case $ac_dashdash$ac_option in
1292   --)
1293     ac_dashdash=yes ;;
1294 
1295   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1296     ac_prev=bindir ;;
1297   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1298     bindir=$ac_optarg ;;
1299 
1300   -build | --build | --buil | --bui | --bu)
1301     ac_prev=build_alias ;;
1302   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1303     build_alias=$ac_optarg ;;
1304 
1305   -cache-file | --cache-file | --cache-fil | --cache-fi \
1306   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1307     ac_prev=cache_file ;;
1308   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1309   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1310     cache_file=$ac_optarg ;;
1311 
1312   --config-cache | -C)
1313     cache_file=config.cache ;;
1314 
1315   -datadir | --datadir | --datadi | --datad)
1316     ac_prev=datadir ;;
1317   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1318     datadir=$ac_optarg ;;
1319 
1320   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1321   | --dataroo | --dataro | --datar)
1322     ac_prev=datarootdir ;;
1323   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1324   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1325     datarootdir=$ac_optarg ;;
1326 
1327   -disable-* | --disable-*)
1328     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1329     # Reject names that are not valid shell variable names.
1330     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331       as_fn_error $? "invalid feature name: $ac_useropt"
1332     ac_useropt_orig=$ac_useropt
1333     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334     case $ac_user_opts in
1335       *"
1336 "enable_$ac_useropt"
1337 "*) ;;
1338       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1339          ac_unrecognized_sep=', ';;
1340     esac
1341     eval enable_$ac_useropt=no ;;
1342 
1343   -docdir | --docdir | --docdi | --doc | --do)
1344     ac_prev=docdir ;;
1345   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1346     docdir=$ac_optarg ;;
1347 
1348   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1349     ac_prev=dvidir ;;
1350   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1351     dvidir=$ac_optarg ;;
1352 
1353   -enable-* | --enable-*)
1354     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1355     # Reject names that are not valid shell variable names.
1356     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1357       as_fn_error $? "invalid feature name: $ac_useropt"
1358     ac_useropt_orig=$ac_useropt
1359     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1360     case $ac_user_opts in
1361       *"
1362 "enable_$ac_useropt"
1363 "*) ;;
1364       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1365          ac_unrecognized_sep=', ';;
1366     esac
1367     eval enable_$ac_useropt=\$ac_optarg ;;
1368 
1369   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1370   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1371   | --exec | --exe | --ex)
1372     ac_prev=exec_prefix ;;
1373   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1374   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1375   | --exec=* | --exe=* | --ex=*)
1376     exec_prefix=$ac_optarg ;;
1377 
1378   -gas | --gas | --ga | --g)
1379     # Obsolete; use --with-gas.
1380     with_gas=yes ;;
1381 
1382   -help | --help | --hel | --he | -h)
1383     ac_init_help=long ;;
1384   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1385     ac_init_help=recursive ;;
1386   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1387     ac_init_help=short ;;
1388 
1389   -host | --host | --hos | --ho)
1390     ac_prev=host_alias ;;
1391   -host=* | --host=* | --hos=* | --ho=*)
1392     host_alias=$ac_optarg ;;
1393 
1394   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1395     ac_prev=htmldir ;;
1396   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1397   | --ht=*)
1398     htmldir=$ac_optarg ;;
1399 
1400   -includedir | --includedir | --includedi | --included | --include \
1401   | --includ | --inclu | --incl | --inc)
1402     ac_prev=includedir ;;
1403   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1404   | --includ=* | --inclu=* | --incl=* | --inc=*)
1405     includedir=$ac_optarg ;;
1406 
1407   -infodir | --infodir | --infodi | --infod | --info | --inf)
1408     ac_prev=infodir ;;
1409   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1410     infodir=$ac_optarg ;;
1411 
1412   -libdir | --libdir | --libdi | --libd)
1413     ac_prev=libdir ;;
1414   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1415     libdir=$ac_optarg ;;
1416 
1417   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1418   | --libexe | --libex | --libe)
1419     ac_prev=libexecdir ;;
1420   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1421   | --libexe=* | --libex=* | --libe=*)
1422     libexecdir=$ac_optarg ;;
1423 
1424   -localedir | --localedir | --localedi | --localed | --locale)
1425     ac_prev=localedir ;;
1426   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1427     localedir=$ac_optarg ;;
1428 
1429   -localstatedir | --localstatedir | --localstatedi | --localstated \
1430   | --localstate | --localstat | --localsta | --localst | --locals)
1431     ac_prev=localstatedir ;;
1432   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1433   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1434     localstatedir=$ac_optarg ;;
1435 
1436   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1437     ac_prev=mandir ;;
1438   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1439     mandir=$ac_optarg ;;
1440 
1441   -nfp | --nfp | --nf)
1442     # Obsolete; use --without-fp.
1443     with_fp=no ;;
1444 
1445   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1446   | --no-cr | --no-c | -n)
1447     no_create=yes ;;
1448 
1449   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1450   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1451     no_recursion=yes ;;
1452 
1453   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1454   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1455   | --oldin | --oldi | --old | --ol | --o)
1456     ac_prev=oldincludedir ;;
1457   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1458   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1459   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1460     oldincludedir=$ac_optarg ;;
1461 
1462   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1463     ac_prev=prefix ;;
1464   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1465     prefix=$ac_optarg ;;
1466 
1467   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1468   | --program-pre | --program-pr | --program-p)
1469     ac_prev=program_prefix ;;
1470   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1471   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1472     program_prefix=$ac_optarg ;;
1473 
1474   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1475   | --program-suf | --program-su | --program-s)
1476     ac_prev=program_suffix ;;
1477   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1478   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1479     program_suffix=$ac_optarg ;;
1480 
1481   -program-transform-name | --program-transform-name \
1482   | --program-transform-nam | --program-transform-na \
1483   | --program-transform-n | --program-transform- \
1484   | --program-transform | --program-transfor \
1485   | --program-transfo | --program-transf \
1486   | --program-trans | --program-tran \
1487   | --progr-tra | --program-tr | --program-t)
1488     ac_prev=program_transform_name ;;
1489   -program-transform-name=* | --program-transform-name=* \
1490   | --program-transform-nam=* | --program-transform-na=* \
1491   | --program-transform-n=* | --program-transform-=* \
1492   | --program-transform=* | --program-transfor=* \
1493   | --program-transfo=* | --program-transf=* \
1494   | --program-trans=* | --program-tran=* \
1495   | --progr-tra=* | --program-tr=* | --program-t=*)
1496     program_transform_name=$ac_optarg ;;
1497 
1498   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1499     ac_prev=pdfdir ;;
1500   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1501     pdfdir=$ac_optarg ;;
1502 
1503   -psdir | --psdir | --psdi | --psd | --ps)
1504     ac_prev=psdir ;;
1505   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1506     psdir=$ac_optarg ;;
1507 
1508   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1509   | -silent | --silent | --silen | --sile | --sil)
1510     silent=yes ;;
1511 
1512   -runstatedir | --runstatedir | --runstatedi | --runstated \
1513   | --runstate | --runstat | --runsta | --runst | --runs \
1514   | --run | --ru | --r)
1515     ac_prev=runstatedir ;;
1516   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1517   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1518   | --run=* | --ru=* | --r=*)
1519     runstatedir=$ac_optarg ;;
1520 
1521   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1522     ac_prev=sbindir ;;
1523   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1524   | --sbi=* | --sb=*)
1525     sbindir=$ac_optarg ;;
1526 
1527   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1528   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1529   | --sharedst | --shareds | --shared | --share | --shar \
1530   | --sha | --sh)
1531     ac_prev=sharedstatedir ;;
1532   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1533   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1534   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1535   | --sha=* | --sh=*)
1536     sharedstatedir=$ac_optarg ;;
1537 
1538   -site | --site | --sit)
1539     ac_prev=site ;;
1540   -site=* | --site=* | --sit=*)
1541     site=$ac_optarg ;;
1542 
1543   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1544     ac_prev=srcdir ;;
1545   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1546     srcdir=$ac_optarg ;;
1547 
1548   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1549   | --syscon | --sysco | --sysc | --sys | --sy)
1550     ac_prev=sysconfdir ;;
1551   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1552   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1553     sysconfdir=$ac_optarg ;;
1554 
1555   -target | --target | --targe | --targ | --tar | --ta | --t)
1556     ac_prev=target_alias ;;
1557   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1558     target_alias=$ac_optarg ;;
1559 
1560   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1561     verbose=yes ;;
1562 
1563   -version | --version | --versio | --versi | --vers | -V)
1564     ac_init_version=: ;;
1565 
1566   -with-* | --with-*)
1567     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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--with-$ac_useropt_orig"
1578          ac_unrecognized_sep=', ';;
1579     esac
1580     eval with_$ac_useropt=\$ac_optarg ;;
1581 
1582   -without-* | --without-*)
1583     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1584     # Reject names that are not valid shell variable names.
1585     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1586       as_fn_error $? "invalid package name: $ac_useropt"
1587     ac_useropt_orig=$ac_useropt
1588     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1589     case $ac_user_opts in
1590       *"
1591 "with_$ac_useropt"
1592 "*) ;;
1593       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1594          ac_unrecognized_sep=', ';;
1595     esac
1596     eval with_$ac_useropt=no ;;
1597 
1598   --x)
1599     # Obsolete; use --with-x.
1600     with_x=yes ;;
1601 
1602   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1603   | --x-incl | --x-inc | --x-in | --x-i)
1604     ac_prev=x_includes ;;
1605   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1606   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1607     x_includes=$ac_optarg ;;
1608 
1609   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1610   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1611     ac_prev=x_libraries ;;
1612   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1613   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1614     x_libraries=$ac_optarg ;;
1615 
1616   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1617 Try \`$0 --help' for more information"
1618     ;;
1619 
1620   *=*)
1621     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1622     # Reject names that are not valid shell variable names.
1623     case $ac_envvar in #(
1624       '' | [0-9]* | *[!_$as_cr_alnum]* )
1625       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1626     esac
1627     eval $ac_envvar=\$ac_optarg
1628     export $ac_envvar ;;
1629 
1630   *)
1631     # FIXME: should be removed in autoconf 3.0.
1632     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1633     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1634       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1635     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1636     ;;
1637 
1638   esac
1639 done
1640 
1641 if test -n "$ac_prev"; then
1642   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1643   as_fn_error $? "missing argument to $ac_option"
1644 fi
1645 
1646 if test -n "$ac_unrecognized_opts"; then
1647   case $enable_option_checking in
1648     no) ;;
1649     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1650     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1651   esac
1652 fi
1653 
1654 # Check all directory arguments for consistency.
1655 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1656                 datadir sysconfdir sharedstatedir localstatedir includedir \
1657                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1658                 libdir localedir mandir runstatedir
1659 do
1660   eval ac_val=\$$ac_var
1661   # Remove trailing slashes.
1662   case $ac_val in
1663     */ )
1664       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1665       eval $ac_var=\$ac_val;;
1666   esac
1667   # Be sure to have absolute directory names.
1668   case $ac_val in
1669     [\\/$]* | ?:[\\/]* )  continue;;
1670     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1671   esac
1672   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1673 done
1674 
1675 # There might be people who depend on the old broken behavior: `$host'
1676 # used to hold the argument of --host etc.
1677 # FIXME: To remove some day.
1678 build=$build_alias
1679 host=$host_alias
1680 target=$target_alias
1681 
1682 # FIXME: To remove some day.
1683 if test "x$host_alias" != x; then
1684   if test "x$build_alias" = x; then
1685     cross_compiling=maybe
1686   elif test "x$build_alias" != "x$host_alias"; then
1687     cross_compiling=yes
1688   fi
1689 fi
1690 
1691 ac_tool_prefix=
1692 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1693 
1694 test "$silent" = yes && exec 6>/dev/null
1695 
1696 
1697 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1698 ac_ls_di=`ls -di .` &&
1699 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1700   as_fn_error $? "working directory cannot be determined"
1701 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1702   as_fn_error $? "pwd does not report name of working directory"
1703 
1704 
1705 # Find the source files, if location was not specified.
1706 if test -z "$srcdir"; then
1707   ac_srcdir_defaulted=yes
1708   # Try the directory containing this script, then the parent directory.
1709   ac_confdir=`$as_dirname -- "$as_myself" ||
1710 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1711          X"$as_myself" : 'X\(//\)[^/]' \| \
1712          X"$as_myself" : 'X\(//\)$' \| \
1713          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1714 $as_echo X"$as_myself" |
1715     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1716             s//\1/
1717             q
1718           }
1719           /^X\(\/\/\)[^/].*/{
1720             s//\1/
1721             q
1722           }
1723           /^X\(\/\/\)$/{
1724             s//\1/
1725             q
1726           }
1727           /^X\(\/\).*/{
1728             s//\1/
1729             q
1730           }
1731           s/.*/./; q'`
1732   srcdir=$ac_confdir
1733   if test ! -r "$srcdir/$ac_unique_file"; then
1734     srcdir=..
1735   fi
1736 else
1737   ac_srcdir_defaulted=no
1738 fi
1739 if test ! -r "$srcdir/$ac_unique_file"; then
1740   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1741   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1742 fi
1743 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1744 ac_abs_confdir=`(
1745         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1746         pwd)`
1747 # When building in place, set srcdir=.
1748 if test "$ac_abs_confdir" = "$ac_pwd"; then
1749   srcdir=.
1750 fi
1751 # Remove unnecessary trailing slashes from srcdir.
1752 # Double slashes in file names in object file debugging info
1753 # mess up M-x gdb in Emacs.
1754 case $srcdir in
1755 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1756 esac
1757 for ac_var in $ac_precious_vars; do
1758   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1759   eval ac_env_${ac_var}_value=\$${ac_var}
1760   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1761   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1762 done
1763 
1764 #
1765 # Report the --help message.
1766 #
1767 if test "$ac_init_help" = "long"; then
1768   # Omit some internal or obsolete options to make the list less imposing.
1769   # This message is too long to be a string in the A/UX 3.1 sh.
1770   cat <<_ACEOF
1771 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1772 
1773 Usage: $0 [OPTION]... [VAR=VALUE]...
1774 
1775 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1776 VAR=VALUE.  See below for descriptions of some of the useful variables.
1777 
1778 Defaults for the options are specified in brackets.
1779 
1780 Configuration:
1781   -h, --help              display this help and exit
1782       --help=short        display options specific to this package
1783       --help=recursive    display the short help of all the included packages
1784   -V, --version           display version information and exit
1785   -q, --quiet, --silent   do not print \`checking ...' messages
1786       --cache-file=FILE   cache test results in FILE [disabled]
1787   -C, --config-cache      alias for \`--cache-file=config.cache'
1788   -n, --no-create         do not create output files
1789       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1790 
1791 Installation directories:
1792   --prefix=PREFIX         install architecture-independent files in PREFIX
1793                           [$ac_default_prefix]
1794   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1795                           [PREFIX]
1796 
1797 By default, \`make install' will install all the files in
1798 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1799 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1800 for instance \`--prefix=\$HOME'.
1801 
1802 For better control, use the options below.
1803 
1804 Fine tuning of the installation directories:
1805   --bindir=DIR            user executables [EPREFIX/bin]
1806   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1807   --libexecdir=DIR        program executables [EPREFIX/libexec]
1808   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1809   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1810   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1811   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1812   --libdir=DIR            object code libraries [EPREFIX/lib]
1813   --includedir=DIR        C header files [PREFIX/include]
1814   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1815   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1816   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1817   --infodir=DIR           info documentation [DATAROOTDIR/info]
1818   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1819   --mandir=DIR            man documentation [DATAROOTDIR/man]
1820   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1821   --htmldir=DIR           html documentation [DOCDIR]
1822   --dvidir=DIR            dvi documentation [DOCDIR]
1823   --pdfdir=DIR            pdf documentation [DOCDIR]
1824   --psdir=DIR             ps documentation [DOCDIR]
1825 _ACEOF
1826 
1827   cat <<\_ACEOF
1828 
1829 X features:
1830   --x-includes=DIR    X include files are in DIR
1831   --x-libraries=DIR   X library files are in DIR
1832 
1833 System types:
1834   --build=BUILD     configure for building on BUILD [guessed]
1835   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1836   --target=TARGET   configure for building compilers for TARGET [HOST]
1837 _ACEOF
1838 fi
1839 
1840 if test -n "$ac_init_help"; then
1841   case $ac_init_help in
1842      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1843    esac
1844   cat <<\_ACEOF
1845 
1846 Optional Features:
1847   --disable-option-checking  ignore unrecognized --enable/--with options
1848   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1849   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1850   --enable-openjdk-only   suppress building custom source even if present
1851                           [disabled]
1852   --enable-debug          set the debug level to fastdebug (shorthand for
1853                           --with-debug-level=fastdebug) [disabled]
1854   --disable-headful       disable building headful support (graphical UI
1855                           support) [enabled]
1856   --enable-hotspot-test-in-build
1857                           run the Queens test after Hotspot build [disabled]
1858   --enable-unlimited-crypto
1859                           Enable unlimited crypto policy [disabled]
1860   --disable-jfr           Disable Java Flight Recorder support [enabled]
1861   --disable-debug-symbols disable generation of debug symbols [enabled]
1862   --disable-zip-debug-info
1863                           disable zipping of debug-info files [enabled]
1864   --enable-macosx-runtime-support
1865                           Deprecated. Option is kept for backwards
1866                           compatibility and is ignored
1867   --disable-freetype-bundling
1868                           disable bundling of the freetype library with the
1869                           build result [enabled on Windows or when using
1870                           --with-freetype, disabled otherwise]
1871   --enable-sjavac         use sjavac to do fast incremental compiles
1872                           [disabled]
1873   --disable-precompiled-headers
1874                           disable using precompiled headers when compiling C++
1875                           [enabled]
1876   --enable-ccache         enable using ccache to speed up recompilations
1877                           [disabled]
1878 
1879 Optional Packages:
1880   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1881   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1882   --with-custom-make-dir  use this directory for custom build/make files
1883   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1884                           support it), e.g. --with-target-bits=32 [guessed]
1885   --with-jdk-variant      JDK variant to build (normal) [normal]
1886   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1887   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1888                           client, minimal1, kernel, zero, zeroshark, core)
1889                           [server]
1890   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1891                           [release]
1892   --with-devkit           use this devkit for compilers, tools and resources
1893   --with-sys-root         alias for --with-sysroot for backwards compatability
1894   --with-sysroot          use this directory as sysroot)
1895   --with-tools-dir        alias for --with-toolchain-path for backwards
1896                           compatibility
1897   --with-toolchain-path   prepend these directories when searching for
1898                           toolchain binaries (compilers etc)
1899   --with-extra-path       prepend these directories to the default path
1900   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1901                           10.9 and later)
1902   --with-conf-name        use this as the name of the configuration [generated
1903                           from important configuration options]
1904   --with-builddeps-conf   use this configuration file for the builddeps
1905   --with-builddeps-server download and use build dependencies from this server
1906                           url
1907   --with-builddeps-dir    store downloaded build dependencies here
1908                           [/localhome/builddeps]
1909   --with-builddeps-group  chgrp the downloaded build dependencies to this
1910                           group
1911   --with-cacerts-file     specify alternative cacerts file
1912   --with-milestone        Set milestone value for build [internal]
1913   --with-update-version   Set update version value for build [b00]
1914   --with-user-release-suffix
1915                           Add a custom string to the version string if build
1916                           number isn't set.[username_builddateb00]
1917   --with-build-number     Set build number value for build [b00]
1918   --with-vendor-name      Set vendor name. Among others, used to set the
1919                           'java.vendor' and 'java.vm.vendor' system
1920                           properties. [not specified]
1921   --with-vendor-url       Set the 'java.vendor.url' system property [not
1922                           specified]
1923   --with-vendor-bug-url   Set the 'java.vendor.url.bug' system property [not
1924                           specified]
1925   --with-vendor-vm-bug-url
1926                           Sets the bug URL which will be displayed when the VM
1927                           crashes [not specified]
1928   --with-copyright-year   Set copyright year value for build [current year]
1929   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1930   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1931                           invocations of the Boot JDK, overriding the default
1932                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1933                           -enableassertions"
1934   --with-add-source-root  for each and every source directory, look in this
1935                           additional source root for the same directory; if it
1936                           exists and have files in it, include it in the build
1937   --with-override-source-root
1938                           for each and every source directory, look in this
1939                           override source root for the same directory; if it
1940                           exists, use that directory instead and ignore the
1941                           directory in the original source root
1942   --with-adds-and-overrides
1943                           use the subdirs 'adds' and 'overrides' in the
1944                           specified directory as add-source-root and
1945                           override-source-root
1946   --with-override-langtools
1947                           use this langtools dir for the build
1948   --with-override-corba   use this corba dir for the build
1949   --with-override-jaxp    use this jaxp dir for the build
1950   --with-override-jaxws   use this jaxws dir for the build
1951   --with-override-hotspot use this hotspot dir for the build
1952   --with-override-nashorn use this nashorn dir for the build
1953   --with-override-jdk     use this jdk dir for the build
1954   --with-import-hotspot   import hotspot binaries from this jdk image or
1955                           hotspot build dist dir instead of building from
1956                           source
1957   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1958                           to show possible values [platform dependent]
1959   --with-toolchain-version
1960                           the version of the toolchain to look for, use
1961                           '--help' to show possible values [platform
1962                           dependent]
1963   --with-jtreg            Regression Test Harness [probed]
1964   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1965   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1966   --with-extra-ldflags    extra flags to be used when linking jdk
1967   --with-extra-asflags    extra flags to be passed to the assembler
1968   --with-native-debug-symbols
1969                           set the native debug symbol configuration (none,
1970                           internal, external, zipped) [varying]
1971   --with-x                use the X Window System
1972   --with-cups             specify prefix directory for the cups package
1973                           (expecting the headers under PATH/include)
1974   --with-cups-include     specify directory for the cups include files
1975   --with-freetype         specify prefix directory for the freetype package
1976                           (expecting the libraries under PATH/lib and the
1977                           headers under PATH/include)
1978   --with-freetype-include specify directory for the freetype include files
1979   --with-freetype-lib     specify directory for the freetype library
1980   --with-freetype-src     specify directory with freetype sources to
1981                           automatically build the library (experimental,
1982                           Windows-only)
1983   --with-alsa             specify prefix directory for the alsa package
1984                           (expecting the libraries under PATH/lib and the
1985                           headers under PATH/include)
1986   --with-alsa-include     specify directory for the alsa include files
1987   --with-alsa-lib         specify directory for the alsa library
1988   --with-fontconfig       specify prefix directory for the fontconfig package
1989                           (expecting the headers under PATH/include)
1990   --with-fontconfig-include
1991                           specify directory for the fontconfig include files
1992   --with-giflib           use giflib from build system or OpenJDK source
1993                           (system, bundled) [bundled]
1994   --with-zlib             use zlib from build system or OpenJDK source
1995                           (system, bundled) [bundled]
1996   --with-stdc++lib=<static>,<dynamic>,<default>
1997                           force linking of the C++ runtime on Linux to either
1998                           static or dynamic, default is static with dynamic as
1999                           fallback
2000   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2001                           (Windows only) [probed]
2002   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2003                           (Windows only) [probed]
2004   --with-ucrt-dll-dir     path to Microsoft Windows Kit UCRT DLL dir (Windows
2005                           only) [probed]
2006   --with-dxsdk            Deprecated. Option is kept for backwards
2007                           compatibility and is ignored
2008   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2009                           compatibility and is ignored
2010   --with-dxsdk-include    Deprecated. Option is kept for backwards
2011                           compatibility and is ignored
2012   --with-num-cores        number of cores in the build system, e.g.
2013                           --with-num-cores=8 [probed]
2014   --with-memory-size      memory (in MB) available in the build system, e.g.
2015                           --with-memory-size=1024 [probed]
2016   --with-jobs             number of parallel jobs to let make run [calculated
2017                           based on cores and memory]
2018   --with-sjavac-server-java
2019                           use this java binary for running the sjavac
2020                           background server [Boot JDK java]
2021   --with-ccache-dir       where to store ccache files [~/.ccache]
2022 
2023 Some influential environment variables:
2024   BASENAME    Override default value for BASENAME
2025   BASH        Override default value for BASH
2026   CAT         Override default value for CAT
2027   CHMOD       Override default value for CHMOD
2028   CMP         Override default value for CMP
2029   COMM        Override default value for COMM
2030   CP          Override default value for CP
2031   CUT         Override default value for CUT
2032   DATE        Override default value for DATE
2033   DIFF        Override default value for DIFF
2034   DIRNAME     Override default value for DIRNAME
2035   ECHO        Override default value for ECHO
2036   EXPR        Override default value for EXPR
2037   FILE        Override default value for FILE
2038   FIND        Override default value for FIND
2039   HEAD        Override default value for HEAD
2040   LN          Override default value for LN
2041   LS          Override default value for LS
2042   MKDIR       Override default value for MKDIR
2043   MKTEMP      Override default value for MKTEMP
2044   MV          Override default value for MV
2045   NAWK        Override default value for NAWK
2046   PRINTF      Override default value for PRINTF
2047   RM          Override default value for RM
2048   SH          Override default value for SH
2049   SORT        Override default value for SORT
2050   TAIL        Override default value for TAIL
2051   TAR         Override default value for TAR
2052   TEE         Override default value for TEE
2053   TOUCH       Override default value for TOUCH
2054   TR          Override default value for TR
2055   UNAME       Override default value for UNAME
2056   UNIQ        Override default value for UNIQ
2057   WC          Override default value for WC
2058   WHICH       Override default value for WHICH
2059   XARGS       Override default value for XARGS
2060   AWK         Override default value for AWK
2061   GREP        Override default value for GREP
2062   EGREP       Override default value for EGREP
2063   FGREP       Override default value for FGREP
2064   SED         Override default value for SED
2065   CYGPATH     Override default value for CYGPATH
2066   READLINK    Override default value for READLINK
2067   DF          Override default value for DF
2068   SETFILE     Override default value for SETFILE
2069   CPIO        Override default value for CPIO
2070   UNZIP       Override default value for UNZIP
2071   ZIP         Override default value for ZIP
2072   LDD         Override default value for LDD
2073   READELF     Override default value for READELF
2074   HG          Override default value for HG
2075   STAT        Override default value for STAT
2076   TIME        Override default value for TIME
2077   DSYMUTIL    Override default value for DSYMUTIL
2078   XATTR       Override default value for XATTR
2079   CODESIGN    Override default value for CODESIGN
2080   PKG_CONFIG  path to pkg-config utility
2081   CC          C compiler command
2082   CFLAGS      C compiler flags
2083   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2084               nonstandard directory <lib dir>
2085   LIBS        libraries to pass to the linker, e.g. -l<library>
2086   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2087               you have headers in a nonstandard directory <include dir>
2088   CXX         C++ compiler command
2089   CXXFLAGS    C++ compiler flags
2090   CPP         C preprocessor
2091   CXXCPP      C++ preprocessor
2092   AS          Override default value for AS
2093   AR          Override default value for AR
2094   OBJC        Objective C compiler command
2095   OBJCFLAGS   Objective C compiler flags
2096   LIPO        Override default value for LIPO
2097   STRIP       Override default value for STRIP
2098   NM          Override default value for NM
2099   GNM         Override default value for GNM
2100   MCS         Override default value for MCS
2101   OBJCOPY     Override default value for OBJCOPY
2102   OBJDUMP     Override default value for OBJDUMP
2103   BUILD_CC    Override default value for BUILD_CC
2104   BUILD_CXX   Override default value for BUILD_CXX
2105   BUILD_LD    Override default value for BUILD_LD
2106   JTREGEXE    Override default value for JTREGEXE
2107   XMKMF       Path to xmkmf, Makefile generator for X Window System
2108   FREETYPE_CFLAGS
2109               C compiler flags for FREETYPE, overriding pkg-config
2110   FREETYPE_LIBS
2111               linker flags for FREETYPE, overriding pkg-config
2112   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2113   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2114   LIBFFI_CFLAGS
2115               C compiler flags for LIBFFI, overriding pkg-config
2116   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2117   CCACHE      Override default value for CCACHE
2118 
2119 Use these variables to override the choices made by `configure' or to help
2120 it to find libraries and programs with nonstandard names/locations.
2121 
2122 Report bugs to <build-dev@openjdk.java.net>.
2123 OpenJDK home page: <http://openjdk.java.net>.
2124 _ACEOF
2125 ac_status=$?
2126 fi
2127 
2128 if test "$ac_init_help" = "recursive"; then
2129   # If there are subdirs, report their specific --help.
2130   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2131     test -d "$ac_dir" ||
2132       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2133       continue
2134     ac_builddir=.
2135 
2136 case "$ac_dir" in
2137 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2138 *)
2139   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2140   # A ".." for each directory in $ac_dir_suffix.
2141   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2142   case $ac_top_builddir_sub in
2143   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2144   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2145   esac ;;
2146 esac
2147 ac_abs_top_builddir=$ac_pwd
2148 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2149 # for backward compatibility:
2150 ac_top_builddir=$ac_top_build_prefix
2151 
2152 case $srcdir in
2153   .)  # We are building in place.
2154     ac_srcdir=.
2155     ac_top_srcdir=$ac_top_builddir_sub
2156     ac_abs_top_srcdir=$ac_pwd ;;
2157   [\\/]* | ?:[\\/]* )  # Absolute name.
2158     ac_srcdir=$srcdir$ac_dir_suffix;
2159     ac_top_srcdir=$srcdir
2160     ac_abs_top_srcdir=$srcdir ;;
2161   *) # Relative name.
2162     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2163     ac_top_srcdir=$ac_top_build_prefix$srcdir
2164     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2165 esac
2166 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2167 
2168     cd "$ac_dir" || { ac_status=$?; continue; }
2169     # Check for guested configure.
2170     if test -f "$ac_srcdir/configure.gnu"; then
2171       echo &&
2172       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2173     elif test -f "$ac_srcdir/configure"; then
2174       echo &&
2175       $SHELL "$ac_srcdir/configure" --help=recursive
2176     else
2177       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2178     fi || ac_status=$?
2179     cd "$ac_pwd" || { ac_status=$?; break; }
2180   done
2181 fi
2182 
2183 test -n "$ac_init_help" && exit $ac_status
2184 if $ac_init_version; then
2185   cat <<\_ACEOF
2186 OpenJDK configure jdk8
2187 generated by GNU Autoconf 2.69
2188 
2189 Copyright (C) 2012 Free Software Foundation, Inc.
2190 This configure script is free software; the Free Software Foundation
2191 gives unlimited permission to copy, distribute and modify it.
2192 _ACEOF
2193   exit
2194 fi
2195 
2196 ## ------------------------ ##
2197 ## Autoconf initialization. ##
2198 ## ------------------------ ##
2199 
2200 # ac_fn_c_try_compile LINENO
2201 # --------------------------
2202 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2203 ac_fn_c_try_compile ()
2204 {
2205   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206   rm -f conftest.$ac_objext
2207   if { { ac_try="$ac_compile"
2208 case "(($ac_try" in
2209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210   *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213 $as_echo "$ac_try_echo"; } >&5
2214   (eval "$ac_compile") 2>conftest.err
2215   ac_status=$?
2216   if test -s conftest.err; then
2217     grep -v '^ *+' conftest.err >conftest.er1
2218     cat conftest.er1 >&5
2219     mv -f conftest.er1 conftest.err
2220   fi
2221   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2222   test $ac_status = 0; } && {
2223          test -z "$ac_c_werror_flag" ||
2224          test ! -s conftest.err
2225        } && test -s conftest.$ac_objext; then :
2226   ac_retval=0
2227 else
2228   $as_echo "$as_me: failed program was:" >&5
2229 sed 's/^/| /' conftest.$ac_ext >&5
2230 
2231         ac_retval=1
2232 fi
2233   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2234   as_fn_set_status $ac_retval
2235 
2236 } # ac_fn_c_try_compile
2237 
2238 # ac_fn_cxx_try_compile LINENO
2239 # ----------------------------
2240 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2241 ac_fn_cxx_try_compile ()
2242 {
2243   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244   rm -f conftest.$ac_objext
2245   if { { ac_try="$ac_compile"
2246 case "(($ac_try" in
2247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2248   *) ac_try_echo=$ac_try;;
2249 esac
2250 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2251 $as_echo "$ac_try_echo"; } >&5
2252   (eval "$ac_compile") 2>conftest.err
2253   ac_status=$?
2254   if test -s conftest.err; then
2255     grep -v '^ *+' conftest.err >conftest.er1
2256     cat conftest.er1 >&5
2257     mv -f conftest.er1 conftest.err
2258   fi
2259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2260   test $ac_status = 0; } && {
2261          test -z "$ac_cxx_werror_flag" ||
2262          test ! -s conftest.err
2263        } && test -s conftest.$ac_objext; then :
2264   ac_retval=0
2265 else
2266   $as_echo "$as_me: failed program was:" >&5
2267 sed 's/^/| /' conftest.$ac_ext >&5
2268 
2269         ac_retval=1
2270 fi
2271   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272   as_fn_set_status $ac_retval
2273 
2274 } # ac_fn_cxx_try_compile
2275 
2276 # ac_fn_c_try_cpp LINENO
2277 # ----------------------
2278 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2279 ac_fn_c_try_cpp ()
2280 {
2281   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282   if { { ac_try="$ac_cpp conftest.$ac_ext"
2283 case "(($ac_try" in
2284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2285   *) ac_try_echo=$ac_try;;
2286 esac
2287 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2288 $as_echo "$ac_try_echo"; } >&5
2289   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2290   ac_status=$?
2291   if test -s conftest.err; then
2292     grep -v '^ *+' conftest.err >conftest.er1
2293     cat conftest.er1 >&5
2294     mv -f conftest.er1 conftest.err
2295   fi
2296   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2297   test $ac_status = 0; } > conftest.i && {
2298          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2299          test ! -s conftest.err
2300        }; then :
2301   ac_retval=0
2302 else
2303   $as_echo "$as_me: failed program was:" >&5
2304 sed 's/^/| /' conftest.$ac_ext >&5
2305 
2306     ac_retval=1
2307 fi
2308   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309   as_fn_set_status $ac_retval
2310 
2311 } # ac_fn_c_try_cpp
2312 
2313 # ac_fn_cxx_try_cpp LINENO
2314 # ------------------------
2315 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2316 ac_fn_cxx_try_cpp ()
2317 {
2318   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319   if { { ac_try="$ac_cpp conftest.$ac_ext"
2320 case "(($ac_try" in
2321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2322   *) ac_try_echo=$ac_try;;
2323 esac
2324 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2325 $as_echo "$ac_try_echo"; } >&5
2326   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2327   ac_status=$?
2328   if test -s conftest.err; then
2329     grep -v '^ *+' conftest.err >conftest.er1
2330     cat conftest.er1 >&5
2331     mv -f conftest.er1 conftest.err
2332   fi
2333   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2334   test $ac_status = 0; } > conftest.i && {
2335          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2336          test ! -s conftest.err
2337        }; then :
2338   ac_retval=0
2339 else
2340   $as_echo "$as_me: failed program was:" >&5
2341 sed 's/^/| /' conftest.$ac_ext >&5
2342 
2343     ac_retval=1
2344 fi
2345   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346   as_fn_set_status $ac_retval
2347 
2348 } # ac_fn_cxx_try_cpp
2349 
2350 # ac_fn_objc_try_compile LINENO
2351 # -----------------------------
2352 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2353 ac_fn_objc_try_compile ()
2354 {
2355   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356   rm -f conftest.$ac_objext
2357   if { { ac_try="$ac_compile"
2358 case "(($ac_try" in
2359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2360   *) ac_try_echo=$ac_try;;
2361 esac
2362 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2363 $as_echo "$ac_try_echo"; } >&5
2364   (eval "$ac_compile") 2>conftest.err
2365   ac_status=$?
2366   if test -s conftest.err; then
2367     grep -v '^ *+' conftest.err >conftest.er1
2368     cat conftest.er1 >&5
2369     mv -f conftest.er1 conftest.err
2370   fi
2371   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2372   test $ac_status = 0; } && {
2373          test -z "$ac_objc_werror_flag" ||
2374          test ! -s conftest.err
2375        } && test -s conftest.$ac_objext; then :
2376   ac_retval=0
2377 else
2378   $as_echo "$as_me: failed program was:" >&5
2379 sed 's/^/| /' conftest.$ac_ext >&5
2380 
2381         ac_retval=1
2382 fi
2383   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2384   as_fn_set_status $ac_retval
2385 
2386 } # ac_fn_objc_try_compile
2387 
2388 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2389 # ---------------------------------------------------------
2390 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2391 # the include files in INCLUDES and setting the cache variable VAR
2392 # accordingly.
2393 ac_fn_cxx_check_header_mongrel ()
2394 {
2395   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2396   if eval \${$3+:} false; then :
2397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2398 $as_echo_n "checking for $2... " >&6; }
2399 if eval \${$3+:} false; then :
2400   $as_echo_n "(cached) " >&6
2401 fi
2402 eval ac_res=\$$3
2403                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404 $as_echo "$ac_res" >&6; }
2405 else
2406   # Is the header compilable?
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2408 $as_echo_n "checking $2 usability... " >&6; }
2409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2410 /* end confdefs.h.  */
2411 $4
2412 #include <$2>
2413 _ACEOF
2414 if ac_fn_cxx_try_compile "$LINENO"; then :
2415   ac_header_compiler=yes
2416 else
2417   ac_header_compiler=no
2418 fi
2419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2421 $as_echo "$ac_header_compiler" >&6; }
2422 
2423 # Is the header present?
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2425 $as_echo_n "checking $2 presence... " >&6; }
2426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427 /* end confdefs.h.  */
2428 #include <$2>
2429 _ACEOF
2430 if ac_fn_cxx_try_cpp "$LINENO"; then :
2431   ac_header_preproc=yes
2432 else
2433   ac_header_preproc=no
2434 fi
2435 rm -f conftest.err conftest.i conftest.$ac_ext
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2437 $as_echo "$ac_header_preproc" >&6; }
2438 
2439 # So?  What about this header?
2440 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2441   yes:no: )
2442     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2443 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2444     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2445 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2446     ;;
2447   no:yes:* )
2448     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2449 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2450     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2451 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2452     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2453 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2454     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2455 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2456     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2457 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2458 ( $as_echo "## ----------------------------------------- ##
2459 ## Report this to build-dev@openjdk.java.net ##
2460 ## ----------------------------------------- ##"
2461      ) | sed "s/^/$as_me: WARNING:     /" >&2
2462     ;;
2463 esac
2464   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465 $as_echo_n "checking for $2... " >&6; }
2466 if eval \${$3+:} false; then :
2467   $as_echo_n "(cached) " >&6
2468 else
2469   eval "$3=\$ac_header_compiler"
2470 fi
2471 eval ac_res=\$$3
2472                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473 $as_echo "$ac_res" >&6; }
2474 fi
2475   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2476 
2477 } # ac_fn_cxx_check_header_mongrel
2478 
2479 # ac_fn_cxx_try_run LINENO
2480 # ------------------------
2481 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2482 # that executables *can* be run.
2483 ac_fn_cxx_try_run ()
2484 {
2485   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486   if { { ac_try="$ac_link"
2487 case "(($ac_try" in
2488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2489   *) ac_try_echo=$ac_try;;
2490 esac
2491 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2492 $as_echo "$ac_try_echo"; } >&5
2493   (eval "$ac_link") 2>&5
2494   ac_status=$?
2495   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2497   { { case "(($ac_try" in
2498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499   *) ac_try_echo=$ac_try;;
2500 esac
2501 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502 $as_echo "$ac_try_echo"; } >&5
2503   (eval "$ac_try") 2>&5
2504   ac_status=$?
2505   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506   test $ac_status = 0; }; }; then :
2507   ac_retval=0
2508 else
2509   $as_echo "$as_me: program exited with status $ac_status" >&5
2510        $as_echo "$as_me: failed program was:" >&5
2511 sed 's/^/| /' conftest.$ac_ext >&5
2512 
2513        ac_retval=$ac_status
2514 fi
2515   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2516   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517   as_fn_set_status $ac_retval
2518 
2519 } # ac_fn_cxx_try_run
2520 
2521 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2522 # ---------------------------------------------------------
2523 # Tests whether HEADER exists and can be compiled using the include files in
2524 # INCLUDES, setting the cache variable VAR accordingly.
2525 ac_fn_cxx_check_header_compile ()
2526 {
2527   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2529 $as_echo_n "checking for $2... " >&6; }
2530 if eval \${$3+:} false; then :
2531   $as_echo_n "(cached) " >&6
2532 else
2533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534 /* end confdefs.h.  */
2535 $4
2536 #include <$2>
2537 _ACEOF
2538 if ac_fn_cxx_try_compile "$LINENO"; then :
2539   eval "$3=yes"
2540 else
2541   eval "$3=no"
2542 fi
2543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2544 fi
2545 eval ac_res=\$$3
2546                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2547 $as_echo "$ac_res" >&6; }
2548   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2549 
2550 } # ac_fn_cxx_check_header_compile
2551 
2552 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2553 # ----------------------------------------------
2554 # Tries to find the compile-time value of EXPR in a program that includes
2555 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2556 # computed
2557 ac_fn_cxx_compute_int ()
2558 {
2559   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560   if test "$cross_compiling" = yes; then
2561     # Depending upon the size, compute the lo and hi bounds.
2562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2563 /* end confdefs.h.  */
2564 $4
2565 int
2566 main ()
2567 {
2568 static int test_array [1 - 2 * !(($2) >= 0)];
2569 test_array [0] = 0;
2570 return test_array [0];
2571 
2572   ;
2573   return 0;
2574 }
2575 _ACEOF
2576 if ac_fn_cxx_try_compile "$LINENO"; then :
2577   ac_lo=0 ac_mid=0
2578   while :; do
2579     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580 /* end confdefs.h.  */
2581 $4
2582 int
2583 main ()
2584 {
2585 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2586 test_array [0] = 0;
2587 return test_array [0];
2588 
2589   ;
2590   return 0;
2591 }
2592 _ACEOF
2593 if ac_fn_cxx_try_compile "$LINENO"; then :
2594   ac_hi=$ac_mid; break
2595 else
2596   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2597                         if test $ac_lo -le $ac_mid; then
2598                           ac_lo= ac_hi=
2599                           break
2600                         fi
2601                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2602 fi
2603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604   done
2605 else
2606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607 /* end confdefs.h.  */
2608 $4
2609 int
2610 main ()
2611 {
2612 static int test_array [1 - 2 * !(($2) < 0)];
2613 test_array [0] = 0;
2614 return test_array [0];
2615 
2616   ;
2617   return 0;
2618 }
2619 _ACEOF
2620 if ac_fn_cxx_try_compile "$LINENO"; then :
2621   ac_hi=-1 ac_mid=-1
2622   while :; do
2623     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624 /* end confdefs.h.  */
2625 $4
2626 int
2627 main ()
2628 {
2629 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2630 test_array [0] = 0;
2631 return test_array [0];
2632 
2633   ;
2634   return 0;
2635 }
2636 _ACEOF
2637 if ac_fn_cxx_try_compile "$LINENO"; then :
2638   ac_lo=$ac_mid; break
2639 else
2640   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2641                         if test $ac_mid -le $ac_hi; then
2642                           ac_lo= ac_hi=
2643                           break
2644                         fi
2645                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2646 fi
2647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2648   done
2649 else
2650   ac_lo= ac_hi=
2651 fi
2652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2653 fi
2654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2655 # Binary search between lo and hi bounds.
2656 while test "x$ac_lo" != "x$ac_hi"; do
2657   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2659 /* end confdefs.h.  */
2660 $4
2661 int
2662 main ()
2663 {
2664 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2665 test_array [0] = 0;
2666 return test_array [0];
2667 
2668   ;
2669   return 0;
2670 }
2671 _ACEOF
2672 if ac_fn_cxx_try_compile "$LINENO"; then :
2673   ac_hi=$ac_mid
2674 else
2675   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2676 fi
2677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2678 done
2679 case $ac_lo in #((
2680 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2681 '') ac_retval=1 ;;
2682 esac
2683   else
2684     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685 /* end confdefs.h.  */
2686 $4
2687 static long int longval () { return $2; }
2688 static unsigned long int ulongval () { return $2; }
2689 #include <stdio.h>
2690 #include <stdlib.h>
2691 int
2692 main ()
2693 {
2694 
2695   FILE *f = fopen ("conftest.val", "w");
2696   if (! f)
2697     return 1;
2698   if (($2) < 0)
2699     {
2700       long int i = longval ();
2701       if (i != ($2))
2702         return 1;
2703       fprintf (f, "%ld", i);
2704     }
2705   else
2706     {
2707       unsigned long int i = ulongval ();
2708       if (i != ($2))
2709         return 1;
2710       fprintf (f, "%lu", i);
2711     }
2712   /* Do not output a trailing newline, as this causes \r\n confusion
2713      on some platforms.  */
2714   return ferror (f) || fclose (f) != 0;
2715 
2716   ;
2717   return 0;
2718 }
2719 _ACEOF
2720 if ac_fn_cxx_try_run "$LINENO"; then :
2721   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2722 else
2723   ac_retval=1
2724 fi
2725 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2726   conftest.$ac_objext conftest.beam conftest.$ac_ext
2727 rm -f conftest.val
2728 
2729   fi
2730   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2731   as_fn_set_status $ac_retval
2732 
2733 } # ac_fn_cxx_compute_int
2734 
2735 # ac_fn_cxx_try_link LINENO
2736 # -------------------------
2737 # Try to link conftest.$ac_ext, and return whether this succeeded.
2738 ac_fn_cxx_try_link ()
2739 {
2740   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2741   rm -f conftest.$ac_objext conftest$ac_exeext
2742   if { { ac_try="$ac_link"
2743 case "(($ac_try" in
2744   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2745   *) ac_try_echo=$ac_try;;
2746 esac
2747 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2748 $as_echo "$ac_try_echo"; } >&5
2749   (eval "$ac_link") 2>conftest.err
2750   ac_status=$?
2751   if test -s conftest.err; then
2752     grep -v '^ *+' conftest.err >conftest.er1
2753     cat conftest.er1 >&5
2754     mv -f conftest.er1 conftest.err
2755   fi
2756   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2757   test $ac_status = 0; } && {
2758          test -z "$ac_cxx_werror_flag" ||
2759          test ! -s conftest.err
2760        } && test -s conftest$ac_exeext && {
2761          test "$cross_compiling" = yes ||
2762          test -x conftest$ac_exeext
2763        }; then :
2764   ac_retval=0
2765 else
2766   $as_echo "$as_me: failed program was:" >&5
2767 sed 's/^/| /' conftest.$ac_ext >&5
2768 
2769         ac_retval=1
2770 fi
2771   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2772   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2773   # interfere with the next link command; also delete a directory that is
2774   # left behind by Apple's compiler.  We do this before executing the actions.
2775   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2776   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2777   as_fn_set_status $ac_retval
2778 
2779 } # ac_fn_cxx_try_link
2780 
2781 # ac_fn_cxx_check_func LINENO FUNC VAR
2782 # ------------------------------------
2783 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2784 ac_fn_cxx_check_func ()
2785 {
2786   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2787   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2788 $as_echo_n "checking for $2... " >&6; }
2789 if eval \${$3+:} false; then :
2790   $as_echo_n "(cached) " >&6
2791 else
2792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793 /* end confdefs.h.  */
2794 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2795    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2796 #define $2 innocuous_$2
2797 
2798 /* System header to define __stub macros and hopefully few prototypes,
2799     which can conflict with char $2 (); below.
2800     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2801     <limits.h> exists even on freestanding compilers.  */
2802 
2803 #ifdef __STDC__
2804 # include <limits.h>
2805 #else
2806 # include <assert.h>
2807 #endif
2808 
2809 #undef $2
2810 
2811 /* Override any GCC internal prototype to avoid an error.
2812    Use char because int might match the return type of a GCC
2813    builtin and then its argument prototype would still apply.  */
2814 #ifdef __cplusplus
2815 extern "C"
2816 #endif
2817 char $2 ();
2818 /* The GNU C library defines this for functions which it implements
2819     to always fail with ENOSYS.  Some functions are actually named
2820     something starting with __ and the normal name is an alias.  */
2821 #if defined __stub_$2 || defined __stub___$2
2822 choke me
2823 #endif
2824 
2825 int
2826 main ()
2827 {
2828 return $2 ();
2829   ;
2830   return 0;
2831 }
2832 _ACEOF
2833 if ac_fn_cxx_try_link "$LINENO"; then :
2834   eval "$3=yes"
2835 else
2836   eval "$3=no"
2837 fi
2838 rm -f core conftest.err conftest.$ac_objext \
2839     conftest$ac_exeext conftest.$ac_ext
2840 fi
2841 eval ac_res=\$$3
2842                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2843 $as_echo "$ac_res" >&6; }
2844   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2845 
2846 } # ac_fn_cxx_check_func
2847 
2848 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2849 # -------------------------------------------------------
2850 # Tests whether HEADER exists and can be compiled using the include files in
2851 # INCLUDES, setting the cache variable VAR accordingly.
2852 ac_fn_c_check_header_compile ()
2853 {
2854   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2855   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2856 $as_echo_n "checking for $2... " >&6; }
2857 if eval \${$3+:} false; then :
2858   $as_echo_n "(cached) " >&6
2859 else
2860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861 /* end confdefs.h.  */
2862 $4
2863 #include <$2>
2864 _ACEOF
2865 if ac_fn_c_try_compile "$LINENO"; then :
2866   eval "$3=yes"
2867 else
2868   eval "$3=no"
2869 fi
2870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871 fi
2872 eval ac_res=\$$3
2873                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2874 $as_echo "$ac_res" >&6; }
2875   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2876 
2877 } # ac_fn_c_check_header_compile
2878 cat >config.log <<_ACEOF
2879 This file contains any messages produced by compilers while
2880 running configure, to aid debugging if configure makes a mistake.
2881 
2882 It was created by OpenJDK $as_me jdk8, which was
2883 generated by GNU Autoconf 2.69.  Invocation command line was
2884 
2885   $ $0 $@
2886 
2887 _ACEOF
2888 exec 5>>config.log
2889 {
2890 cat <<_ASUNAME
2891 ## --------- ##
2892 ## Platform. ##
2893 ## --------- ##
2894 
2895 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2896 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2897 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2898 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2899 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2900 
2901 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2902 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2903 
2904 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2905 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2906 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2907 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2908 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2909 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2910 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2911 
2912 _ASUNAME
2913 
2914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915 for as_dir in $PATH
2916 do
2917   IFS=$as_save_IFS
2918   test -z "$as_dir" && as_dir=.
2919     $as_echo "PATH: $as_dir"
2920   done
2921 IFS=$as_save_IFS
2922 
2923 } >&5
2924 
2925 cat >&5 <<_ACEOF
2926 
2927 
2928 ## ----------- ##
2929 ## Core tests. ##
2930 ## ----------- ##
2931 
2932 _ACEOF
2933 
2934 
2935 # Keep a trace of the command line.
2936 # Strip out --no-create and --no-recursion so they do not pile up.
2937 # Strip out --silent because we don't want to record it for future runs.
2938 # Also quote any args containing shell meta-characters.
2939 # Make two passes to allow for proper duplicate-argument suppression.
2940 ac_configure_args=
2941 ac_configure_args0=
2942 ac_configure_args1=
2943 ac_must_keep_next=false
2944 for ac_pass in 1 2
2945 do
2946   for ac_arg
2947   do
2948     case $ac_arg in
2949     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2950     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2951     | -silent | --silent | --silen | --sile | --sil)
2952       continue ;;
2953     *\'*)
2954       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2955     esac
2956     case $ac_pass in
2957     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2958     2)
2959       as_fn_append ac_configure_args1 " '$ac_arg'"
2960       if test $ac_must_keep_next = true; then
2961         ac_must_keep_next=false # Got value, back to normal.
2962       else
2963         case $ac_arg in
2964           *=* | --config-cache | -C | -disable-* | --disable-* \
2965           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2966           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2967           | -with-* | --with-* | -without-* | --without-* | --x)
2968             case "$ac_configure_args0 " in
2969               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2970             esac
2971             ;;
2972           -* ) ac_must_keep_next=true ;;
2973         esac
2974       fi
2975       as_fn_append ac_configure_args " '$ac_arg'"
2976       ;;
2977     esac
2978   done
2979 done
2980 { ac_configure_args0=; unset ac_configure_args0;}
2981 { ac_configure_args1=; unset ac_configure_args1;}
2982 
2983 # When interrupted or exit'd, cleanup temporary files, and complete
2984 # config.log.  We remove comments because anyway the quotes in there
2985 # would cause problems or look ugly.
2986 # WARNING: Use '\'' to represent an apostrophe within the trap.
2987 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2988 trap 'exit_status=$?
2989   # Save into config.log some information that might help in debugging.
2990   {
2991     echo
2992 
2993     $as_echo "## ---------------- ##
2994 ## Cache variables. ##
2995 ## ---------------- ##"
2996     echo
2997     # The following way of writing the cache mishandles newlines in values,
2998 (
2999   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3000     eval ac_val=\$$ac_var
3001     case $ac_val in #(
3002     *${as_nl}*)
3003       case $ac_var in #(
3004       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3005 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3006       esac
3007       case $ac_var in #(
3008       _ | IFS | as_nl) ;; #(
3009       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3010       *) { eval $ac_var=; unset $ac_var;} ;;
3011       esac ;;
3012     esac
3013   done
3014   (set) 2>&1 |
3015     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3016     *${as_nl}ac_space=\ *)
3017       sed -n \
3018         "s/'\''/'\''\\\\'\'''\''/g;
3019           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3020       ;; #(
3021     *)
3022       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3023       ;;
3024     esac |
3025     sort
3026 )
3027     echo
3028 
3029     $as_echo "## ----------------- ##
3030 ## Output variables. ##
3031 ## ----------------- ##"
3032     echo
3033     for ac_var in $ac_subst_vars
3034     do
3035       eval ac_val=\$$ac_var
3036       case $ac_val in
3037       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3038       esac
3039       $as_echo "$ac_var='\''$ac_val'\''"
3040     done | sort
3041     echo
3042 
3043     if test -n "$ac_subst_files"; then
3044       $as_echo "## ------------------- ##
3045 ## File substitutions. ##
3046 ## ------------------- ##"
3047       echo
3048       for ac_var in $ac_subst_files
3049       do
3050         eval ac_val=\$$ac_var
3051         case $ac_val in
3052         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3053         esac
3054         $as_echo "$ac_var='\''$ac_val'\''"
3055       done | sort
3056       echo
3057     fi
3058 
3059     if test -s confdefs.h; then
3060       $as_echo "## ----------- ##
3061 ## confdefs.h. ##
3062 ## ----------- ##"
3063       echo
3064       cat confdefs.h
3065       echo
3066     fi
3067     test "$ac_signal" != 0 &&
3068       $as_echo "$as_me: caught signal $ac_signal"
3069     $as_echo "$as_me: exit $exit_status"
3070   } >&5
3071   rm -f core *.core core.conftest.* &&
3072     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3073     exit $exit_status
3074 ' 0
3075 for ac_signal in 1 2 13 15; do
3076   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3077 done
3078 ac_signal=0
3079 
3080 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3081 rm -f -r conftest* confdefs.h
3082 
3083 $as_echo "/* confdefs.h */" > confdefs.h
3084 
3085 # Predefined preprocessor variables.
3086 
3087 cat >>confdefs.h <<_ACEOF
3088 #define PACKAGE_NAME "$PACKAGE_NAME"
3089 _ACEOF
3090 
3091 cat >>confdefs.h <<_ACEOF
3092 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3093 _ACEOF
3094 
3095 cat >>confdefs.h <<_ACEOF
3096 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3097 _ACEOF
3098 
3099 cat >>confdefs.h <<_ACEOF
3100 #define PACKAGE_STRING "$PACKAGE_STRING"
3101 _ACEOF
3102 
3103 cat >>confdefs.h <<_ACEOF
3104 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3105 _ACEOF
3106 
3107 cat >>confdefs.h <<_ACEOF
3108 #define PACKAGE_URL "$PACKAGE_URL"
3109 _ACEOF
3110 
3111 
3112 # Let the site file select an alternate cache file if it wants to.
3113 # Prefer an explicitly selected file to automatically selected ones.
3114 ac_site_file1=NONE
3115 ac_site_file2=NONE
3116 if test -n "$CONFIG_SITE"; then
3117   # We do not want a PATH search for config.site.
3118   case $CONFIG_SITE in #((
3119     -*)  ac_site_file1=./$CONFIG_SITE;;
3120     */*) ac_site_file1=$CONFIG_SITE;;
3121     *)   ac_site_file1=./$CONFIG_SITE;;
3122   esac
3123 elif test "x$prefix" != xNONE; then
3124   ac_site_file1=$prefix/share/config.site
3125   ac_site_file2=$prefix/etc/config.site
3126 else
3127   ac_site_file1=$ac_default_prefix/share/config.site
3128   ac_site_file2=$ac_default_prefix/etc/config.site
3129 fi
3130 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3131 do
3132   test "x$ac_site_file" = xNONE && continue
3133   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3134     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3135 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3136     sed 's/^/| /' "$ac_site_file" >&5
3137     . "$ac_site_file" \
3138       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 as_fn_error $? "failed to load site script $ac_site_file
3141 See \`config.log' for more details" "$LINENO" 5; }
3142   fi
3143 done
3144 
3145 if test -r "$cache_file"; then
3146   # Some versions of bash will fail to source /dev/null (special files
3147   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3148   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3149     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3150 $as_echo "$as_me: loading cache $cache_file" >&6;}
3151     case $cache_file in
3152       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3153       *)                      . "./$cache_file";;
3154     esac
3155   fi
3156 else
3157   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3158 $as_echo "$as_me: creating cache $cache_file" >&6;}
3159   >$cache_file
3160 fi
3161 
3162 # Check that the precious variables saved in the cache have kept the same
3163 # value.
3164 ac_cache_corrupted=false
3165 for ac_var in $ac_precious_vars; do
3166   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3167   eval ac_new_set=\$ac_env_${ac_var}_set
3168   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3169   eval ac_new_val=\$ac_env_${ac_var}_value
3170   case $ac_old_set,$ac_new_set in
3171     set,)
3172       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3173 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3174       ac_cache_corrupted=: ;;
3175     ,set)
3176       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3177 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3178       ac_cache_corrupted=: ;;
3179     ,);;
3180     *)
3181       if test "x$ac_old_val" != "x$ac_new_val"; then
3182         # differences in whitespace do not lead to failure.
3183         ac_old_val_w=`echo x $ac_old_val`
3184         ac_new_val_w=`echo x $ac_new_val`
3185         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3186           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3187 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3188           ac_cache_corrupted=:
3189         else
3190           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3191 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3192           eval $ac_var=\$ac_old_val
3193         fi
3194         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3195 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3196         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3197 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3198       fi;;
3199   esac
3200   # Pass precious variables to config.status.
3201   if test "$ac_new_set" = set; then
3202     case $ac_new_val in
3203     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3204     *) ac_arg=$ac_var=$ac_new_val ;;
3205     esac
3206     case " $ac_configure_args " in
3207       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3208       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3209     esac
3210   fi
3211 done
3212 if $ac_cache_corrupted; then
3213   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3214 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3215   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3216 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3217   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3218 fi
3219 ## -------------------- ##
3220 ## Main body of script. ##
3221 ## -------------------- ##
3222 
3223 ac_ext=c
3224 ac_cpp='$CPP $CPPFLAGS'
3225 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3226 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3227 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3228 
3229 
3230 
3231 ac_aux_dir=
3232 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3233   if test -f "$ac_dir/install-sh"; then
3234     ac_aux_dir=$ac_dir
3235     ac_install_sh="$ac_aux_dir/install-sh -c"
3236     break
3237   elif test -f "$ac_dir/install.sh"; then
3238     ac_aux_dir=$ac_dir
3239     ac_install_sh="$ac_aux_dir/install.sh -c"
3240     break
3241   elif test -f "$ac_dir/shtool"; then
3242     ac_aux_dir=$ac_dir
3243     ac_install_sh="$ac_aux_dir/shtool install -c"
3244     break
3245   fi
3246 done
3247 if test -z "$ac_aux_dir"; then
3248   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
3249 fi
3250 
3251 # These three variables are undocumented and unsupported,
3252 # and are intended to be withdrawn in a future Autoconf release.
3253 # They can cause serious problems if a builder's source tree is in a directory
3254 # whose full name contains unusual characters.
3255 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3256 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3257 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3258 
3259 
3260 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3261 
3262 #
3263 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3264 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3265 #
3266 # This code is free software; you can redistribute it and/or modify it
3267 # under the terms of the GNU General Public License version 2 only, as
3268 # published by the Free Software Foundation.  Oracle designates this
3269 # particular file as subject to the "Classpath" exception as provided
3270 # by Oracle in the LICENSE file that accompanied this code.
3271 #
3272 # This code is distributed in the hope that it will be useful, but WITHOUT
3273 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3274 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3275 # version 2 for more details (a copy is included in the LICENSE file that
3276 # accompanied this code).
3277 #
3278 # You should have received a copy of the GNU General Public License version
3279 # 2 along with this work; if not, write to the Free Software Foundation,
3280 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3281 #
3282 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3283 # or visit www.oracle.com if you need additional information or have any
3284 # questions.
3285 #
3286 
3287 #
3288 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3289 #
3290 # This program is free software; you can redistribute it and/or modify
3291 # it under the terms of the GNU General Public License as published by
3292 # the Free Software Foundation; either version 2 of the License, or
3293 # (at your option) any later version.
3294 #
3295 # This program is distributed in the hope that it will be useful, but
3296 # WITHOUT ANY WARRANTY; without even the implied warranty of
3297 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3298 # General Public License for more details.
3299 #
3300 # You should have received a copy of the GNU General Public License
3301 # along with this program; if not, write to the Free Software
3302 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3303 #
3304 # As a special exception to the GNU General Public License, if you
3305 # distribute this file as part of a program that contains a
3306 # configuration script generated by Autoconf, you may include it under
3307 # the same distribution terms that you use for the rest of that program.
3308 
3309 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3310 # ----------------------------------
3311 # PKG_PROG_PKG_CONFIG
3312 
3313 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3314 #
3315 # Check to see whether a particular set of modules exists.  Similar
3316 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3317 #
3318 #
3319 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3320 # this or PKG_CHECK_MODULES is called, or make sure to call
3321 # PKG_CHECK_EXISTS manually
3322 # --------------------------------------------------------------
3323 
3324 
3325 
3326 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3327 # ---------------------------------------------
3328 # _PKG_CONFIG
3329 
3330 # _PKG_SHORT_ERRORS_SUPPORTED
3331 # -----------------------------
3332 # _PKG_SHORT_ERRORS_SUPPORTED
3333 
3334 
3335 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3336 # [ACTION-IF-NOT-FOUND])
3337 #
3338 #
3339 # Note that if there is a possibility the first call to
3340 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3341 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3342 #
3343 #
3344 # --------------------------------------------------------------
3345 # PKG_CHECK_MODULES
3346 
3347 
3348 # Include these first...
3349 #
3350 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3351 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3352 #
3353 # This code is free software; you can redistribute it and/or modify it
3354 # under the terms of the GNU General Public License version 2 only, as
3355 # published by the Free Software Foundation.  Oracle designates this
3356 # particular file as subject to the "Classpath" exception as provided
3357 # by Oracle in the LICENSE file that accompanied this code.
3358 #
3359 # This code is distributed in the hope that it will be useful, but WITHOUT
3360 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3361 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3362 # version 2 for more details (a copy is included in the LICENSE file that
3363 # accompanied this code).
3364 #
3365 # You should have received a copy of the GNU General Public License version
3366 # 2 along with this work; if not, write to the Free Software Foundation,
3367 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3368 #
3369 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3370 # or visit www.oracle.com if you need additional information or have any
3371 # questions.
3372 #
3373 
3374 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3375 # If so, then append $1 to $2 \
3376 # Also set JVM_ARG_OK to true/false depending on outcome.
3377 
3378 
3379 # Appends a string to a path variable, only adding the : when needed.
3380 
3381 
3382 # Prepends a string to a path variable, only adding the : when needed.
3383 
3384 
3385 # This will make sure the given variable points to a full and proper
3386 # path. This means:
3387 # 1) There will be no spaces in the path. On posix platforms,
3388 #    spaces in the path will result in an error. On Windows,
3389 #    the path will be rewritten using short-style to be space-free.
3390 # 2) The path will be absolute, and it will be in unix-style (on
3391 #     cygwin).
3392 # $1: The name of the variable to fix
3393 
3394 
3395 # This will make sure the given variable points to a executable
3396 # with a full and proper path. This means:
3397 # 1) There will be no spaces in the path. On posix platforms,
3398 #    spaces in the path will result in an error. On Windows,
3399 #    the path will be rewritten using short-style to be space-free.
3400 # 2) The path will be absolute, and it will be in unix-style (on
3401 #     cygwin).
3402 # Any arguments given to the executable is preserved.
3403 # If the input variable does not have a directory specification, then
3404 # it need to be in the PATH.
3405 # $1: The name of the variable to fix
3406 
3407 
3408 
3409 
3410 # Register a --with argument but mark it as deprecated
3411 # $1: The name of the with argument to deprecate, not including --with-
3412 
3413 
3414 # Register a --enable argument but mark it as deprecated
3415 # $1: The name of the with argument to deprecate, not including --enable-
3416 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3417 
3418 
3419 
3420 
3421 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3422 # $1: variable to check
3423 
3424 
3425 # Check that there are no unprocessed overridden variables left.
3426 # If so, they are an incorrect argument and we will exit with an error.
3427 
3428 
3429 # Setup a tool for the given variable. If correctly specified by the user,
3430 # use that value, otherwise search for the tool using the supplied code snippet.
3431 # $1: variable to set
3432 # $2: code snippet to call to look for the tool
3433 
3434 
3435 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3436 # $1: variable to set
3437 # $2: executable name (or list of names) to look for
3438 
3439 
3440 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3441 # $1: variable to set
3442 # $2: executable name (or list of names) to look for
3443 
3444 
3445 # Like BASIC_PATH_PROGS but fails if no tool was found.
3446 # $1: variable to set
3447 # $2: executable name (or list of names) to look for
3448 
3449 
3450 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3451 # $1: variable to set
3452 # $2: autoconf macro to call to look for the special tool
3453 
3454 
3455 # Setup the most fundamental tools that relies on not much else to set up,
3456 # but is used by much of the early bootstrap code.
3457 
3458 
3459 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3460 
3461 
3462 # Evaluates platform specific overrides for devkit variables.
3463 # $1: Name of variable
3464 
3465 
3466 
3467 
3468 
3469 
3470 
3471 
3472 
3473 #%%% Simple tools %%%
3474 
3475 # Check if we have found a usable version of make
3476 # $1: the path to a potential make binary (or empty)
3477 # $2: the description on how we found this
3478 
3479 
3480 # Goes looking for a usable version of GNU make.
3481 
3482 
3483 
3484 
3485 
3486 
3487 # Check if build directory is on local disk. If not possible to determine,
3488 # we prefer to claim it's local.
3489 # Argument 1: directory to test
3490 # Argument 2: what to do if it is on local disk
3491 # Argument 3: what to do otherwise (remote disk or failure)
3492 
3493 
3494 # Check that source files have basic read permissions set. This might
3495 # not be the case in cygwin in certain conditions.
3496 
3497 
3498 
3499 
3500 #
3501 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3502 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3503 #
3504 # This code is free software; you can redistribute it and/or modify it
3505 # under the terms of the GNU General Public License version 2 only, as
3506 # published by the Free Software Foundation.  Oracle designates this
3507 # particular file as subject to the "Classpath" exception as provided
3508 # by Oracle in the LICENSE file that accompanied this code.
3509 #
3510 # This code is distributed in the hope that it will be useful, but WITHOUT
3511 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3512 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3513 # version 2 for more details (a copy is included in the LICENSE file that
3514 # accompanied this code).
3515 #
3516 # You should have received a copy of the GNU General Public License version
3517 # 2 along with this work; if not, write to the Free Software Foundation,
3518 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3519 #
3520 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3521 # or visit www.oracle.com if you need additional information or have any
3522 # questions.
3523 #
3524 
3525 
3526 
3527 
3528 
3529 # Helper function which possibly converts a path using DOS-style short mode.
3530 # If so, the updated path is stored in $new_path.
3531 # $1: The path to check
3532 
3533 
3534 # Helper function which possibly converts a path using DOS-style short mode.
3535 # If so, the updated path is stored in $new_path.
3536 # $1: The path to check
3537 
3538 
3539 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3540 # and could probably be heavily simplified. However, all changes in this
3541 # area tend to need lot of testing in different scenarios, and in lack of
3542 # proper unit testing, cleaning this up has not been deemed worth the effort
3543 # at the moment.
3544 
3545 
3546 
3547 
3548 
3549 
3550 
3551 
3552 
3553 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3554 
3555 
3556 
3557 
3558 #
3559 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3560 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561 #
3562 # This code is free software; you can redistribute it and/or modify it
3563 # under the terms of the GNU General Public License version 2 only, as
3564 # published by the Free Software Foundation.  Oracle designates this
3565 # particular file as subject to the "Classpath" exception as provided
3566 # by Oracle in the LICENSE file that accompanied this code.
3567 #
3568 # This code is distributed in the hope that it will be useful, but WITHOUT
3569 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571 # version 2 for more details (a copy is included in the LICENSE file that
3572 # accompanied this code).
3573 #
3574 # You should have received a copy of the GNU General Public License version
3575 # 2 along with this work; if not, write to the Free Software Foundation,
3576 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577 #
3578 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579 # or visit www.oracle.com if you need additional information or have any
3580 # questions.
3581 #
3582 
3583 
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 
3593 # ... then the rest
3594 #
3595 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3596 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3597 #
3598 # This code is free software; you can redistribute it and/or modify it
3599 # under the terms of the GNU General Public License version 2 only, as
3600 # published by the Free Software Foundation.  Oracle designates this
3601 # particular file as subject to the "Classpath" exception as provided
3602 # by Oracle in the LICENSE file that accompanied this code.
3603 #
3604 # This code is distributed in the hope that it will be useful, but WITHOUT
3605 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3606 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3607 # version 2 for more details (a copy is included in the LICENSE file that
3608 # accompanied this code).
3609 #
3610 # You should have received a copy of the GNU General Public License version
3611 # 2 along with this work; if not, write to the Free Software Foundation,
3612 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3613 #
3614 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3615 # or visit www.oracle.com if you need additional information or have any
3616 # questions.
3617 #
3618 
3619 # Execute the check given as argument, and verify the result
3620 # If the Boot JDK was previously found, do nothing
3621 # $1 A command line (typically autoconf macro) to execute
3622 
3623 
3624 # Test: Is bootjdk explicitely set by command line arguments?
3625 
3626 
3627 # Test: Is bootjdk available from builddeps?
3628 
3629 
3630 # Test: Is $JAVA_HOME set?
3631 
3632 
3633 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3634 
3635 
3636 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3637 
3638 
3639 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3640 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3641 # $1 = Path to directory containing jdk installations.
3642 # $2 = String to append to the found JDK directory to get the proper JDK home
3643 
3644 
3645 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3646 # environmental variable as base for where to look.
3647 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3648 
3649 
3650 # Test: Is there a JDK installed in default, well-known locations?
3651 
3652 
3653 # Check that a command-line tool in the Boot JDK is correct
3654 # $1 = name of variable to assign
3655 # $2 = name of binary
3656 
3657 
3658 ###############################################################################
3659 #
3660 # We need a Boot JDK to bootstrap the build.
3661 #
3662 
3663 
3664 
3665 
3666 
3667 #
3668 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
3669 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3670 #
3671 # This code is free software; you can redistribute it and/or modify it
3672 # under the terms of the GNU General Public License version 2 only, as
3673 # published by the Free Software Foundation.  Oracle designates this
3674 # particular file as subject to the "Classpath" exception as provided
3675 # by Oracle in the LICENSE file that accompanied this code.
3676 #
3677 # This code is distributed in the hope that it will be useful, but WITHOUT
3678 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3679 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3680 # version 2 for more details (a copy is included in the LICENSE file that
3681 # accompanied this code).
3682 #
3683 # You should have received a copy of the GNU General Public License version
3684 # 2 along with this work; if not, write to the Free Software Foundation,
3685 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3686 #
3687 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3688 # or visit www.oracle.com if you need additional information or have any
3689 # questions.
3690 #
3691 
3692 
3693 
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 
3702 
3703 
3704 
3705 
3706 
3707 
3708 
3709 
3710 
3711 #
3712 # Copyright (c) 2011, 2018, 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 # Documentation on common flags used for solstudio in HIGHEST.
3741 #
3742 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3743 #          done with care, there are some assumptions below that need to
3744 #          be understood about the use of pointers, and IEEE behavior.
3745 #
3746 # -fns: Use non-standard floating point mode (not IEEE 754)
3747 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3748 # -fsingle: Use single precision floating point with 'float'
3749 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3750 #   (Source with excessing pointer casting and data access with mixed
3751 #    pointer types are not recommended)
3752 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3753 #   (If you expect perfect errno behavior, do not use this)
3754 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3755 # -xrestrict: Pointer parameters to functions do not overlap
3756 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3757 #    If you pass in multiple pointers to the same data, do not use this)
3758 # -xlibmil: Inline some library routines
3759 #   (If you expect perfect errno behavior, do not use this)
3760 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3761 #   (If you expect perfect errno behavior, do not use this)
3762 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3763 
3764     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3765     # Bug?
3766     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3767     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3768     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3769     #fi
3770 
3771 
3772 
3773 
3774 
3775 
3776 # FLAGS_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3777 #                                  [RUN-IF-FALSE])
3778 # ------------------------------------------------------------
3779 # Check that the C compiler supports an argument
3780 
3781 
3782 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3783 #                                    [RUN-IF-FALSE])
3784 # ------------------------------------------------------------
3785 # Check that the C++ compiler supports an argument
3786 
3787 
3788 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3789 #                                [RUN-IF-FALSE])
3790 # ------------------------------------------------------------
3791 # Check that the C and C++ compilers support an argument
3792 
3793 
3794 
3795 
3796 
3797 
3798 
3799 #
3800 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3801 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3802 #
3803 # This code is free software; you can redistribute it and/or modify it
3804 # under the terms of the GNU General Public License version 2 only, as
3805 # published by the Free Software Foundation.  Oracle designates this
3806 # particular file as subject to the "Classpath" exception as provided
3807 # by Oracle in the LICENSE file that accompanied this code.
3808 #
3809 # This code is distributed in the hope that it will be useful, but WITHOUT
3810 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3811 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3812 # version 2 for more details (a copy is included in the LICENSE file that
3813 # accompanied this code).
3814 #
3815 # You should have received a copy of the GNU General Public License version
3816 # 2 along with this work; if not, write to the Free Software Foundation,
3817 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3818 #
3819 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3820 # or visit www.oracle.com if you need additional information or have any
3821 # questions.
3822 #
3823 
3824 
3825 
3826 
3827 
3828 cygwin_help() {
3829   case $1 in
3830     unzip)
3831       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3832       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3833       ;;
3834     zip)
3835       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3836       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3837       ;;
3838     make)
3839       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3840       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3841       ;;
3842     freetype)
3843       HELP_MSG="
3844 The freetype library can now be build during the configure process.
3845 Download the freetype sources and unpack them into an arbitrary directory:
3846 
3847 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3848 tar -xzf freetype-2.5.3.tar.gz
3849 
3850 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3851 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3852 builds or into '<freetype_src>/lib32' for 32-bit builds.
3853 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3854 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3855       ;;
3856   esac
3857 }
3858 
3859 msys_help() {
3860   PKGHANDLER_COMMAND=""
3861 }
3862 
3863 apt_help() {
3864   case $1 in
3865     devkit)
3866       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3867     openjdk)
3868       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3869     alsa)
3870       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3871     cups)
3872       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3873     fontconfig)
3874       PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
3875     freetype)
3876       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3877     pulse)
3878       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3879     x11)
3880       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3881     ccache)
3882       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3883   esac
3884 }
3885 
3886 yum_help() {
3887   case $1 in
3888     devkit)
3889       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3890     openjdk)
3891       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3892     alsa)
3893       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3894     cups)
3895       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3896     fontconfig)
3897       PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
3898     freetype)
3899       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3900     pulse)
3901       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3902     x11)
3903       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3904     ccache)
3905       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3906   esac
3907 }
3908 
3909 port_help() {
3910   PKGHANDLER_COMMAND=""
3911 }
3912 
3913 pkgutil_help() {
3914   PKGHANDLER_COMMAND=""
3915 }
3916 
3917 pkgadd_help() {
3918   PKGHANDLER_COMMAND=""
3919 }
3920 
3921 # This function will check if we're called from the "configure" wrapper while
3922 # printing --help. If so, we will print out additional information that can
3923 # only be extracted within the autoconf script, and then exit. This must be
3924 # called at the very beginning in configure.ac.
3925 
3926 
3927 
3928 
3929 
3930 
3931 #
3932 # Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
3933 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3934 #
3935 # This code is free software; you can redistribute it and/or modify it
3936 # under the terms of the GNU General Public License version 2 only, as
3937 # published by the Free Software Foundation.  Oracle designates this
3938 # particular file as subject to the "Classpath" exception as provided
3939 # by Oracle in the LICENSE file that accompanied this code.
3940 #
3941 # This code is distributed in the hope that it will be useful, but WITHOUT
3942 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3943 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3944 # version 2 for more details (a copy is included in the LICENSE file that
3945 # accompanied this code).
3946 #
3947 # You should have received a copy of the GNU General Public License version
3948 # 2 along with this work; if not, write to the Free Software Foundation,
3949 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3950 #
3951 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3952 # or visit www.oracle.com if you need additional information or have any
3953 # questions.
3954 #
3955 
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 ###############################################################################
3966 #
3967 # Should we build only OpenJDK even if closed sources are present?
3968 #
3969 
3970 
3971 
3972 
3973 ###############################################################################
3974 #
3975 # Setup version numbers
3976 #
3977 
3978 
3979 
3980 
3981 
3982 
3983 # Support for customization of the build process. Some build files
3984 # will include counterparts from this location, if they exist. This allows
3985 # for a degree of customization of the build targets and the rules/recipes
3986 # to create them
3987 
3988 # Check whether --with-custom-make-dir was given.
3989 if test "${with_custom_make_dir+set}" = set; then :
3990   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3991 fi
3992 
3993 
3994 
3995 #
3996 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3997 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3998 #
3999 # This code is free software; you can redistribute it and/or modify it
4000 # under the terms of the GNU General Public License version 2 only, as
4001 # published by the Free Software Foundation.  Oracle designates this
4002 # particular file as subject to the "Classpath" exception as provided
4003 # by Oracle in the LICENSE file that accompanied this code.
4004 #
4005 # This code is distributed in the hope that it will be useful, but WITHOUT
4006 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4007 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4008 # version 2 for more details (a copy is included in the LICENSE file that
4009 # accompanied this code).
4010 #
4011 # You should have received a copy of the GNU General Public License version
4012 # 2 along with this work; if not, write to the Free Software Foundation,
4013 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4014 #
4015 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4016 # or visit www.oracle.com if you need additional information or have any
4017 # questions.
4018 #
4019 
4020 
4021 
4022 
4023 
4024 
4025 
4026 
4027 
4028 
4029 
4030 
4031 
4032 
4033 
4034 ################################################################################
4035 # Setup fontconfig
4036 ################################################################################
4037 
4038 
4039 
4040 
4041 
4042 
4043 
4044 
4045 #
4046 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4047 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4048 #
4049 # This code is free software; you can redistribute it and/or modify it
4050 # under the terms of the GNU General Public License version 2 only, as
4051 # published by the Free Software Foundation.  Oracle designates this
4052 # particular file as subject to the "Classpath" exception as provided
4053 # by Oracle in the LICENSE file that accompanied this code.
4054 #
4055 # This code is distributed in the hope that it will be useful, but WITHOUT
4056 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4057 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4058 # version 2 for more details (a copy is included in the LICENSE file that
4059 # accompanied this code).
4060 #
4061 # You should have received a copy of the GNU General Public License version
4062 # 2 along with this work; if not, write to the Free Software Foundation,
4063 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4064 #
4065 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4066 # or visit www.oracle.com if you need additional information or have any
4067 # questions.
4068 #
4069 
4070 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4071 # Converts autoconf style CPU name to OpenJDK style, into
4072 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4073 
4074 
4075 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4076 # Converts autoconf style OS name to OpenJDK style, into
4077 # VAR_OS and VAR_OS_API.
4078 
4079 
4080 # Expects $host_os $host_cpu $build_os and $build_cpu
4081 # and $with_target_bits to have been setup!
4082 #
4083 # Translate the standard triplet(quadruplet) definition
4084 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4085 # OPENJDK_BUILD_OS, etc.
4086 
4087 
4088 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4089 # accordingly. Must be done after setting up build and target system, but before
4090 # doing anything else with these values.
4091 
4092 
4093 # Setup the legacy variables, for controlling the old makefiles.
4094 #
4095 
4096 
4097 
4098 
4099 #%%% Build and target systems %%%
4100 
4101 
4102 
4103 
4104 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4105 # Add -mX to various FLAGS variables.
4106 
4107 
4108 
4109 
4110 
4111 
4112 #
4113 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4114 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4115 #
4116 # This code is free software; you can redistribute it and/or modify it
4117 # under the terms of the GNU General Public License version 2 only, as
4118 # published by the Free Software Foundation.  Oracle designates this
4119 # particular file as subject to the "Classpath" exception as provided
4120 # by Oracle in the LICENSE file that accompanied this code.
4121 #
4122 # This code is distributed in the hope that it will be useful, but WITHOUT
4123 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4124 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4125 # version 2 for more details (a copy is included in the LICENSE file that
4126 # accompanied this code).
4127 #
4128 # You should have received a copy of the GNU General Public License version
4129 # 2 along with this work; if not, write to the Free Software Foundation,
4130 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4131 #
4132 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4133 # or visit www.oracle.com if you need additional information or have any
4134 # questions.
4135 #
4136 
4137 
4138 
4139 
4140 
4141 
4142 
4143 
4144 #
4145 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4146 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4147 #
4148 # This code is free software; you can redistribute it and/or modify it
4149 # under the terms of the GNU General Public License version 2 only, as
4150 # published by the Free Software Foundation.  Oracle designates this
4151 # particular file as subject to the "Classpath" exception as provided
4152 # by Oracle in the LICENSE file that accompanied this code.
4153 #
4154 # This code is distributed in the hope that it will be useful, but WITHOUT
4155 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4156 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4157 # version 2 for more details (a copy is included in the LICENSE file that
4158 # accompanied this code).
4159 #
4160 # You should have received a copy of the GNU General Public License version
4161 # 2 along with this work; if not, write to the Free Software Foundation,
4162 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4163 #
4164 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4165 # or visit www.oracle.com if you need additional information or have any
4166 # questions.
4167 #
4168 
4169 ########################################################################
4170 # This file is responsible for detecting, verifying and setting up the
4171 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4172 # proper paths to the binaries, but it will not setup any flags.
4173 #
4174 # The binaries used is determined by the toolchain type, which is the family of
4175 # compilers and related tools that are used.
4176 ########################################################################
4177 
4178 
4179 # All valid toolchains, regardless of platform (used by help.m4)
4180 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4181 
4182 # These toolchains are valid on different platforms
4183 VALID_TOOLCHAINS_linux="gcc clang"
4184 VALID_TOOLCHAINS_solaris="solstudio"
4185 VALID_TOOLCHAINS_macosx="gcc clang"
4186 VALID_TOOLCHAINS_aix="xlc"
4187 VALID_TOOLCHAINS_windows="microsoft"
4188 
4189 # Toolchain descriptions
4190 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4191 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4192 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4193 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4194 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4195 
4196 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4197 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4198 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4199 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4200 
4201 
4202 # Check if the configured compiler (C and C++) is of a specific version or
4203 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4204 #
4205 # Arguments:
4206 #   $1:   The version string to check against the found version
4207 #   $2:   block to run if the compiler is at least this version (>=)
4208 #   $3:   block to run if the compiler is older than this version (<)
4209 
4210 
4211 
4212 # Setup a number of variables describing how native output files are
4213 # named on this platform/toolchain.
4214 
4215 
4216 # Determine which toolchain type to use, and make sure it is valid for this
4217 # platform. Setup various information about the selected toolchain.
4218 
4219 
4220 # Before we start detecting the toolchain executables, we might need some
4221 # special setup, e.g. additional paths etc.
4222 
4223 
4224 # Restore path, etc
4225 
4226 
4227 # Check if a compiler is of the toolchain type we expect, and save the version
4228 # information from it. If the compiler does not match the expected type,
4229 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4230 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4231 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4232 #
4233 # $1 = compiler to test (CC or CXX)
4234 # $2 = human readable name of compiler (C or C++)
4235 
4236 
4237 
4238 # Try to locate the given C or C++ compiler in the path, or otherwise.
4239 #
4240 # $1 = compiler to test (CC or CXX)
4241 # $2 = human readable name of compiler (C or C++)
4242 # $3 = list of compiler names to search for
4243 
4244 
4245 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4246 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4247 # archiver (AR). Verify that the compilers are correct according to the
4248 # toolchain type.
4249 
4250 
4251 # Setup additional tools that is considered a part of the toolchain, but not the
4252 # core part. Many of these are highly platform-specific and do not exist,
4253 # and/or are not needed on all platforms.
4254 
4255 
4256 # Setup the build tools (i.e, the compiler and linker used to build programs
4257 # that should be run on the build platform, not the target platform, as a build
4258 # helper). Since the non-cross-compile case uses the normal, target compilers
4259 # for this, we can only do this after these have been setup.
4260 
4261 
4262 # Setup legacy variables that are still needed as alternative ways to refer to
4263 # parts of the toolchain.
4264 
4265 
4266 # Do some additional checks on the detected tools.
4267 
4268 
4269 # Setup the JTReg Regression Test Harness.
4270 
4271 
4272 
4273 #
4274 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4275 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4276 #
4277 # This code is free software; you can redistribute it and/or modify it
4278 # under the terms of the GNU General Public License version 2 only, as
4279 # published by the Free Software Foundation.  Oracle designates this
4280 # particular file as subject to the "Classpath" exception as provided
4281 # by Oracle in the LICENSE file that accompanied this code.
4282 #
4283 # This code is distributed in the hope that it will be useful, but WITHOUT
4284 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4285 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4286 # version 2 for more details (a copy is included in the LICENSE file that
4287 # accompanied this code).
4288 #
4289 # You should have received a copy of the GNU General Public License version
4290 # 2 along with this work; if not, write to the Free Software Foundation,
4291 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4292 #
4293 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4294 # or visit www.oracle.com if you need additional information or have any
4295 # questions.
4296 #
4297 
4298 ################################################################################
4299 # The order of these defines the priority by which we try to find them.
4300 VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
4301 
4302 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4303 VS_VERSION_INTERNAL_2010=100
4304 VS_MSVCR_2010=msvcr100.dll
4305 # We don't use msvcp on Visual Studio 2010
4306 #VS_MSVCP_2010=msvcp100.dll
4307 VS_ENVVAR_2010="VS100COMNTOOLS"
4308 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4309 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4310 VS_VS_PLATFORM_NAME_2010="v100"
4311 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4312 
4313 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4314 VS_VERSION_INTERNAL_2012=110
4315 VS_MSVCR_2012=msvcr110.dll
4316 VS_MSVCP_2012=msvcp110.dll
4317 VS_ENVVAR_2012="VS110COMNTOOLS"
4318 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4319 VS_SDK_INSTALLDIR_2012=
4320 VS_VS_PLATFORM_NAME_2012="v110"
4321 VS_SDK_PLATFORM_NAME_2012=
4322 
4323 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4324 VS_VERSION_INTERNAL_2013=120
4325 VS_MSVCR_2013=msvcr120.dll
4326 VS_MSVCP_2013=msvcp120.dll
4327 VS_ENVVAR_2013="VS120COMNTOOLS"
4328 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4329 VS_SDK_INSTALLDIR_2013=
4330 VS_VS_PLATFORM_NAME_2013="v120"
4331 VS_SDK_PLATFORM_NAME_2013=
4332 
4333 VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
4334 VS_VERSION_INTERNAL_2015=140
4335 VS_MSVCR_2015=vcruntime140.dll
4336 VS_MSVCP_2015=msvcp140.dll
4337 VS_ENVVAR_2015="VS140COMNTOOLS"
4338 VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
4339 VS_SDK_INSTALLDIR_2015=
4340 VS_VS_PLATFORM_NAME_2015="v140"
4341 VS_SDK_PLATFORM_NAME_2015=
4342 # The vcvars of 2015 breaks if 2017 is also installed. Work around this by
4343 # explicitly specifying Windows Kit 8.1 to be used.
4344 VS_ENV_ARGS_2015="8.1"
4345 
4346 VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
4347 VS_VERSION_INTERNAL_2017=141
4348 VS_MSVCR_2017=vcruntime140.dll
4349 VS_MSVCP_2017=msvcp140.dll
4350 VS_ENVVAR_2017="VS150COMNTOOLS"
4351 VS_USE_UCRT_2017="true"
4352 VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
4353 VS_EDITIONS_2017="Community Professional Enterprise"
4354 VS_SDK_INSTALLDIR_2017=
4355 VS_VS_PLATFORM_NAME_2017="v141"
4356 VS_SDK_PLATFORM_NAME_2017=
4357 
4358 ################################################################################
4359 
4360 
4361 
4362 ################################################################################
4363 
4364 
4365 
4366 ################################################################################
4367 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4368 # build environment and assigns it to VS_ENV_CMD
4369 
4370 
4371 ################################################################################
4372 
4373 
4374 
4375 ################################################################################
4376 # Check if the VS env variables were setup prior to running configure.
4377 # If not, then find vcvarsall.bat and run it automatically, and integrate
4378 # the set env variables into the spec file.
4379 
4380 
4381 
4382 
4383 
4384 
4385 
4386 
4387 
4388 
4389 
4390 
4391 
4392 
4393 # This line needs to be here, verbatim, after all includes and the dummy hook
4394 # definitions. It is replaced with custom functionality when building
4395 # custom sources.
4396 #CUSTOM_AUTOCONF_INCLUDE
4397 
4398 # Do not change or remove the following line, it is needed for consistency checks:
4399 DATE_WHEN_GENERATED=1625573051
4400 
4401 ###############################################################################
4402 #
4403 # Initialization / Boot-strapping
4404 #
4405 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4406 # thus it jumps back and forth, each time gaining something needed later on.
4407 #
4408 ###############################################################################
4409 
4410 # If we are requested to print additional help, do that and then exit.
4411 # This must be the very first call.
4412 
4413   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4414     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4415     $PRINTF "Which are valid to use depends on the build platform.\n"
4416     for toolchain in $VALID_TOOLCHAINS_all; do
4417       # Use indirect variable referencing
4418       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4419       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4420       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4421     done
4422 
4423     # And now exit directly
4424     exit 0
4425   fi
4426 
4427 
4428 # Basic initialization that must happen first of all in the normal process.
4429 
4430   # Save the original command line. This is passed to us by the wrapper configure script.
4431 
4432   DATE_WHEN_CONFIGURED=`LANG=C date`
4433 
4434   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4435 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4436   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4437 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4438 
4439 
4440   # Start with tools that do not need have cross compilation support
4441   # and can be expected to be found in the default PATH. These tools are
4442   # used by configure. Nor are these tools expected to be found in the
4443   # devkit from the builddeps server either, since they are
4444   # needed to download the devkit.
4445 
4446   # First are all the simple required tools.
4447 
4448 
4449 
4450   # Publish this variable in the help.
4451 
4452 
4453   if test "x$BASENAME" = x; then
4454     # The variable is not set by user, try to locate tool using the code snippet
4455     for ac_prog in basename
4456 do
4457   # Extract the first word of "$ac_prog", so it can be a program name with args.
4458 set dummy $ac_prog; ac_word=$2
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4460 $as_echo_n "checking for $ac_word... " >&6; }
4461 if ${ac_cv_path_BASENAME+:} false; then :
4462   $as_echo_n "(cached) " >&6
4463 else
4464   case $BASENAME in
4465   [\\/]* | ?:[\\/]*)
4466   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4467   ;;
4468   *)
4469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470 for as_dir in $PATH
4471 do
4472   IFS=$as_save_IFS
4473   test -z "$as_dir" && as_dir=.
4474     for ac_exec_ext in '' $ac_executable_extensions; do
4475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478     break 2
4479   fi
4480 done
4481   done
4482 IFS=$as_save_IFS
4483 
4484   ;;
4485 esac
4486 fi
4487 BASENAME=$ac_cv_path_BASENAME
4488 if test -n "$BASENAME"; then
4489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4490 $as_echo "$BASENAME" >&6; }
4491 else
4492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493 $as_echo "no" >&6; }
4494 fi
4495 
4496 
4497   test -n "$BASENAME" && break
4498 done
4499 
4500   else
4501     # The variable is set, but is it from the command line or the environment?
4502 
4503     # Try to remove the string !BASENAME! from our list.
4504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4506       # If it failed, the variable was not from the command line. Ignore it,
4507       # but warn the user (except for BASH, which is always set by the calling BASH).
4508       if test "xBASENAME" != xBASH; then
4509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4510 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4511       fi
4512       # Try to locate tool using the code snippet
4513       for ac_prog in basename
4514 do
4515   # Extract the first word of "$ac_prog", so it can be a program name with args.
4516 set dummy $ac_prog; ac_word=$2
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4518 $as_echo_n "checking for $ac_word... " >&6; }
4519 if ${ac_cv_path_BASENAME+:} false; then :
4520   $as_echo_n "(cached) " >&6
4521 else
4522   case $BASENAME in
4523   [\\/]* | ?:[\\/]*)
4524   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4525   ;;
4526   *)
4527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528 for as_dir in $PATH
4529 do
4530   IFS=$as_save_IFS
4531   test -z "$as_dir" && as_dir=.
4532     for ac_exec_ext in '' $ac_executable_extensions; do
4533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4534     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4536     break 2
4537   fi
4538 done
4539   done
4540 IFS=$as_save_IFS
4541 
4542   ;;
4543 esac
4544 fi
4545 BASENAME=$ac_cv_path_BASENAME
4546 if test -n "$BASENAME"; then
4547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4548 $as_echo "$BASENAME" >&6; }
4549 else
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551 $as_echo "no" >&6; }
4552 fi
4553 
4554 
4555   test -n "$BASENAME" && break
4556 done
4557 
4558     else
4559       # If it succeeded, then it was overridden by the user. We will use it
4560       # for the tool.
4561 
4562       # First remove it from the list of overridden variables, so we can test
4563       # for unknown variables in the end.
4564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4565 
4566       # Check if the provided tool contains a complete path.
4567       tool_specified="$BASENAME"
4568       tool_basename="${tool_specified##*/}"
4569       if test "x$tool_basename" = "x$tool_specified"; then
4570         # A command without a complete path is provided, search $PATH.
4571         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4572 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4573         # Extract the first word of "$tool_basename", so it can be a program name with args.
4574 set dummy $tool_basename; ac_word=$2
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4576 $as_echo_n "checking for $ac_word... " >&6; }
4577 if ${ac_cv_path_BASENAME+:} false; then :
4578   $as_echo_n "(cached) " >&6
4579 else
4580   case $BASENAME in
4581   [\\/]* | ?:[\\/]*)
4582   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4583   ;;
4584   *)
4585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586 for as_dir in $PATH
4587 do
4588   IFS=$as_save_IFS
4589   test -z "$as_dir" && as_dir=.
4590     for ac_exec_ext in '' $ac_executable_extensions; do
4591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4592     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4594     break 2
4595   fi
4596 done
4597   done
4598 IFS=$as_save_IFS
4599 
4600   ;;
4601 esac
4602 fi
4603 BASENAME=$ac_cv_path_BASENAME
4604 if test -n "$BASENAME"; then
4605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4606 $as_echo "$BASENAME" >&6; }
4607 else
4608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609 $as_echo "no" >&6; }
4610 fi
4611 
4612 
4613         if test "x$BASENAME" = x; then
4614           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4615         fi
4616       else
4617         # Otherwise we believe it is a complete path. Use it as it is.
4618         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4619 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4620         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4621 $as_echo_n "checking for BASENAME... " >&6; }
4622         if test ! -x "$tool_specified"; then
4623           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4624 $as_echo "not found" >&6; }
4625           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4626         fi
4627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4628 $as_echo "$tool_specified" >&6; }
4629       fi
4630     fi
4631   fi
4632 
4633 
4634 
4635   if test "x$BASENAME" = x; then
4636     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4637   fi
4638 
4639 
4640 
4641 
4642 
4643   # Publish this variable in the help.
4644 
4645 
4646   if test "x$BASH" = x; then
4647     # The variable is not set by user, try to locate tool using the code snippet
4648     for ac_prog in bash
4649 do
4650   # Extract the first word of "$ac_prog", so it can be a program name with args.
4651 set dummy $ac_prog; ac_word=$2
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653 $as_echo_n "checking for $ac_word... " >&6; }
4654 if ${ac_cv_path_BASH+:} false; then :
4655   $as_echo_n "(cached) " >&6
4656 else
4657   case $BASH in
4658   [\\/]* | ?:[\\/]*)
4659   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4660   ;;
4661   *)
4662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663 for as_dir in $PATH
4664 do
4665   IFS=$as_save_IFS
4666   test -z "$as_dir" && as_dir=.
4667     for ac_exec_ext in '' $ac_executable_extensions; do
4668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671     break 2
4672   fi
4673 done
4674   done
4675 IFS=$as_save_IFS
4676 
4677   ;;
4678 esac
4679 fi
4680 BASH=$ac_cv_path_BASH
4681 if test -n "$BASH"; then
4682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4683 $as_echo "$BASH" >&6; }
4684 else
4685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4687 fi
4688 
4689 
4690   test -n "$BASH" && break
4691 done
4692 
4693   else
4694     # The variable is set, but is it from the command line or the environment?
4695 
4696     # Try to remove the string !BASH! from our list.
4697     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4698     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4699       # If it failed, the variable was not from the command line. Ignore it,
4700       # but warn the user (except for BASH, which is always set by the calling BASH).
4701       if test "xBASH" != xBASH; then
4702         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4703 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4704       fi
4705       # Try to locate tool using the code snippet
4706       for ac_prog in bash
4707 do
4708   # Extract the first word of "$ac_prog", so it can be a program name with args.
4709 set dummy $ac_prog; ac_word=$2
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711 $as_echo_n "checking for $ac_word... " >&6; }
4712 if ${ac_cv_path_BASH+:} false; then :
4713   $as_echo_n "(cached) " >&6
4714 else
4715   case $BASH in
4716   [\\/]* | ?:[\\/]*)
4717   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4718   ;;
4719   *)
4720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721 for as_dir in $PATH
4722 do
4723   IFS=$as_save_IFS
4724   test -z "$as_dir" && as_dir=.
4725     for ac_exec_ext in '' $ac_executable_extensions; do
4726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729     break 2
4730   fi
4731 done
4732   done
4733 IFS=$as_save_IFS
4734 
4735   ;;
4736 esac
4737 fi
4738 BASH=$ac_cv_path_BASH
4739 if test -n "$BASH"; then
4740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4741 $as_echo "$BASH" >&6; }
4742 else
4743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744 $as_echo "no" >&6; }
4745 fi
4746 
4747 
4748   test -n "$BASH" && break
4749 done
4750 
4751     else
4752       # If it succeeded, then it was overridden by the user. We will use it
4753       # for the tool.
4754 
4755       # First remove it from the list of overridden variables, so we can test
4756       # for unknown variables in the end.
4757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4758 
4759       # Check if the provided tool contains a complete path.
4760       tool_specified="$BASH"
4761       tool_basename="${tool_specified##*/}"
4762       if test "x$tool_basename" = "x$tool_specified"; then
4763         # A command without a complete path is provided, search $PATH.
4764         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4765 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4766         # Extract the first word of "$tool_basename", so it can be a program name with args.
4767 set dummy $tool_basename; ac_word=$2
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769 $as_echo_n "checking for $ac_word... " >&6; }
4770 if ${ac_cv_path_BASH+:} false; then :
4771   $as_echo_n "(cached) " >&6
4772 else
4773   case $BASH in
4774   [\\/]* | ?:[\\/]*)
4775   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4776   ;;
4777   *)
4778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779 for as_dir in $PATH
4780 do
4781   IFS=$as_save_IFS
4782   test -z "$as_dir" && as_dir=.
4783     for ac_exec_ext in '' $ac_executable_extensions; do
4784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4785     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787     break 2
4788   fi
4789 done
4790   done
4791 IFS=$as_save_IFS
4792 
4793   ;;
4794 esac
4795 fi
4796 BASH=$ac_cv_path_BASH
4797 if test -n "$BASH"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4799 $as_echo "$BASH" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802 $as_echo "no" >&6; }
4803 fi
4804 
4805 
4806         if test "x$BASH" = x; then
4807           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4808         fi
4809       else
4810         # Otherwise we believe it is a complete path. Use it as it is.
4811         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4812 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4814 $as_echo_n "checking for BASH... " >&6; }
4815         if test ! -x "$tool_specified"; then
4816           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4817 $as_echo "not found" >&6; }
4818           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4819         fi
4820         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4821 $as_echo "$tool_specified" >&6; }
4822       fi
4823     fi
4824   fi
4825 
4826 
4827 
4828   if test "x$BASH" = x; then
4829     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4830   fi
4831 
4832 
4833 
4834 
4835 
4836   # Publish this variable in the help.
4837 
4838 
4839   if test "x$CAT" = x; then
4840     # The variable is not set by user, try to locate tool using the code snippet
4841     for ac_prog in cat
4842 do
4843   # Extract the first word of "$ac_prog", so it can be a program name with args.
4844 set dummy $ac_prog; ac_word=$2
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846 $as_echo_n "checking for $ac_word... " >&6; }
4847 if ${ac_cv_path_CAT+:} false; then :
4848   $as_echo_n "(cached) " >&6
4849 else
4850   case $CAT in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860     for ac_exec_ext in '' $ac_executable_extensions; do
4861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867   done
4868 IFS=$as_save_IFS
4869 
4870   ;;
4871 esac
4872 fi
4873 CAT=$ac_cv_path_CAT
4874 if test -n "$CAT"; then
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4876 $as_echo "$CAT" >&6; }
4877 else
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879 $as_echo "no" >&6; }
4880 fi
4881 
4882 
4883   test -n "$CAT" && break
4884 done
4885 
4886   else
4887     # The variable is set, but is it from the command line or the environment?
4888 
4889     # Try to remove the string !CAT! from our list.
4890     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4891     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4892       # If it failed, the variable was not from the command line. Ignore it,
4893       # but warn the user (except for BASH, which is always set by the calling BASH).
4894       if test "xCAT" != xBASH; then
4895         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4896 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4897       fi
4898       # Try to locate tool using the code snippet
4899       for ac_prog in cat
4900 do
4901   # Extract the first word of "$ac_prog", so it can be a program name with args.
4902 set dummy $ac_prog; ac_word=$2
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904 $as_echo_n "checking for $ac_word... " >&6; }
4905 if ${ac_cv_path_CAT+:} false; then :
4906   $as_echo_n "(cached) " >&6
4907 else
4908   case $CAT in
4909   [\\/]* | ?:[\\/]*)
4910   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4911   ;;
4912   *)
4913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914 for as_dir in $PATH
4915 do
4916   IFS=$as_save_IFS
4917   test -z "$as_dir" && as_dir=.
4918     for ac_exec_ext in '' $ac_executable_extensions; do
4919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922     break 2
4923   fi
4924 done
4925   done
4926 IFS=$as_save_IFS
4927 
4928   ;;
4929 esac
4930 fi
4931 CAT=$ac_cv_path_CAT
4932 if test -n "$CAT"; then
4933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4934 $as_echo "$CAT" >&6; }
4935 else
4936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937 $as_echo "no" >&6; }
4938 fi
4939 
4940 
4941   test -n "$CAT" && break
4942 done
4943 
4944     else
4945       # If it succeeded, then it was overridden by the user. We will use it
4946       # for the tool.
4947 
4948       # First remove it from the list of overridden variables, so we can test
4949       # for unknown variables in the end.
4950       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4951 
4952       # Check if the provided tool contains a complete path.
4953       tool_specified="$CAT"
4954       tool_basename="${tool_specified##*/}"
4955       if test "x$tool_basename" = "x$tool_specified"; then
4956         # A command without a complete path is provided, search $PATH.
4957         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4958 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4959         # Extract the first word of "$tool_basename", so it can be a program name with args.
4960 set dummy $tool_basename; ac_word=$2
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962 $as_echo_n "checking for $ac_word... " >&6; }
4963 if ${ac_cv_path_CAT+:} false; then :
4964   $as_echo_n "(cached) " >&6
4965 else
4966   case $CAT in
4967   [\\/]* | ?:[\\/]*)
4968   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4969   ;;
4970   *)
4971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972 for as_dir in $PATH
4973 do
4974   IFS=$as_save_IFS
4975   test -z "$as_dir" && as_dir=.
4976     for ac_exec_ext in '' $ac_executable_extensions; do
4977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980     break 2
4981   fi
4982 done
4983   done
4984 IFS=$as_save_IFS
4985 
4986   ;;
4987 esac
4988 fi
4989 CAT=$ac_cv_path_CAT
4990 if test -n "$CAT"; then
4991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4992 $as_echo "$CAT" >&6; }
4993 else
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995 $as_echo "no" >&6; }
4996 fi
4997 
4998 
4999         if test "x$CAT" = x; then
5000           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5001         fi
5002       else
5003         # Otherwise we believe it is a complete path. Use it as it is.
5004         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5005 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5006         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5007 $as_echo_n "checking for CAT... " >&6; }
5008         if test ! -x "$tool_specified"; then
5009           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5010 $as_echo "not found" >&6; }
5011           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5012         fi
5013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5014 $as_echo "$tool_specified" >&6; }
5015       fi
5016     fi
5017   fi
5018 
5019 
5020 
5021   if test "x$CAT" = x; then
5022     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5023   fi
5024 
5025 
5026 
5027 
5028 
5029   # Publish this variable in the help.
5030 
5031 
5032   if test "x$CHMOD" = x; then
5033     # The variable is not set by user, try to locate tool using the code snippet
5034     for ac_prog in chmod
5035 do
5036   # Extract the first word of "$ac_prog", so it can be a program name with args.
5037 set dummy $ac_prog; ac_word=$2
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039 $as_echo_n "checking for $ac_word... " >&6; }
5040 if ${ac_cv_path_CHMOD+:} false; then :
5041   $as_echo_n "(cached) " >&6
5042 else
5043   case $CHMOD in
5044   [\\/]* | ?:[\\/]*)
5045   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5046   ;;
5047   *)
5048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049 for as_dir in $PATH
5050 do
5051   IFS=$as_save_IFS
5052   test -z "$as_dir" && as_dir=.
5053     for ac_exec_ext in '' $ac_executable_extensions; do
5054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057     break 2
5058   fi
5059 done
5060   done
5061 IFS=$as_save_IFS
5062 
5063   ;;
5064 esac
5065 fi
5066 CHMOD=$ac_cv_path_CHMOD
5067 if test -n "$CHMOD"; then
5068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5069 $as_echo "$CHMOD" >&6; }
5070 else
5071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072 $as_echo "no" >&6; }
5073 fi
5074 
5075 
5076   test -n "$CHMOD" && break
5077 done
5078 
5079   else
5080     # The variable is set, but is it from the command line or the environment?
5081 
5082     # Try to remove the string !CHMOD! from our list.
5083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5085       # If it failed, the variable was not from the command line. Ignore it,
5086       # but warn the user (except for BASH, which is always set by the calling BASH).
5087       if test "xCHMOD" != xBASH; then
5088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5089 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5090       fi
5091       # Try to locate tool using the code snippet
5092       for ac_prog in chmod
5093 do
5094   # Extract the first word of "$ac_prog", so it can be a program name with args.
5095 set dummy $ac_prog; ac_word=$2
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 $as_echo_n "checking for $ac_word... " >&6; }
5098 if ${ac_cv_path_CHMOD+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101   case $CHMOD in
5102   [\\/]* | ?:[\\/]*)
5103   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5104   ;;
5105   *)
5106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109   IFS=$as_save_IFS
5110   test -z "$as_dir" && as_dir=.
5111     for ac_exec_ext in '' $ac_executable_extensions; do
5112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115     break 2
5116   fi
5117 done
5118   done
5119 IFS=$as_save_IFS
5120 
5121   ;;
5122 esac
5123 fi
5124 CHMOD=$ac_cv_path_CHMOD
5125 if test -n "$CHMOD"; then
5126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5127 $as_echo "$CHMOD" >&6; }
5128 else
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130 $as_echo "no" >&6; }
5131 fi
5132 
5133 
5134   test -n "$CHMOD" && break
5135 done
5136 
5137     else
5138       # If it succeeded, then it was overridden by the user. We will use it
5139       # for the tool.
5140 
5141       # First remove it from the list of overridden variables, so we can test
5142       # for unknown variables in the end.
5143       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5144 
5145       # Check if the provided tool contains a complete path.
5146       tool_specified="$CHMOD"
5147       tool_basename="${tool_specified##*/}"
5148       if test "x$tool_basename" = "x$tool_specified"; then
5149         # A command without a complete path is provided, search $PATH.
5150         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5151 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5152         # Extract the first word of "$tool_basename", so it can be a program name with args.
5153 set dummy $tool_basename; ac_word=$2
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155 $as_echo_n "checking for $ac_word... " >&6; }
5156 if ${ac_cv_path_CHMOD+:} false; then :
5157   $as_echo_n "(cached) " >&6
5158 else
5159   case $CHMOD in
5160   [\\/]* | ?:[\\/]*)
5161   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5162   ;;
5163   *)
5164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165 for as_dir in $PATH
5166 do
5167   IFS=$as_save_IFS
5168   test -z "$as_dir" && as_dir=.
5169     for ac_exec_ext in '' $ac_executable_extensions; do
5170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5171     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173     break 2
5174   fi
5175 done
5176   done
5177 IFS=$as_save_IFS
5178 
5179   ;;
5180 esac
5181 fi
5182 CHMOD=$ac_cv_path_CHMOD
5183 if test -n "$CHMOD"; then
5184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5185 $as_echo "$CHMOD" >&6; }
5186 else
5187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188 $as_echo "no" >&6; }
5189 fi
5190 
5191 
5192         if test "x$CHMOD" = x; then
5193           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5194         fi
5195       else
5196         # Otherwise we believe it is a complete path. Use it as it is.
5197         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5198 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5200 $as_echo_n "checking for CHMOD... " >&6; }
5201         if test ! -x "$tool_specified"; then
5202           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5203 $as_echo "not found" >&6; }
5204           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5205         fi
5206         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5207 $as_echo "$tool_specified" >&6; }
5208       fi
5209     fi
5210   fi
5211 
5212 
5213 
5214   if test "x$CHMOD" = x; then
5215     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5216   fi
5217 
5218 
5219 
5220 
5221 
5222   # Publish this variable in the help.
5223 
5224 
5225   if test "x$CMP" = x; then
5226     # The variable is not set by user, try to locate tool using the code snippet
5227     for ac_prog in cmp
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5232 $as_echo_n "checking for $ac_word... " >&6; }
5233 if ${ac_cv_path_CMP+:} false; then :
5234   $as_echo_n "(cached) " >&6
5235 else
5236   case $CMP in
5237   [\\/]* | ?:[\\/]*)
5238   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5239   ;;
5240   *)
5241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5242 for as_dir in $PATH
5243 do
5244   IFS=$as_save_IFS
5245   test -z "$as_dir" && as_dir=.
5246     for ac_exec_ext in '' $ac_executable_extensions; do
5247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5248     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5250     break 2
5251   fi
5252 done
5253   done
5254 IFS=$as_save_IFS
5255 
5256   ;;
5257 esac
5258 fi
5259 CMP=$ac_cv_path_CMP
5260 if test -n "$CMP"; then
5261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5262 $as_echo "$CMP" >&6; }
5263 else
5264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5265 $as_echo "no" >&6; }
5266 fi
5267 
5268 
5269   test -n "$CMP" && break
5270 done
5271 
5272   else
5273     # The variable is set, but is it from the command line or the environment?
5274 
5275     # Try to remove the string !CMP! from our list.
5276     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5277     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5278       # If it failed, the variable was not from the command line. Ignore it,
5279       # but warn the user (except for BASH, which is always set by the calling BASH).
5280       if test "xCMP" != xBASH; then
5281         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5282 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5283       fi
5284       # Try to locate tool using the code snippet
5285       for ac_prog in cmp
5286 do
5287   # Extract the first word of "$ac_prog", so it can be a program name with args.
5288 set dummy $ac_prog; ac_word=$2
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290 $as_echo_n "checking for $ac_word... " >&6; }
5291 if ${ac_cv_path_CMP+:} false; then :
5292   $as_echo_n "(cached) " >&6
5293 else
5294   case $CMP in
5295   [\\/]* | ?:[\\/]*)
5296   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5297   ;;
5298   *)
5299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300 for as_dir in $PATH
5301 do
5302   IFS=$as_save_IFS
5303   test -z "$as_dir" && as_dir=.
5304     for ac_exec_ext in '' $ac_executable_extensions; do
5305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5306     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308     break 2
5309   fi
5310 done
5311   done
5312 IFS=$as_save_IFS
5313 
5314   ;;
5315 esac
5316 fi
5317 CMP=$ac_cv_path_CMP
5318 if test -n "$CMP"; then
5319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5320 $as_echo "$CMP" >&6; }
5321 else
5322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323 $as_echo "no" >&6; }
5324 fi
5325 
5326 
5327   test -n "$CMP" && break
5328 done
5329 
5330     else
5331       # If it succeeded, then it was overridden by the user. We will use it
5332       # for the tool.
5333 
5334       # First remove it from the list of overridden variables, so we can test
5335       # for unknown variables in the end.
5336       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5337 
5338       # Check if the provided tool contains a complete path.
5339       tool_specified="$CMP"
5340       tool_basename="${tool_specified##*/}"
5341       if test "x$tool_basename" = "x$tool_specified"; then
5342         # A command without a complete path is provided, search $PATH.
5343         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5344 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5345         # Extract the first word of "$tool_basename", so it can be a program name with args.
5346 set dummy $tool_basename; ac_word=$2
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348 $as_echo_n "checking for $ac_word... " >&6; }
5349 if ${ac_cv_path_CMP+:} false; then :
5350   $as_echo_n "(cached) " >&6
5351 else
5352   case $CMP in
5353   [\\/]* | ?:[\\/]*)
5354   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5355   ;;
5356   *)
5357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358 for as_dir in $PATH
5359 do
5360   IFS=$as_save_IFS
5361   test -z "$as_dir" && as_dir=.
5362     for ac_exec_ext in '' $ac_executable_extensions; do
5363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366     break 2
5367   fi
5368 done
5369   done
5370 IFS=$as_save_IFS
5371 
5372   ;;
5373 esac
5374 fi
5375 CMP=$ac_cv_path_CMP
5376 if test -n "$CMP"; then
5377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5378 $as_echo "$CMP" >&6; }
5379 else
5380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381 $as_echo "no" >&6; }
5382 fi
5383 
5384 
5385         if test "x$CMP" = x; then
5386           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5387         fi
5388       else
5389         # Otherwise we believe it is a complete path. Use it as it is.
5390         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5391 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5393 $as_echo_n "checking for CMP... " >&6; }
5394         if test ! -x "$tool_specified"; then
5395           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5396 $as_echo "not found" >&6; }
5397           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5398         fi
5399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5400 $as_echo "$tool_specified" >&6; }
5401       fi
5402     fi
5403   fi
5404 
5405 
5406 
5407   if test "x$CMP" = x; then
5408     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5409   fi
5410 
5411 
5412 
5413 
5414 
5415   # Publish this variable in the help.
5416 
5417 
5418   if test "x$COMM" = x; then
5419     # The variable is not set by user, try to locate tool using the code snippet
5420     for ac_prog in comm
5421 do
5422   # Extract the first word of "$ac_prog", so it can be a program name with args.
5423 set dummy $ac_prog; ac_word=$2
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425 $as_echo_n "checking for $ac_word... " >&6; }
5426 if ${ac_cv_path_COMM+:} false; then :
5427   $as_echo_n "(cached) " >&6
5428 else
5429   case $COMM in
5430   [\\/]* | ?:[\\/]*)
5431   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5432   ;;
5433   *)
5434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435 for as_dir in $PATH
5436 do
5437   IFS=$as_save_IFS
5438   test -z "$as_dir" && as_dir=.
5439     for ac_exec_ext in '' $ac_executable_extensions; do
5440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5441     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443     break 2
5444   fi
5445 done
5446   done
5447 IFS=$as_save_IFS
5448 
5449   ;;
5450 esac
5451 fi
5452 COMM=$ac_cv_path_COMM
5453 if test -n "$COMM"; then
5454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5455 $as_echo "$COMM" >&6; }
5456 else
5457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458 $as_echo "no" >&6; }
5459 fi
5460 
5461 
5462   test -n "$COMM" && break
5463 done
5464 
5465   else
5466     # The variable is set, but is it from the command line or the environment?
5467 
5468     # Try to remove the string !COMM! from our list.
5469     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5470     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5471       # If it failed, the variable was not from the command line. Ignore it,
5472       # but warn the user (except for BASH, which is always set by the calling BASH).
5473       if test "xCOMM" != xBASH; then
5474         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5475 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5476       fi
5477       # Try to locate tool using the code snippet
5478       for ac_prog in comm
5479 do
5480   # Extract the first word of "$ac_prog", so it can be a program name with args.
5481 set dummy $ac_prog; ac_word=$2
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5483 $as_echo_n "checking for $ac_word... " >&6; }
5484 if ${ac_cv_path_COMM+:} false; then :
5485   $as_echo_n "(cached) " >&6
5486 else
5487   case $COMM in
5488   [\\/]* | ?:[\\/]*)
5489   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5490   ;;
5491   *)
5492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH
5494 do
5495   IFS=$as_save_IFS
5496   test -z "$as_dir" && as_dir=.
5497     for ac_exec_ext in '' $ac_executable_extensions; do
5498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5499     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501     break 2
5502   fi
5503 done
5504   done
5505 IFS=$as_save_IFS
5506 
5507   ;;
5508 esac
5509 fi
5510 COMM=$ac_cv_path_COMM
5511 if test -n "$COMM"; then
5512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5513 $as_echo "$COMM" >&6; }
5514 else
5515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516 $as_echo "no" >&6; }
5517 fi
5518 
5519 
5520   test -n "$COMM" && break
5521 done
5522 
5523     else
5524       # If it succeeded, then it was overridden by the user. We will use it
5525       # for the tool.
5526 
5527       # First remove it from the list of overridden variables, so we can test
5528       # for unknown variables in the end.
5529       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5530 
5531       # Check if the provided tool contains a complete path.
5532       tool_specified="$COMM"
5533       tool_basename="${tool_specified##*/}"
5534       if test "x$tool_basename" = "x$tool_specified"; then
5535         # A command without a complete path is provided, search $PATH.
5536         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5537 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5538         # Extract the first word of "$tool_basename", so it can be a program name with args.
5539 set dummy $tool_basename; ac_word=$2
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541 $as_echo_n "checking for $ac_word... " >&6; }
5542 if ${ac_cv_path_COMM+:} false; then :
5543   $as_echo_n "(cached) " >&6
5544 else
5545   case $COMM in
5546   [\\/]* | ?:[\\/]*)
5547   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5548   ;;
5549   *)
5550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551 for as_dir in $PATH
5552 do
5553   IFS=$as_save_IFS
5554   test -z "$as_dir" && as_dir=.
5555     for ac_exec_ext in '' $ac_executable_extensions; do
5556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5557     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559     break 2
5560   fi
5561 done
5562   done
5563 IFS=$as_save_IFS
5564 
5565   ;;
5566 esac
5567 fi
5568 COMM=$ac_cv_path_COMM
5569 if test -n "$COMM"; then
5570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5571 $as_echo "$COMM" >&6; }
5572 else
5573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574 $as_echo "no" >&6; }
5575 fi
5576 
5577 
5578         if test "x$COMM" = x; then
5579           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5580         fi
5581       else
5582         # Otherwise we believe it is a complete path. Use it as it is.
5583         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5584 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5586 $as_echo_n "checking for COMM... " >&6; }
5587         if test ! -x "$tool_specified"; then
5588           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5589 $as_echo "not found" >&6; }
5590           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5591         fi
5592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5593 $as_echo "$tool_specified" >&6; }
5594       fi
5595     fi
5596   fi
5597 
5598 
5599 
5600   if test "x$COMM" = x; then
5601     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5602   fi
5603 
5604 
5605 
5606 
5607 
5608   # Publish this variable in the help.
5609 
5610 
5611   if test "x$CP" = x; then
5612     # The variable is not set by user, try to locate tool using the code snippet
5613     for ac_prog in cp
5614 do
5615   # Extract the first word of "$ac_prog", so it can be a program name with args.
5616 set dummy $ac_prog; ac_word=$2
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618 $as_echo_n "checking for $ac_word... " >&6; }
5619 if ${ac_cv_path_CP+:} false; then :
5620   $as_echo_n "(cached) " >&6
5621 else
5622   case $CP in
5623   [\\/]* | ?:[\\/]*)
5624   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5625   ;;
5626   *)
5627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628 for as_dir in $PATH
5629 do
5630   IFS=$as_save_IFS
5631   test -z "$as_dir" && as_dir=.
5632     for ac_exec_ext in '' $ac_executable_extensions; do
5633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636     break 2
5637   fi
5638 done
5639   done
5640 IFS=$as_save_IFS
5641 
5642   ;;
5643 esac
5644 fi
5645 CP=$ac_cv_path_CP
5646 if test -n "$CP"; then
5647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5648 $as_echo "$CP" >&6; }
5649 else
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651 $as_echo "no" >&6; }
5652 fi
5653 
5654 
5655   test -n "$CP" && break
5656 done
5657 
5658   else
5659     # The variable is set, but is it from the command line or the environment?
5660 
5661     # Try to remove the string !CP! from our list.
5662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5664       # If it failed, the variable was not from the command line. Ignore it,
5665       # but warn the user (except for BASH, which is always set by the calling BASH).
5666       if test "xCP" != xBASH; then
5667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5668 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5669       fi
5670       # Try to locate tool using the code snippet
5671       for ac_prog in cp
5672 do
5673   # Extract the first word of "$ac_prog", so it can be a program name with args.
5674 set dummy $ac_prog; ac_word=$2
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676 $as_echo_n "checking for $ac_word... " >&6; }
5677 if ${ac_cv_path_CP+:} false; then :
5678   $as_echo_n "(cached) " >&6
5679 else
5680   case $CP in
5681   [\\/]* | ?:[\\/]*)
5682   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5683   ;;
5684   *)
5685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686 for as_dir in $PATH
5687 do
5688   IFS=$as_save_IFS
5689   test -z "$as_dir" && as_dir=.
5690     for ac_exec_ext in '' $ac_executable_extensions; do
5691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694     break 2
5695   fi
5696 done
5697   done
5698 IFS=$as_save_IFS
5699 
5700   ;;
5701 esac
5702 fi
5703 CP=$ac_cv_path_CP
5704 if test -n "$CP"; then
5705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5706 $as_echo "$CP" >&6; }
5707 else
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709 $as_echo "no" >&6; }
5710 fi
5711 
5712 
5713   test -n "$CP" && break
5714 done
5715 
5716     else
5717       # If it succeeded, then it was overridden by the user. We will use it
5718       # for the tool.
5719 
5720       # First remove it from the list of overridden variables, so we can test
5721       # for unknown variables in the end.
5722       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5723 
5724       # Check if the provided tool contains a complete path.
5725       tool_specified="$CP"
5726       tool_basename="${tool_specified##*/}"
5727       if test "x$tool_basename" = "x$tool_specified"; then
5728         # A command without a complete path is provided, search $PATH.
5729         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5730 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5731         # Extract the first word of "$tool_basename", so it can be a program name with args.
5732 set dummy $tool_basename; ac_word=$2
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734 $as_echo_n "checking for $ac_word... " >&6; }
5735 if ${ac_cv_path_CP+:} false; then :
5736   $as_echo_n "(cached) " >&6
5737 else
5738   case $CP in
5739   [\\/]* | ?:[\\/]*)
5740   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5741   ;;
5742   *)
5743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744 for as_dir in $PATH
5745 do
5746   IFS=$as_save_IFS
5747   test -z "$as_dir" && as_dir=.
5748     for ac_exec_ext in '' $ac_executable_extensions; do
5749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752     break 2
5753   fi
5754 done
5755   done
5756 IFS=$as_save_IFS
5757 
5758   ;;
5759 esac
5760 fi
5761 CP=$ac_cv_path_CP
5762 if test -n "$CP"; then
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5764 $as_echo "$CP" >&6; }
5765 else
5766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767 $as_echo "no" >&6; }
5768 fi
5769 
5770 
5771         if test "x$CP" = x; then
5772           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5773         fi
5774       else
5775         # Otherwise we believe it is a complete path. Use it as it is.
5776         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5777 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5778         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5779 $as_echo_n "checking for CP... " >&6; }
5780         if test ! -x "$tool_specified"; then
5781           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5782 $as_echo "not found" >&6; }
5783           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5784         fi
5785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5786 $as_echo "$tool_specified" >&6; }
5787       fi
5788     fi
5789   fi
5790 
5791 
5792 
5793   if test "x$CP" = x; then
5794     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5795   fi
5796 
5797 
5798 
5799 
5800 
5801   # Publish this variable in the help.
5802 
5803 
5804   if test "x$CUT" = x; then
5805     # The variable is not set by user, try to locate tool using the code snippet
5806     for ac_prog in cut
5807 do
5808   # Extract the first word of "$ac_prog", so it can be a program name with args.
5809 set dummy $ac_prog; ac_word=$2
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5811 $as_echo_n "checking for $ac_word... " >&6; }
5812 if ${ac_cv_path_CUT+:} false; then :
5813   $as_echo_n "(cached) " >&6
5814 else
5815   case $CUT in
5816   [\\/]* | ?:[\\/]*)
5817   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5818   ;;
5819   *)
5820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5821 for as_dir in $PATH
5822 do
5823   IFS=$as_save_IFS
5824   test -z "$as_dir" && as_dir=.
5825     for ac_exec_ext in '' $ac_executable_extensions; do
5826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5829     break 2
5830   fi
5831 done
5832   done
5833 IFS=$as_save_IFS
5834 
5835   ;;
5836 esac
5837 fi
5838 CUT=$ac_cv_path_CUT
5839 if test -n "$CUT"; then
5840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5841 $as_echo "$CUT" >&6; }
5842 else
5843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5844 $as_echo "no" >&6; }
5845 fi
5846 
5847 
5848   test -n "$CUT" && break
5849 done
5850 
5851   else
5852     # The variable is set, but is it from the command line or the environment?
5853 
5854     # Try to remove the string !CUT! from our list.
5855     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5856     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5857       # If it failed, the variable was not from the command line. Ignore it,
5858       # but warn the user (except for BASH, which is always set by the calling BASH).
5859       if test "xCUT" != xBASH; then
5860         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5861 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5862       fi
5863       # Try to locate tool using the code snippet
5864       for ac_prog in cut
5865 do
5866   # Extract the first word of "$ac_prog", so it can be a program name with args.
5867 set dummy $ac_prog; ac_word=$2
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869 $as_echo_n "checking for $ac_word... " >&6; }
5870 if ${ac_cv_path_CUT+:} false; then :
5871   $as_echo_n "(cached) " >&6
5872 else
5873   case $CUT in
5874   [\\/]* | ?:[\\/]*)
5875   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5876   ;;
5877   *)
5878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879 for as_dir in $PATH
5880 do
5881   IFS=$as_save_IFS
5882   test -z "$as_dir" && as_dir=.
5883     for ac_exec_ext in '' $ac_executable_extensions; do
5884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887     break 2
5888   fi
5889 done
5890   done
5891 IFS=$as_save_IFS
5892 
5893   ;;
5894 esac
5895 fi
5896 CUT=$ac_cv_path_CUT
5897 if test -n "$CUT"; then
5898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5899 $as_echo "$CUT" >&6; }
5900 else
5901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902 $as_echo "no" >&6; }
5903 fi
5904 
5905 
5906   test -n "$CUT" && break
5907 done
5908 
5909     else
5910       # If it succeeded, then it was overridden by the user. We will use it
5911       # for the tool.
5912 
5913       # First remove it from the list of overridden variables, so we can test
5914       # for unknown variables in the end.
5915       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5916 
5917       # Check if the provided tool contains a complete path.
5918       tool_specified="$CUT"
5919       tool_basename="${tool_specified##*/}"
5920       if test "x$tool_basename" = "x$tool_specified"; then
5921         # A command without a complete path is provided, search $PATH.
5922         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5923 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5924         # Extract the first word of "$tool_basename", so it can be a program name with args.
5925 set dummy $tool_basename; ac_word=$2
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927 $as_echo_n "checking for $ac_word... " >&6; }
5928 if ${ac_cv_path_CUT+:} false; then :
5929   $as_echo_n "(cached) " >&6
5930 else
5931   case $CUT in
5932   [\\/]* | ?:[\\/]*)
5933   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5934   ;;
5935   *)
5936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937 for as_dir in $PATH
5938 do
5939   IFS=$as_save_IFS
5940   test -z "$as_dir" && as_dir=.
5941     for ac_exec_ext in '' $ac_executable_extensions; do
5942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945     break 2
5946   fi
5947 done
5948   done
5949 IFS=$as_save_IFS
5950 
5951   ;;
5952 esac
5953 fi
5954 CUT=$ac_cv_path_CUT
5955 if test -n "$CUT"; then
5956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5957 $as_echo "$CUT" >&6; }
5958 else
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960 $as_echo "no" >&6; }
5961 fi
5962 
5963 
5964         if test "x$CUT" = x; then
5965           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5966         fi
5967       else
5968         # Otherwise we believe it is a complete path. Use it as it is.
5969         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5970 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5971         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5972 $as_echo_n "checking for CUT... " >&6; }
5973         if test ! -x "$tool_specified"; then
5974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5975 $as_echo "not found" >&6; }
5976           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5977         fi
5978         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5979 $as_echo "$tool_specified" >&6; }
5980       fi
5981     fi
5982   fi
5983 
5984 
5985 
5986   if test "x$CUT" = x; then
5987     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5988   fi
5989 
5990 
5991 
5992 
5993 
5994   # Publish this variable in the help.
5995 
5996 
5997   if test "x$DATE" = x; then
5998     # The variable is not set by user, try to locate tool using the code snippet
5999     for ac_prog in date
6000 do
6001   # Extract the first word of "$ac_prog", so it can be a program name with args.
6002 set dummy $ac_prog; ac_word=$2
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004 $as_echo_n "checking for $ac_word... " >&6; }
6005 if ${ac_cv_path_DATE+:} false; then :
6006   $as_echo_n "(cached) " >&6
6007 else
6008   case $DATE in
6009   [\\/]* | ?:[\\/]*)
6010   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6011   ;;
6012   *)
6013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014 for as_dir in $PATH
6015 do
6016   IFS=$as_save_IFS
6017   test -z "$as_dir" && as_dir=.
6018     for ac_exec_ext in '' $ac_executable_extensions; do
6019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022     break 2
6023   fi
6024 done
6025   done
6026 IFS=$as_save_IFS
6027 
6028   ;;
6029 esac
6030 fi
6031 DATE=$ac_cv_path_DATE
6032 if test -n "$DATE"; then
6033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6034 $as_echo "$DATE" >&6; }
6035 else
6036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037 $as_echo "no" >&6; }
6038 fi
6039 
6040 
6041   test -n "$DATE" && break
6042 done
6043 
6044   else
6045     # The variable is set, but is it from the command line or the environment?
6046 
6047     # Try to remove the string !DATE! from our list.
6048     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6049     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6050       # If it failed, the variable was not from the command line. Ignore it,
6051       # but warn the user (except for BASH, which is always set by the calling BASH).
6052       if test "xDATE" != xBASH; then
6053         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6054 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6055       fi
6056       # Try to locate tool using the code snippet
6057       for ac_prog in date
6058 do
6059   # Extract the first word of "$ac_prog", so it can be a program name with args.
6060 set dummy $ac_prog; ac_word=$2
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062 $as_echo_n "checking for $ac_word... " >&6; }
6063 if ${ac_cv_path_DATE+:} false; then :
6064   $as_echo_n "(cached) " >&6
6065 else
6066   case $DATE in
6067   [\\/]* | ?:[\\/]*)
6068   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6069   ;;
6070   *)
6071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072 for as_dir in $PATH
6073 do
6074   IFS=$as_save_IFS
6075   test -z "$as_dir" && as_dir=.
6076     for ac_exec_ext in '' $ac_executable_extensions; do
6077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080     break 2
6081   fi
6082 done
6083   done
6084 IFS=$as_save_IFS
6085 
6086   ;;
6087 esac
6088 fi
6089 DATE=$ac_cv_path_DATE
6090 if test -n "$DATE"; then
6091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6092 $as_echo "$DATE" >&6; }
6093 else
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095 $as_echo "no" >&6; }
6096 fi
6097 
6098 
6099   test -n "$DATE" && break
6100 done
6101 
6102     else
6103       # If it succeeded, then it was overridden by the user. We will use it
6104       # for the tool.
6105 
6106       # First remove it from the list of overridden variables, so we can test
6107       # for unknown variables in the end.
6108       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6109 
6110       # Check if the provided tool contains a complete path.
6111       tool_specified="$DATE"
6112       tool_basename="${tool_specified##*/}"
6113       if test "x$tool_basename" = "x$tool_specified"; then
6114         # A command without a complete path is provided, search $PATH.
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6116 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6117         # Extract the first word of "$tool_basename", so it can be a program name with args.
6118 set dummy $tool_basename; ac_word=$2
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120 $as_echo_n "checking for $ac_word... " >&6; }
6121 if ${ac_cv_path_DATE+:} false; then :
6122   $as_echo_n "(cached) " >&6
6123 else
6124   case $DATE in
6125   [\\/]* | ?:[\\/]*)
6126   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6127   ;;
6128   *)
6129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130 for as_dir in $PATH
6131 do
6132   IFS=$as_save_IFS
6133   test -z "$as_dir" && as_dir=.
6134     for ac_exec_ext in '' $ac_executable_extensions; do
6135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6136     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138     break 2
6139   fi
6140 done
6141   done
6142 IFS=$as_save_IFS
6143 
6144   ;;
6145 esac
6146 fi
6147 DATE=$ac_cv_path_DATE
6148 if test -n "$DATE"; then
6149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6150 $as_echo "$DATE" >&6; }
6151 else
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153 $as_echo "no" >&6; }
6154 fi
6155 
6156 
6157         if test "x$DATE" = x; then
6158           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6159         fi
6160       else
6161         # Otherwise we believe it is a complete path. Use it as it is.
6162         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6163 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6164         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6165 $as_echo_n "checking for DATE... " >&6; }
6166         if test ! -x "$tool_specified"; then
6167           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6168 $as_echo "not found" >&6; }
6169           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6170         fi
6171         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6172 $as_echo "$tool_specified" >&6; }
6173       fi
6174     fi
6175   fi
6176 
6177 
6178 
6179   if test "x$DATE" = x; then
6180     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6181   fi
6182 
6183 
6184 
6185 
6186 
6187   # Publish this variable in the help.
6188 
6189 
6190   if test "x$DIFF" = x; then
6191     # The variable is not set by user, try to locate tool using the code snippet
6192     for ac_prog in gdiff diff
6193 do
6194   # Extract the first word of "$ac_prog", so it can be a program name with args.
6195 set dummy $ac_prog; ac_word=$2
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197 $as_echo_n "checking for $ac_word... " >&6; }
6198 if ${ac_cv_path_DIFF+:} false; then :
6199   $as_echo_n "(cached) " >&6
6200 else
6201   case $DIFF in
6202   [\\/]* | ?:[\\/]*)
6203   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6204   ;;
6205   *)
6206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207 for as_dir in $PATH
6208 do
6209   IFS=$as_save_IFS
6210   test -z "$as_dir" && as_dir=.
6211     for ac_exec_ext in '' $ac_executable_extensions; do
6212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6213     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215     break 2
6216   fi
6217 done
6218   done
6219 IFS=$as_save_IFS
6220 
6221   ;;
6222 esac
6223 fi
6224 DIFF=$ac_cv_path_DIFF
6225 if test -n "$DIFF"; then
6226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6227 $as_echo "$DIFF" >&6; }
6228 else
6229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230 $as_echo "no" >&6; }
6231 fi
6232 
6233 
6234   test -n "$DIFF" && break
6235 done
6236 
6237   else
6238     # The variable is set, but is it from the command line or the environment?
6239 
6240     # Try to remove the string !DIFF! from our list.
6241     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6242     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6243       # If it failed, the variable was not from the command line. Ignore it,
6244       # but warn the user (except for BASH, which is always set by the calling BASH).
6245       if test "xDIFF" != xBASH; then
6246         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6247 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6248       fi
6249       # Try to locate tool using the code snippet
6250       for ac_prog in gdiff diff
6251 do
6252   # Extract the first word of "$ac_prog", so it can be a program name with args.
6253 set dummy $ac_prog; ac_word=$2
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255 $as_echo_n "checking for $ac_word... " >&6; }
6256 if ${ac_cv_path_DIFF+:} false; then :
6257   $as_echo_n "(cached) " >&6
6258 else
6259   case $DIFF in
6260   [\\/]* | ?:[\\/]*)
6261   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6262   ;;
6263   *)
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269     for ac_exec_ext in '' $ac_executable_extensions; do
6270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273     break 2
6274   fi
6275 done
6276   done
6277 IFS=$as_save_IFS
6278 
6279   ;;
6280 esac
6281 fi
6282 DIFF=$ac_cv_path_DIFF
6283 if test -n "$DIFF"; then
6284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6285 $as_echo "$DIFF" >&6; }
6286 else
6287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288 $as_echo "no" >&6; }
6289 fi
6290 
6291 
6292   test -n "$DIFF" && break
6293 done
6294 
6295     else
6296       # If it succeeded, then it was overridden by the user. We will use it
6297       # for the tool.
6298 
6299       # First remove it from the list of overridden variables, so we can test
6300       # for unknown variables in the end.
6301       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6302 
6303       # Check if the provided tool contains a complete path.
6304       tool_specified="$DIFF"
6305       tool_basename="${tool_specified##*/}"
6306       if test "x$tool_basename" = "x$tool_specified"; then
6307         # A command without a complete path is provided, search $PATH.
6308         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6309 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6310         # Extract the first word of "$tool_basename", so it can be a program name with args.
6311 set dummy $tool_basename; ac_word=$2
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313 $as_echo_n "checking for $ac_word... " >&6; }
6314 if ${ac_cv_path_DIFF+:} false; then :
6315   $as_echo_n "(cached) " >&6
6316 else
6317   case $DIFF in
6318   [\\/]* | ?:[\\/]*)
6319   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6320   ;;
6321   *)
6322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323 for as_dir in $PATH
6324 do
6325   IFS=$as_save_IFS
6326   test -z "$as_dir" && as_dir=.
6327     for ac_exec_ext in '' $ac_executable_extensions; do
6328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331     break 2
6332   fi
6333 done
6334   done
6335 IFS=$as_save_IFS
6336 
6337   ;;
6338 esac
6339 fi
6340 DIFF=$ac_cv_path_DIFF
6341 if test -n "$DIFF"; then
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6343 $as_echo "$DIFF" >&6; }
6344 else
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346 $as_echo "no" >&6; }
6347 fi
6348 
6349 
6350         if test "x$DIFF" = x; then
6351           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352         fi
6353       else
6354         # Otherwise we believe it is a complete path. Use it as it is.
6355         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6356 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6358 $as_echo_n "checking for DIFF... " >&6; }
6359         if test ! -x "$tool_specified"; then
6360           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361 $as_echo "not found" >&6; }
6362           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6363         fi
6364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365 $as_echo "$tool_specified" >&6; }
6366       fi
6367     fi
6368   fi
6369 
6370 
6371 
6372   if test "x$DIFF" = x; then
6373     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6374   fi
6375 
6376 
6377 
6378 
6379 
6380   # Publish this variable in the help.
6381 
6382 
6383   if test "x$DIRNAME" = x; then
6384     # The variable is not set by user, try to locate tool using the code snippet
6385     for ac_prog in dirname
6386 do
6387   # Extract the first word of "$ac_prog", so it can be a program name with args.
6388 set dummy $ac_prog; ac_word=$2
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390 $as_echo_n "checking for $ac_word... " >&6; }
6391 if ${ac_cv_path_DIRNAME+:} false; then :
6392   $as_echo_n "(cached) " >&6
6393 else
6394   case $DIRNAME in
6395   [\\/]* | ?:[\\/]*)
6396   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6397   ;;
6398   *)
6399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400 for as_dir in $PATH
6401 do
6402   IFS=$as_save_IFS
6403   test -z "$as_dir" && as_dir=.
6404     for ac_exec_ext in '' $ac_executable_extensions; do
6405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408     break 2
6409   fi
6410 done
6411   done
6412 IFS=$as_save_IFS
6413 
6414   ;;
6415 esac
6416 fi
6417 DIRNAME=$ac_cv_path_DIRNAME
6418 if test -n "$DIRNAME"; then
6419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6420 $as_echo "$DIRNAME" >&6; }
6421 else
6422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423 $as_echo "no" >&6; }
6424 fi
6425 
6426 
6427   test -n "$DIRNAME" && break
6428 done
6429 
6430   else
6431     # The variable is set, but is it from the command line or the environment?
6432 
6433     # Try to remove the string !DIRNAME! from our list.
6434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6436       # If it failed, the variable was not from the command line. Ignore it,
6437       # but warn the user (except for BASH, which is always set by the calling BASH).
6438       if test "xDIRNAME" != xBASH; then
6439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6440 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6441       fi
6442       # Try to locate tool using the code snippet
6443       for ac_prog in dirname
6444 do
6445   # Extract the first word of "$ac_prog", so it can be a program name with args.
6446 set dummy $ac_prog; ac_word=$2
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6448 $as_echo_n "checking for $ac_word... " >&6; }
6449 if ${ac_cv_path_DIRNAME+:} false; then :
6450   $as_echo_n "(cached) " >&6
6451 else
6452   case $DIRNAME in
6453   [\\/]* | ?:[\\/]*)
6454   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6455   ;;
6456   *)
6457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458 for as_dir in $PATH
6459 do
6460   IFS=$as_save_IFS
6461   test -z "$as_dir" && as_dir=.
6462     for ac_exec_ext in '' $ac_executable_extensions; do
6463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6464     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466     break 2
6467   fi
6468 done
6469   done
6470 IFS=$as_save_IFS
6471 
6472   ;;
6473 esac
6474 fi
6475 DIRNAME=$ac_cv_path_DIRNAME
6476 if test -n "$DIRNAME"; then
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6478 $as_echo "$DIRNAME" >&6; }
6479 else
6480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481 $as_echo "no" >&6; }
6482 fi
6483 
6484 
6485   test -n "$DIRNAME" && break
6486 done
6487 
6488     else
6489       # If it succeeded, then it was overridden by the user. We will use it
6490       # for the tool.
6491 
6492       # First remove it from the list of overridden variables, so we can test
6493       # for unknown variables in the end.
6494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6495 
6496       # Check if the provided tool contains a complete path.
6497       tool_specified="$DIRNAME"
6498       tool_basename="${tool_specified##*/}"
6499       if test "x$tool_basename" = "x$tool_specified"; then
6500         # A command without a complete path is provided, search $PATH.
6501         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6502 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6503         # Extract the first word of "$tool_basename", so it can be a program name with args.
6504 set dummy $tool_basename; ac_word=$2
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506 $as_echo_n "checking for $ac_word... " >&6; }
6507 if ${ac_cv_path_DIRNAME+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   case $DIRNAME in
6511   [\\/]* | ?:[\\/]*)
6512   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6513   ;;
6514   *)
6515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518   IFS=$as_save_IFS
6519   test -z "$as_dir" && as_dir=.
6520     for ac_exec_ext in '' $ac_executable_extensions; do
6521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524     break 2
6525   fi
6526 done
6527   done
6528 IFS=$as_save_IFS
6529 
6530   ;;
6531 esac
6532 fi
6533 DIRNAME=$ac_cv_path_DIRNAME
6534 if test -n "$DIRNAME"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6536 $as_echo "$DIRNAME" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541 
6542 
6543         if test "x$DIRNAME" = x; then
6544           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6545         fi
6546       else
6547         # Otherwise we believe it is a complete path. Use it as it is.
6548         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6549 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6551 $as_echo_n "checking for DIRNAME... " >&6; }
6552         if test ! -x "$tool_specified"; then
6553           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6554 $as_echo "not found" >&6; }
6555           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6556         fi
6557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6558 $as_echo "$tool_specified" >&6; }
6559       fi
6560     fi
6561   fi
6562 
6563 
6564 
6565   if test "x$DIRNAME" = x; then
6566     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6567   fi
6568 
6569 
6570 
6571 
6572 
6573   # Publish this variable in the help.
6574 
6575 
6576   if test "x$ECHO" = x; then
6577     # The variable is not set by user, try to locate tool using the code snippet
6578     for ac_prog in echo
6579 do
6580   # Extract the first word of "$ac_prog", so it can be a program name with args.
6581 set dummy $ac_prog; ac_word=$2
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583 $as_echo_n "checking for $ac_word... " >&6; }
6584 if ${ac_cv_path_ECHO+:} false; then :
6585   $as_echo_n "(cached) " >&6
6586 else
6587   case $ECHO in
6588   [\\/]* | ?:[\\/]*)
6589   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6590   ;;
6591   *)
6592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593 for as_dir in $PATH
6594 do
6595   IFS=$as_save_IFS
6596   test -z "$as_dir" && as_dir=.
6597     for ac_exec_ext in '' $ac_executable_extensions; do
6598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601     break 2
6602   fi
6603 done
6604   done
6605 IFS=$as_save_IFS
6606 
6607   ;;
6608 esac
6609 fi
6610 ECHO=$ac_cv_path_ECHO
6611 if test -n "$ECHO"; then
6612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6613 $as_echo "$ECHO" >&6; }
6614 else
6615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616 $as_echo "no" >&6; }
6617 fi
6618 
6619 
6620   test -n "$ECHO" && break
6621 done
6622 
6623   else
6624     # The variable is set, but is it from the command line or the environment?
6625 
6626     # Try to remove the string !ECHO! from our list.
6627     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6628     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6629       # If it failed, the variable was not from the command line. Ignore it,
6630       # but warn the user (except for BASH, which is always set by the calling BASH).
6631       if test "xECHO" != xBASH; then
6632         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6633 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6634       fi
6635       # Try to locate tool using the code snippet
6636       for ac_prog in echo
6637 do
6638   # Extract the first word of "$ac_prog", so it can be a program name with args.
6639 set dummy $ac_prog; ac_word=$2
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641 $as_echo_n "checking for $ac_word... " >&6; }
6642 if ${ac_cv_path_ECHO+:} false; then :
6643   $as_echo_n "(cached) " >&6
6644 else
6645   case $ECHO in
6646   [\\/]* | ?:[\\/]*)
6647   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6648   ;;
6649   *)
6650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   test -z "$as_dir" && as_dir=.
6655     for ac_exec_ext in '' $ac_executable_extensions; do
6656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659     break 2
6660   fi
6661 done
6662   done
6663 IFS=$as_save_IFS
6664 
6665   ;;
6666 esac
6667 fi
6668 ECHO=$ac_cv_path_ECHO
6669 if test -n "$ECHO"; then
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6671 $as_echo "$ECHO" >&6; }
6672 else
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674 $as_echo "no" >&6; }
6675 fi
6676 
6677 
6678   test -n "$ECHO" && break
6679 done
6680 
6681     else
6682       # If it succeeded, then it was overridden by the user. We will use it
6683       # for the tool.
6684 
6685       # First remove it from the list of overridden variables, so we can test
6686       # for unknown variables in the end.
6687       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6688 
6689       # Check if the provided tool contains a complete path.
6690       tool_specified="$ECHO"
6691       tool_basename="${tool_specified##*/}"
6692       if test "x$tool_basename" = "x$tool_specified"; then
6693         # A command without a complete path is provided, search $PATH.
6694         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6695 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6696         # Extract the first word of "$tool_basename", so it can be a program name with args.
6697 set dummy $tool_basename; ac_word=$2
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699 $as_echo_n "checking for $ac_word... " >&6; }
6700 if ${ac_cv_path_ECHO+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   case $ECHO in
6704   [\\/]* | ?:[\\/]*)
6705   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6706   ;;
6707   *)
6708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709 for as_dir in $PATH
6710 do
6711   IFS=$as_save_IFS
6712   test -z "$as_dir" && as_dir=.
6713     for ac_exec_ext in '' $ac_executable_extensions; do
6714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717     break 2
6718   fi
6719 done
6720   done
6721 IFS=$as_save_IFS
6722 
6723   ;;
6724 esac
6725 fi
6726 ECHO=$ac_cv_path_ECHO
6727 if test -n "$ECHO"; then
6728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6729 $as_echo "$ECHO" >&6; }
6730 else
6731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732 $as_echo "no" >&6; }
6733 fi
6734 
6735 
6736         if test "x$ECHO" = x; then
6737           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6738         fi
6739       else
6740         # Otherwise we believe it is a complete path. Use it as it is.
6741         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6742 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6744 $as_echo_n "checking for ECHO... " >&6; }
6745         if test ! -x "$tool_specified"; then
6746           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6747 $as_echo "not found" >&6; }
6748           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6749         fi
6750         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6751 $as_echo "$tool_specified" >&6; }
6752       fi
6753     fi
6754   fi
6755 
6756 
6757 
6758   if test "x$ECHO" = x; then
6759     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6760   fi
6761 
6762 
6763 
6764 
6765 
6766   # Publish this variable in the help.
6767 
6768 
6769   if test "x$EXPR" = x; then
6770     # The variable is not set by user, try to locate tool using the code snippet
6771     for ac_prog in expr
6772 do
6773   # Extract the first word of "$ac_prog", so it can be a program name with args.
6774 set dummy $ac_prog; ac_word=$2
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776 $as_echo_n "checking for $ac_word... " >&6; }
6777 if ${ac_cv_path_EXPR+:} false; then :
6778   $as_echo_n "(cached) " >&6
6779 else
6780   case $EXPR in
6781   [\\/]* | ?:[\\/]*)
6782   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6783   ;;
6784   *)
6785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6786 for as_dir in $PATH
6787 do
6788   IFS=$as_save_IFS
6789   test -z "$as_dir" && as_dir=.
6790     for ac_exec_ext in '' $ac_executable_extensions; do
6791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6792     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6794     break 2
6795   fi
6796 done
6797   done
6798 IFS=$as_save_IFS
6799 
6800   ;;
6801 esac
6802 fi
6803 EXPR=$ac_cv_path_EXPR
6804 if test -n "$EXPR"; then
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6806 $as_echo "$EXPR" >&6; }
6807 else
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809 $as_echo "no" >&6; }
6810 fi
6811 
6812 
6813   test -n "$EXPR" && break
6814 done
6815 
6816   else
6817     # The variable is set, but is it from the command line or the environment?
6818 
6819     # Try to remove the string !EXPR! from our list.
6820     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6821     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6822       # If it failed, the variable was not from the command line. Ignore it,
6823       # but warn the user (except for BASH, which is always set by the calling BASH).
6824       if test "xEXPR" != xBASH; then
6825         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6826 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6827       fi
6828       # Try to locate tool using the code snippet
6829       for ac_prog in expr
6830 do
6831   # Extract the first word of "$ac_prog", so it can be a program name with args.
6832 set dummy $ac_prog; ac_word=$2
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6834 $as_echo_n "checking for $ac_word... " >&6; }
6835 if ${ac_cv_path_EXPR+:} false; then :
6836   $as_echo_n "(cached) " >&6
6837 else
6838   case $EXPR in
6839   [\\/]* | ?:[\\/]*)
6840   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6841   ;;
6842   *)
6843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844 for as_dir in $PATH
6845 do
6846   IFS=$as_save_IFS
6847   test -z "$as_dir" && as_dir=.
6848     for ac_exec_ext in '' $ac_executable_extensions; do
6849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6852     break 2
6853   fi
6854 done
6855   done
6856 IFS=$as_save_IFS
6857 
6858   ;;
6859 esac
6860 fi
6861 EXPR=$ac_cv_path_EXPR
6862 if test -n "$EXPR"; then
6863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6864 $as_echo "$EXPR" >&6; }
6865 else
6866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6867 $as_echo "no" >&6; }
6868 fi
6869 
6870 
6871   test -n "$EXPR" && break
6872 done
6873 
6874     else
6875       # If it succeeded, then it was overridden by the user. We will use it
6876       # for the tool.
6877 
6878       # First remove it from the list of overridden variables, so we can test
6879       # for unknown variables in the end.
6880       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6881 
6882       # Check if the provided tool contains a complete path.
6883       tool_specified="$EXPR"
6884       tool_basename="${tool_specified##*/}"
6885       if test "x$tool_basename" = "x$tool_specified"; then
6886         # A command without a complete path is provided, search $PATH.
6887         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6888 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6889         # Extract the first word of "$tool_basename", so it can be a program name with args.
6890 set dummy $tool_basename; ac_word=$2
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892 $as_echo_n "checking for $ac_word... " >&6; }
6893 if ${ac_cv_path_EXPR+:} false; then :
6894   $as_echo_n "(cached) " >&6
6895 else
6896   case $EXPR in
6897   [\\/]* | ?:[\\/]*)
6898   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6899   ;;
6900   *)
6901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902 for as_dir in $PATH
6903 do
6904   IFS=$as_save_IFS
6905   test -z "$as_dir" && as_dir=.
6906     for ac_exec_ext in '' $ac_executable_extensions; do
6907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910     break 2
6911   fi
6912 done
6913   done
6914 IFS=$as_save_IFS
6915 
6916   ;;
6917 esac
6918 fi
6919 EXPR=$ac_cv_path_EXPR
6920 if test -n "$EXPR"; then
6921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6922 $as_echo "$EXPR" >&6; }
6923 else
6924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925 $as_echo "no" >&6; }
6926 fi
6927 
6928 
6929         if test "x$EXPR" = x; then
6930           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6931         fi
6932       else
6933         # Otherwise we believe it is a complete path. Use it as it is.
6934         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6935 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6936         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6937 $as_echo_n "checking for EXPR... " >&6; }
6938         if test ! -x "$tool_specified"; then
6939           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6940 $as_echo "not found" >&6; }
6941           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6942         fi
6943         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6944 $as_echo "$tool_specified" >&6; }
6945       fi
6946     fi
6947   fi
6948 
6949 
6950 
6951   if test "x$EXPR" = x; then
6952     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6953   fi
6954 
6955 
6956 
6957 
6958 
6959   # Publish this variable in the help.
6960 
6961 
6962   if test "x$FILE" = x; then
6963     # The variable is not set by user, try to locate tool using the code snippet
6964     for ac_prog in file
6965 do
6966   # Extract the first word of "$ac_prog", so it can be a program name with args.
6967 set dummy $ac_prog; ac_word=$2
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6969 $as_echo_n "checking for $ac_word... " >&6; }
6970 if ${ac_cv_path_FILE+:} false; then :
6971   $as_echo_n "(cached) " >&6
6972 else
6973   case $FILE in
6974   [\\/]* | ?:[\\/]*)
6975   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6976   ;;
6977   *)
6978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6979 for as_dir in $PATH
6980 do
6981   IFS=$as_save_IFS
6982   test -z "$as_dir" && as_dir=.
6983     for ac_exec_ext in '' $ac_executable_extensions; do
6984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6985     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6987     break 2
6988   fi
6989 done
6990   done
6991 IFS=$as_save_IFS
6992 
6993   ;;
6994 esac
6995 fi
6996 FILE=$ac_cv_path_FILE
6997 if test -n "$FILE"; then
6998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6999 $as_echo "$FILE" >&6; }
7000 else
7001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7002 $as_echo "no" >&6; }
7003 fi
7004 
7005 
7006   test -n "$FILE" && break
7007 done
7008 
7009   else
7010     # The variable is set, but is it from the command line or the environment?
7011 
7012     # Try to remove the string !FILE! from our list.
7013     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7014     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7015       # If it failed, the variable was not from the command line. Ignore it,
7016       # but warn the user (except for BASH, which is always set by the calling BASH).
7017       if test "xFILE" != xBASH; then
7018         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7019 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7020       fi
7021       # Try to locate tool using the code snippet
7022       for ac_prog in file
7023 do
7024   # Extract the first word of "$ac_prog", so it can be a program name with args.
7025 set dummy $ac_prog; ac_word=$2
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if ${ac_cv_path_FILE+:} false; then :
7029   $as_echo_n "(cached) " >&6
7030 else
7031   case $FILE in
7032   [\\/]* | ?:[\\/]*)
7033   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7034   ;;
7035   *)
7036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050 
7051   ;;
7052 esac
7053 fi
7054 FILE=$ac_cv_path_FILE
7055 if test -n "$FILE"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7057 $as_echo "$FILE" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062 
7063 
7064   test -n "$FILE" && break
7065 done
7066 
7067     else
7068       # If it succeeded, then it was overridden by the user. We will use it
7069       # for the tool.
7070 
7071       # First remove it from the list of overridden variables, so we can test
7072       # for unknown variables in the end.
7073       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7074 
7075       # Check if the provided tool contains a complete path.
7076       tool_specified="$FILE"
7077       tool_basename="${tool_specified##*/}"
7078       if test "x$tool_basename" = "x$tool_specified"; then
7079         # A command without a complete path is provided, search $PATH.
7080         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7081 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7082         # Extract the first word of "$tool_basename", so it can be a program name with args.
7083 set dummy $tool_basename; ac_word=$2
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085 $as_echo_n "checking for $ac_word... " >&6; }
7086 if ${ac_cv_path_FILE+:} false; then :
7087   $as_echo_n "(cached) " >&6
7088 else
7089   case $FILE in
7090   [\\/]* | ?:[\\/]*)
7091   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7092   ;;
7093   *)
7094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 for as_dir in $PATH
7096 do
7097   IFS=$as_save_IFS
7098   test -z "$as_dir" && as_dir=.
7099     for ac_exec_ext in '' $ac_executable_extensions; do
7100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103     break 2
7104   fi
7105 done
7106   done
7107 IFS=$as_save_IFS
7108 
7109   ;;
7110 esac
7111 fi
7112 FILE=$ac_cv_path_FILE
7113 if test -n "$FILE"; then
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7115 $as_echo "$FILE" >&6; }
7116 else
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 $as_echo "no" >&6; }
7119 fi
7120 
7121 
7122         if test "x$FILE" = x; then
7123           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7124         fi
7125       else
7126         # Otherwise we believe it is a complete path. Use it as it is.
7127         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7128 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7130 $as_echo_n "checking for FILE... " >&6; }
7131         if test ! -x "$tool_specified"; then
7132           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7133 $as_echo "not found" >&6; }
7134           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7135         fi
7136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7137 $as_echo "$tool_specified" >&6; }
7138       fi
7139     fi
7140   fi
7141 
7142 
7143 
7144   if test "x$FILE" = x; then
7145     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7146   fi
7147 
7148 
7149 
7150 
7151 
7152   # Publish this variable in the help.
7153 
7154 
7155   if test "x$FIND" = x; then
7156     # The variable is not set by user, try to locate tool using the code snippet
7157     for ac_prog in find
7158 do
7159   # Extract the first word of "$ac_prog", so it can be a program name with args.
7160 set dummy $ac_prog; ac_word=$2
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162 $as_echo_n "checking for $ac_word... " >&6; }
7163 if ${ac_cv_path_FIND+:} false; then :
7164   $as_echo_n "(cached) " >&6
7165 else
7166   case $FIND in
7167   [\\/]* | ?:[\\/]*)
7168   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7169   ;;
7170   *)
7171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172 for as_dir in $PATH
7173 do
7174   IFS=$as_save_IFS
7175   test -z "$as_dir" && as_dir=.
7176     for ac_exec_ext in '' $ac_executable_extensions; do
7177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180     break 2
7181   fi
7182 done
7183   done
7184 IFS=$as_save_IFS
7185 
7186   ;;
7187 esac
7188 fi
7189 FIND=$ac_cv_path_FIND
7190 if test -n "$FIND"; then
7191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7192 $as_echo "$FIND" >&6; }
7193 else
7194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195 $as_echo "no" >&6; }
7196 fi
7197 
7198 
7199   test -n "$FIND" && break
7200 done
7201 
7202   else
7203     # The variable is set, but is it from the command line or the environment?
7204 
7205     # Try to remove the string !FIND! from our list.
7206     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7207     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7208       # If it failed, the variable was not from the command line. Ignore it,
7209       # but warn the user (except for BASH, which is always set by the calling BASH).
7210       if test "xFIND" != xBASH; then
7211         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7212 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7213       fi
7214       # Try to locate tool using the code snippet
7215       for ac_prog in find
7216 do
7217   # Extract the first word of "$ac_prog", so it can be a program name with args.
7218 set dummy $ac_prog; ac_word=$2
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7220 $as_echo_n "checking for $ac_word... " >&6; }
7221 if ${ac_cv_path_FIND+:} false; then :
7222   $as_echo_n "(cached) " >&6
7223 else
7224   case $FIND in
7225   [\\/]* | ?:[\\/]*)
7226   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7227   ;;
7228   *)
7229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7230 for as_dir in $PATH
7231 do
7232   IFS=$as_save_IFS
7233   test -z "$as_dir" && as_dir=.
7234     for ac_exec_ext in '' $ac_executable_extensions; do
7235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7236     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7238     break 2
7239   fi
7240 done
7241   done
7242 IFS=$as_save_IFS
7243 
7244   ;;
7245 esac
7246 fi
7247 FIND=$ac_cv_path_FIND
7248 if test -n "$FIND"; then
7249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7250 $as_echo "$FIND" >&6; }
7251 else
7252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253 $as_echo "no" >&6; }
7254 fi
7255 
7256 
7257   test -n "$FIND" && break
7258 done
7259 
7260     else
7261       # If it succeeded, then it was overridden by the user. We will use it
7262       # for the tool.
7263 
7264       # First remove it from the list of overridden variables, so we can test
7265       # for unknown variables in the end.
7266       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7267 
7268       # Check if the provided tool contains a complete path.
7269       tool_specified="$FIND"
7270       tool_basename="${tool_specified##*/}"
7271       if test "x$tool_basename" = "x$tool_specified"; then
7272         # A command without a complete path is provided, search $PATH.
7273         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7274 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7275         # Extract the first word of "$tool_basename", so it can be a program name with args.
7276 set dummy $tool_basename; ac_word=$2
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7278 $as_echo_n "checking for $ac_word... " >&6; }
7279 if ${ac_cv_path_FIND+:} false; then :
7280   $as_echo_n "(cached) " >&6
7281 else
7282   case $FIND in
7283   [\\/]* | ?:[\\/]*)
7284   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7285   ;;
7286   *)
7287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288 for as_dir in $PATH
7289 do
7290   IFS=$as_save_IFS
7291   test -z "$as_dir" && as_dir=.
7292     for ac_exec_ext in '' $ac_executable_extensions; do
7293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7294     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7296     break 2
7297   fi
7298 done
7299   done
7300 IFS=$as_save_IFS
7301 
7302   ;;
7303 esac
7304 fi
7305 FIND=$ac_cv_path_FIND
7306 if test -n "$FIND"; then
7307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7308 $as_echo "$FIND" >&6; }
7309 else
7310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311 $as_echo "no" >&6; }
7312 fi
7313 
7314 
7315         if test "x$FIND" = x; then
7316           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7317         fi
7318       else
7319         # Otherwise we believe it is a complete path. Use it as it is.
7320         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7321 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7323 $as_echo_n "checking for FIND... " >&6; }
7324         if test ! -x "$tool_specified"; then
7325           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7326 $as_echo "not found" >&6; }
7327           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7328         fi
7329         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7330 $as_echo "$tool_specified" >&6; }
7331       fi
7332     fi
7333   fi
7334 
7335 
7336 
7337   if test "x$FIND" = x; then
7338     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7339   fi
7340 
7341 
7342 
7343 
7344 
7345   # Publish this variable in the help.
7346 
7347 
7348   if test "x$HEAD" = x; then
7349     # The variable is not set by user, try to locate tool using the code snippet
7350     for ac_prog in head
7351 do
7352   # Extract the first word of "$ac_prog", so it can be a program name with args.
7353 set dummy $ac_prog; ac_word=$2
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355 $as_echo_n "checking for $ac_word... " >&6; }
7356 if ${ac_cv_path_HEAD+:} false; then :
7357   $as_echo_n "(cached) " >&6
7358 else
7359   case $HEAD in
7360   [\\/]* | ?:[\\/]*)
7361   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7362   ;;
7363   *)
7364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365 for as_dir in $PATH
7366 do
7367   IFS=$as_save_IFS
7368   test -z "$as_dir" && as_dir=.
7369     for ac_exec_ext in '' $ac_executable_extensions; do
7370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373     break 2
7374   fi
7375 done
7376   done
7377 IFS=$as_save_IFS
7378 
7379   ;;
7380 esac
7381 fi
7382 HEAD=$ac_cv_path_HEAD
7383 if test -n "$HEAD"; then
7384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7385 $as_echo "$HEAD" >&6; }
7386 else
7387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390 
7391 
7392   test -n "$HEAD" && break
7393 done
7394 
7395   else
7396     # The variable is set, but is it from the command line or the environment?
7397 
7398     # Try to remove the string !HEAD! from our list.
7399     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7400     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7401       # If it failed, the variable was not from the command line. Ignore it,
7402       # but warn the user (except for BASH, which is always set by the calling BASH).
7403       if test "xHEAD" != xBASH; then
7404         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7405 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7406       fi
7407       # Try to locate tool using the code snippet
7408       for ac_prog in head
7409 do
7410   # Extract the first word of "$ac_prog", so it can be a program name with args.
7411 set dummy $ac_prog; ac_word=$2
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413 $as_echo_n "checking for $ac_word... " >&6; }
7414 if ${ac_cv_path_HEAD+:} false; then :
7415   $as_echo_n "(cached) " >&6
7416 else
7417   case $HEAD in
7418   [\\/]* | ?:[\\/]*)
7419   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7420   ;;
7421   *)
7422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423 for as_dir in $PATH
7424 do
7425   IFS=$as_save_IFS
7426   test -z "$as_dir" && as_dir=.
7427     for ac_exec_ext in '' $ac_executable_extensions; do
7428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431     break 2
7432   fi
7433 done
7434   done
7435 IFS=$as_save_IFS
7436 
7437   ;;
7438 esac
7439 fi
7440 HEAD=$ac_cv_path_HEAD
7441 if test -n "$HEAD"; then
7442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7443 $as_echo "$HEAD" >&6; }
7444 else
7445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446 $as_echo "no" >&6; }
7447 fi
7448 
7449 
7450   test -n "$HEAD" && break
7451 done
7452 
7453     else
7454       # If it succeeded, then it was overridden by the user. We will use it
7455       # for the tool.
7456 
7457       # First remove it from the list of overridden variables, so we can test
7458       # for unknown variables in the end.
7459       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7460 
7461       # Check if the provided tool contains a complete path.
7462       tool_specified="$HEAD"
7463       tool_basename="${tool_specified##*/}"
7464       if test "x$tool_basename" = "x$tool_specified"; then
7465         # A command without a complete path is provided, search $PATH.
7466         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7467 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7468         # Extract the first word of "$tool_basename", so it can be a program name with args.
7469 set dummy $tool_basename; ac_word=$2
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471 $as_echo_n "checking for $ac_word... " >&6; }
7472 if ${ac_cv_path_HEAD+:} false; then :
7473   $as_echo_n "(cached) " >&6
7474 else
7475   case $HEAD in
7476   [\\/]* | ?:[\\/]*)
7477   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7478   ;;
7479   *)
7480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481 for as_dir in $PATH
7482 do
7483   IFS=$as_save_IFS
7484   test -z "$as_dir" && as_dir=.
7485     for ac_exec_ext in '' $ac_executable_extensions; do
7486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489     break 2
7490   fi
7491 done
7492   done
7493 IFS=$as_save_IFS
7494 
7495   ;;
7496 esac
7497 fi
7498 HEAD=$ac_cv_path_HEAD
7499 if test -n "$HEAD"; then
7500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7501 $as_echo "$HEAD" >&6; }
7502 else
7503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504 $as_echo "no" >&6; }
7505 fi
7506 
7507 
7508         if test "x$HEAD" = x; then
7509           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7510         fi
7511       else
7512         # Otherwise we believe it is a complete path. Use it as it is.
7513         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7514 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7516 $as_echo_n "checking for HEAD... " >&6; }
7517         if test ! -x "$tool_specified"; then
7518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7519 $as_echo "not found" >&6; }
7520           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7521         fi
7522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7523 $as_echo "$tool_specified" >&6; }
7524       fi
7525     fi
7526   fi
7527 
7528 
7529 
7530   if test "x$HEAD" = x; then
7531     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7532   fi
7533 
7534 
7535 
7536 
7537 
7538   # Publish this variable in the help.
7539 
7540 
7541   if test "x$LN" = x; then
7542     # The variable is not set by user, try to locate tool using the code snippet
7543     for ac_prog in ln
7544 do
7545   # Extract the first word of "$ac_prog", so it can be a program name with args.
7546 set dummy $ac_prog; ac_word=$2
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7548 $as_echo_n "checking for $ac_word... " >&6; }
7549 if ${ac_cv_path_LN+:} false; then :
7550   $as_echo_n "(cached) " >&6
7551 else
7552   case $LN in
7553   [\\/]* | ?:[\\/]*)
7554   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7555   ;;
7556   *)
7557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7558 for as_dir in $PATH
7559 do
7560   IFS=$as_save_IFS
7561   test -z "$as_dir" && as_dir=.
7562     for ac_exec_ext in '' $ac_executable_extensions; do
7563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7564     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7566     break 2
7567   fi
7568 done
7569   done
7570 IFS=$as_save_IFS
7571 
7572   ;;
7573 esac
7574 fi
7575 LN=$ac_cv_path_LN
7576 if test -n "$LN"; then
7577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7578 $as_echo "$LN" >&6; }
7579 else
7580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7581 $as_echo "no" >&6; }
7582 fi
7583 
7584 
7585   test -n "$LN" && break
7586 done
7587 
7588   else
7589     # The variable is set, but is it from the command line or the environment?
7590 
7591     # Try to remove the string !LN! from our list.
7592     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7593     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7594       # If it failed, the variable was not from the command line. Ignore it,
7595       # but warn the user (except for BASH, which is always set by the calling BASH).
7596       if test "xLN" != xBASH; then
7597         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7598 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7599       fi
7600       # Try to locate tool using the code snippet
7601       for ac_prog in ln
7602 do
7603   # Extract the first word of "$ac_prog", so it can be a program name with args.
7604 set dummy $ac_prog; ac_word=$2
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7606 $as_echo_n "checking for $ac_word... " >&6; }
7607 if ${ac_cv_path_LN+:} false; then :
7608   $as_echo_n "(cached) " >&6
7609 else
7610   case $LN in
7611   [\\/]* | ?:[\\/]*)
7612   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7613   ;;
7614   *)
7615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7616 for as_dir in $PATH
7617 do
7618   IFS=$as_save_IFS
7619   test -z "$as_dir" && as_dir=.
7620     for ac_exec_ext in '' $ac_executable_extensions; do
7621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7622     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7624     break 2
7625   fi
7626 done
7627   done
7628 IFS=$as_save_IFS
7629 
7630   ;;
7631 esac
7632 fi
7633 LN=$ac_cv_path_LN
7634 if test -n "$LN"; then
7635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7636 $as_echo "$LN" >&6; }
7637 else
7638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639 $as_echo "no" >&6; }
7640 fi
7641 
7642 
7643   test -n "$LN" && break
7644 done
7645 
7646     else
7647       # If it succeeded, then it was overridden by the user. We will use it
7648       # for the tool.
7649 
7650       # First remove it from the list of overridden variables, so we can test
7651       # for unknown variables in the end.
7652       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7653 
7654       # Check if the provided tool contains a complete path.
7655       tool_specified="$LN"
7656       tool_basename="${tool_specified##*/}"
7657       if test "x$tool_basename" = "x$tool_specified"; then
7658         # A command without a complete path is provided, search $PATH.
7659         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7660 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7661         # Extract the first word of "$tool_basename", so it can be a program name with args.
7662 set dummy $tool_basename; ac_word=$2
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664 $as_echo_n "checking for $ac_word... " >&6; }
7665 if ${ac_cv_path_LN+:} false; then :
7666   $as_echo_n "(cached) " >&6
7667 else
7668   case $LN in
7669   [\\/]* | ?:[\\/]*)
7670   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7671   ;;
7672   *)
7673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674 for as_dir in $PATH
7675 do
7676   IFS=$as_save_IFS
7677   test -z "$as_dir" && as_dir=.
7678     for ac_exec_ext in '' $ac_executable_extensions; do
7679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682     break 2
7683   fi
7684 done
7685   done
7686 IFS=$as_save_IFS
7687 
7688   ;;
7689 esac
7690 fi
7691 LN=$ac_cv_path_LN
7692 if test -n "$LN"; then
7693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7694 $as_echo "$LN" >&6; }
7695 else
7696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7698 fi
7699 
7700 
7701         if test "x$LN" = x; then
7702           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7703         fi
7704       else
7705         # Otherwise we believe it is a complete path. Use it as it is.
7706         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7707 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7709 $as_echo_n "checking for LN... " >&6; }
7710         if test ! -x "$tool_specified"; then
7711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7712 $as_echo "not found" >&6; }
7713           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7714         fi
7715         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7716 $as_echo "$tool_specified" >&6; }
7717       fi
7718     fi
7719   fi
7720 
7721 
7722 
7723   if test "x$LN" = x; then
7724     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7725   fi
7726 
7727 
7728 
7729 
7730 
7731   # Publish this variable in the help.
7732 
7733 
7734   if test "x$LS" = x; then
7735     # The variable is not set by user, try to locate tool using the code snippet
7736     for ac_prog in ls
7737 do
7738   # Extract the first word of "$ac_prog", so it can be a program name with args.
7739 set dummy $ac_prog; ac_word=$2
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741 $as_echo_n "checking for $ac_word... " >&6; }
7742 if ${ac_cv_path_LS+:} false; then :
7743   $as_echo_n "(cached) " >&6
7744 else
7745   case $LS in
7746   [\\/]* | ?:[\\/]*)
7747   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7748   ;;
7749   *)
7750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751 for as_dir in $PATH
7752 do
7753   IFS=$as_save_IFS
7754   test -z "$as_dir" && as_dir=.
7755     for ac_exec_ext in '' $ac_executable_extensions; do
7756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759     break 2
7760   fi
7761 done
7762   done
7763 IFS=$as_save_IFS
7764 
7765   ;;
7766 esac
7767 fi
7768 LS=$ac_cv_path_LS
7769 if test -n "$LS"; then
7770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7771 $as_echo "$LS" >&6; }
7772 else
7773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774 $as_echo "no" >&6; }
7775 fi
7776 
7777 
7778   test -n "$LS" && break
7779 done
7780 
7781   else
7782     # The variable is set, but is it from the command line or the environment?
7783 
7784     # Try to remove the string !LS! from our list.
7785     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7786     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7787       # If it failed, the variable was not from the command line. Ignore it,
7788       # but warn the user (except for BASH, which is always set by the calling BASH).
7789       if test "xLS" != xBASH; then
7790         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7791 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7792       fi
7793       # Try to locate tool using the code snippet
7794       for ac_prog in ls
7795 do
7796   # Extract the first word of "$ac_prog", so it can be a program name with args.
7797 set dummy $ac_prog; ac_word=$2
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7799 $as_echo_n "checking for $ac_word... " >&6; }
7800 if ${ac_cv_path_LS+:} false; then :
7801   $as_echo_n "(cached) " >&6
7802 else
7803   case $LS in
7804   [\\/]* | ?:[\\/]*)
7805   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7806   ;;
7807   *)
7808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809 for as_dir in $PATH
7810 do
7811   IFS=$as_save_IFS
7812   test -z "$as_dir" && as_dir=.
7813     for ac_exec_ext in '' $ac_executable_extensions; do
7814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7815     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7817     break 2
7818   fi
7819 done
7820   done
7821 IFS=$as_save_IFS
7822 
7823   ;;
7824 esac
7825 fi
7826 LS=$ac_cv_path_LS
7827 if test -n "$LS"; then
7828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7829 $as_echo "$LS" >&6; }
7830 else
7831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833 fi
7834 
7835 
7836   test -n "$LS" && break
7837 done
7838 
7839     else
7840       # If it succeeded, then it was overridden by the user. We will use it
7841       # for the tool.
7842 
7843       # First remove it from the list of overridden variables, so we can test
7844       # for unknown variables in the end.
7845       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7846 
7847       # Check if the provided tool contains a complete path.
7848       tool_specified="$LS"
7849       tool_basename="${tool_specified##*/}"
7850       if test "x$tool_basename" = "x$tool_specified"; then
7851         # A command without a complete path is provided, search $PATH.
7852         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7853 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7854         # Extract the first word of "$tool_basename", so it can be a program name with args.
7855 set dummy $tool_basename; ac_word=$2
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857 $as_echo_n "checking for $ac_word... " >&6; }
7858 if ${ac_cv_path_LS+:} false; then :
7859   $as_echo_n "(cached) " >&6
7860 else
7861   case $LS in
7862   [\\/]* | ?:[\\/]*)
7863   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7864   ;;
7865   *)
7866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869   IFS=$as_save_IFS
7870   test -z "$as_dir" && as_dir=.
7871     for ac_exec_ext in '' $ac_executable_extensions; do
7872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875     break 2
7876   fi
7877 done
7878   done
7879 IFS=$as_save_IFS
7880 
7881   ;;
7882 esac
7883 fi
7884 LS=$ac_cv_path_LS
7885 if test -n "$LS"; then
7886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7887 $as_echo "$LS" >&6; }
7888 else
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890 $as_echo "no" >&6; }
7891 fi
7892 
7893 
7894         if test "x$LS" = x; then
7895           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7896         fi
7897       else
7898         # Otherwise we believe it is a complete path. Use it as it is.
7899         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7900 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7902 $as_echo_n "checking for LS... " >&6; }
7903         if test ! -x "$tool_specified"; then
7904           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7905 $as_echo "not found" >&6; }
7906           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7907         fi
7908         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7909 $as_echo "$tool_specified" >&6; }
7910       fi
7911     fi
7912   fi
7913 
7914 
7915 
7916   if test "x$LS" = x; then
7917     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7918   fi
7919 
7920 
7921 
7922 
7923 
7924   # Publish this variable in the help.
7925 
7926 
7927   if test "x$MKDIR" = x; then
7928     # The variable is not set by user, try to locate tool using the code snippet
7929     for ac_prog in mkdir
7930 do
7931   # Extract the first word of "$ac_prog", so it can be a program name with args.
7932 set dummy $ac_prog; ac_word=$2
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934 $as_echo_n "checking for $ac_word... " >&6; }
7935 if ${ac_cv_path_MKDIR+:} false; then :
7936   $as_echo_n "(cached) " >&6
7937 else
7938   case $MKDIR in
7939   [\\/]* | ?:[\\/]*)
7940   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7941   ;;
7942   *)
7943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7944 for as_dir in $PATH
7945 do
7946   IFS=$as_save_IFS
7947   test -z "$as_dir" && as_dir=.
7948     for ac_exec_ext in '' $ac_executable_extensions; do
7949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7950     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7952     break 2
7953   fi
7954 done
7955   done
7956 IFS=$as_save_IFS
7957 
7958   ;;
7959 esac
7960 fi
7961 MKDIR=$ac_cv_path_MKDIR
7962 if test -n "$MKDIR"; then
7963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7964 $as_echo "$MKDIR" >&6; }
7965 else
7966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7967 $as_echo "no" >&6; }
7968 fi
7969 
7970 
7971   test -n "$MKDIR" && break
7972 done
7973 
7974   else
7975     # The variable is set, but is it from the command line or the environment?
7976 
7977     # Try to remove the string !MKDIR! from our list.
7978     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7979     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7980       # If it failed, the variable was not from the command line. Ignore it,
7981       # but warn the user (except for BASH, which is always set by the calling BASH).
7982       if test "xMKDIR" != xBASH; then
7983         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7984 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7985       fi
7986       # Try to locate tool using the code snippet
7987       for ac_prog in mkdir
7988 do
7989   # Extract the first word of "$ac_prog", so it can be a program name with args.
7990 set dummy $ac_prog; ac_word=$2
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7992 $as_echo_n "checking for $ac_word... " >&6; }
7993 if ${ac_cv_path_MKDIR+:} false; then :
7994   $as_echo_n "(cached) " >&6
7995 else
7996   case $MKDIR in
7997   [\\/]* | ?:[\\/]*)
7998   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7999   ;;
8000   *)
8001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8002 for as_dir in $PATH
8003 do
8004   IFS=$as_save_IFS
8005   test -z "$as_dir" && as_dir=.
8006     for ac_exec_ext in '' $ac_executable_extensions; do
8007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8008     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8010     break 2
8011   fi
8012 done
8013   done
8014 IFS=$as_save_IFS
8015 
8016   ;;
8017 esac
8018 fi
8019 MKDIR=$ac_cv_path_MKDIR
8020 if test -n "$MKDIR"; then
8021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8022 $as_echo "$MKDIR" >&6; }
8023 else
8024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025 $as_echo "no" >&6; }
8026 fi
8027 
8028 
8029   test -n "$MKDIR" && break
8030 done
8031 
8032     else
8033       # If it succeeded, then it was overridden by the user. We will use it
8034       # for the tool.
8035 
8036       # First remove it from the list of overridden variables, so we can test
8037       # for unknown variables in the end.
8038       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8039 
8040       # Check if the provided tool contains a complete path.
8041       tool_specified="$MKDIR"
8042       tool_basename="${tool_specified##*/}"
8043       if test "x$tool_basename" = "x$tool_specified"; then
8044         # A command without a complete path is provided, search $PATH.
8045         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8046 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8047         # Extract the first word of "$tool_basename", so it can be a program name with args.
8048 set dummy $tool_basename; ac_word=$2
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050 $as_echo_n "checking for $ac_word... " >&6; }
8051 if ${ac_cv_path_MKDIR+:} false; then :
8052   $as_echo_n "(cached) " >&6
8053 else
8054   case $MKDIR in
8055   [\\/]* | ?:[\\/]*)
8056   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8057   ;;
8058   *)
8059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8060 for as_dir in $PATH
8061 do
8062   IFS=$as_save_IFS
8063   test -z "$as_dir" && as_dir=.
8064     for ac_exec_ext in '' $ac_executable_extensions; do
8065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8066     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8068     break 2
8069   fi
8070 done
8071   done
8072 IFS=$as_save_IFS
8073 
8074   ;;
8075 esac
8076 fi
8077 MKDIR=$ac_cv_path_MKDIR
8078 if test -n "$MKDIR"; then
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8080 $as_echo "$MKDIR" >&6; }
8081 else
8082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8083 $as_echo "no" >&6; }
8084 fi
8085 
8086 
8087         if test "x$MKDIR" = x; then
8088           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8089         fi
8090       else
8091         # Otherwise we believe it is a complete path. Use it as it is.
8092         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8093 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8094         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8095 $as_echo_n "checking for MKDIR... " >&6; }
8096         if test ! -x "$tool_specified"; then
8097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8098 $as_echo "not found" >&6; }
8099           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8100         fi
8101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8102 $as_echo "$tool_specified" >&6; }
8103       fi
8104     fi
8105   fi
8106 
8107 
8108 
8109   if test "x$MKDIR" = x; then
8110     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8111   fi
8112 
8113 
8114 
8115 
8116 
8117   # Publish this variable in the help.
8118 
8119 
8120   if test "x$MKTEMP" = x; then
8121     # The variable is not set by user, try to locate tool using the code snippet
8122     for ac_prog in mktemp
8123 do
8124   # Extract the first word of "$ac_prog", so it can be a program name with args.
8125 set dummy $ac_prog; ac_word=$2
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127 $as_echo_n "checking for $ac_word... " >&6; }
8128 if ${ac_cv_path_MKTEMP+:} false; then :
8129   $as_echo_n "(cached) " >&6
8130 else
8131   case $MKTEMP in
8132   [\\/]* | ?:[\\/]*)
8133   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8134   ;;
8135   *)
8136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137 for as_dir in $PATH
8138 do
8139   IFS=$as_save_IFS
8140   test -z "$as_dir" && as_dir=.
8141     for ac_exec_ext in '' $ac_executable_extensions; do
8142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8143     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8145     break 2
8146   fi
8147 done
8148   done
8149 IFS=$as_save_IFS
8150 
8151   ;;
8152 esac
8153 fi
8154 MKTEMP=$ac_cv_path_MKTEMP
8155 if test -n "$MKTEMP"; then
8156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8157 $as_echo "$MKTEMP" >&6; }
8158 else
8159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160 $as_echo "no" >&6; }
8161 fi
8162 
8163 
8164   test -n "$MKTEMP" && break
8165 done
8166 
8167   else
8168     # The variable is set, but is it from the command line or the environment?
8169 
8170     # Try to remove the string !MKTEMP! from our list.
8171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8173       # If it failed, the variable was not from the command line. Ignore it,
8174       # but warn the user (except for BASH, which is always set by the calling BASH).
8175       if test "xMKTEMP" != xBASH; then
8176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8177 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8178       fi
8179       # Try to locate tool using the code snippet
8180       for ac_prog in mktemp
8181 do
8182   # Extract the first word of "$ac_prog", so it can be a program name with args.
8183 set dummy $ac_prog; ac_word=$2
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185 $as_echo_n "checking for $ac_word... " >&6; }
8186 if ${ac_cv_path_MKTEMP+:} false; then :
8187   $as_echo_n "(cached) " >&6
8188 else
8189   case $MKTEMP in
8190   [\\/]* | ?:[\\/]*)
8191   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8192   ;;
8193   *)
8194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8195 for as_dir in $PATH
8196 do
8197   IFS=$as_save_IFS
8198   test -z "$as_dir" && as_dir=.
8199     for ac_exec_ext in '' $ac_executable_extensions; do
8200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8201     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8203     break 2
8204   fi
8205 done
8206   done
8207 IFS=$as_save_IFS
8208 
8209   ;;
8210 esac
8211 fi
8212 MKTEMP=$ac_cv_path_MKTEMP
8213 if test -n "$MKTEMP"; then
8214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8215 $as_echo "$MKTEMP" >&6; }
8216 else
8217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218 $as_echo "no" >&6; }
8219 fi
8220 
8221 
8222   test -n "$MKTEMP" && break
8223 done
8224 
8225     else
8226       # If it succeeded, then it was overridden by the user. We will use it
8227       # for the tool.
8228 
8229       # First remove it from the list of overridden variables, so we can test
8230       # for unknown variables in the end.
8231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8232 
8233       # Check if the provided tool contains a complete path.
8234       tool_specified="$MKTEMP"
8235       tool_basename="${tool_specified##*/}"
8236       if test "x$tool_basename" = "x$tool_specified"; then
8237         # A command without a complete path is provided, search $PATH.
8238         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8239 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8240         # Extract the first word of "$tool_basename", so it can be a program name with args.
8241 set dummy $tool_basename; ac_word=$2
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243 $as_echo_n "checking for $ac_word... " >&6; }
8244 if ${ac_cv_path_MKTEMP+:} false; then :
8245   $as_echo_n "(cached) " >&6
8246 else
8247   case $MKTEMP in
8248   [\\/]* | ?:[\\/]*)
8249   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8250   ;;
8251   *)
8252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253 for as_dir in $PATH
8254 do
8255   IFS=$as_save_IFS
8256   test -z "$as_dir" && as_dir=.
8257     for ac_exec_ext in '' $ac_executable_extensions; do
8258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8259     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8261     break 2
8262   fi
8263 done
8264   done
8265 IFS=$as_save_IFS
8266 
8267   ;;
8268 esac
8269 fi
8270 MKTEMP=$ac_cv_path_MKTEMP
8271 if test -n "$MKTEMP"; then
8272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8273 $as_echo "$MKTEMP" >&6; }
8274 else
8275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276 $as_echo "no" >&6; }
8277 fi
8278 
8279 
8280         if test "x$MKTEMP" = x; then
8281           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8282         fi
8283       else
8284         # Otherwise we believe it is a complete path. Use it as it is.
8285         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8286 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8287         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8288 $as_echo_n "checking for MKTEMP... " >&6; }
8289         if test ! -x "$tool_specified"; then
8290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8291 $as_echo "not found" >&6; }
8292           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8293         fi
8294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8295 $as_echo "$tool_specified" >&6; }
8296       fi
8297     fi
8298   fi
8299 
8300 
8301 
8302   if test "x$MKTEMP" = x; then
8303     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8304   fi
8305 
8306 
8307 
8308 
8309 
8310   # Publish this variable in the help.
8311 
8312 
8313   if test "x$MV" = x; then
8314     # The variable is not set by user, try to locate tool using the code snippet
8315     for ac_prog in mv
8316 do
8317   # Extract the first word of "$ac_prog", so it can be a program name with args.
8318 set dummy $ac_prog; ac_word=$2
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320 $as_echo_n "checking for $ac_word... " >&6; }
8321 if ${ac_cv_path_MV+:} false; then :
8322   $as_echo_n "(cached) " >&6
8323 else
8324   case $MV in
8325   [\\/]* | ?:[\\/]*)
8326   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8327   ;;
8328   *)
8329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330 for as_dir in $PATH
8331 do
8332   IFS=$as_save_IFS
8333   test -z "$as_dir" && as_dir=.
8334     for ac_exec_ext in '' $ac_executable_extensions; do
8335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8336     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338     break 2
8339   fi
8340 done
8341   done
8342 IFS=$as_save_IFS
8343 
8344   ;;
8345 esac
8346 fi
8347 MV=$ac_cv_path_MV
8348 if test -n "$MV"; then
8349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8350 $as_echo "$MV" >&6; }
8351 else
8352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353 $as_echo "no" >&6; }
8354 fi
8355 
8356 
8357   test -n "$MV" && break
8358 done
8359 
8360   else
8361     # The variable is set, but is it from the command line or the environment?
8362 
8363     # Try to remove the string !MV! from our list.
8364     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8365     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8366       # If it failed, the variable was not from the command line. Ignore it,
8367       # but warn the user (except for BASH, which is always set by the calling BASH).
8368       if test "xMV" != xBASH; then
8369         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8370 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8371       fi
8372       # Try to locate tool using the code snippet
8373       for ac_prog in mv
8374 do
8375   # Extract the first word of "$ac_prog", so it can be a program name with args.
8376 set dummy $ac_prog; ac_word=$2
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378 $as_echo_n "checking for $ac_word... " >&6; }
8379 if ${ac_cv_path_MV+:} false; then :
8380   $as_echo_n "(cached) " >&6
8381 else
8382   case $MV in
8383   [\\/]* | ?:[\\/]*)
8384   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8385   ;;
8386   *)
8387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388 for as_dir in $PATH
8389 do
8390   IFS=$as_save_IFS
8391   test -z "$as_dir" && as_dir=.
8392     for ac_exec_ext in '' $ac_executable_extensions; do
8393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396     break 2
8397   fi
8398 done
8399   done
8400 IFS=$as_save_IFS
8401 
8402   ;;
8403 esac
8404 fi
8405 MV=$ac_cv_path_MV
8406 if test -n "$MV"; then
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8408 $as_echo "$MV" >&6; }
8409 else
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411 $as_echo "no" >&6; }
8412 fi
8413 
8414 
8415   test -n "$MV" && break
8416 done
8417 
8418     else
8419       # If it succeeded, then it was overridden by the user. We will use it
8420       # for the tool.
8421 
8422       # First remove it from the list of overridden variables, so we can test
8423       # for unknown variables in the end.
8424       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8425 
8426       # Check if the provided tool contains a complete path.
8427       tool_specified="$MV"
8428       tool_basename="${tool_specified##*/}"
8429       if test "x$tool_basename" = "x$tool_specified"; then
8430         # A command without a complete path is provided, search $PATH.
8431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8432 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8433         # Extract the first word of "$tool_basename", so it can be a program name with args.
8434 set dummy $tool_basename; ac_word=$2
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436 $as_echo_n "checking for $ac_word... " >&6; }
8437 if ${ac_cv_path_MV+:} false; then :
8438   $as_echo_n "(cached) " >&6
8439 else
8440   case $MV in
8441   [\\/]* | ?:[\\/]*)
8442   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8443   ;;
8444   *)
8445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446 for as_dir in $PATH
8447 do
8448   IFS=$as_save_IFS
8449   test -z "$as_dir" && as_dir=.
8450     for ac_exec_ext in '' $ac_executable_extensions; do
8451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454     break 2
8455   fi
8456 done
8457   done
8458 IFS=$as_save_IFS
8459 
8460   ;;
8461 esac
8462 fi
8463 MV=$ac_cv_path_MV
8464 if test -n "$MV"; then
8465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8466 $as_echo "$MV" >&6; }
8467 else
8468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469 $as_echo "no" >&6; }
8470 fi
8471 
8472 
8473         if test "x$MV" = x; then
8474           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8475         fi
8476       else
8477         # Otherwise we believe it is a complete path. Use it as it is.
8478         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8479 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8481 $as_echo_n "checking for MV... " >&6; }
8482         if test ! -x "$tool_specified"; then
8483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8484 $as_echo "not found" >&6; }
8485           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8486         fi
8487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8488 $as_echo "$tool_specified" >&6; }
8489       fi
8490     fi
8491   fi
8492 
8493 
8494 
8495   if test "x$MV" = x; then
8496     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8497   fi
8498 
8499 
8500 
8501 
8502 
8503   # Publish this variable in the help.
8504 
8505 
8506   if test "x$NAWK" = x; then
8507     # The variable is not set by user, try to locate tool using the code snippet
8508     for ac_prog in nawk gawk awk
8509 do
8510   # Extract the first word of "$ac_prog", so it can be a program name with args.
8511 set dummy $ac_prog; ac_word=$2
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513 $as_echo_n "checking for $ac_word... " >&6; }
8514 if ${ac_cv_path_NAWK+:} false; then :
8515   $as_echo_n "(cached) " >&6
8516 else
8517   case $NAWK in
8518   [\\/]* | ?:[\\/]*)
8519   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8520   ;;
8521   *)
8522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536 
8537   ;;
8538 esac
8539 fi
8540 NAWK=$ac_cv_path_NAWK
8541 if test -n "$NAWK"; then
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8543 $as_echo "$NAWK" >&6; }
8544 else
8545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546 $as_echo "no" >&6; }
8547 fi
8548 
8549 
8550   test -n "$NAWK" && break
8551 done
8552 
8553   else
8554     # The variable is set, but is it from the command line or the environment?
8555 
8556     # Try to remove the string !NAWK! from our list.
8557     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8558     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8559       # If it failed, the variable was not from the command line. Ignore it,
8560       # but warn the user (except for BASH, which is always set by the calling BASH).
8561       if test "xNAWK" != xBASH; then
8562         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8563 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8564       fi
8565       # Try to locate tool using the code snippet
8566       for ac_prog in nawk gawk awk
8567 do
8568   # Extract the first word of "$ac_prog", so it can be a program name with args.
8569 set dummy $ac_prog; ac_word=$2
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8571 $as_echo_n "checking for $ac_word... " >&6; }
8572 if ${ac_cv_path_NAWK+:} false; then :
8573   $as_echo_n "(cached) " >&6
8574 else
8575   case $NAWK in
8576   [\\/]* | ?:[\\/]*)
8577   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8578   ;;
8579   *)
8580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581 for as_dir in $PATH
8582 do
8583   IFS=$as_save_IFS
8584   test -z "$as_dir" && as_dir=.
8585     for ac_exec_ext in '' $ac_executable_extensions; do
8586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589     break 2
8590   fi
8591 done
8592   done
8593 IFS=$as_save_IFS
8594 
8595   ;;
8596 esac
8597 fi
8598 NAWK=$ac_cv_path_NAWK
8599 if test -n "$NAWK"; then
8600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8601 $as_echo "$NAWK" >&6; }
8602 else
8603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604 $as_echo "no" >&6; }
8605 fi
8606 
8607 
8608   test -n "$NAWK" && break
8609 done
8610 
8611     else
8612       # If it succeeded, then it was overridden by the user. We will use it
8613       # for the tool.
8614 
8615       # First remove it from the list of overridden variables, so we can test
8616       # for unknown variables in the end.
8617       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8618 
8619       # Check if the provided tool contains a complete path.
8620       tool_specified="$NAWK"
8621       tool_basename="${tool_specified##*/}"
8622       if test "x$tool_basename" = "x$tool_specified"; then
8623         # A command without a complete path is provided, search $PATH.
8624         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8625 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8626         # Extract the first word of "$tool_basename", so it can be a program name with args.
8627 set dummy $tool_basename; ac_word=$2
8628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8629 $as_echo_n "checking for $ac_word... " >&6; }
8630 if ${ac_cv_path_NAWK+:} false; then :
8631   $as_echo_n "(cached) " >&6
8632 else
8633   case $NAWK in
8634   [\\/]* | ?:[\\/]*)
8635   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8636   ;;
8637   *)
8638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8639 for as_dir in $PATH
8640 do
8641   IFS=$as_save_IFS
8642   test -z "$as_dir" && as_dir=.
8643     for ac_exec_ext in '' $ac_executable_extensions; do
8644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8645     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8647     break 2
8648   fi
8649 done
8650   done
8651 IFS=$as_save_IFS
8652 
8653   ;;
8654 esac
8655 fi
8656 NAWK=$ac_cv_path_NAWK
8657 if test -n "$NAWK"; then
8658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8659 $as_echo "$NAWK" >&6; }
8660 else
8661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662 $as_echo "no" >&6; }
8663 fi
8664 
8665 
8666         if test "x$NAWK" = x; then
8667           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8668         fi
8669       else
8670         # Otherwise we believe it is a complete path. Use it as it is.
8671         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8672 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8673         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8674 $as_echo_n "checking for NAWK... " >&6; }
8675         if test ! -x "$tool_specified"; then
8676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8677 $as_echo "not found" >&6; }
8678           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8679         fi
8680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8681 $as_echo "$tool_specified" >&6; }
8682       fi
8683     fi
8684   fi
8685 
8686 
8687 
8688   if test "x$NAWK" = x; then
8689     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8690   fi
8691 
8692 
8693 
8694 
8695 
8696   # Publish this variable in the help.
8697 
8698 
8699   if test "x$PRINTF" = x; then
8700     # The variable is not set by user, try to locate tool using the code snippet
8701     for ac_prog in printf
8702 do
8703   # Extract the first word of "$ac_prog", so it can be a program name with args.
8704 set dummy $ac_prog; ac_word=$2
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8706 $as_echo_n "checking for $ac_word... " >&6; }
8707 if ${ac_cv_path_PRINTF+:} false; then :
8708   $as_echo_n "(cached) " >&6
8709 else
8710   case $PRINTF in
8711   [\\/]* | ?:[\\/]*)
8712   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8713   ;;
8714   *)
8715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8716 for as_dir in $PATH
8717 do
8718   IFS=$as_save_IFS
8719   test -z "$as_dir" && as_dir=.
8720     for ac_exec_ext in '' $ac_executable_extensions; do
8721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8722     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8724     break 2
8725   fi
8726 done
8727   done
8728 IFS=$as_save_IFS
8729 
8730   ;;
8731 esac
8732 fi
8733 PRINTF=$ac_cv_path_PRINTF
8734 if test -n "$PRINTF"; then
8735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8736 $as_echo "$PRINTF" >&6; }
8737 else
8738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8739 $as_echo "no" >&6; }
8740 fi
8741 
8742 
8743   test -n "$PRINTF" && break
8744 done
8745 
8746   else
8747     # The variable is set, but is it from the command line or the environment?
8748 
8749     # Try to remove the string !PRINTF! from our list.
8750     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8751     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8752       # If it failed, the variable was not from the command line. Ignore it,
8753       # but warn the user (except for BASH, which is always set by the calling BASH).
8754       if test "xPRINTF" != xBASH; then
8755         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8756 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8757       fi
8758       # Try to locate tool using the code snippet
8759       for ac_prog in printf
8760 do
8761   # Extract the first word of "$ac_prog", so it can be a program name with args.
8762 set dummy $ac_prog; ac_word=$2
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8764 $as_echo_n "checking for $ac_word... " >&6; }
8765 if ${ac_cv_path_PRINTF+:} false; then :
8766   $as_echo_n "(cached) " >&6
8767 else
8768   case $PRINTF in
8769   [\\/]* | ?:[\\/]*)
8770   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8771   ;;
8772   *)
8773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8774 for as_dir in $PATH
8775 do
8776   IFS=$as_save_IFS
8777   test -z "$as_dir" && as_dir=.
8778     for ac_exec_ext in '' $ac_executable_extensions; do
8779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8780     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8782     break 2
8783   fi
8784 done
8785   done
8786 IFS=$as_save_IFS
8787 
8788   ;;
8789 esac
8790 fi
8791 PRINTF=$ac_cv_path_PRINTF
8792 if test -n "$PRINTF"; then
8793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8794 $as_echo "$PRINTF" >&6; }
8795 else
8796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797 $as_echo "no" >&6; }
8798 fi
8799 
8800 
8801   test -n "$PRINTF" && break
8802 done
8803 
8804     else
8805       # If it succeeded, then it was overridden by the user. We will use it
8806       # for the tool.
8807 
8808       # First remove it from the list of overridden variables, so we can test
8809       # for unknown variables in the end.
8810       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8811 
8812       # Check if the provided tool contains a complete path.
8813       tool_specified="$PRINTF"
8814       tool_basename="${tool_specified##*/}"
8815       if test "x$tool_basename" = "x$tool_specified"; then
8816         # A command without a complete path is provided, search $PATH.
8817         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8818 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8819         # Extract the first word of "$tool_basename", so it can be a program name with args.
8820 set dummy $tool_basename; ac_word=$2
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822 $as_echo_n "checking for $ac_word... " >&6; }
8823 if ${ac_cv_path_PRINTF+:} false; then :
8824   $as_echo_n "(cached) " >&6
8825 else
8826   case $PRINTF in
8827   [\\/]* | ?:[\\/]*)
8828   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8829   ;;
8830   *)
8831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832 for as_dir in $PATH
8833 do
8834   IFS=$as_save_IFS
8835   test -z "$as_dir" && as_dir=.
8836     for ac_exec_ext in '' $ac_executable_extensions; do
8837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840     break 2
8841   fi
8842 done
8843   done
8844 IFS=$as_save_IFS
8845 
8846   ;;
8847 esac
8848 fi
8849 PRINTF=$ac_cv_path_PRINTF
8850 if test -n "$PRINTF"; then
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8852 $as_echo "$PRINTF" >&6; }
8853 else
8854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855 $as_echo "no" >&6; }
8856 fi
8857 
8858 
8859         if test "x$PRINTF" = x; then
8860           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8861         fi
8862       else
8863         # Otherwise we believe it is a complete path. Use it as it is.
8864         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8865 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8866         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8867 $as_echo_n "checking for PRINTF... " >&6; }
8868         if test ! -x "$tool_specified"; then
8869           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8870 $as_echo "not found" >&6; }
8871           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8872         fi
8873         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8874 $as_echo "$tool_specified" >&6; }
8875       fi
8876     fi
8877   fi
8878 
8879 
8880 
8881   if test "x$PRINTF" = x; then
8882     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8883   fi
8884 
8885 
8886 
8887 
8888 
8889   # Publish this variable in the help.
8890 
8891 
8892   if test "x$RM" = x; then
8893     # The variable is not set by user, try to locate tool using the code snippet
8894     for ac_prog in rm
8895 do
8896   # Extract the first word of "$ac_prog", so it can be a program name with args.
8897 set dummy $ac_prog; ac_word=$2
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899 $as_echo_n "checking for $ac_word... " >&6; }
8900 if ${ac_cv_path_RM+:} false; then :
8901   $as_echo_n "(cached) " >&6
8902 else
8903   case $RM in
8904   [\\/]* | ?:[\\/]*)
8905   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8906   ;;
8907   *)
8908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909 for as_dir in $PATH
8910 do
8911   IFS=$as_save_IFS
8912   test -z "$as_dir" && as_dir=.
8913     for ac_exec_ext in '' $ac_executable_extensions; do
8914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917     break 2
8918   fi
8919 done
8920   done
8921 IFS=$as_save_IFS
8922 
8923   ;;
8924 esac
8925 fi
8926 RM=$ac_cv_path_RM
8927 if test -n "$RM"; then
8928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8929 $as_echo "$RM" >&6; }
8930 else
8931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932 $as_echo "no" >&6; }
8933 fi
8934 
8935 
8936   test -n "$RM" && break
8937 done
8938 
8939   else
8940     # The variable is set, but is it from the command line or the environment?
8941 
8942     # Try to remove the string !RM! from our list.
8943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8945       # If it failed, the variable was not from the command line. Ignore it,
8946       # but warn the user (except for BASH, which is always set by the calling BASH).
8947       if test "xRM" != xBASH; then
8948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8949 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8950       fi
8951       # Try to locate tool using the code snippet
8952       for ac_prog in rm
8953 do
8954   # Extract the first word of "$ac_prog", so it can be a program name with args.
8955 set dummy $ac_prog; ac_word=$2
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957 $as_echo_n "checking for $ac_word... " >&6; }
8958 if ${ac_cv_path_RM+:} false; then :
8959   $as_echo_n "(cached) " >&6
8960 else
8961   case $RM in
8962   [\\/]* | ?:[\\/]*)
8963   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8964   ;;
8965   *)
8966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8967 for as_dir in $PATH
8968 do
8969   IFS=$as_save_IFS
8970   test -z "$as_dir" && as_dir=.
8971     for ac_exec_ext in '' $ac_executable_extensions; do
8972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8973     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8975     break 2
8976   fi
8977 done
8978   done
8979 IFS=$as_save_IFS
8980 
8981   ;;
8982 esac
8983 fi
8984 RM=$ac_cv_path_RM
8985 if test -n "$RM"; then
8986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8987 $as_echo "$RM" >&6; }
8988 else
8989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990 $as_echo "no" >&6; }
8991 fi
8992 
8993 
8994   test -n "$RM" && break
8995 done
8996 
8997     else
8998       # If it succeeded, then it was overridden by the user. We will use it
8999       # for the tool.
9000 
9001       # First remove it from the list of overridden variables, so we can test
9002       # for unknown variables in the end.
9003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9004 
9005       # Check if the provided tool contains a complete path.
9006       tool_specified="$RM"
9007       tool_basename="${tool_specified##*/}"
9008       if test "x$tool_basename" = "x$tool_specified"; then
9009         # A command without a complete path is provided, search $PATH.
9010         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9011 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9012         # Extract the first word of "$tool_basename", so it can be a program name with args.
9013 set dummy $tool_basename; ac_word=$2
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015 $as_echo_n "checking for $ac_word... " >&6; }
9016 if ${ac_cv_path_RM+:} false; then :
9017   $as_echo_n "(cached) " >&6
9018 else
9019   case $RM in
9020   [\\/]* | ?:[\\/]*)
9021   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9022   ;;
9023   *)
9024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025 for as_dir in $PATH
9026 do
9027   IFS=$as_save_IFS
9028   test -z "$as_dir" && as_dir=.
9029     for ac_exec_ext in '' $ac_executable_extensions; do
9030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033     break 2
9034   fi
9035 done
9036   done
9037 IFS=$as_save_IFS
9038 
9039   ;;
9040 esac
9041 fi
9042 RM=$ac_cv_path_RM
9043 if test -n "$RM"; then
9044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9045 $as_echo "$RM" >&6; }
9046 else
9047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048 $as_echo "no" >&6; }
9049 fi
9050 
9051 
9052         if test "x$RM" = x; then
9053           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9054         fi
9055       else
9056         # Otherwise we believe it is a complete path. Use it as it is.
9057         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9058 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9060 $as_echo_n "checking for RM... " >&6; }
9061         if test ! -x "$tool_specified"; then
9062           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9063 $as_echo "not found" >&6; }
9064           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9065         fi
9066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9067 $as_echo "$tool_specified" >&6; }
9068       fi
9069     fi
9070   fi
9071 
9072 
9073 
9074   if test "x$RM" = x; then
9075     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9076   fi
9077 
9078 
9079 
9080 
9081 
9082   # Publish this variable in the help.
9083 
9084 
9085   if test "x$SH" = x; then
9086     # The variable is not set by user, try to locate tool using the code snippet
9087     for ac_prog in sh
9088 do
9089   # Extract the first word of "$ac_prog", so it can be a program name with args.
9090 set dummy $ac_prog; ac_word=$2
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092 $as_echo_n "checking for $ac_word... " >&6; }
9093 if ${ac_cv_path_SH+:} false; then :
9094   $as_echo_n "(cached) " >&6
9095 else
9096   case $SH in
9097   [\\/]* | ?:[\\/]*)
9098   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9099   ;;
9100   *)
9101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102 for as_dir in $PATH
9103 do
9104   IFS=$as_save_IFS
9105   test -z "$as_dir" && as_dir=.
9106     for ac_exec_ext in '' $ac_executable_extensions; do
9107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110     break 2
9111   fi
9112 done
9113   done
9114 IFS=$as_save_IFS
9115 
9116   ;;
9117 esac
9118 fi
9119 SH=$ac_cv_path_SH
9120 if test -n "$SH"; then
9121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9122 $as_echo "$SH" >&6; }
9123 else
9124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125 $as_echo "no" >&6; }
9126 fi
9127 
9128 
9129   test -n "$SH" && break
9130 done
9131 
9132   else
9133     # The variable is set, but is it from the command line or the environment?
9134 
9135     # Try to remove the string !SH! from our list.
9136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9138       # If it failed, the variable was not from the command line. Ignore it,
9139       # but warn the user (except for BASH, which is always set by the calling BASH).
9140       if test "xSH" != xBASH; then
9141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9142 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9143       fi
9144       # Try to locate tool using the code snippet
9145       for ac_prog in sh
9146 do
9147   # Extract the first word of "$ac_prog", so it can be a program name with args.
9148 set dummy $ac_prog; ac_word=$2
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150 $as_echo_n "checking for $ac_word... " >&6; }
9151 if ${ac_cv_path_SH+:} false; then :
9152   $as_echo_n "(cached) " >&6
9153 else
9154   case $SH in
9155   [\\/]* | ?:[\\/]*)
9156   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9157   ;;
9158   *)
9159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160 for as_dir in $PATH
9161 do
9162   IFS=$as_save_IFS
9163   test -z "$as_dir" && as_dir=.
9164     for ac_exec_ext in '' $ac_executable_extensions; do
9165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168     break 2
9169   fi
9170 done
9171   done
9172 IFS=$as_save_IFS
9173 
9174   ;;
9175 esac
9176 fi
9177 SH=$ac_cv_path_SH
9178 if test -n "$SH"; then
9179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9180 $as_echo "$SH" >&6; }
9181 else
9182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183 $as_echo "no" >&6; }
9184 fi
9185 
9186 
9187   test -n "$SH" && break
9188 done
9189 
9190     else
9191       # If it succeeded, then it was overridden by the user. We will use it
9192       # for the tool.
9193 
9194       # First remove it from the list of overridden variables, so we can test
9195       # for unknown variables in the end.
9196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9197 
9198       # Check if the provided tool contains a complete path.
9199       tool_specified="$SH"
9200       tool_basename="${tool_specified##*/}"
9201       if test "x$tool_basename" = "x$tool_specified"; then
9202         # A command without a complete path is provided, search $PATH.
9203         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9204 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9205         # Extract the first word of "$tool_basename", so it can be a program name with args.
9206 set dummy $tool_basename; ac_word=$2
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208 $as_echo_n "checking for $ac_word... " >&6; }
9209 if ${ac_cv_path_SH+:} false; then :
9210   $as_echo_n "(cached) " >&6
9211 else
9212   case $SH in
9213   [\\/]* | ?:[\\/]*)
9214   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9215   ;;
9216   *)
9217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218 for as_dir in $PATH
9219 do
9220   IFS=$as_save_IFS
9221   test -z "$as_dir" && as_dir=.
9222     for ac_exec_ext in '' $ac_executable_extensions; do
9223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226     break 2
9227   fi
9228 done
9229   done
9230 IFS=$as_save_IFS
9231 
9232   ;;
9233 esac
9234 fi
9235 SH=$ac_cv_path_SH
9236 if test -n "$SH"; then
9237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9238 $as_echo "$SH" >&6; }
9239 else
9240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241 $as_echo "no" >&6; }
9242 fi
9243 
9244 
9245         if test "x$SH" = x; then
9246           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9247         fi
9248       else
9249         # Otherwise we believe it is a complete path. Use it as it is.
9250         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9251 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9253 $as_echo_n "checking for SH... " >&6; }
9254         if test ! -x "$tool_specified"; then
9255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9256 $as_echo "not found" >&6; }
9257           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9258         fi
9259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9260 $as_echo "$tool_specified" >&6; }
9261       fi
9262     fi
9263   fi
9264 
9265 
9266 
9267   if test "x$SH" = x; then
9268     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9269   fi
9270 
9271 
9272 
9273 
9274 
9275   # Publish this variable in the help.
9276 
9277 
9278   if test "x$SORT" = x; then
9279     # The variable is not set by user, try to locate tool using the code snippet
9280     for ac_prog in sort
9281 do
9282   # Extract the first word of "$ac_prog", so it can be a program name with args.
9283 set dummy $ac_prog; ac_word=$2
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285 $as_echo_n "checking for $ac_word... " >&6; }
9286 if ${ac_cv_path_SORT+:} false; then :
9287   $as_echo_n "(cached) " >&6
9288 else
9289   case $SORT in
9290   [\\/]* | ?:[\\/]*)
9291   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9292   ;;
9293   *)
9294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295 for as_dir in $PATH
9296 do
9297   IFS=$as_save_IFS
9298   test -z "$as_dir" && as_dir=.
9299     for ac_exec_ext in '' $ac_executable_extensions; do
9300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9301     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9303     break 2
9304   fi
9305 done
9306   done
9307 IFS=$as_save_IFS
9308 
9309   ;;
9310 esac
9311 fi
9312 SORT=$ac_cv_path_SORT
9313 if test -n "$SORT"; then
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9315 $as_echo "$SORT" >&6; }
9316 else
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318 $as_echo "no" >&6; }
9319 fi
9320 
9321 
9322   test -n "$SORT" && break
9323 done
9324 
9325   else
9326     # The variable is set, but is it from the command line or the environment?
9327 
9328     # Try to remove the string !SORT! from our list.
9329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9331       # If it failed, the variable was not from the command line. Ignore it,
9332       # but warn the user (except for BASH, which is always set by the calling BASH).
9333       if test "xSORT" != xBASH; then
9334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9335 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9336       fi
9337       # Try to locate tool using the code snippet
9338       for ac_prog in sort
9339 do
9340   # Extract the first word of "$ac_prog", so it can be a program name with args.
9341 set dummy $ac_prog; ac_word=$2
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9343 $as_echo_n "checking for $ac_word... " >&6; }
9344 if ${ac_cv_path_SORT+:} false; then :
9345   $as_echo_n "(cached) " >&6
9346 else
9347   case $SORT in
9348   [\\/]* | ?:[\\/]*)
9349   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9350   ;;
9351   *)
9352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9353 for as_dir in $PATH
9354 do
9355   IFS=$as_save_IFS
9356   test -z "$as_dir" && as_dir=.
9357     for ac_exec_ext in '' $ac_executable_extensions; do
9358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9359     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9361     break 2
9362   fi
9363 done
9364   done
9365 IFS=$as_save_IFS
9366 
9367   ;;
9368 esac
9369 fi
9370 SORT=$ac_cv_path_SORT
9371 if test -n "$SORT"; then
9372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9373 $as_echo "$SORT" >&6; }
9374 else
9375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376 $as_echo "no" >&6; }
9377 fi
9378 
9379 
9380   test -n "$SORT" && break
9381 done
9382 
9383     else
9384       # If it succeeded, then it was overridden by the user. We will use it
9385       # for the tool.
9386 
9387       # First remove it from the list of overridden variables, so we can test
9388       # for unknown variables in the end.
9389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9390 
9391       # Check if the provided tool contains a complete path.
9392       tool_specified="$SORT"
9393       tool_basename="${tool_specified##*/}"
9394       if test "x$tool_basename" = "x$tool_specified"; then
9395         # A command without a complete path is provided, search $PATH.
9396         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9397 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9398         # Extract the first word of "$tool_basename", so it can be a program name with args.
9399 set dummy $tool_basename; ac_word=$2
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9401 $as_echo_n "checking for $ac_word... " >&6; }
9402 if ${ac_cv_path_SORT+:} false; then :
9403   $as_echo_n "(cached) " >&6
9404 else
9405   case $SORT in
9406   [\\/]* | ?:[\\/]*)
9407   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9408   ;;
9409   *)
9410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411 for as_dir in $PATH
9412 do
9413   IFS=$as_save_IFS
9414   test -z "$as_dir" && as_dir=.
9415     for ac_exec_ext in '' $ac_executable_extensions; do
9416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419     break 2
9420   fi
9421 done
9422   done
9423 IFS=$as_save_IFS
9424 
9425   ;;
9426 esac
9427 fi
9428 SORT=$ac_cv_path_SORT
9429 if test -n "$SORT"; then
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9431 $as_echo "$SORT" >&6; }
9432 else
9433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434 $as_echo "no" >&6; }
9435 fi
9436 
9437 
9438         if test "x$SORT" = x; then
9439           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9440         fi
9441       else
9442         # Otherwise we believe it is a complete path. Use it as it is.
9443         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9444 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9446 $as_echo_n "checking for SORT... " >&6; }
9447         if test ! -x "$tool_specified"; then
9448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9449 $as_echo "not found" >&6; }
9450           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9451         fi
9452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9453 $as_echo "$tool_specified" >&6; }
9454       fi
9455     fi
9456   fi
9457 
9458 
9459 
9460   if test "x$SORT" = x; then
9461     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9462   fi
9463 
9464 
9465 
9466 
9467 
9468   # Publish this variable in the help.
9469 
9470 
9471   if test "x$TAIL" = x; then
9472     # The variable is not set by user, try to locate tool using the code snippet
9473     for ac_prog in tail
9474 do
9475   # Extract the first word of "$ac_prog", so it can be a program name with args.
9476 set dummy $ac_prog; ac_word=$2
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9478 $as_echo_n "checking for $ac_word... " >&6; }
9479 if ${ac_cv_path_TAIL+:} false; then :
9480   $as_echo_n "(cached) " >&6
9481 else
9482   case $TAIL in
9483   [\\/]* | ?:[\\/]*)
9484   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9485   ;;
9486   *)
9487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9488 for as_dir in $PATH
9489 do
9490   IFS=$as_save_IFS
9491   test -z "$as_dir" && as_dir=.
9492     for ac_exec_ext in '' $ac_executable_extensions; do
9493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9494     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9496     break 2
9497   fi
9498 done
9499   done
9500 IFS=$as_save_IFS
9501 
9502   ;;
9503 esac
9504 fi
9505 TAIL=$ac_cv_path_TAIL
9506 if test -n "$TAIL"; then
9507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9508 $as_echo "$TAIL" >&6; }
9509 else
9510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511 $as_echo "no" >&6; }
9512 fi
9513 
9514 
9515   test -n "$TAIL" && break
9516 done
9517 
9518   else
9519     # The variable is set, but is it from the command line or the environment?
9520 
9521     # Try to remove the string !TAIL! from our list.
9522     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9523     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9524       # If it failed, the variable was not from the command line. Ignore it,
9525       # but warn the user (except for BASH, which is always set by the calling BASH).
9526       if test "xTAIL" != xBASH; then
9527         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9528 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9529       fi
9530       # Try to locate tool using the code snippet
9531       for ac_prog in tail
9532 do
9533   # Extract the first word of "$ac_prog", so it can be a program name with args.
9534 set dummy $ac_prog; ac_word=$2
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9536 $as_echo_n "checking for $ac_word... " >&6; }
9537 if ${ac_cv_path_TAIL+:} false; then :
9538   $as_echo_n "(cached) " >&6
9539 else
9540   case $TAIL in
9541   [\\/]* | ?:[\\/]*)
9542   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9543   ;;
9544   *)
9545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9546 for as_dir in $PATH
9547 do
9548   IFS=$as_save_IFS
9549   test -z "$as_dir" && as_dir=.
9550     for ac_exec_ext in '' $ac_executable_extensions; do
9551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9552     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9554     break 2
9555   fi
9556 done
9557   done
9558 IFS=$as_save_IFS
9559 
9560   ;;
9561 esac
9562 fi
9563 TAIL=$ac_cv_path_TAIL
9564 if test -n "$TAIL"; then
9565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9566 $as_echo "$TAIL" >&6; }
9567 else
9568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569 $as_echo "no" >&6; }
9570 fi
9571 
9572 
9573   test -n "$TAIL" && break
9574 done
9575 
9576     else
9577       # If it succeeded, then it was overridden by the user. We will use it
9578       # for the tool.
9579 
9580       # First remove it from the list of overridden variables, so we can test
9581       # for unknown variables in the end.
9582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9583 
9584       # Check if the provided tool contains a complete path.
9585       tool_specified="$TAIL"
9586       tool_basename="${tool_specified##*/}"
9587       if test "x$tool_basename" = "x$tool_specified"; then
9588         # A command without a complete path is provided, search $PATH.
9589         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9590 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9591         # Extract the first word of "$tool_basename", so it can be a program name with args.
9592 set dummy $tool_basename; ac_word=$2
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594 $as_echo_n "checking for $ac_word... " >&6; }
9595 if ${ac_cv_path_TAIL+:} false; then :
9596   $as_echo_n "(cached) " >&6
9597 else
9598   case $TAIL in
9599   [\\/]* | ?:[\\/]*)
9600   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9601   ;;
9602   *)
9603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604 for as_dir in $PATH
9605 do
9606   IFS=$as_save_IFS
9607   test -z "$as_dir" && as_dir=.
9608     for ac_exec_ext in '' $ac_executable_extensions; do
9609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612     break 2
9613   fi
9614 done
9615   done
9616 IFS=$as_save_IFS
9617 
9618   ;;
9619 esac
9620 fi
9621 TAIL=$ac_cv_path_TAIL
9622 if test -n "$TAIL"; then
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9624 $as_echo "$TAIL" >&6; }
9625 else
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627 $as_echo "no" >&6; }
9628 fi
9629 
9630 
9631         if test "x$TAIL" = x; then
9632           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9633         fi
9634       else
9635         # Otherwise we believe it is a complete path. Use it as it is.
9636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9637 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9639 $as_echo_n "checking for TAIL... " >&6; }
9640         if test ! -x "$tool_specified"; then
9641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9642 $as_echo "not found" >&6; }
9643           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9644         fi
9645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9646 $as_echo "$tool_specified" >&6; }
9647       fi
9648     fi
9649   fi
9650 
9651 
9652 
9653   if test "x$TAIL" = x; then
9654     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9655   fi
9656 
9657 
9658 
9659 
9660 
9661   # Publish this variable in the help.
9662 
9663 
9664   if test "x$TAR" = x; then
9665     # The variable is not set by user, try to locate tool using the code snippet
9666     for ac_prog in tar
9667 do
9668   # Extract the first word of "$ac_prog", so it can be a program name with args.
9669 set dummy $ac_prog; ac_word=$2
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9671 $as_echo_n "checking for $ac_word... " >&6; }
9672 if ${ac_cv_path_TAR+:} false; then :
9673   $as_echo_n "(cached) " >&6
9674 else
9675   case $TAR in
9676   [\\/]* | ?:[\\/]*)
9677   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9678   ;;
9679   *)
9680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681 for as_dir in $PATH
9682 do
9683   IFS=$as_save_IFS
9684   test -z "$as_dir" && as_dir=.
9685     for ac_exec_ext in '' $ac_executable_extensions; do
9686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9687     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9689     break 2
9690   fi
9691 done
9692   done
9693 IFS=$as_save_IFS
9694 
9695   ;;
9696 esac
9697 fi
9698 TAR=$ac_cv_path_TAR
9699 if test -n "$TAR"; then
9700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9701 $as_echo "$TAR" >&6; }
9702 else
9703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704 $as_echo "no" >&6; }
9705 fi
9706 
9707 
9708   test -n "$TAR" && break
9709 done
9710 
9711   else
9712     # The variable is set, but is it from the command line or the environment?
9713 
9714     # Try to remove the string !TAR! from our list.
9715     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9716     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9717       # If it failed, the variable was not from the command line. Ignore it,
9718       # but warn the user (except for BASH, which is always set by the calling BASH).
9719       if test "xTAR" != xBASH; then
9720         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9721 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9722       fi
9723       # Try to locate tool using the code snippet
9724       for ac_prog in tar
9725 do
9726   # Extract the first word of "$ac_prog", so it can be a program name with args.
9727 set dummy $ac_prog; ac_word=$2
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729 $as_echo_n "checking for $ac_word... " >&6; }
9730 if ${ac_cv_path_TAR+:} false; then :
9731   $as_echo_n "(cached) " >&6
9732 else
9733   case $TAR in
9734   [\\/]* | ?:[\\/]*)
9735   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9736   ;;
9737   *)
9738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739 for as_dir in $PATH
9740 do
9741   IFS=$as_save_IFS
9742   test -z "$as_dir" && as_dir=.
9743     for ac_exec_ext in '' $ac_executable_extensions; do
9744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747     break 2
9748   fi
9749 done
9750   done
9751 IFS=$as_save_IFS
9752 
9753   ;;
9754 esac
9755 fi
9756 TAR=$ac_cv_path_TAR
9757 if test -n "$TAR"; then
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9759 $as_echo "$TAR" >&6; }
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9763 fi
9764 
9765 
9766   test -n "$TAR" && break
9767 done
9768 
9769     else
9770       # If it succeeded, then it was overridden by the user. We will use it
9771       # for the tool.
9772 
9773       # First remove it from the list of overridden variables, so we can test
9774       # for unknown variables in the end.
9775       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9776 
9777       # Check if the provided tool contains a complete path.
9778       tool_specified="$TAR"
9779       tool_basename="${tool_specified##*/}"
9780       if test "x$tool_basename" = "x$tool_specified"; then
9781         # A command without a complete path is provided, search $PATH.
9782         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9783 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9784         # Extract the first word of "$tool_basename", so it can be a program name with args.
9785 set dummy $tool_basename; ac_word=$2
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787 $as_echo_n "checking for $ac_word... " >&6; }
9788 if ${ac_cv_path_TAR+:} false; then :
9789   $as_echo_n "(cached) " >&6
9790 else
9791   case $TAR in
9792   [\\/]* | ?:[\\/]*)
9793   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9794   ;;
9795   *)
9796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797 for as_dir in $PATH
9798 do
9799   IFS=$as_save_IFS
9800   test -z "$as_dir" && as_dir=.
9801     for ac_exec_ext in '' $ac_executable_extensions; do
9802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805     break 2
9806   fi
9807 done
9808   done
9809 IFS=$as_save_IFS
9810 
9811   ;;
9812 esac
9813 fi
9814 TAR=$ac_cv_path_TAR
9815 if test -n "$TAR"; then
9816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9817 $as_echo "$TAR" >&6; }
9818 else
9819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820 $as_echo "no" >&6; }
9821 fi
9822 
9823 
9824         if test "x$TAR" = x; then
9825           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9826         fi
9827       else
9828         # Otherwise we believe it is a complete path. Use it as it is.
9829         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9830 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9831         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9832 $as_echo_n "checking for TAR... " >&6; }
9833         if test ! -x "$tool_specified"; then
9834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9835 $as_echo "not found" >&6; }
9836           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9837         fi
9838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9839 $as_echo "$tool_specified" >&6; }
9840       fi
9841     fi
9842   fi
9843 
9844 
9845 
9846   if test "x$TAR" = x; then
9847     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9848   fi
9849 
9850 
9851 
9852 
9853 
9854   # Publish this variable in the help.
9855 
9856 
9857   if test "x$TEE" = x; then
9858     # The variable is not set by user, try to locate tool using the code snippet
9859     for ac_prog in tee
9860 do
9861   # Extract the first word of "$ac_prog", so it can be a program name with args.
9862 set dummy $ac_prog; ac_word=$2
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864 $as_echo_n "checking for $ac_word... " >&6; }
9865 if ${ac_cv_path_TEE+:} false; then :
9866   $as_echo_n "(cached) " >&6
9867 else
9868   case $TEE in
9869   [\\/]* | ?:[\\/]*)
9870   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9871   ;;
9872   *)
9873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874 for as_dir in $PATH
9875 do
9876   IFS=$as_save_IFS
9877   test -z "$as_dir" && as_dir=.
9878     for ac_exec_ext in '' $ac_executable_extensions; do
9879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882     break 2
9883   fi
9884 done
9885   done
9886 IFS=$as_save_IFS
9887 
9888   ;;
9889 esac
9890 fi
9891 TEE=$ac_cv_path_TEE
9892 if test -n "$TEE"; then
9893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9894 $as_echo "$TEE" >&6; }
9895 else
9896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897 $as_echo "no" >&6; }
9898 fi
9899 
9900 
9901   test -n "$TEE" && break
9902 done
9903 
9904   else
9905     # The variable is set, but is it from the command line or the environment?
9906 
9907     # Try to remove the string !TEE! from our list.
9908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9910       # If it failed, the variable was not from the command line. Ignore it,
9911       # but warn the user (except for BASH, which is always set by the calling BASH).
9912       if test "xTEE" != xBASH; then
9913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9914 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9915       fi
9916       # Try to locate tool using the code snippet
9917       for ac_prog in tee
9918 do
9919   # Extract the first word of "$ac_prog", so it can be a program name with args.
9920 set dummy $ac_prog; ac_word=$2
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922 $as_echo_n "checking for $ac_word... " >&6; }
9923 if ${ac_cv_path_TEE+:} false; then :
9924   $as_echo_n "(cached) " >&6
9925 else
9926   case $TEE in
9927   [\\/]* | ?:[\\/]*)
9928   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9929   ;;
9930   *)
9931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932 for as_dir in $PATH
9933 do
9934   IFS=$as_save_IFS
9935   test -z "$as_dir" && as_dir=.
9936     for ac_exec_ext in '' $ac_executable_extensions; do
9937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9938     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9940     break 2
9941   fi
9942 done
9943   done
9944 IFS=$as_save_IFS
9945 
9946   ;;
9947 esac
9948 fi
9949 TEE=$ac_cv_path_TEE
9950 if test -n "$TEE"; then
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9952 $as_echo "$TEE" >&6; }
9953 else
9954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955 $as_echo "no" >&6; }
9956 fi
9957 
9958 
9959   test -n "$TEE" && break
9960 done
9961 
9962     else
9963       # If it succeeded, then it was overridden by the user. We will use it
9964       # for the tool.
9965 
9966       # First remove it from the list of overridden variables, so we can test
9967       # for unknown variables in the end.
9968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9969 
9970       # Check if the provided tool contains a complete path.
9971       tool_specified="$TEE"
9972       tool_basename="${tool_specified##*/}"
9973       if test "x$tool_basename" = "x$tool_specified"; then
9974         # A command without a complete path is provided, search $PATH.
9975         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9976 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9977         # Extract the first word of "$tool_basename", so it can be a program name with args.
9978 set dummy $tool_basename; ac_word=$2
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980 $as_echo_n "checking for $ac_word... " >&6; }
9981 if ${ac_cv_path_TEE+:} false; then :
9982   $as_echo_n "(cached) " >&6
9983 else
9984   case $TEE in
9985   [\\/]* | ?:[\\/]*)
9986   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9987   ;;
9988   *)
9989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990 for as_dir in $PATH
9991 do
9992   IFS=$as_save_IFS
9993   test -z "$as_dir" && as_dir=.
9994     for ac_exec_ext in '' $ac_executable_extensions; do
9995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998     break 2
9999   fi
10000 done
10001   done
10002 IFS=$as_save_IFS
10003 
10004   ;;
10005 esac
10006 fi
10007 TEE=$ac_cv_path_TEE
10008 if test -n "$TEE"; then
10009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10010 $as_echo "$TEE" >&6; }
10011 else
10012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013 $as_echo "no" >&6; }
10014 fi
10015 
10016 
10017         if test "x$TEE" = x; then
10018           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10019         fi
10020       else
10021         # Otherwise we believe it is a complete path. Use it as it is.
10022         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10023 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10025 $as_echo_n "checking for TEE... " >&6; }
10026         if test ! -x "$tool_specified"; then
10027           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10028 $as_echo "not found" >&6; }
10029           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10030         fi
10031         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10032 $as_echo "$tool_specified" >&6; }
10033       fi
10034     fi
10035   fi
10036 
10037 
10038 
10039   if test "x$TEE" = x; then
10040     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10041   fi
10042 
10043 
10044 
10045 
10046 
10047   # Publish this variable in the help.
10048 
10049 
10050   if test "x$TOUCH" = x; then
10051     # The variable is not set by user, try to locate tool using the code snippet
10052     for ac_prog in touch
10053 do
10054   # Extract the first word of "$ac_prog", so it can be a program name with args.
10055 set dummy $ac_prog; ac_word=$2
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10057 $as_echo_n "checking for $ac_word... " >&6; }
10058 if ${ac_cv_path_TOUCH+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   case $TOUCH in
10062   [\\/]* | ?:[\\/]*)
10063   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10064   ;;
10065   *)
10066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10067 for as_dir in $PATH
10068 do
10069   IFS=$as_save_IFS
10070   test -z "$as_dir" && as_dir=.
10071     for ac_exec_ext in '' $ac_executable_extensions; do
10072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10073     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10075     break 2
10076   fi
10077 done
10078   done
10079 IFS=$as_save_IFS
10080 
10081   ;;
10082 esac
10083 fi
10084 TOUCH=$ac_cv_path_TOUCH
10085 if test -n "$TOUCH"; then
10086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10087 $as_echo "$TOUCH" >&6; }
10088 else
10089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090 $as_echo "no" >&6; }
10091 fi
10092 
10093 
10094   test -n "$TOUCH" && break
10095 done
10096 
10097   else
10098     # The variable is set, but is it from the command line or the environment?
10099 
10100     # Try to remove the string !TOUCH! from our list.
10101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10103       # If it failed, the variable was not from the command line. Ignore it,
10104       # but warn the user (except for BASH, which is always set by the calling BASH).
10105       if test "xTOUCH" != xBASH; then
10106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10107 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10108       fi
10109       # Try to locate tool using the code snippet
10110       for ac_prog in touch
10111 do
10112   # Extract the first word of "$ac_prog", so it can be a program name with args.
10113 set dummy $ac_prog; ac_word=$2
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10115 $as_echo_n "checking for $ac_word... " >&6; }
10116 if ${ac_cv_path_TOUCH+:} false; then :
10117   $as_echo_n "(cached) " >&6
10118 else
10119   case $TOUCH in
10120   [\\/]* | ?:[\\/]*)
10121   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10122   ;;
10123   *)
10124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10125 for as_dir in $PATH
10126 do
10127   IFS=$as_save_IFS
10128   test -z "$as_dir" && as_dir=.
10129     for ac_exec_ext in '' $ac_executable_extensions; do
10130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10131     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10133     break 2
10134   fi
10135 done
10136   done
10137 IFS=$as_save_IFS
10138 
10139   ;;
10140 esac
10141 fi
10142 TOUCH=$ac_cv_path_TOUCH
10143 if test -n "$TOUCH"; then
10144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10145 $as_echo "$TOUCH" >&6; }
10146 else
10147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148 $as_echo "no" >&6; }
10149 fi
10150 
10151 
10152   test -n "$TOUCH" && break
10153 done
10154 
10155     else
10156       # If it succeeded, then it was overridden by the user. We will use it
10157       # for the tool.
10158 
10159       # First remove it from the list of overridden variables, so we can test
10160       # for unknown variables in the end.
10161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10162 
10163       # Check if the provided tool contains a complete path.
10164       tool_specified="$TOUCH"
10165       tool_basename="${tool_specified##*/}"
10166       if test "x$tool_basename" = "x$tool_specified"; then
10167         # A command without a complete path is provided, search $PATH.
10168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10169 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10170         # Extract the first word of "$tool_basename", so it can be a program name with args.
10171 set dummy $tool_basename; ac_word=$2
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173 $as_echo_n "checking for $ac_word... " >&6; }
10174 if ${ac_cv_path_TOUCH+:} false; then :
10175   $as_echo_n "(cached) " >&6
10176 else
10177   case $TOUCH in
10178   [\\/]* | ?:[\\/]*)
10179   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10180   ;;
10181   *)
10182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183 for as_dir in $PATH
10184 do
10185   IFS=$as_save_IFS
10186   test -z "$as_dir" && as_dir=.
10187     for ac_exec_ext in '' $ac_executable_extensions; do
10188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191     break 2
10192   fi
10193 done
10194   done
10195 IFS=$as_save_IFS
10196 
10197   ;;
10198 esac
10199 fi
10200 TOUCH=$ac_cv_path_TOUCH
10201 if test -n "$TOUCH"; then
10202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10203 $as_echo "$TOUCH" >&6; }
10204 else
10205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206 $as_echo "no" >&6; }
10207 fi
10208 
10209 
10210         if test "x$TOUCH" = x; then
10211           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10212         fi
10213       else
10214         # Otherwise we believe it is a complete path. Use it as it is.
10215         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10216 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10218 $as_echo_n "checking for TOUCH... " >&6; }
10219         if test ! -x "$tool_specified"; then
10220           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10221 $as_echo "not found" >&6; }
10222           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10223         fi
10224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10225 $as_echo "$tool_specified" >&6; }
10226       fi
10227     fi
10228   fi
10229 
10230 
10231 
10232   if test "x$TOUCH" = x; then
10233     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10234   fi
10235 
10236 
10237 
10238 
10239 
10240   # Publish this variable in the help.
10241 
10242 
10243   if test "x$TR" = x; then
10244     # The variable is not set by user, try to locate tool using the code snippet
10245     for ac_prog in tr
10246 do
10247   # Extract the first word of "$ac_prog", so it can be a program name with args.
10248 set dummy $ac_prog; ac_word=$2
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250 $as_echo_n "checking for $ac_word... " >&6; }
10251 if ${ac_cv_path_TR+:} false; then :
10252   $as_echo_n "(cached) " >&6
10253 else
10254   case $TR in
10255   [\\/]* | ?:[\\/]*)
10256   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10257   ;;
10258   *)
10259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260 for as_dir in $PATH
10261 do
10262   IFS=$as_save_IFS
10263   test -z "$as_dir" && as_dir=.
10264     for ac_exec_ext in '' $ac_executable_extensions; do
10265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268     break 2
10269   fi
10270 done
10271   done
10272 IFS=$as_save_IFS
10273 
10274   ;;
10275 esac
10276 fi
10277 TR=$ac_cv_path_TR
10278 if test -n "$TR"; then
10279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10280 $as_echo "$TR" >&6; }
10281 else
10282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283 $as_echo "no" >&6; }
10284 fi
10285 
10286 
10287   test -n "$TR" && break
10288 done
10289 
10290   else
10291     # The variable is set, but is it from the command line or the environment?
10292 
10293     # Try to remove the string !TR! from our list.
10294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10296       # If it failed, the variable was not from the command line. Ignore it,
10297       # but warn the user (except for BASH, which is always set by the calling BASH).
10298       if test "xTR" != xBASH; then
10299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10300 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10301       fi
10302       # Try to locate tool using the code snippet
10303       for ac_prog in tr
10304 do
10305   # Extract the first word of "$ac_prog", so it can be a program name with args.
10306 set dummy $ac_prog; ac_word=$2
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308 $as_echo_n "checking for $ac_word... " >&6; }
10309 if ${ac_cv_path_TR+:} false; then :
10310   $as_echo_n "(cached) " >&6
10311 else
10312   case $TR in
10313   [\\/]* | ?:[\\/]*)
10314   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10315   ;;
10316   *)
10317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318 for as_dir in $PATH
10319 do
10320   IFS=$as_save_IFS
10321   test -z "$as_dir" && as_dir=.
10322     for ac_exec_ext in '' $ac_executable_extensions; do
10323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326     break 2
10327   fi
10328 done
10329   done
10330 IFS=$as_save_IFS
10331 
10332   ;;
10333 esac
10334 fi
10335 TR=$ac_cv_path_TR
10336 if test -n "$TR"; then
10337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10338 $as_echo "$TR" >&6; }
10339 else
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341 $as_echo "no" >&6; }
10342 fi
10343 
10344 
10345   test -n "$TR" && break
10346 done
10347 
10348     else
10349       # If it succeeded, then it was overridden by the user. We will use it
10350       # for the tool.
10351 
10352       # First remove it from the list of overridden variables, so we can test
10353       # for unknown variables in the end.
10354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10355 
10356       # Check if the provided tool contains a complete path.
10357       tool_specified="$TR"
10358       tool_basename="${tool_specified##*/}"
10359       if test "x$tool_basename" = "x$tool_specified"; then
10360         # A command without a complete path is provided, search $PATH.
10361         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10362 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10363         # Extract the first word of "$tool_basename", so it can be a program name with args.
10364 set dummy $tool_basename; ac_word=$2
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366 $as_echo_n "checking for $ac_word... " >&6; }
10367 if ${ac_cv_path_TR+:} false; then :
10368   $as_echo_n "(cached) " >&6
10369 else
10370   case $TR in
10371   [\\/]* | ?:[\\/]*)
10372   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10373   ;;
10374   *)
10375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376 for as_dir in $PATH
10377 do
10378   IFS=$as_save_IFS
10379   test -z "$as_dir" && as_dir=.
10380     for ac_exec_ext in '' $ac_executable_extensions; do
10381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10382     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384     break 2
10385   fi
10386 done
10387   done
10388 IFS=$as_save_IFS
10389 
10390   ;;
10391 esac
10392 fi
10393 TR=$ac_cv_path_TR
10394 if test -n "$TR"; then
10395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10396 $as_echo "$TR" >&6; }
10397 else
10398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399 $as_echo "no" >&6; }
10400 fi
10401 
10402 
10403         if test "x$TR" = x; then
10404           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10405         fi
10406       else
10407         # Otherwise we believe it is a complete path. Use it as it is.
10408         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10409 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10410         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10411 $as_echo_n "checking for TR... " >&6; }
10412         if test ! -x "$tool_specified"; then
10413           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10414 $as_echo "not found" >&6; }
10415           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10416         fi
10417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10418 $as_echo "$tool_specified" >&6; }
10419       fi
10420     fi
10421   fi
10422 
10423 
10424 
10425   if test "x$TR" = x; then
10426     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10427   fi
10428 
10429 
10430 
10431 
10432 
10433   # Publish this variable in the help.
10434 
10435 
10436   if test "x$UNAME" = x; then
10437     # The variable is not set by user, try to locate tool using the code snippet
10438     for ac_prog in uname
10439 do
10440   # Extract the first word of "$ac_prog", so it can be a program name with args.
10441 set dummy $ac_prog; ac_word=$2
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443 $as_echo_n "checking for $ac_word... " >&6; }
10444 if ${ac_cv_path_UNAME+:} false; then :
10445   $as_echo_n "(cached) " >&6
10446 else
10447   case $UNAME in
10448   [\\/]* | ?:[\\/]*)
10449   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10450   ;;
10451   *)
10452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453 for as_dir in $PATH
10454 do
10455   IFS=$as_save_IFS
10456   test -z "$as_dir" && as_dir=.
10457     for ac_exec_ext in '' $ac_executable_extensions; do
10458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461     break 2
10462   fi
10463 done
10464   done
10465 IFS=$as_save_IFS
10466 
10467   ;;
10468 esac
10469 fi
10470 UNAME=$ac_cv_path_UNAME
10471 if test -n "$UNAME"; then
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10473 $as_echo "$UNAME" >&6; }
10474 else
10475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476 $as_echo "no" >&6; }
10477 fi
10478 
10479 
10480   test -n "$UNAME" && break
10481 done
10482 
10483   else
10484     # The variable is set, but is it from the command line or the environment?
10485 
10486     # Try to remove the string !UNAME! from our list.
10487     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10488     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10489       # If it failed, the variable was not from the command line. Ignore it,
10490       # but warn the user (except for BASH, which is always set by the calling BASH).
10491       if test "xUNAME" != xBASH; then
10492         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10493 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10494       fi
10495       # Try to locate tool using the code snippet
10496       for ac_prog in uname
10497 do
10498   # Extract the first word of "$ac_prog", so it can be a program name with args.
10499 set dummy $ac_prog; ac_word=$2
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10501 $as_echo_n "checking for $ac_word... " >&6; }
10502 if ${ac_cv_path_UNAME+:} false; then :
10503   $as_echo_n "(cached) " >&6
10504 else
10505   case $UNAME in
10506   [\\/]* | ?:[\\/]*)
10507   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10508   ;;
10509   *)
10510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10511 for as_dir in $PATH
10512 do
10513   IFS=$as_save_IFS
10514   test -z "$as_dir" && as_dir=.
10515     for ac_exec_ext in '' $ac_executable_extensions; do
10516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10517     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10519     break 2
10520   fi
10521 done
10522   done
10523 IFS=$as_save_IFS
10524 
10525   ;;
10526 esac
10527 fi
10528 UNAME=$ac_cv_path_UNAME
10529 if test -n "$UNAME"; then
10530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10531 $as_echo "$UNAME" >&6; }
10532 else
10533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534 $as_echo "no" >&6; }
10535 fi
10536 
10537 
10538   test -n "$UNAME" && break
10539 done
10540 
10541     else
10542       # If it succeeded, then it was overridden by the user. We will use it
10543       # for the tool.
10544 
10545       # First remove it from the list of overridden variables, so we can test
10546       # for unknown variables in the end.
10547       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10548 
10549       # Check if the provided tool contains a complete path.
10550       tool_specified="$UNAME"
10551       tool_basename="${tool_specified##*/}"
10552       if test "x$tool_basename" = "x$tool_specified"; then
10553         # A command without a complete path is provided, search $PATH.
10554         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10555 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10556         # Extract the first word of "$tool_basename", so it can be a program name with args.
10557 set dummy $tool_basename; ac_word=$2
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559 $as_echo_n "checking for $ac_word... " >&6; }
10560 if ${ac_cv_path_UNAME+:} false; then :
10561   $as_echo_n "(cached) " >&6
10562 else
10563   case $UNAME in
10564   [\\/]* | ?:[\\/]*)
10565   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10566   ;;
10567   *)
10568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569 for as_dir in $PATH
10570 do
10571   IFS=$as_save_IFS
10572   test -z "$as_dir" && as_dir=.
10573     for ac_exec_ext in '' $ac_executable_extensions; do
10574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577     break 2
10578   fi
10579 done
10580   done
10581 IFS=$as_save_IFS
10582 
10583   ;;
10584 esac
10585 fi
10586 UNAME=$ac_cv_path_UNAME
10587 if test -n "$UNAME"; then
10588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10589 $as_echo "$UNAME" >&6; }
10590 else
10591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592 $as_echo "no" >&6; }
10593 fi
10594 
10595 
10596         if test "x$UNAME" = x; then
10597           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598         fi
10599       else
10600         # Otherwise we believe it is a complete path. Use it as it is.
10601         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10602 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10604 $as_echo_n "checking for UNAME... " >&6; }
10605         if test ! -x "$tool_specified"; then
10606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607 $as_echo "not found" >&6; }
10608           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10609         fi
10610         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611 $as_echo "$tool_specified" >&6; }
10612       fi
10613     fi
10614   fi
10615 
10616 
10617 
10618   if test "x$UNAME" = x; then
10619     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10620   fi
10621 
10622 
10623 
10624 
10625 
10626   # Publish this variable in the help.
10627 
10628 
10629   if test "x$UNIQ" = x; then
10630     # The variable is not set by user, try to locate tool using the code snippet
10631     for ac_prog in uniq
10632 do
10633   # Extract the first word of "$ac_prog", so it can be a program name with args.
10634 set dummy $ac_prog; ac_word=$2
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636 $as_echo_n "checking for $ac_word... " >&6; }
10637 if ${ac_cv_path_UNIQ+:} false; then :
10638   $as_echo_n "(cached) " >&6
10639 else
10640   case $UNIQ in
10641   [\\/]* | ?:[\\/]*)
10642   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10643   ;;
10644   *)
10645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646 for as_dir in $PATH
10647 do
10648   IFS=$as_save_IFS
10649   test -z "$as_dir" && as_dir=.
10650     for ac_exec_ext in '' $ac_executable_extensions; do
10651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654     break 2
10655   fi
10656 done
10657   done
10658 IFS=$as_save_IFS
10659 
10660   ;;
10661 esac
10662 fi
10663 UNIQ=$ac_cv_path_UNIQ
10664 if test -n "$UNIQ"; then
10665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10666 $as_echo "$UNIQ" >&6; }
10667 else
10668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669 $as_echo "no" >&6; }
10670 fi
10671 
10672 
10673   test -n "$UNIQ" && break
10674 done
10675 
10676   else
10677     # The variable is set, but is it from the command line or the environment?
10678 
10679     # Try to remove the string !UNIQ! from our list.
10680     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10681     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10682       # If it failed, the variable was not from the command line. Ignore it,
10683       # but warn the user (except for BASH, which is always set by the calling BASH).
10684       if test "xUNIQ" != xBASH; then
10685         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10686 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10687       fi
10688       # Try to locate tool using the code snippet
10689       for ac_prog in uniq
10690 do
10691   # Extract the first word of "$ac_prog", so it can be a program name with args.
10692 set dummy $ac_prog; ac_word=$2
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10694 $as_echo_n "checking for $ac_word... " >&6; }
10695 if ${ac_cv_path_UNIQ+:} false; then :
10696   $as_echo_n "(cached) " >&6
10697 else
10698   case $UNIQ in
10699   [\\/]* | ?:[\\/]*)
10700   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10701   ;;
10702   *)
10703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10704 for as_dir in $PATH
10705 do
10706   IFS=$as_save_IFS
10707   test -z "$as_dir" && as_dir=.
10708     for ac_exec_ext in '' $ac_executable_extensions; do
10709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10710     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10712     break 2
10713   fi
10714 done
10715   done
10716 IFS=$as_save_IFS
10717 
10718   ;;
10719 esac
10720 fi
10721 UNIQ=$ac_cv_path_UNIQ
10722 if test -n "$UNIQ"; then
10723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10724 $as_echo "$UNIQ" >&6; }
10725 else
10726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727 $as_echo "no" >&6; }
10728 fi
10729 
10730 
10731   test -n "$UNIQ" && break
10732 done
10733 
10734     else
10735       # If it succeeded, then it was overridden by the user. We will use it
10736       # for the tool.
10737 
10738       # First remove it from the list of overridden variables, so we can test
10739       # for unknown variables in the end.
10740       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10741 
10742       # Check if the provided tool contains a complete path.
10743       tool_specified="$UNIQ"
10744       tool_basename="${tool_specified##*/}"
10745       if test "x$tool_basename" = "x$tool_specified"; then
10746         # A command without a complete path is provided, search $PATH.
10747         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10748 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10749         # Extract the first word of "$tool_basename", so it can be a program name with args.
10750 set dummy $tool_basename; ac_word=$2
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752 $as_echo_n "checking for $ac_word... " >&6; }
10753 if ${ac_cv_path_UNIQ+:} false; then :
10754   $as_echo_n "(cached) " >&6
10755 else
10756   case $UNIQ in
10757   [\\/]* | ?:[\\/]*)
10758   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10759   ;;
10760   *)
10761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762 for as_dir in $PATH
10763 do
10764   IFS=$as_save_IFS
10765   test -z "$as_dir" && as_dir=.
10766     for ac_exec_ext in '' $ac_executable_extensions; do
10767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770     break 2
10771   fi
10772 done
10773   done
10774 IFS=$as_save_IFS
10775 
10776   ;;
10777 esac
10778 fi
10779 UNIQ=$ac_cv_path_UNIQ
10780 if test -n "$UNIQ"; then
10781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10782 $as_echo "$UNIQ" >&6; }
10783 else
10784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785 $as_echo "no" >&6; }
10786 fi
10787 
10788 
10789         if test "x$UNIQ" = x; then
10790           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10791         fi
10792       else
10793         # Otherwise we believe it is a complete path. Use it as it is.
10794         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10795 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10796         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10797 $as_echo_n "checking for UNIQ... " >&6; }
10798         if test ! -x "$tool_specified"; then
10799           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10800 $as_echo "not found" >&6; }
10801           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10802         fi
10803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10804 $as_echo "$tool_specified" >&6; }
10805       fi
10806     fi
10807   fi
10808 
10809 
10810 
10811   if test "x$UNIQ" = x; then
10812     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10813   fi
10814 
10815 
10816 
10817 
10818 
10819   # Publish this variable in the help.
10820 
10821 
10822   if test "x$WC" = x; then
10823     # The variable is not set by user, try to locate tool using the code snippet
10824     for ac_prog in wc
10825 do
10826   # Extract the first word of "$ac_prog", so it can be a program name with args.
10827 set dummy $ac_prog; ac_word=$2
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10829 $as_echo_n "checking for $ac_word... " >&6; }
10830 if ${ac_cv_path_WC+:} false; then :
10831   $as_echo_n "(cached) " >&6
10832 else
10833   case $WC in
10834   [\\/]* | ?:[\\/]*)
10835   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10836   ;;
10837   *)
10838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10839 for as_dir in $PATH
10840 do
10841   IFS=$as_save_IFS
10842   test -z "$as_dir" && as_dir=.
10843     for ac_exec_ext in '' $ac_executable_extensions; do
10844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10845     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10847     break 2
10848   fi
10849 done
10850   done
10851 IFS=$as_save_IFS
10852 
10853   ;;
10854 esac
10855 fi
10856 WC=$ac_cv_path_WC
10857 if test -n "$WC"; then
10858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10859 $as_echo "$WC" >&6; }
10860 else
10861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862 $as_echo "no" >&6; }
10863 fi
10864 
10865 
10866   test -n "$WC" && break
10867 done
10868 
10869   else
10870     # The variable is set, but is it from the command line or the environment?
10871 
10872     # Try to remove the string !WC! from our list.
10873     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10874     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10875       # If it failed, the variable was not from the command line. Ignore it,
10876       # but warn the user (except for BASH, which is always set by the calling BASH).
10877       if test "xWC" != xBASH; then
10878         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10879 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10880       fi
10881       # Try to locate tool using the code snippet
10882       for ac_prog in wc
10883 do
10884   # Extract the first word of "$ac_prog", so it can be a program name with args.
10885 set dummy $ac_prog; ac_word=$2
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887 $as_echo_n "checking for $ac_word... " >&6; }
10888 if ${ac_cv_path_WC+:} false; then :
10889   $as_echo_n "(cached) " >&6
10890 else
10891   case $WC in
10892   [\\/]* | ?:[\\/]*)
10893   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10894   ;;
10895   *)
10896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897 for as_dir in $PATH
10898 do
10899   IFS=$as_save_IFS
10900   test -z "$as_dir" && as_dir=.
10901     for ac_exec_ext in '' $ac_executable_extensions; do
10902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905     break 2
10906   fi
10907 done
10908   done
10909 IFS=$as_save_IFS
10910 
10911   ;;
10912 esac
10913 fi
10914 WC=$ac_cv_path_WC
10915 if test -n "$WC"; then
10916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10917 $as_echo "$WC" >&6; }
10918 else
10919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920 $as_echo "no" >&6; }
10921 fi
10922 
10923 
10924   test -n "$WC" && break
10925 done
10926 
10927     else
10928       # If it succeeded, then it was overridden by the user. We will use it
10929       # for the tool.
10930 
10931       # First remove it from the list of overridden variables, so we can test
10932       # for unknown variables in the end.
10933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10934 
10935       # Check if the provided tool contains a complete path.
10936       tool_specified="$WC"
10937       tool_basename="${tool_specified##*/}"
10938       if test "x$tool_basename" = "x$tool_specified"; then
10939         # A command without a complete path is provided, search $PATH.
10940         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10941 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10942         # Extract the first word of "$tool_basename", so it can be a program name with args.
10943 set dummy $tool_basename; ac_word=$2
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945 $as_echo_n "checking for $ac_word... " >&6; }
10946 if ${ac_cv_path_WC+:} false; then :
10947   $as_echo_n "(cached) " >&6
10948 else
10949   case $WC in
10950   [\\/]* | ?:[\\/]*)
10951   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10952   ;;
10953   *)
10954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955 for as_dir in $PATH
10956 do
10957   IFS=$as_save_IFS
10958   test -z "$as_dir" && as_dir=.
10959     for ac_exec_ext in '' $ac_executable_extensions; do
10960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963     break 2
10964   fi
10965 done
10966   done
10967 IFS=$as_save_IFS
10968 
10969   ;;
10970 esac
10971 fi
10972 WC=$ac_cv_path_WC
10973 if test -n "$WC"; then
10974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10975 $as_echo "$WC" >&6; }
10976 else
10977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978 $as_echo "no" >&6; }
10979 fi
10980 
10981 
10982         if test "x$WC" = x; then
10983           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10984         fi
10985       else
10986         # Otherwise we believe it is a complete path. Use it as it is.
10987         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10988 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10990 $as_echo_n "checking for WC... " >&6; }
10991         if test ! -x "$tool_specified"; then
10992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10993 $as_echo "not found" >&6; }
10994           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10995         fi
10996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10997 $as_echo "$tool_specified" >&6; }
10998       fi
10999     fi
11000   fi
11001 
11002 
11003 
11004   if test "x$WC" = x; then
11005     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11006   fi
11007 
11008 
11009 
11010 
11011 
11012   # Publish this variable in the help.
11013 
11014 
11015   if test "x$WHICH" = x; then
11016     # The variable is not set by user, try to locate tool using the code snippet
11017     for ac_prog in which
11018 do
11019   # Extract the first word of "$ac_prog", so it can be a program name with args.
11020 set dummy $ac_prog; ac_word=$2
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022 $as_echo_n "checking for $ac_word... " >&6; }
11023 if ${ac_cv_path_WHICH+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   case $WHICH in
11027   [\\/]* | ?:[\\/]*)
11028   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11029   ;;
11030   *)
11031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11032 for as_dir in $PATH
11033 do
11034   IFS=$as_save_IFS
11035   test -z "$as_dir" && as_dir=.
11036     for ac_exec_ext in '' $ac_executable_extensions; do
11037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11038     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11040     break 2
11041   fi
11042 done
11043   done
11044 IFS=$as_save_IFS
11045 
11046   ;;
11047 esac
11048 fi
11049 WHICH=$ac_cv_path_WHICH
11050 if test -n "$WHICH"; then
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11052 $as_echo "$WHICH" >&6; }
11053 else
11054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055 $as_echo "no" >&6; }
11056 fi
11057 
11058 
11059   test -n "$WHICH" && break
11060 done
11061 
11062   else
11063     # The variable is set, but is it from the command line or the environment?
11064 
11065     # Try to remove the string !WHICH! from our list.
11066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11068       # If it failed, the variable was not from the command line. Ignore it,
11069       # but warn the user (except for BASH, which is always set by the calling BASH).
11070       if test "xWHICH" != xBASH; then
11071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11072 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11073       fi
11074       # Try to locate tool using the code snippet
11075       for ac_prog in which
11076 do
11077   # Extract the first word of "$ac_prog", so it can be a program name with args.
11078 set dummy $ac_prog; ac_word=$2
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11080 $as_echo_n "checking for $ac_word... " >&6; }
11081 if ${ac_cv_path_WHICH+:} false; then :
11082   $as_echo_n "(cached) " >&6
11083 else
11084   case $WHICH in
11085   [\\/]* | ?:[\\/]*)
11086   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11087   ;;
11088   *)
11089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11090 for as_dir in $PATH
11091 do
11092   IFS=$as_save_IFS
11093   test -z "$as_dir" && as_dir=.
11094     for ac_exec_ext in '' $ac_executable_extensions; do
11095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11096     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11098     break 2
11099   fi
11100 done
11101   done
11102 IFS=$as_save_IFS
11103 
11104   ;;
11105 esac
11106 fi
11107 WHICH=$ac_cv_path_WHICH
11108 if test -n "$WHICH"; then
11109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11110 $as_echo "$WHICH" >&6; }
11111 else
11112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11113 $as_echo "no" >&6; }
11114 fi
11115 
11116 
11117   test -n "$WHICH" && break
11118 done
11119 
11120     else
11121       # If it succeeded, then it was overridden by the user. We will use it
11122       # for the tool.
11123 
11124       # First remove it from the list of overridden variables, so we can test
11125       # for unknown variables in the end.
11126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11127 
11128       # Check if the provided tool contains a complete path.
11129       tool_specified="$WHICH"
11130       tool_basename="${tool_specified##*/}"
11131       if test "x$tool_basename" = "x$tool_specified"; then
11132         # A command without a complete path is provided, search $PATH.
11133         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11134 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11135         # Extract the first word of "$tool_basename", so it can be a program name with args.
11136 set dummy $tool_basename; ac_word=$2
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138 $as_echo_n "checking for $ac_word... " >&6; }
11139 if ${ac_cv_path_WHICH+:} false; then :
11140   $as_echo_n "(cached) " >&6
11141 else
11142   case $WHICH in
11143   [\\/]* | ?:[\\/]*)
11144   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11145   ;;
11146   *)
11147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148 for as_dir in $PATH
11149 do
11150   IFS=$as_save_IFS
11151   test -z "$as_dir" && as_dir=.
11152     for ac_exec_ext in '' $ac_executable_extensions; do
11153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156     break 2
11157   fi
11158 done
11159   done
11160 IFS=$as_save_IFS
11161 
11162   ;;
11163 esac
11164 fi
11165 WHICH=$ac_cv_path_WHICH
11166 if test -n "$WHICH"; then
11167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11168 $as_echo "$WHICH" >&6; }
11169 else
11170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171 $as_echo "no" >&6; }
11172 fi
11173 
11174 
11175         if test "x$WHICH" = x; then
11176           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11177         fi
11178       else
11179         # Otherwise we believe it is a complete path. Use it as it is.
11180         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11181 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11183 $as_echo_n "checking for WHICH... " >&6; }
11184         if test ! -x "$tool_specified"; then
11185           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11186 $as_echo "not found" >&6; }
11187           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11188         fi
11189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11190 $as_echo "$tool_specified" >&6; }
11191       fi
11192     fi
11193   fi
11194 
11195 
11196 
11197   if test "x$WHICH" = x; then
11198     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11199   fi
11200 
11201 
11202 
11203 
11204 
11205   # Publish this variable in the help.
11206 
11207 
11208   if test "x$XARGS" = x; then
11209     # The variable is not set by user, try to locate tool using the code snippet
11210     for ac_prog in xargs
11211 do
11212   # Extract the first word of "$ac_prog", so it can be a program name with args.
11213 set dummy $ac_prog; ac_word=$2
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11215 $as_echo_n "checking for $ac_word... " >&6; }
11216 if ${ac_cv_path_XARGS+:} false; then :
11217   $as_echo_n "(cached) " >&6
11218 else
11219   case $XARGS in
11220   [\\/]* | ?:[\\/]*)
11221   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11222   ;;
11223   *)
11224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11225 for as_dir in $PATH
11226 do
11227   IFS=$as_save_IFS
11228   test -z "$as_dir" && as_dir=.
11229     for ac_exec_ext in '' $ac_executable_extensions; do
11230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11231     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11233     break 2
11234   fi
11235 done
11236   done
11237 IFS=$as_save_IFS
11238 
11239   ;;
11240 esac
11241 fi
11242 XARGS=$ac_cv_path_XARGS
11243 if test -n "$XARGS"; then
11244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11245 $as_echo "$XARGS" >&6; }
11246 else
11247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248 $as_echo "no" >&6; }
11249 fi
11250 
11251 
11252   test -n "$XARGS" && break
11253 done
11254 
11255   else
11256     # The variable is set, but is it from the command line or the environment?
11257 
11258     # Try to remove the string !XARGS! from our list.
11259     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11260     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11261       # If it failed, the variable was not from the command line. Ignore it,
11262       # but warn the user (except for BASH, which is always set by the calling BASH).
11263       if test "xXARGS" != xBASH; then
11264         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11265 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11266       fi
11267       # Try to locate tool using the code snippet
11268       for ac_prog in xargs
11269 do
11270   # Extract the first word of "$ac_prog", so it can be a program name with args.
11271 set dummy $ac_prog; ac_word=$2
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11273 $as_echo_n "checking for $ac_word... " >&6; }
11274 if ${ac_cv_path_XARGS+:} false; then :
11275   $as_echo_n "(cached) " >&6
11276 else
11277   case $XARGS in
11278   [\\/]* | ?:[\\/]*)
11279   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11280   ;;
11281   *)
11282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11283 for as_dir in $PATH
11284 do
11285   IFS=$as_save_IFS
11286   test -z "$as_dir" && as_dir=.
11287     for ac_exec_ext in '' $ac_executable_extensions; do
11288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11289     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11291     break 2
11292   fi
11293 done
11294   done
11295 IFS=$as_save_IFS
11296 
11297   ;;
11298 esac
11299 fi
11300 XARGS=$ac_cv_path_XARGS
11301 if test -n "$XARGS"; then
11302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11303 $as_echo "$XARGS" >&6; }
11304 else
11305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306 $as_echo "no" >&6; }
11307 fi
11308 
11309 
11310   test -n "$XARGS" && break
11311 done
11312 
11313     else
11314       # If it succeeded, then it was overridden by the user. We will use it
11315       # for the tool.
11316 
11317       # First remove it from the list of overridden variables, so we can test
11318       # for unknown variables in the end.
11319       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11320 
11321       # Check if the provided tool contains a complete path.
11322       tool_specified="$XARGS"
11323       tool_basename="${tool_specified##*/}"
11324       if test "x$tool_basename" = "x$tool_specified"; then
11325         # A command without a complete path is provided, search $PATH.
11326         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11327 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11328         # Extract the first word of "$tool_basename", so it can be a program name with args.
11329 set dummy $tool_basename; ac_word=$2
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11331 $as_echo_n "checking for $ac_word... " >&6; }
11332 if ${ac_cv_path_XARGS+:} false; then :
11333   $as_echo_n "(cached) " >&6
11334 else
11335   case $XARGS in
11336   [\\/]* | ?:[\\/]*)
11337   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11338   ;;
11339   *)
11340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341 for as_dir in $PATH
11342 do
11343   IFS=$as_save_IFS
11344   test -z "$as_dir" && as_dir=.
11345     for ac_exec_ext in '' $ac_executable_extensions; do
11346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11347     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11349     break 2
11350   fi
11351 done
11352   done
11353 IFS=$as_save_IFS
11354 
11355   ;;
11356 esac
11357 fi
11358 XARGS=$ac_cv_path_XARGS
11359 if test -n "$XARGS"; then
11360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11361 $as_echo "$XARGS" >&6; }
11362 else
11363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364 $as_echo "no" >&6; }
11365 fi
11366 
11367 
11368         if test "x$XARGS" = x; then
11369           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11370         fi
11371       else
11372         # Otherwise we believe it is a complete path. Use it as it is.
11373         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11374 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11376 $as_echo_n "checking for XARGS... " >&6; }
11377         if test ! -x "$tool_specified"; then
11378           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11379 $as_echo "not found" >&6; }
11380           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11381         fi
11382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11383 $as_echo "$tool_specified" >&6; }
11384       fi
11385     fi
11386   fi
11387 
11388 
11389 
11390   if test "x$XARGS" = x; then
11391     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11392   fi
11393 
11394 
11395 
11396   # Then required tools that require some special treatment.
11397 
11398 
11399   # Publish this variable in the help.
11400 
11401 
11402   if test "x$AWK" = x; then
11403     # The variable is not set by user, try to locate tool using the code snippet
11404     for ac_prog in gawk mawk nawk awk
11405 do
11406   # Extract the first word of "$ac_prog", so it can be a program name with args.
11407 set dummy $ac_prog; ac_word=$2
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409 $as_echo_n "checking for $ac_word... " >&6; }
11410 if ${ac_cv_prog_AWK+:} false; then :
11411   $as_echo_n "(cached) " >&6
11412 else
11413   if test -n "$AWK"; then
11414   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11415 else
11416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417 for as_dir in $PATH
11418 do
11419   IFS=$as_save_IFS
11420   test -z "$as_dir" && as_dir=.
11421     for ac_exec_ext in '' $ac_executable_extensions; do
11422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423     ac_cv_prog_AWK="$ac_prog"
11424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425     break 2
11426   fi
11427 done
11428   done
11429 IFS=$as_save_IFS
11430 
11431 fi
11432 fi
11433 AWK=$ac_cv_prog_AWK
11434 if test -n "$AWK"; then
11435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11436 $as_echo "$AWK" >&6; }
11437 else
11438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439 $as_echo "no" >&6; }
11440 fi
11441 
11442 
11443   test -n "$AWK" && break
11444 done
11445 
11446   else
11447     # The variable is set, but is it from the command line or the environment?
11448 
11449     # Try to remove the string !AWK! from our list.
11450     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11451     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11452       # If it failed, the variable was not from the command line. Ignore it,
11453       # but warn the user (except for BASH, which is always set by the calling BASH).
11454       if test "xAWK" != xBASH; then
11455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11456 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11457       fi
11458       # Try to locate tool using the code snippet
11459       for ac_prog in gawk mawk nawk awk
11460 do
11461   # Extract the first word of "$ac_prog", so it can be a program name with args.
11462 set dummy $ac_prog; ac_word=$2
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464 $as_echo_n "checking for $ac_word... " >&6; }
11465 if ${ac_cv_prog_AWK+:} false; then :
11466   $as_echo_n "(cached) " >&6
11467 else
11468   if test -n "$AWK"; then
11469   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11470 else
11471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11472 for as_dir in $PATH
11473 do
11474   IFS=$as_save_IFS
11475   test -z "$as_dir" && as_dir=.
11476     for ac_exec_ext in '' $ac_executable_extensions; do
11477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11478     ac_cv_prog_AWK="$ac_prog"
11479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11480     break 2
11481   fi
11482 done
11483   done
11484 IFS=$as_save_IFS
11485 
11486 fi
11487 fi
11488 AWK=$ac_cv_prog_AWK
11489 if test -n "$AWK"; then
11490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11491 $as_echo "$AWK" >&6; }
11492 else
11493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494 $as_echo "no" >&6; }
11495 fi
11496 
11497 
11498   test -n "$AWK" && break
11499 done
11500 
11501     else
11502       # If it succeeded, then it was overridden by the user. We will use it
11503       # for the tool.
11504 
11505       # First remove it from the list of overridden variables, so we can test
11506       # for unknown variables in the end.
11507       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11508 
11509       # Check if the provided tool contains a complete path.
11510       tool_specified="$AWK"
11511       tool_basename="${tool_specified##*/}"
11512       if test "x$tool_basename" = "x$tool_specified"; then
11513         # A command without a complete path is provided, search $PATH.
11514         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11515 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11516         # Extract the first word of "$tool_basename", so it can be a program name with args.
11517 set dummy $tool_basename; ac_word=$2
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519 $as_echo_n "checking for $ac_word... " >&6; }
11520 if ${ac_cv_path_AWK+:} false; then :
11521   $as_echo_n "(cached) " >&6
11522 else
11523   case $AWK in
11524   [\\/]* | ?:[\\/]*)
11525   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11526   ;;
11527   *)
11528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529 for as_dir in $PATH
11530 do
11531   IFS=$as_save_IFS
11532   test -z "$as_dir" && as_dir=.
11533     for ac_exec_ext in '' $ac_executable_extensions; do
11534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537     break 2
11538   fi
11539 done
11540   done
11541 IFS=$as_save_IFS
11542 
11543   ;;
11544 esac
11545 fi
11546 AWK=$ac_cv_path_AWK
11547 if test -n "$AWK"; then
11548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11549 $as_echo "$AWK" >&6; }
11550 else
11551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552 $as_echo "no" >&6; }
11553 fi
11554 
11555 
11556         if test "x$AWK" = x; then
11557           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558         fi
11559       else
11560         # Otherwise we believe it is a complete path. Use it as it is.
11561         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11562 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11564 $as_echo_n "checking for AWK... " >&6; }
11565         if test ! -x "$tool_specified"; then
11566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567 $as_echo "not found" >&6; }
11568           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11569         fi
11570         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571 $as_echo "$tool_specified" >&6; }
11572       fi
11573     fi
11574   fi
11575 
11576 
11577   if test "x$AWK" = x; then
11578     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11579   fi
11580 
11581 
11582 
11583 
11584   # Publish this variable in the help.
11585 
11586 
11587   if test "x$GREP" = x; then
11588     # The variable is not set by user, try to locate tool using the code snippet
11589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11590 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11591 if ${ac_cv_path_GREP+:} false; then :
11592   $as_echo_n "(cached) " >&6
11593 else
11594   if test -z "$GREP"; then
11595   ac_path_GREP_found=false
11596   # Loop through the user's path and test for each of PROGNAME-LIST
11597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11599 do
11600   IFS=$as_save_IFS
11601   test -z "$as_dir" && as_dir=.
11602     for ac_prog in grep ggrep; do
11603     for ac_exec_ext in '' $ac_executable_extensions; do
11604       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11605       as_fn_executable_p "$ac_path_GREP" || continue
11606 # Check for GNU ac_path_GREP and select it if it is found.
11607   # Check for GNU $ac_path_GREP
11608 case `"$ac_path_GREP" --version 2>&1` in
11609 *GNU*)
11610   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11611 *)
11612   ac_count=0
11613   $as_echo_n 0123456789 >"conftest.in"
11614   while :
11615   do
11616     cat "conftest.in" "conftest.in" >"conftest.tmp"
11617     mv "conftest.tmp" "conftest.in"
11618     cp "conftest.in" "conftest.nl"
11619     $as_echo 'GREP' >> "conftest.nl"
11620     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11621     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11622     as_fn_arith $ac_count + 1 && ac_count=$as_val
11623     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11624       # Best one so far, save it but keep looking for a better one
11625       ac_cv_path_GREP="$ac_path_GREP"
11626       ac_path_GREP_max=$ac_count
11627     fi
11628     # 10*(2^10) chars as input seems more than enough
11629     test $ac_count -gt 10 && break
11630   done
11631   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11632 esac
11633 
11634       $ac_path_GREP_found && break 3
11635     done
11636   done
11637   done
11638 IFS=$as_save_IFS
11639   if test -z "$ac_cv_path_GREP"; then
11640     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11641   fi
11642 else
11643   ac_cv_path_GREP=$GREP
11644 fi
11645 
11646 fi
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11648 $as_echo "$ac_cv_path_GREP" >&6; }
11649  GREP="$ac_cv_path_GREP"
11650 
11651 
11652   else
11653     # The variable is set, but is it from the command line or the environment?
11654 
11655     # Try to remove the string !GREP! from our list.
11656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11658       # If it failed, the variable was not from the command line. Ignore it,
11659       # but warn the user (except for BASH, which is always set by the calling BASH).
11660       if test "xGREP" != xBASH; then
11661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11662 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11663       fi
11664       # Try to locate tool using the code snippet
11665       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11666 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11667 if ${ac_cv_path_GREP+:} false; then :
11668   $as_echo_n "(cached) " >&6
11669 else
11670   if test -z "$GREP"; then
11671   ac_path_GREP_found=false
11672   # Loop through the user's path and test for each of PROGNAME-LIST
11673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11674 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11675 do
11676   IFS=$as_save_IFS
11677   test -z "$as_dir" && as_dir=.
11678     for ac_prog in grep ggrep; do
11679     for ac_exec_ext in '' $ac_executable_extensions; do
11680       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11681       as_fn_executable_p "$ac_path_GREP" || continue
11682 # Check for GNU ac_path_GREP and select it if it is found.
11683   # Check for GNU $ac_path_GREP
11684 case `"$ac_path_GREP" --version 2>&1` in
11685 *GNU*)
11686   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11687 *)
11688   ac_count=0
11689   $as_echo_n 0123456789 >"conftest.in"
11690   while :
11691   do
11692     cat "conftest.in" "conftest.in" >"conftest.tmp"
11693     mv "conftest.tmp" "conftest.in"
11694     cp "conftest.in" "conftest.nl"
11695     $as_echo 'GREP' >> "conftest.nl"
11696     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11697     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11698     as_fn_arith $ac_count + 1 && ac_count=$as_val
11699     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11700       # Best one so far, save it but keep looking for a better one
11701       ac_cv_path_GREP="$ac_path_GREP"
11702       ac_path_GREP_max=$ac_count
11703     fi
11704     # 10*(2^10) chars as input seems more than enough
11705     test $ac_count -gt 10 && break
11706   done
11707   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11708 esac
11709 
11710       $ac_path_GREP_found && break 3
11711     done
11712   done
11713   done
11714 IFS=$as_save_IFS
11715   if test -z "$ac_cv_path_GREP"; then
11716     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11717   fi
11718 else
11719   ac_cv_path_GREP=$GREP
11720 fi
11721 
11722 fi
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11724 $as_echo "$ac_cv_path_GREP" >&6; }
11725  GREP="$ac_cv_path_GREP"
11726 
11727 
11728     else
11729       # If it succeeded, then it was overridden by the user. We will use it
11730       # for the tool.
11731 
11732       # First remove it from the list of overridden variables, so we can test
11733       # for unknown variables in the end.
11734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11735 
11736       # Check if the provided tool contains a complete path.
11737       tool_specified="$GREP"
11738       tool_basename="${tool_specified##*/}"
11739       if test "x$tool_basename" = "x$tool_specified"; then
11740         # A command without a complete path is provided, search $PATH.
11741         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11742 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11743         # Extract the first word of "$tool_basename", so it can be a program name with args.
11744 set dummy $tool_basename; ac_word=$2
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746 $as_echo_n "checking for $ac_word... " >&6; }
11747 if ${ac_cv_path_GREP+:} false; then :
11748   $as_echo_n "(cached) " >&6
11749 else
11750   case $GREP in
11751   [\\/]* | ?:[\\/]*)
11752   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11753   ;;
11754   *)
11755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756 for as_dir in $PATH
11757 do
11758   IFS=$as_save_IFS
11759   test -z "$as_dir" && as_dir=.
11760     for ac_exec_ext in '' $ac_executable_extensions; do
11761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764     break 2
11765   fi
11766 done
11767   done
11768 IFS=$as_save_IFS
11769 
11770   ;;
11771 esac
11772 fi
11773 GREP=$ac_cv_path_GREP
11774 if test -n "$GREP"; then
11775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11776 $as_echo "$GREP" >&6; }
11777 else
11778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779 $as_echo "no" >&6; }
11780 fi
11781 
11782 
11783         if test "x$GREP" = x; then
11784           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11785         fi
11786       else
11787         # Otherwise we believe it is a complete path. Use it as it is.
11788         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11789 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11791 $as_echo_n "checking for GREP... " >&6; }
11792         if test ! -x "$tool_specified"; then
11793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11794 $as_echo "not found" >&6; }
11795           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11796         fi
11797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11798 $as_echo "$tool_specified" >&6; }
11799       fi
11800     fi
11801   fi
11802 
11803 
11804   if test "x$GREP" = x; then
11805     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11806   fi
11807 
11808 
11809 
11810 
11811   # Publish this variable in the help.
11812 
11813 
11814   if test "x$EGREP" = x; then
11815     # The variable is not set by user, try to locate tool using the code snippet
11816     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11817 $as_echo_n "checking for egrep... " >&6; }
11818 if ${ac_cv_path_EGREP+:} false; then :
11819   $as_echo_n "(cached) " >&6
11820 else
11821   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11822    then ac_cv_path_EGREP="$GREP -E"
11823    else
11824      if test -z "$EGREP"; then
11825   ac_path_EGREP_found=false
11826   # Loop through the user's path and test for each of PROGNAME-LIST
11827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11828 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11829 do
11830   IFS=$as_save_IFS
11831   test -z "$as_dir" && as_dir=.
11832     for ac_prog in egrep; do
11833     for ac_exec_ext in '' $ac_executable_extensions; do
11834       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11835       as_fn_executable_p "$ac_path_EGREP" || continue
11836 # Check for GNU ac_path_EGREP and select it if it is found.
11837   # Check for GNU $ac_path_EGREP
11838 case `"$ac_path_EGREP" --version 2>&1` in
11839 *GNU*)
11840   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11841 *)
11842   ac_count=0
11843   $as_echo_n 0123456789 >"conftest.in"
11844   while :
11845   do
11846     cat "conftest.in" "conftest.in" >"conftest.tmp"
11847     mv "conftest.tmp" "conftest.in"
11848     cp "conftest.in" "conftest.nl"
11849     $as_echo 'EGREP' >> "conftest.nl"
11850     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11851     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11852     as_fn_arith $ac_count + 1 && ac_count=$as_val
11853     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11854       # Best one so far, save it but keep looking for a better one
11855       ac_cv_path_EGREP="$ac_path_EGREP"
11856       ac_path_EGREP_max=$ac_count
11857     fi
11858     # 10*(2^10) chars as input seems more than enough
11859     test $ac_count -gt 10 && break
11860   done
11861   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11862 esac
11863 
11864       $ac_path_EGREP_found && break 3
11865     done
11866   done
11867   done
11868 IFS=$as_save_IFS
11869   if test -z "$ac_cv_path_EGREP"; then
11870     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11871   fi
11872 else
11873   ac_cv_path_EGREP=$EGREP
11874 fi
11875 
11876    fi
11877 fi
11878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11879 $as_echo "$ac_cv_path_EGREP" >&6; }
11880  EGREP="$ac_cv_path_EGREP"
11881 
11882 
11883   else
11884     # The variable is set, but is it from the command line or the environment?
11885 
11886     # Try to remove the string !EGREP! from our list.
11887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11889       # If it failed, the variable was not from the command line. Ignore it,
11890       # but warn the user (except for BASH, which is always set by the calling BASH).
11891       if test "xEGREP" != xBASH; then
11892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11893 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11894       fi
11895       # Try to locate tool using the code snippet
11896       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11897 $as_echo_n "checking for egrep... " >&6; }
11898 if ${ac_cv_path_EGREP+:} false; then :
11899   $as_echo_n "(cached) " >&6
11900 else
11901   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11902    then ac_cv_path_EGREP="$GREP -E"
11903    else
11904      if test -z "$EGREP"; then
11905   ac_path_EGREP_found=false
11906   # Loop through the user's path and test for each of PROGNAME-LIST
11907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11909 do
11910   IFS=$as_save_IFS
11911   test -z "$as_dir" && as_dir=.
11912     for ac_prog in egrep; do
11913     for ac_exec_ext in '' $ac_executable_extensions; do
11914       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11915       as_fn_executable_p "$ac_path_EGREP" || continue
11916 # Check for GNU ac_path_EGREP and select it if it is found.
11917   # Check for GNU $ac_path_EGREP
11918 case `"$ac_path_EGREP" --version 2>&1` in
11919 *GNU*)
11920   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11921 *)
11922   ac_count=0
11923   $as_echo_n 0123456789 >"conftest.in"
11924   while :
11925   do
11926     cat "conftest.in" "conftest.in" >"conftest.tmp"
11927     mv "conftest.tmp" "conftest.in"
11928     cp "conftest.in" "conftest.nl"
11929     $as_echo 'EGREP' >> "conftest.nl"
11930     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11931     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11932     as_fn_arith $ac_count + 1 && ac_count=$as_val
11933     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11934       # Best one so far, save it but keep looking for a better one
11935       ac_cv_path_EGREP="$ac_path_EGREP"
11936       ac_path_EGREP_max=$ac_count
11937     fi
11938     # 10*(2^10) chars as input seems more than enough
11939     test $ac_count -gt 10 && break
11940   done
11941   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11942 esac
11943 
11944       $ac_path_EGREP_found && break 3
11945     done
11946   done
11947   done
11948 IFS=$as_save_IFS
11949   if test -z "$ac_cv_path_EGREP"; then
11950     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11951   fi
11952 else
11953   ac_cv_path_EGREP=$EGREP
11954 fi
11955 
11956    fi
11957 fi
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11959 $as_echo "$ac_cv_path_EGREP" >&6; }
11960  EGREP="$ac_cv_path_EGREP"
11961 
11962 
11963     else
11964       # If it succeeded, then it was overridden by the user. We will use it
11965       # for the tool.
11966 
11967       # First remove it from the list of overridden variables, so we can test
11968       # for unknown variables in the end.
11969       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11970 
11971       # Check if the provided tool contains a complete path.
11972       tool_specified="$EGREP"
11973       tool_basename="${tool_specified##*/}"
11974       if test "x$tool_basename" = "x$tool_specified"; then
11975         # A command without a complete path is provided, search $PATH.
11976         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11977 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11978         # Extract the first word of "$tool_basename", so it can be a program name with args.
11979 set dummy $tool_basename; ac_word=$2
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981 $as_echo_n "checking for $ac_word... " >&6; }
11982 if ${ac_cv_path_EGREP+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   case $EGREP in
11986   [\\/]* | ?:[\\/]*)
11987   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11988   ;;
11989   *)
11990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991 for as_dir in $PATH
11992 do
11993   IFS=$as_save_IFS
11994   test -z "$as_dir" && as_dir=.
11995     for ac_exec_ext in '' $ac_executable_extensions; do
11996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999     break 2
12000   fi
12001 done
12002   done
12003 IFS=$as_save_IFS
12004 
12005   ;;
12006 esac
12007 fi
12008 EGREP=$ac_cv_path_EGREP
12009 if test -n "$EGREP"; then
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12011 $as_echo "$EGREP" >&6; }
12012 else
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014 $as_echo "no" >&6; }
12015 fi
12016 
12017 
12018         if test "x$EGREP" = x; then
12019           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12020         fi
12021       else
12022         # Otherwise we believe it is a complete path. Use it as it is.
12023         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12024 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12025         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12026 $as_echo_n "checking for EGREP... " >&6; }
12027         if test ! -x "$tool_specified"; then
12028           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12029 $as_echo "not found" >&6; }
12030           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12031         fi
12032         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12033 $as_echo "$tool_specified" >&6; }
12034       fi
12035     fi
12036   fi
12037 
12038 
12039   if test "x$EGREP" = x; then
12040     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12041   fi
12042 
12043 
12044 
12045 
12046   # Publish this variable in the help.
12047 
12048 
12049   if test "x$FGREP" = x; then
12050     # The variable is not set by user, try to locate tool using the code snippet
12051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12052 $as_echo_n "checking for fgrep... " >&6; }
12053 if ${ac_cv_path_FGREP+:} false; then :
12054   $as_echo_n "(cached) " >&6
12055 else
12056   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12057    then ac_cv_path_FGREP="$GREP -F"
12058    else
12059      if test -z "$FGREP"; then
12060   ac_path_FGREP_found=false
12061   # Loop through the user's path and test for each of PROGNAME-LIST
12062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12063 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12064 do
12065   IFS=$as_save_IFS
12066   test -z "$as_dir" && as_dir=.
12067     for ac_prog in fgrep; do
12068     for ac_exec_ext in '' $ac_executable_extensions; do
12069       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12070       as_fn_executable_p "$ac_path_FGREP" || continue
12071 # Check for GNU ac_path_FGREP and select it if it is found.
12072   # Check for GNU $ac_path_FGREP
12073 case `"$ac_path_FGREP" --version 2>&1` in
12074 *GNU*)
12075   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12076 *)
12077   ac_count=0
12078   $as_echo_n 0123456789 >"conftest.in"
12079   while :
12080   do
12081     cat "conftest.in" "conftest.in" >"conftest.tmp"
12082     mv "conftest.tmp" "conftest.in"
12083     cp "conftest.in" "conftest.nl"
12084     $as_echo 'FGREP' >> "conftest.nl"
12085     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12086     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12087     as_fn_arith $ac_count + 1 && ac_count=$as_val
12088     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12089       # Best one so far, save it but keep looking for a better one
12090       ac_cv_path_FGREP="$ac_path_FGREP"
12091       ac_path_FGREP_max=$ac_count
12092     fi
12093     # 10*(2^10) chars as input seems more than enough
12094     test $ac_count -gt 10 && break
12095   done
12096   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12097 esac
12098 
12099       $ac_path_FGREP_found && break 3
12100     done
12101   done
12102   done
12103 IFS=$as_save_IFS
12104   if test -z "$ac_cv_path_FGREP"; then
12105     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12106   fi
12107 else
12108   ac_cv_path_FGREP=$FGREP
12109 fi
12110 
12111    fi
12112 fi
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12114 $as_echo "$ac_cv_path_FGREP" >&6; }
12115  FGREP="$ac_cv_path_FGREP"
12116 
12117 
12118   else
12119     # The variable is set, but is it from the command line or the environment?
12120 
12121     # Try to remove the string !FGREP! from our list.
12122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12124       # If it failed, the variable was not from the command line. Ignore it,
12125       # but warn the user (except for BASH, which is always set by the calling BASH).
12126       if test "xFGREP" != xBASH; then
12127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12128 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12129       fi
12130       # Try to locate tool using the code snippet
12131       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12132 $as_echo_n "checking for fgrep... " >&6; }
12133 if ${ac_cv_path_FGREP+:} false; then :
12134   $as_echo_n "(cached) " >&6
12135 else
12136   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12137    then ac_cv_path_FGREP="$GREP -F"
12138    else
12139      if test -z "$FGREP"; then
12140   ac_path_FGREP_found=false
12141   # Loop through the user's path and test for each of PROGNAME-LIST
12142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12144 do
12145   IFS=$as_save_IFS
12146   test -z "$as_dir" && as_dir=.
12147     for ac_prog in fgrep; do
12148     for ac_exec_ext in '' $ac_executable_extensions; do
12149       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12150       as_fn_executable_p "$ac_path_FGREP" || continue
12151 # Check for GNU ac_path_FGREP and select it if it is found.
12152   # Check for GNU $ac_path_FGREP
12153 case `"$ac_path_FGREP" --version 2>&1` in
12154 *GNU*)
12155   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12156 *)
12157   ac_count=0
12158   $as_echo_n 0123456789 >"conftest.in"
12159   while :
12160   do
12161     cat "conftest.in" "conftest.in" >"conftest.tmp"
12162     mv "conftest.tmp" "conftest.in"
12163     cp "conftest.in" "conftest.nl"
12164     $as_echo 'FGREP' >> "conftest.nl"
12165     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12166     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12167     as_fn_arith $ac_count + 1 && ac_count=$as_val
12168     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12169       # Best one so far, save it but keep looking for a better one
12170       ac_cv_path_FGREP="$ac_path_FGREP"
12171       ac_path_FGREP_max=$ac_count
12172     fi
12173     # 10*(2^10) chars as input seems more than enough
12174     test $ac_count -gt 10 && break
12175   done
12176   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12177 esac
12178 
12179       $ac_path_FGREP_found && break 3
12180     done
12181   done
12182   done
12183 IFS=$as_save_IFS
12184   if test -z "$ac_cv_path_FGREP"; then
12185     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12186   fi
12187 else
12188   ac_cv_path_FGREP=$FGREP
12189 fi
12190 
12191    fi
12192 fi
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12194 $as_echo "$ac_cv_path_FGREP" >&6; }
12195  FGREP="$ac_cv_path_FGREP"
12196 
12197 
12198     else
12199       # If it succeeded, then it was overridden by the user. We will use it
12200       # for the tool.
12201 
12202       # First remove it from the list of overridden variables, so we can test
12203       # for unknown variables in the end.
12204       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12205 
12206       # Check if the provided tool contains a complete path.
12207       tool_specified="$FGREP"
12208       tool_basename="${tool_specified##*/}"
12209       if test "x$tool_basename" = "x$tool_specified"; then
12210         # A command without a complete path is provided, search $PATH.
12211         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12212 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12213         # Extract the first word of "$tool_basename", so it can be a program name with args.
12214 set dummy $tool_basename; ac_word=$2
12215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216 $as_echo_n "checking for $ac_word... " >&6; }
12217 if ${ac_cv_path_FGREP+:} false; then :
12218   $as_echo_n "(cached) " >&6
12219 else
12220   case $FGREP in
12221   [\\/]* | ?:[\\/]*)
12222   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12223   ;;
12224   *)
12225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226 for as_dir in $PATH
12227 do
12228   IFS=$as_save_IFS
12229   test -z "$as_dir" && as_dir=.
12230     for ac_exec_ext in '' $ac_executable_extensions; do
12231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234     break 2
12235   fi
12236 done
12237   done
12238 IFS=$as_save_IFS
12239 
12240   ;;
12241 esac
12242 fi
12243 FGREP=$ac_cv_path_FGREP
12244 if test -n "$FGREP"; then
12245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12246 $as_echo "$FGREP" >&6; }
12247 else
12248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249 $as_echo "no" >&6; }
12250 fi
12251 
12252 
12253         if test "x$FGREP" = x; then
12254           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12255         fi
12256       else
12257         # Otherwise we believe it is a complete path. Use it as it is.
12258         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12259 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12260         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12261 $as_echo_n "checking for FGREP... " >&6; }
12262         if test ! -x "$tool_specified"; then
12263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12264 $as_echo "not found" >&6; }
12265           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12266         fi
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12268 $as_echo "$tool_specified" >&6; }
12269       fi
12270     fi
12271   fi
12272 
12273 
12274   if test "x$FGREP" = x; then
12275     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12276   fi
12277 
12278 
12279 
12280 
12281   # Publish this variable in the help.
12282 
12283 
12284   if test "x$SED" = x; then
12285     # The variable is not set by user, try to locate tool using the code snippet
12286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12287 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12288 if ${ac_cv_path_SED+:} false; then :
12289   $as_echo_n "(cached) " >&6
12290 else
12291             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12292      for ac_i in 1 2 3 4 5 6 7; do
12293        ac_script="$ac_script$as_nl$ac_script"
12294      done
12295      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12296      { ac_script=; unset ac_script;}
12297      if test -z "$SED"; then
12298   ac_path_SED_found=false
12299   # Loop through the user's path and test for each of PROGNAME-LIST
12300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12301 for as_dir in $PATH
12302 do
12303   IFS=$as_save_IFS
12304   test -z "$as_dir" && as_dir=.
12305     for ac_prog in sed gsed; do
12306     for ac_exec_ext in '' $ac_executable_extensions; do
12307       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12308       as_fn_executable_p "$ac_path_SED" || continue
12309 # Check for GNU ac_path_SED and select it if it is found.
12310   # Check for GNU $ac_path_SED
12311 case `"$ac_path_SED" --version 2>&1` in
12312 *GNU*)
12313   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12314 *)
12315   ac_count=0
12316   $as_echo_n 0123456789 >"conftest.in"
12317   while :
12318   do
12319     cat "conftest.in" "conftest.in" >"conftest.tmp"
12320     mv "conftest.tmp" "conftest.in"
12321     cp "conftest.in" "conftest.nl"
12322     $as_echo '' >> "conftest.nl"
12323     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12324     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12325     as_fn_arith $ac_count + 1 && ac_count=$as_val
12326     if test $ac_count -gt ${ac_path_SED_max-0}; then
12327       # Best one so far, save it but keep looking for a better one
12328       ac_cv_path_SED="$ac_path_SED"
12329       ac_path_SED_max=$ac_count
12330     fi
12331     # 10*(2^10) chars as input seems more than enough
12332     test $ac_count -gt 10 && break
12333   done
12334   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12335 esac
12336 
12337       $ac_path_SED_found && break 3
12338     done
12339   done
12340   done
12341 IFS=$as_save_IFS
12342   if test -z "$ac_cv_path_SED"; then
12343     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12344   fi
12345 else
12346   ac_cv_path_SED=$SED
12347 fi
12348 
12349 fi
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12351 $as_echo "$ac_cv_path_SED" >&6; }
12352  SED="$ac_cv_path_SED"
12353   rm -f conftest.sed
12354 
12355   else
12356     # The variable is set, but is it from the command line or the environment?
12357 
12358     # Try to remove the string !SED! from our list.
12359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12361       # If it failed, the variable was not from the command line. Ignore it,
12362       # but warn the user (except for BASH, which is always set by the calling BASH).
12363       if test "xSED" != xBASH; then
12364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12365 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12366       fi
12367       # Try to locate tool using the code snippet
12368       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12369 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12370 if ${ac_cv_path_SED+:} false; then :
12371   $as_echo_n "(cached) " >&6
12372 else
12373             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12374      for ac_i in 1 2 3 4 5 6 7; do
12375        ac_script="$ac_script$as_nl$ac_script"
12376      done
12377      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12378      { ac_script=; unset ac_script;}
12379      if test -z "$SED"; then
12380   ac_path_SED_found=false
12381   # Loop through the user's path and test for each of PROGNAME-LIST
12382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383 for as_dir in $PATH
12384 do
12385   IFS=$as_save_IFS
12386   test -z "$as_dir" && as_dir=.
12387     for ac_prog in sed gsed; do
12388     for ac_exec_ext in '' $ac_executable_extensions; do
12389       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12390       as_fn_executable_p "$ac_path_SED" || continue
12391 # Check for GNU ac_path_SED and select it if it is found.
12392   # Check for GNU $ac_path_SED
12393 case `"$ac_path_SED" --version 2>&1` in
12394 *GNU*)
12395   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12396 *)
12397   ac_count=0
12398   $as_echo_n 0123456789 >"conftest.in"
12399   while :
12400   do
12401     cat "conftest.in" "conftest.in" >"conftest.tmp"
12402     mv "conftest.tmp" "conftest.in"
12403     cp "conftest.in" "conftest.nl"
12404     $as_echo '' >> "conftest.nl"
12405     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12406     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12407     as_fn_arith $ac_count + 1 && ac_count=$as_val
12408     if test $ac_count -gt ${ac_path_SED_max-0}; then
12409       # Best one so far, save it but keep looking for a better one
12410       ac_cv_path_SED="$ac_path_SED"
12411       ac_path_SED_max=$ac_count
12412     fi
12413     # 10*(2^10) chars as input seems more than enough
12414     test $ac_count -gt 10 && break
12415   done
12416   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12417 esac
12418 
12419       $ac_path_SED_found && break 3
12420     done
12421   done
12422   done
12423 IFS=$as_save_IFS
12424   if test -z "$ac_cv_path_SED"; then
12425     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12426   fi
12427 else
12428   ac_cv_path_SED=$SED
12429 fi
12430 
12431 fi
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12433 $as_echo "$ac_cv_path_SED" >&6; }
12434  SED="$ac_cv_path_SED"
12435   rm -f conftest.sed
12436 
12437     else
12438       # If it succeeded, then it was overridden by the user. We will use it
12439       # for the tool.
12440 
12441       # First remove it from the list of overridden variables, so we can test
12442       # for unknown variables in the end.
12443       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12444 
12445       # Check if the provided tool contains a complete path.
12446       tool_specified="$SED"
12447       tool_basename="${tool_specified##*/}"
12448       if test "x$tool_basename" = "x$tool_specified"; then
12449         # A command without a complete path is provided, search $PATH.
12450         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12451 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12452         # Extract the first word of "$tool_basename", so it can be a program name with args.
12453 set dummy $tool_basename; ac_word=$2
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455 $as_echo_n "checking for $ac_word... " >&6; }
12456 if ${ac_cv_path_SED+:} false; then :
12457   $as_echo_n "(cached) " >&6
12458 else
12459   case $SED in
12460   [\\/]* | ?:[\\/]*)
12461   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12462   ;;
12463   *)
12464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465 for as_dir in $PATH
12466 do
12467   IFS=$as_save_IFS
12468   test -z "$as_dir" && as_dir=.
12469     for ac_exec_ext in '' $ac_executable_extensions; do
12470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473     break 2
12474   fi
12475 done
12476   done
12477 IFS=$as_save_IFS
12478 
12479   ;;
12480 esac
12481 fi
12482 SED=$ac_cv_path_SED
12483 if test -n "$SED"; then
12484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12485 $as_echo "$SED" >&6; }
12486 else
12487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488 $as_echo "no" >&6; }
12489 fi
12490 
12491 
12492         if test "x$SED" = x; then
12493           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12494         fi
12495       else
12496         # Otherwise we believe it is a complete path. Use it as it is.
12497         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12498 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12500 $as_echo_n "checking for SED... " >&6; }
12501         if test ! -x "$tool_specified"; then
12502           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12503 $as_echo "not found" >&6; }
12504           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12505         fi
12506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12507 $as_echo "$tool_specified" >&6; }
12508       fi
12509     fi
12510   fi
12511 
12512 
12513   if test "x$SED" = x; then
12514     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12515   fi
12516 
12517 
12518 
12519   # Always force rm.
12520   RM="$RM -f"
12521 
12522   # pwd behaves differently on various platforms and some don't support the -L flag.
12523   # Always use the bash builtin pwd to get uniform behavior.
12524   THEPWDCMD=pwd
12525 
12526   # These are not required on all platforms
12527 
12528 
12529   # Publish this variable in the help.
12530 
12531 
12532   if test "x$CYGPATH" = x; then
12533     # The variable is not set by user, try to locate tool using the code snippet
12534     for ac_prog in cygpath
12535 do
12536   # Extract the first word of "$ac_prog", so it can be a program name with args.
12537 set dummy $ac_prog; ac_word=$2
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12539 $as_echo_n "checking for $ac_word... " >&6; }
12540 if ${ac_cv_path_CYGPATH+:} false; then :
12541   $as_echo_n "(cached) " >&6
12542 else
12543   case $CYGPATH in
12544   [\\/]* | ?:[\\/]*)
12545   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12546   ;;
12547   *)
12548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12549 for as_dir in $PATH
12550 do
12551   IFS=$as_save_IFS
12552   test -z "$as_dir" && as_dir=.
12553     for ac_exec_ext in '' $ac_executable_extensions; do
12554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12555     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12557     break 2
12558   fi
12559 done
12560   done
12561 IFS=$as_save_IFS
12562 
12563   ;;
12564 esac
12565 fi
12566 CYGPATH=$ac_cv_path_CYGPATH
12567 if test -n "$CYGPATH"; then
12568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12569 $as_echo "$CYGPATH" >&6; }
12570 else
12571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12572 $as_echo "no" >&6; }
12573 fi
12574 
12575 
12576   test -n "$CYGPATH" && break
12577 done
12578 
12579   else
12580     # The variable is set, but is it from the command line or the environment?
12581 
12582     # Try to remove the string !CYGPATH! from our list.
12583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12585       # If it failed, the variable was not from the command line. Ignore it,
12586       # but warn the user (except for BASH, which is always set by the calling BASH).
12587       if test "xCYGPATH" != xBASH; then
12588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12589 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12590       fi
12591       # Try to locate tool using the code snippet
12592       for ac_prog in cygpath
12593 do
12594   # Extract the first word of "$ac_prog", so it can be a program name with args.
12595 set dummy $ac_prog; ac_word=$2
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12597 $as_echo_n "checking for $ac_word... " >&6; }
12598 if ${ac_cv_path_CYGPATH+:} false; then :
12599   $as_echo_n "(cached) " >&6
12600 else
12601   case $CYGPATH in
12602   [\\/]* | ?:[\\/]*)
12603   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12604   ;;
12605   *)
12606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607 for as_dir in $PATH
12608 do
12609   IFS=$as_save_IFS
12610   test -z "$as_dir" && as_dir=.
12611     for ac_exec_ext in '' $ac_executable_extensions; do
12612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12613     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615     break 2
12616   fi
12617 done
12618   done
12619 IFS=$as_save_IFS
12620 
12621   ;;
12622 esac
12623 fi
12624 CYGPATH=$ac_cv_path_CYGPATH
12625 if test -n "$CYGPATH"; then
12626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12627 $as_echo "$CYGPATH" >&6; }
12628 else
12629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630 $as_echo "no" >&6; }
12631 fi
12632 
12633 
12634   test -n "$CYGPATH" && break
12635 done
12636 
12637     else
12638       # If it succeeded, then it was overridden by the user. We will use it
12639       # for the tool.
12640 
12641       # First remove it from the list of overridden variables, so we can test
12642       # for unknown variables in the end.
12643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12644 
12645       # Check if the provided tool contains a complete path.
12646       tool_specified="$CYGPATH"
12647       tool_basename="${tool_specified##*/}"
12648       if test "x$tool_basename" = "x$tool_specified"; then
12649         # A command without a complete path is provided, search $PATH.
12650         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12651 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12652         # Extract the first word of "$tool_basename", so it can be a program name with args.
12653 set dummy $tool_basename; ac_word=$2
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655 $as_echo_n "checking for $ac_word... " >&6; }
12656 if ${ac_cv_path_CYGPATH+:} false; then :
12657   $as_echo_n "(cached) " >&6
12658 else
12659   case $CYGPATH in
12660   [\\/]* | ?:[\\/]*)
12661   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12662   ;;
12663   *)
12664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665 for as_dir in $PATH
12666 do
12667   IFS=$as_save_IFS
12668   test -z "$as_dir" && as_dir=.
12669     for ac_exec_ext in '' $ac_executable_extensions; do
12670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673     break 2
12674   fi
12675 done
12676   done
12677 IFS=$as_save_IFS
12678 
12679   ;;
12680 esac
12681 fi
12682 CYGPATH=$ac_cv_path_CYGPATH
12683 if test -n "$CYGPATH"; then
12684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12685 $as_echo "$CYGPATH" >&6; }
12686 else
12687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688 $as_echo "no" >&6; }
12689 fi
12690 
12691 
12692         if test "x$CYGPATH" = x; then
12693           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12694         fi
12695       else
12696         # Otherwise we believe it is a complete path. Use it as it is.
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12698 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12700 $as_echo_n "checking for CYGPATH... " >&6; }
12701         if test ! -x "$tool_specified"; then
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12703 $as_echo "not found" >&6; }
12704           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12705         fi
12706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12707 $as_echo "$tool_specified" >&6; }
12708       fi
12709     fi
12710   fi
12711 
12712 
12713 
12714 
12715   # Publish this variable in the help.
12716 
12717 
12718   if test "x$READLINK" = x; then
12719     # The variable is not set by user, try to locate tool using the code snippet
12720     for ac_prog in greadlink readlink
12721 do
12722   # Extract the first word of "$ac_prog", so it can be a program name with args.
12723 set dummy $ac_prog; ac_word=$2
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12725 $as_echo_n "checking for $ac_word... " >&6; }
12726 if ${ac_cv_path_READLINK+:} false; then :
12727   $as_echo_n "(cached) " >&6
12728 else
12729   case $READLINK in
12730   [\\/]* | ?:[\\/]*)
12731   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12732   ;;
12733   *)
12734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12735 for as_dir in $PATH
12736 do
12737   IFS=$as_save_IFS
12738   test -z "$as_dir" && as_dir=.
12739     for ac_exec_ext in '' $ac_executable_extensions; do
12740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12741     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12743     break 2
12744   fi
12745 done
12746   done
12747 IFS=$as_save_IFS
12748 
12749   ;;
12750 esac
12751 fi
12752 READLINK=$ac_cv_path_READLINK
12753 if test -n "$READLINK"; then
12754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12755 $as_echo "$READLINK" >&6; }
12756 else
12757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758 $as_echo "no" >&6; }
12759 fi
12760 
12761 
12762   test -n "$READLINK" && break
12763 done
12764 
12765   else
12766     # The variable is set, but is it from the command line or the environment?
12767 
12768     # Try to remove the string !READLINK! from our list.
12769     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12770     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12771       # If it failed, the variable was not from the command line. Ignore it,
12772       # but warn the user (except for BASH, which is always set by the calling BASH).
12773       if test "xREADLINK" != xBASH; then
12774         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12775 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12776       fi
12777       # Try to locate tool using the code snippet
12778       for ac_prog in greadlink readlink
12779 do
12780   # Extract the first word of "$ac_prog", so it can be a program name with args.
12781 set dummy $ac_prog; ac_word=$2
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783 $as_echo_n "checking for $ac_word... " >&6; }
12784 if ${ac_cv_path_READLINK+:} false; then :
12785   $as_echo_n "(cached) " >&6
12786 else
12787   case $READLINK in
12788   [\\/]* | ?:[\\/]*)
12789   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12790   ;;
12791   *)
12792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793 for as_dir in $PATH
12794 do
12795   IFS=$as_save_IFS
12796   test -z "$as_dir" && as_dir=.
12797     for ac_exec_ext in '' $ac_executable_extensions; do
12798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801     break 2
12802   fi
12803 done
12804   done
12805 IFS=$as_save_IFS
12806 
12807   ;;
12808 esac
12809 fi
12810 READLINK=$ac_cv_path_READLINK
12811 if test -n "$READLINK"; then
12812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12813 $as_echo "$READLINK" >&6; }
12814 else
12815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816 $as_echo "no" >&6; }
12817 fi
12818 
12819 
12820   test -n "$READLINK" && break
12821 done
12822 
12823     else
12824       # If it succeeded, then it was overridden by the user. We will use it
12825       # for the tool.
12826 
12827       # First remove it from the list of overridden variables, so we can test
12828       # for unknown variables in the end.
12829       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12830 
12831       # Check if the provided tool contains a complete path.
12832       tool_specified="$READLINK"
12833       tool_basename="${tool_specified##*/}"
12834       if test "x$tool_basename" = "x$tool_specified"; then
12835         # A command without a complete path is provided, search $PATH.
12836         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12837 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12838         # Extract the first word of "$tool_basename", so it can be a program name with args.
12839 set dummy $tool_basename; ac_word=$2
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841 $as_echo_n "checking for $ac_word... " >&6; }
12842 if ${ac_cv_path_READLINK+:} false; then :
12843   $as_echo_n "(cached) " >&6
12844 else
12845   case $READLINK in
12846   [\\/]* | ?:[\\/]*)
12847   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12848   ;;
12849   *)
12850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851 for as_dir in $PATH
12852 do
12853   IFS=$as_save_IFS
12854   test -z "$as_dir" && as_dir=.
12855     for ac_exec_ext in '' $ac_executable_extensions; do
12856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859     break 2
12860   fi
12861 done
12862   done
12863 IFS=$as_save_IFS
12864 
12865   ;;
12866 esac
12867 fi
12868 READLINK=$ac_cv_path_READLINK
12869 if test -n "$READLINK"; then
12870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12871 $as_echo "$READLINK" >&6; }
12872 else
12873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874 $as_echo "no" >&6; }
12875 fi
12876 
12877 
12878         if test "x$READLINK" = x; then
12879           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880         fi
12881       else
12882         # Otherwise we believe it is a complete path. Use it as it is.
12883         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12884 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12886 $as_echo_n "checking for READLINK... " >&6; }
12887         if test ! -x "$tool_specified"; then
12888           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889 $as_echo "not found" >&6; }
12890           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12891         fi
12892         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893 $as_echo "$tool_specified" >&6; }
12894       fi
12895     fi
12896   fi
12897 
12898 
12899 
12900 
12901   # Publish this variable in the help.
12902 
12903 
12904   if test "x$DF" = x; then
12905     # The variable is not set by user, try to locate tool using the code snippet
12906     for ac_prog in df
12907 do
12908   # Extract the first word of "$ac_prog", so it can be a program name with args.
12909 set dummy $ac_prog; ac_word=$2
12910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12911 $as_echo_n "checking for $ac_word... " >&6; }
12912 if ${ac_cv_path_DF+:} false; then :
12913   $as_echo_n "(cached) " >&6
12914 else
12915   case $DF in
12916   [\\/]* | ?:[\\/]*)
12917   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12918   ;;
12919   *)
12920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12921 for as_dir in $PATH
12922 do
12923   IFS=$as_save_IFS
12924   test -z "$as_dir" && as_dir=.
12925     for ac_exec_ext in '' $ac_executable_extensions; do
12926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12927     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12929     break 2
12930   fi
12931 done
12932   done
12933 IFS=$as_save_IFS
12934 
12935   ;;
12936 esac
12937 fi
12938 DF=$ac_cv_path_DF
12939 if test -n "$DF"; then
12940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12941 $as_echo "$DF" >&6; }
12942 else
12943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12944 $as_echo "no" >&6; }
12945 fi
12946 
12947 
12948   test -n "$DF" && break
12949 done
12950 
12951   else
12952     # The variable is set, but is it from the command line or the environment?
12953 
12954     # Try to remove the string !DF! from our list.
12955     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12956     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12957       # If it failed, the variable was not from the command line. Ignore it,
12958       # but warn the user (except for BASH, which is always set by the calling BASH).
12959       if test "xDF" != xBASH; then
12960         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12961 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12962       fi
12963       # Try to locate tool using the code snippet
12964       for ac_prog in df
12965 do
12966   # Extract the first word of "$ac_prog", so it can be a program name with args.
12967 set dummy $ac_prog; ac_word=$2
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12969 $as_echo_n "checking for $ac_word... " >&6; }
12970 if ${ac_cv_path_DF+:} false; then :
12971   $as_echo_n "(cached) " >&6
12972 else
12973   case $DF in
12974   [\\/]* | ?:[\\/]*)
12975   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12976   ;;
12977   *)
12978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12979 for as_dir in $PATH
12980 do
12981   IFS=$as_save_IFS
12982   test -z "$as_dir" && as_dir=.
12983     for ac_exec_ext in '' $ac_executable_extensions; do
12984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12985     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12987     break 2
12988   fi
12989 done
12990   done
12991 IFS=$as_save_IFS
12992 
12993   ;;
12994 esac
12995 fi
12996 DF=$ac_cv_path_DF
12997 if test -n "$DF"; then
12998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12999 $as_echo "$DF" >&6; }
13000 else
13001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13002 $as_echo "no" >&6; }
13003 fi
13004 
13005 
13006   test -n "$DF" && break
13007 done
13008 
13009     else
13010       # If it succeeded, then it was overridden by the user. We will use it
13011       # for the tool.
13012 
13013       # First remove it from the list of overridden variables, so we can test
13014       # for unknown variables in the end.
13015       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016 
13017       # Check if the provided tool contains a complete path.
13018       tool_specified="$DF"
13019       tool_basename="${tool_specified##*/}"
13020       if test "x$tool_basename" = "x$tool_specified"; then
13021         # A command without a complete path is provided, search $PATH.
13022         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13023 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13024         # Extract the first word of "$tool_basename", so it can be a program name with args.
13025 set dummy $tool_basename; ac_word=$2
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13027 $as_echo_n "checking for $ac_word... " >&6; }
13028 if ${ac_cv_path_DF+:} false; then :
13029   $as_echo_n "(cached) " >&6
13030 else
13031   case $DF in
13032   [\\/]* | ?:[\\/]*)
13033   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13034   ;;
13035   *)
13036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13037 for as_dir in $PATH
13038 do
13039   IFS=$as_save_IFS
13040   test -z "$as_dir" && as_dir=.
13041     for ac_exec_ext in '' $ac_executable_extensions; do
13042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13043     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13045     break 2
13046   fi
13047 done
13048   done
13049 IFS=$as_save_IFS
13050 
13051   ;;
13052 esac
13053 fi
13054 DF=$ac_cv_path_DF
13055 if test -n "$DF"; then
13056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13057 $as_echo "$DF" >&6; }
13058 else
13059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13060 $as_echo "no" >&6; }
13061 fi
13062 
13063 
13064         if test "x$DF" = x; then
13065           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13066         fi
13067       else
13068         # Otherwise we believe it is a complete path. Use it as it is.
13069         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13070 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13071         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13072 $as_echo_n "checking for DF... " >&6; }
13073         if test ! -x "$tool_specified"; then
13074           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13075 $as_echo "not found" >&6; }
13076           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13077         fi
13078         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13079 $as_echo "$tool_specified" >&6; }
13080       fi
13081     fi
13082   fi
13083 
13084 
13085 
13086 
13087   # Publish this variable in the help.
13088 
13089 
13090   if test "x$SETFILE" = x; then
13091     # The variable is not set by user, try to locate tool using the code snippet
13092     for ac_prog in SetFile
13093 do
13094   # Extract the first word of "$ac_prog", so it can be a program name with args.
13095 set dummy $ac_prog; ac_word=$2
13096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13097 $as_echo_n "checking for $ac_word... " >&6; }
13098 if ${ac_cv_path_SETFILE+:} false; then :
13099   $as_echo_n "(cached) " >&6
13100 else
13101   case $SETFILE in
13102   [\\/]* | ?:[\\/]*)
13103   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13104   ;;
13105   *)
13106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13107 for as_dir in $PATH
13108 do
13109   IFS=$as_save_IFS
13110   test -z "$as_dir" && as_dir=.
13111     for ac_exec_ext in '' $ac_executable_extensions; do
13112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13113     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13115     break 2
13116   fi
13117 done
13118   done
13119 IFS=$as_save_IFS
13120 
13121   ;;
13122 esac
13123 fi
13124 SETFILE=$ac_cv_path_SETFILE
13125 if test -n "$SETFILE"; then
13126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13127 $as_echo "$SETFILE" >&6; }
13128 else
13129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13130 $as_echo "no" >&6; }
13131 fi
13132 
13133 
13134   test -n "$SETFILE" && break
13135 done
13136 
13137   else
13138     # The variable is set, but is it from the command line or the environment?
13139 
13140     # Try to remove the string !SETFILE! from our list.
13141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13143       # If it failed, the variable was not from the command line. Ignore it,
13144       # but warn the user (except for BASH, which is always set by the calling BASH).
13145       if test "xSETFILE" != xBASH; then
13146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13147 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13148       fi
13149       # Try to locate tool using the code snippet
13150       for ac_prog in SetFile
13151 do
13152   # Extract the first word of "$ac_prog", so it can be a program name with args.
13153 set dummy $ac_prog; ac_word=$2
13154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13155 $as_echo_n "checking for $ac_word... " >&6; }
13156 if ${ac_cv_path_SETFILE+:} false; then :
13157   $as_echo_n "(cached) " >&6
13158 else
13159   case $SETFILE in
13160   [\\/]* | ?:[\\/]*)
13161   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13162   ;;
13163   *)
13164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13165 for as_dir in $PATH
13166 do
13167   IFS=$as_save_IFS
13168   test -z "$as_dir" && as_dir=.
13169     for ac_exec_ext in '' $ac_executable_extensions; do
13170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13171     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13173     break 2
13174   fi
13175 done
13176   done
13177 IFS=$as_save_IFS
13178 
13179   ;;
13180 esac
13181 fi
13182 SETFILE=$ac_cv_path_SETFILE
13183 if test -n "$SETFILE"; then
13184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13185 $as_echo "$SETFILE" >&6; }
13186 else
13187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13188 $as_echo "no" >&6; }
13189 fi
13190 
13191 
13192   test -n "$SETFILE" && break
13193 done
13194 
13195     else
13196       # If it succeeded, then it was overridden by the user. We will use it
13197       # for the tool.
13198 
13199       # First remove it from the list of overridden variables, so we can test
13200       # for unknown variables in the end.
13201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13202 
13203       # Check if the provided tool contains a complete path.
13204       tool_specified="$SETFILE"
13205       tool_basename="${tool_specified##*/}"
13206       if test "x$tool_basename" = "x$tool_specified"; then
13207         # A command without a complete path is provided, search $PATH.
13208         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13209 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13210         # Extract the first word of "$tool_basename", so it can be a program name with args.
13211 set dummy $tool_basename; ac_word=$2
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13213 $as_echo_n "checking for $ac_word... " >&6; }
13214 if ${ac_cv_path_SETFILE+:} false; then :
13215   $as_echo_n "(cached) " >&6
13216 else
13217   case $SETFILE in
13218   [\\/]* | ?:[\\/]*)
13219   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13220   ;;
13221   *)
13222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223 for as_dir in $PATH
13224 do
13225   IFS=$as_save_IFS
13226   test -z "$as_dir" && as_dir=.
13227     for ac_exec_ext in '' $ac_executable_extensions; do
13228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13229     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13231     break 2
13232   fi
13233 done
13234   done
13235 IFS=$as_save_IFS
13236 
13237   ;;
13238 esac
13239 fi
13240 SETFILE=$ac_cv_path_SETFILE
13241 if test -n "$SETFILE"; then
13242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13243 $as_echo "$SETFILE" >&6; }
13244 else
13245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13246 $as_echo "no" >&6; }
13247 fi
13248 
13249 
13250         if test "x$SETFILE" = x; then
13251           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13252         fi
13253       else
13254         # Otherwise we believe it is a complete path. Use it as it is.
13255         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13256 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13258 $as_echo_n "checking for SETFILE... " >&6; }
13259         if test ! -x "$tool_specified"; then
13260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13261 $as_echo "not found" >&6; }
13262           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13263         fi
13264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13265 $as_echo "$tool_specified" >&6; }
13266       fi
13267     fi
13268   fi
13269 
13270 
13271 
13272 
13273   # Publish this variable in the help.
13274 
13275 
13276   if test "x$CPIO" = x; then
13277     # The variable is not set by user, try to locate tool using the code snippet
13278     for ac_prog in cpio bsdcpio
13279 do
13280   # Extract the first word of "$ac_prog", so it can be a program name with args.
13281 set dummy $ac_prog; ac_word=$2
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13283 $as_echo_n "checking for $ac_word... " >&6; }
13284 if ${ac_cv_path_CPIO+:} false; then :
13285   $as_echo_n "(cached) " >&6
13286 else
13287   case $CPIO in
13288   [\\/]* | ?:[\\/]*)
13289   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13290   ;;
13291   *)
13292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13293 for as_dir in $PATH
13294 do
13295   IFS=$as_save_IFS
13296   test -z "$as_dir" && as_dir=.
13297     for ac_exec_ext in '' $ac_executable_extensions; do
13298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13299     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13301     break 2
13302   fi
13303 done
13304   done
13305 IFS=$as_save_IFS
13306 
13307   ;;
13308 esac
13309 fi
13310 CPIO=$ac_cv_path_CPIO
13311 if test -n "$CPIO"; then
13312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13313 $as_echo "$CPIO" >&6; }
13314 else
13315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316 $as_echo "no" >&6; }
13317 fi
13318 
13319 
13320   test -n "$CPIO" && break
13321 done
13322 
13323   else
13324     # The variable is set, but is it from the command line or the environment?
13325 
13326     # Try to remove the string !CPIO! from our list.
13327     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13328     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13329       # If it failed, the variable was not from the command line. Ignore it,
13330       # but warn the user (except for BASH, which is always set by the calling BASH).
13331       if test "xCPIO" != xBASH; then
13332         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13333 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13334       fi
13335       # Try to locate tool using the code snippet
13336       for ac_prog in cpio bsdcpio
13337 do
13338   # Extract the first word of "$ac_prog", so it can be a program name with args.
13339 set dummy $ac_prog; ac_word=$2
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13341 $as_echo_n "checking for $ac_word... " >&6; }
13342 if ${ac_cv_path_CPIO+:} false; then :
13343   $as_echo_n "(cached) " >&6
13344 else
13345   case $CPIO in
13346   [\\/]* | ?:[\\/]*)
13347   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13348   ;;
13349   *)
13350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351 for as_dir in $PATH
13352 do
13353   IFS=$as_save_IFS
13354   test -z "$as_dir" && as_dir=.
13355     for ac_exec_ext in '' $ac_executable_extensions; do
13356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13357     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13359     break 2
13360   fi
13361 done
13362   done
13363 IFS=$as_save_IFS
13364 
13365   ;;
13366 esac
13367 fi
13368 CPIO=$ac_cv_path_CPIO
13369 if test -n "$CPIO"; then
13370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13371 $as_echo "$CPIO" >&6; }
13372 else
13373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13374 $as_echo "no" >&6; }
13375 fi
13376 
13377 
13378   test -n "$CPIO" && break
13379 done
13380 
13381     else
13382       # If it succeeded, then it was overridden by the user. We will use it
13383       # for the tool.
13384 
13385       # First remove it from the list of overridden variables, so we can test
13386       # for unknown variables in the end.
13387       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13388 
13389       # Check if the provided tool contains a complete path.
13390       tool_specified="$CPIO"
13391       tool_basename="${tool_specified##*/}"
13392       if test "x$tool_basename" = "x$tool_specified"; then
13393         # A command without a complete path is provided, search $PATH.
13394         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13395 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13396         # Extract the first word of "$tool_basename", so it can be a program name with args.
13397 set dummy $tool_basename; ac_word=$2
13398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13399 $as_echo_n "checking for $ac_word... " >&6; }
13400 if ${ac_cv_path_CPIO+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   case $CPIO in
13404   [\\/]* | ?:[\\/]*)
13405   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13406   ;;
13407   *)
13408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13409 for as_dir in $PATH
13410 do
13411   IFS=$as_save_IFS
13412   test -z "$as_dir" && as_dir=.
13413     for ac_exec_ext in '' $ac_executable_extensions; do
13414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13415     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13417     break 2
13418   fi
13419 done
13420   done
13421 IFS=$as_save_IFS
13422 
13423   ;;
13424 esac
13425 fi
13426 CPIO=$ac_cv_path_CPIO
13427 if test -n "$CPIO"; then
13428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13429 $as_echo "$CPIO" >&6; }
13430 else
13431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13432 $as_echo "no" >&6; }
13433 fi
13434 
13435 
13436         if test "x$CPIO" = x; then
13437           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13438         fi
13439       else
13440         # Otherwise we believe it is a complete path. Use it as it is.
13441         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13442 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13444 $as_echo_n "checking for CPIO... " >&6; }
13445         if test ! -x "$tool_specified"; then
13446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13447 $as_echo "not found" >&6; }
13448           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13449         fi
13450         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13451 $as_echo "$tool_specified" >&6; }
13452       fi
13453     fi
13454   fi
13455 
13456 
13457 
13458 
13459 # Now we can determine OpenJDK build and target platforms. This is required to
13460 # have early on.
13461 # Make sure we can run config.sub.
13462 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13463   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13464 
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13466 $as_echo_n "checking build system type... " >&6; }
13467 if ${ac_cv_build+:} false; then :
13468   $as_echo_n "(cached) " >&6
13469 else
13470   ac_build_alias=$build_alias
13471 test "x$ac_build_alias" = x &&
13472   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13473 test "x$ac_build_alias" = x &&
13474   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13475 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13476   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13477 
13478 fi
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13480 $as_echo "$ac_cv_build" >&6; }
13481 case $ac_cv_build in
13482 *-*-*) ;;
13483 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13484 esac
13485 build=$ac_cv_build
13486 ac_save_IFS=$IFS; IFS='-'
13487 set x $ac_cv_build
13488 shift
13489 build_cpu=$1
13490 build_vendor=$2
13491 shift; shift
13492 # Remember, the first character of IFS is used to create $*,
13493 # except with old shells:
13494 build_os=$*
13495 IFS=$ac_save_IFS
13496 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13497 
13498 
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13500 $as_echo_n "checking host system type... " >&6; }
13501 if ${ac_cv_host+:} false; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   if test "x$host_alias" = x; then
13505   ac_cv_host=$ac_cv_build
13506 else
13507   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13508     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13509 fi
13510 
13511 fi
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13513 $as_echo "$ac_cv_host" >&6; }
13514 case $ac_cv_host in
13515 *-*-*) ;;
13516 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13517 esac
13518 host=$ac_cv_host
13519 ac_save_IFS=$IFS; IFS='-'
13520 set x $ac_cv_host
13521 shift
13522 host_cpu=$1
13523 host_vendor=$2
13524 shift; shift
13525 # Remember, the first character of IFS is used to create $*,
13526 # except with old shells:
13527 host_os=$*
13528 IFS=$ac_save_IFS
13529 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13530 
13531 
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13533 $as_echo_n "checking target system type... " >&6; }
13534 if ${ac_cv_target+:} false; then :
13535   $as_echo_n "(cached) " >&6
13536 else
13537   if test "x$target_alias" = x; then
13538   ac_cv_target=$ac_cv_host
13539 else
13540   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13541     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13542 fi
13543 
13544 fi
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13546 $as_echo "$ac_cv_target" >&6; }
13547 case $ac_cv_target in
13548 *-*-*) ;;
13549 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13550 esac
13551 target=$ac_cv_target
13552 ac_save_IFS=$IFS; IFS='-'
13553 set x $ac_cv_target
13554 shift
13555 target_cpu=$1
13556 target_vendor=$2
13557 shift; shift
13558 # Remember, the first character of IFS is used to create $*,
13559 # except with old shells:
13560 target_os=$*
13561 IFS=$ac_save_IFS
13562 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13563 
13564 
13565 # The aliases save the names the user supplied, while $host etc.
13566 # will get canonicalized.
13567 test -n "$target_alias" &&
13568   test "$program_prefix$program_suffix$program_transform_name" = \
13569     NONENONEs,x,x, &&
13570   program_prefix=${target_alias}-
13571 
13572   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13573   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13574   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13575   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13576   # to use the configure naming style.
13577 
13578 
13579 
13580 
13581 
13582   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13583   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13584   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13585   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13586   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13587   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13588 
13589 
13590 
13591   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13592 
13593   case "$build_os" in
13594     *linux*)
13595       VAR_OS=linux
13596       VAR_OS_API=posix
13597       VAR_OS_ENV=linux
13598       ;;
13599     *solaris*)
13600       VAR_OS=solaris
13601       VAR_OS_API=posix
13602       VAR_OS_ENV=solaris
13603       ;;
13604     *darwin*)
13605       VAR_OS=macosx
13606       VAR_OS_API=posix
13607       VAR_OS_ENV=macosx
13608       ;;
13609     *bsd*)
13610       VAR_OS=bsd
13611       VAR_OS_API=posix
13612       VAR_OS_ENV=bsd
13613       ;;
13614     *cygwin*)
13615       VAR_OS=windows
13616       VAR_OS_API=winapi
13617       VAR_OS_ENV=windows.cygwin
13618       ;;
13619     *mingw*)
13620       VAR_OS=windows
13621       VAR_OS_API=winapi
13622       VAR_OS_ENV=windows.msys
13623       ;;
13624     *aix*)
13625       VAR_OS=aix
13626       VAR_OS_API=posix
13627       VAR_OS_ENV=aix
13628       ;;
13629     *)
13630       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13631       ;;
13632   esac
13633 
13634 
13635   # First argument is the cpu name from the trip/quad
13636   case "$build_cpu" in
13637     x86_64)
13638       VAR_CPU=x86_64
13639       VAR_CPU_ARCH=x86
13640       VAR_CPU_BITS=64
13641       VAR_CPU_ENDIAN=little
13642       ;;
13643     i?86)
13644       VAR_CPU=x86
13645       VAR_CPU_ARCH=x86
13646       VAR_CPU_BITS=32
13647       VAR_CPU_ENDIAN=little
13648       ;;
13649     arm*)
13650       VAR_CPU=arm
13651       VAR_CPU_ARCH=arm
13652       VAR_CPU_BITS=32
13653       VAR_CPU_ENDIAN=little
13654       ;;
13655     aarch64)
13656       VAR_CPU=aarch64
13657       VAR_CPU_ARCH=aarch64
13658       VAR_CPU_BITS=64
13659       VAR_CPU_ENDIAN=little
13660       ;;
13661     powerpc)
13662       VAR_CPU=ppc
13663       VAR_CPU_ARCH=ppc
13664       VAR_CPU_BITS=32
13665       VAR_CPU_ENDIAN=big
13666       ;;
13667     powerpc64)
13668       VAR_CPU=ppc64
13669       VAR_CPU_ARCH=ppc
13670       VAR_CPU_BITS=64
13671       VAR_CPU_ENDIAN=big
13672       ;;
13673     powerpc64le)
13674       VAR_CPU=ppc64le
13675       VAR_CPU_ARCH=ppc
13676       VAR_CPU_BITS=64
13677       VAR_CPU_ENDIAN=little
13678       ;;
13679     s390)
13680       VAR_CPU=s390
13681       VAR_CPU_ARCH=s390
13682       VAR_CPU_BITS=32
13683       VAR_CPU_ENDIAN=big
13684       ;;
13685     s390x)
13686       VAR_CPU=s390x
13687       VAR_CPU_ARCH=s390
13688       VAR_CPU_BITS=64
13689       VAR_CPU_ENDIAN=big
13690       ;;
13691     sparc)
13692       VAR_CPU=sparc
13693       VAR_CPU_ARCH=sparc
13694       VAR_CPU_BITS=32
13695       VAR_CPU_ENDIAN=big
13696       ;;
13697     sparcv9|sparc64)
13698       VAR_CPU=sparcv9
13699       VAR_CPU_ARCH=sparc
13700       VAR_CPU_BITS=64
13701       VAR_CPU_ENDIAN=big
13702       ;;
13703     *)
13704       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13705       ;;
13706   esac
13707 
13708   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13709   OPENJDK_BUILD_OS="$VAR_OS"
13710   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13711   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13712   OPENJDK_BUILD_CPU="$VAR_CPU"
13713   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13714   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13715   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13716 
13717 
13718 
13719 
13720 
13721 
13722 
13723 
13724   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13725 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13727 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13728 
13729   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13730 
13731   case "$host_os" in
13732     *linux*)
13733       VAR_OS=linux
13734       VAR_OS_API=posix
13735       VAR_OS_ENV=linux
13736       ;;
13737     *solaris*)
13738       VAR_OS=solaris
13739       VAR_OS_API=posix
13740       VAR_OS_ENV=solaris
13741       ;;
13742     *darwin*)
13743       VAR_OS=macosx
13744       VAR_OS_API=posix
13745       VAR_OS_ENV=macosx
13746       ;;
13747     *bsd*)
13748       VAR_OS=bsd
13749       VAR_OS_API=posix
13750       VAR_OS_ENV=bsd
13751       ;;
13752     *cygwin*)
13753       VAR_OS=windows
13754       VAR_OS_API=winapi
13755       VAR_OS_ENV=windows.cygwin
13756       ;;
13757     *mingw*)
13758       VAR_OS=windows
13759       VAR_OS_API=winapi
13760       VAR_OS_ENV=windows.msys
13761       ;;
13762     *aix*)
13763       VAR_OS=aix
13764       VAR_OS_API=posix
13765       VAR_OS_ENV=aix
13766       ;;
13767     *)
13768       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13769       ;;
13770   esac
13771 
13772 
13773   # First argument is the cpu name from the trip/quad
13774   case "$host_cpu" in
13775     x86_64)
13776       VAR_CPU=x86_64
13777       VAR_CPU_ARCH=x86
13778       VAR_CPU_BITS=64
13779       VAR_CPU_ENDIAN=little
13780       ;;
13781     i?86)
13782       VAR_CPU=x86
13783       VAR_CPU_ARCH=x86
13784       VAR_CPU_BITS=32
13785       VAR_CPU_ENDIAN=little
13786       ;;
13787     arm*)
13788       VAR_CPU=arm
13789       VAR_CPU_ARCH=arm
13790       VAR_CPU_BITS=32
13791       VAR_CPU_ENDIAN=little
13792       ;;
13793     aarch64)
13794       VAR_CPU=aarch64
13795       VAR_CPU_ARCH=aarch64
13796       VAR_CPU_BITS=64
13797       VAR_CPU_ENDIAN=little
13798       ;;
13799     powerpc)
13800       VAR_CPU=ppc
13801       VAR_CPU_ARCH=ppc
13802       VAR_CPU_BITS=32
13803       VAR_CPU_ENDIAN=big
13804       ;;
13805     powerpc64)
13806       VAR_CPU=ppc64
13807       VAR_CPU_ARCH=ppc
13808       VAR_CPU_BITS=64
13809       VAR_CPU_ENDIAN=big
13810       ;;
13811     powerpc64le)
13812       VAR_CPU=ppc64le
13813       VAR_CPU_ARCH=ppc
13814       VAR_CPU_BITS=64
13815       VAR_CPU_ENDIAN=little
13816       ;;
13817     s390)
13818       VAR_CPU=s390
13819       VAR_CPU_ARCH=s390
13820       VAR_CPU_BITS=32
13821       VAR_CPU_ENDIAN=big
13822       ;;
13823     s390x)
13824       VAR_CPU=s390x
13825       VAR_CPU_ARCH=s390
13826       VAR_CPU_BITS=64
13827       VAR_CPU_ENDIAN=big
13828       ;;
13829     sparc)
13830       VAR_CPU=sparc
13831       VAR_CPU_ARCH=sparc
13832       VAR_CPU_BITS=32
13833       VAR_CPU_ENDIAN=big
13834       ;;
13835     sparcv9|sparc64)
13836       VAR_CPU=sparcv9
13837       VAR_CPU_ARCH=sparc
13838       VAR_CPU_BITS=64
13839       VAR_CPU_ENDIAN=big
13840       ;;
13841     *)
13842       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13843       ;;
13844   esac
13845 
13846   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13847   OPENJDK_TARGET_OS="$VAR_OS"
13848   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13849   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13850   OPENJDK_TARGET_CPU="$VAR_CPU"
13851   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13852   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13853   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13854 
13855 
13856 
13857 
13858 
13859 
13860 
13861 
13862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13863 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13865 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13866 
13867 
13868 
13869 # Check whether --with-target-bits was given.
13870 if test "${with_target_bits+set}" = set; then :
13871   withval=$with_target_bits;
13872 fi
13873 
13874 
13875   # We have three types of compiles:
13876   # native  == normal compilation, target system == build system
13877   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13878   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13879   #
13880   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13881     # We're doing a proper cross-compilation
13882     COMPILE_TYPE="cross"
13883   else
13884     COMPILE_TYPE="native"
13885   fi
13886 
13887   if test "x$with_target_bits" != x; then
13888     if test "x$COMPILE_TYPE" = "xcross"; then
13889       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13890     fi
13891 
13892     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13893       # A reduced build is requested
13894       COMPILE_TYPE="reduced"
13895       OPENJDK_TARGET_CPU_BITS=32
13896       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13897         OPENJDK_TARGET_CPU=x86
13898       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13899         OPENJDK_TARGET_CPU=sparc
13900       else
13901         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13902       fi
13903     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13904       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
13905     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13906       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13907 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13908     else
13909       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13910     fi
13911   fi
13912 
13913 
13914   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13915 $as_echo_n "checking compilation type... " >&6; }
13916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13917 $as_echo "$COMPILE_TYPE" >&6; }
13918 
13919 
13920   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13921     REQUIRED_OS_NAME=SunOS
13922     REQUIRED_OS_VERSION=5.10
13923   fi
13924   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13925     REQUIRED_OS_NAME=Linux
13926     REQUIRED_OS_VERSION=2.6
13927   fi
13928   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13929     REQUIRED_OS_NAME=Windows
13930     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13931       REQUIRED_OS_VERSION=5.2
13932     else
13933       REQUIRED_OS_VERSION=5.1
13934     fi
13935   fi
13936   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13937     REQUIRED_OS_NAME=Darwin
13938     REQUIRED_OS_VERSION=11.2
13939   fi
13940 
13941 
13942 
13943 
13944 
13945   # Also store the legacy naming of the cpu.
13946   # Ie i586 and amd64 instead of x86 and x86_64
13947   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13948   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13949     OPENJDK_TARGET_CPU_LEGACY="i586"
13950   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13951     # On all platforms except MacOSX replace x86_64 with amd64.
13952     OPENJDK_TARGET_CPU_LEGACY="amd64"
13953   fi
13954 
13955 
13956   # And the second legacy naming of the cpu.
13957   # Ie i386 and amd64 instead of x86 and x86_64.
13958   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13959   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13960     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13961   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13962     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13963   fi
13964 
13965 
13966   # This is the name of the cpu (but using i386 and amd64 instead of
13967   # x86 and x86_64, respectively), preceeded by a /, to be used when
13968   # locating libraries. On macosx, it's empty, though.
13969   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13970   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13971     OPENJDK_TARGET_CPU_LIBDIR=""
13972   fi
13973 
13974 
13975   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13976   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13977   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13978   OPENJDK_TARGET_CPU_ISADIR=""
13979   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13980     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13981       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13982     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13983       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13984     fi
13985   fi
13986 
13987 
13988   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13989   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13990   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13991     # On linux only, we replace x86 with i386.
13992     OPENJDK_TARGET_CPU_OSARCH="i386"
13993   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13994     # On all platforms except macosx, we replace x86_64 with amd64.
13995     OPENJDK_TARGET_CPU_OSARCH="amd64"
13996   fi
13997 
13998 
13999   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14000   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14001     OPENJDK_TARGET_CPU_JLI="i386"
14002   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14003     # On all platforms except macosx, we replace x86_64 with amd64.
14004     OPENJDK_TARGET_CPU_JLI="amd64"
14005   fi
14006   # Now setup the -D flags for building libjli.
14007   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14008   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14009     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14010       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14011     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14012       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14013     fi
14014   fi
14015 
14016 
14017   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
14018   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
14019     OPENJDK_TARGET_OS_API_DIR="solaris"
14020   fi
14021   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
14022     OPENJDK_TARGET_OS_API_DIR="windows"
14023   fi
14024 
14025 
14026   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14027       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14028   else
14029       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
14030   fi
14031 
14032 
14033   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14034     A_LP64="LP64:="
14035     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14036     # unpack200.exe
14037     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14038       ADD_LP64="-D_LP64=1"
14039     fi
14040   fi
14041   LP64=$A_LP64
14042 
14043 
14044   if test "x$COMPILE_TYPE" = "xcross"; then
14045     # FIXME: ... or should this include reduced builds..?
14046     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14047   else
14048     DEFINE_CROSS_COMPILE_ARCH=""
14049   fi
14050 
14051 
14052   # ZERO_ARCHDEF is used to enable architecture-specific code
14053   case "${OPENJDK_TARGET_CPU}" in
14054     ppc)     ZERO_ARCHDEF=PPC32 ;;
14055     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14056     s390*)   ZERO_ARCHDEF=S390  ;;
14057     sparc*)  ZERO_ARCHDEF=SPARC ;;
14058     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14059     x86)     ZERO_ARCHDEF=IA32  ;;
14060     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14061   esac
14062 
14063 
14064 
14065 
14066 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14067 
14068   # Save the current directory this script was started from
14069   CURDIR="$PWD"
14070 
14071   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14072     PATH_SEP=";"
14073 
14074   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14075   if test $SRC_ROOT_LENGTH -gt 100; then
14076     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14077   fi
14078 
14079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14081 $as_echo_n "checking cygwin release... " >&6; }
14082     CYGWIN_VERSION=`$UNAME -r`
14083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14084 $as_echo "$CYGWIN_VERSION" >&6; }
14085     WINDOWS_ENV_VENDOR='cygwin'
14086     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14087 
14088     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14089     if test "x$CYGWIN_VERSION_OLD" != x; then
14090       { $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
14091 $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;}
14092       as_fn_error $? "Cannot continue" "$LINENO" 5
14093     fi
14094     if test "x$CYGPATH" = x; then
14095       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14096     fi
14097     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14098 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14099     # The cmd output ends with Windows line endings (CR/LF)
14100     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
14101     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14102     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14103     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14104 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14105     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14106     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14107     if test "x$test_cygdrive_prefix" = x; then
14108       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14109     fi
14110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14112 $as_echo_n "checking msys release... " >&6; }
14113     MSYS_VERSION=`$UNAME -r`
14114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14115 $as_echo "$MSYS_VERSION" >&6; }
14116 
14117     WINDOWS_ENV_VENDOR='msys'
14118     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14119 
14120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14121 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14122     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14123     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14124 
14125   windows_path="$MSYS_ROOT_PATH"
14126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14127     unix_path=`$CYGPATH -u "$windows_path"`
14128     MSYS_ROOT_PATH="$unix_path"
14129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14131     MSYS_ROOT_PATH="$unix_path"
14132   fi
14133 
14134     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14135 $as_echo "$MSYS_ROOT_PATH" >&6; }
14136     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14137   else
14138     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14139   fi
14140 
14141   # Test if windows or unix (cygwin/msys) find is first in path.
14142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14143 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14144   FIND_BINARY_OUTPUT=`find --version 2>&1`
14145   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14146     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14147 $as_echo "unix style" >&6; }
14148   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14149     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14150 $as_echo "Windows" >&6; }
14151     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14152 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14153     { $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
14154 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14155     as_fn_error $? "Cannot continue" "$LINENO" 5
14156   else
14157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14158 $as_echo "unknown" >&6; }
14159     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14160 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14161   fi
14162 
14163   else
14164     PATH_SEP=":"
14165   fi
14166 
14167 
14168   # We get the top-level directory from the supporting wrappers.
14169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14170 $as_echo_n "checking for top-level directory... " >&6; }
14171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14172 $as_echo "$TOPDIR" >&6; }
14173 
14174 
14175   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14176 
14177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14178 
14179   # Input might be given as Windows format, start by converting to
14180   # unix format.
14181   path="$CURDIR"
14182   new_path=`$CYGPATH -u "$path"`
14183 
14184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14187   # "foo.exe" is OK but "foo" is an error.
14188   #
14189   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14190   # It is also a way to make sure we got the proper file name for the real test later on.
14191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14192   if test "x$test_shortpath" = x; then
14193     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14194 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14195     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14196   fi
14197 
14198   # Call helper function which possibly converts this using DOS-style short mode.
14199   # If so, the updated path is stored in $new_path.
14200 
14201   input_path="$new_path"
14202   # Check if we need to convert this using DOS-style short mode. If the path
14203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14204   # take no chances and rewrite it.
14205   # Note: m4 eats our [], so we need to use [ and ] instead.
14206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14207   if test "x$has_forbidden_chars" != x; then
14208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14212       # Going to short mode and back again did indeed matter. Since short mode is
14213       # case insensitive, let's make it lowercase to improve readability.
14214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14215       # Now convert it back to Unix-style (cygpath)
14216       input_path=`$CYGPATH -u "$shortmode_path"`
14217       new_path="$input_path"
14218     fi
14219   fi
14220 
14221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14222   if test "x$test_cygdrive_prefix" = x; then
14223     # As a simple fix, exclude /usr/bin since it's not a real path.
14224     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14226       # a path prefixed by /cygdrive for fixpath to work.
14227       new_path="$CYGWIN_ROOT_PATH$input_path"
14228     fi
14229   fi
14230 
14231 
14232   if test "x$path" != "x$new_path"; then
14233     CURDIR="$new_path"
14234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14235 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14236   fi
14237 
14238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14239 
14240   path="$CURDIR"
14241   has_colon=`$ECHO $path | $GREP ^.:`
14242   new_path="$path"
14243   if test "x$has_colon" = x; then
14244     # Not in mixed or Windows style, start by that.
14245     new_path=`cmd //c echo $path`
14246   fi
14247 
14248 
14249   input_path="$new_path"
14250   # Check if we need to convert this using DOS-style short mode. If the path
14251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14252   # take no chances and rewrite it.
14253   # Note: m4 eats our [], so we need to use [ and ] instead.
14254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14255   if test "x$has_forbidden_chars" != x; then
14256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14258   fi
14259 
14260 
14261   windows_path="$new_path"
14262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14263     unix_path=`$CYGPATH -u "$windows_path"`
14264     new_path="$unix_path"
14265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14267     new_path="$unix_path"
14268   fi
14269 
14270   if test "x$path" != "x$new_path"; then
14271     CURDIR="$new_path"
14272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14273 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14274   fi
14275 
14276   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14277   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14278 
14279   else
14280     # We're on a posix platform. Hooray! :)
14281     path="$CURDIR"
14282     has_space=`$ECHO "$path" | $GREP " "`
14283     if test "x$has_space" != x; then
14284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14285 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14286       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14287     fi
14288 
14289     # Use eval to expand a potential ~
14290     eval path="$path"
14291     if test ! -f "$path" && test ! -d "$path"; then
14292       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14293     fi
14294 
14295     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14296   fi
14297 
14298 
14299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14300 
14301   # Input might be given as Windows format, start by converting to
14302   # unix format.
14303   path="$TOPDIR"
14304   new_path=`$CYGPATH -u "$path"`
14305 
14306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14309   # "foo.exe" is OK but "foo" is an error.
14310   #
14311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14312   # It is also a way to make sure we got the proper file name for the real test later on.
14313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14314   if test "x$test_shortpath" = x; then
14315     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14316 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14317     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14318   fi
14319 
14320   # Call helper function which possibly converts this using DOS-style short mode.
14321   # If so, the updated path is stored in $new_path.
14322 
14323   input_path="$new_path"
14324   # Check if we need to convert this using DOS-style short mode. If the path
14325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14326   # take no chances and rewrite it.
14327   # Note: m4 eats our [], so we need to use [ and ] instead.
14328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14329   if test "x$has_forbidden_chars" != x; then
14330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14334       # Going to short mode and back again did indeed matter. Since short mode is
14335       # case insensitive, let's make it lowercase to improve readability.
14336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14337       # Now convert it back to Unix-style (cygpath)
14338       input_path=`$CYGPATH -u "$shortmode_path"`
14339       new_path="$input_path"
14340     fi
14341   fi
14342 
14343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14344   if test "x$test_cygdrive_prefix" = x; then
14345     # As a simple fix, exclude /usr/bin since it's not a real path.
14346     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14348       # a path prefixed by /cygdrive for fixpath to work.
14349       new_path="$CYGWIN_ROOT_PATH$input_path"
14350     fi
14351   fi
14352 
14353 
14354   if test "x$path" != "x$new_path"; then
14355     TOPDIR="$new_path"
14356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14357 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14358   fi
14359 
14360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14361 
14362   path="$TOPDIR"
14363   has_colon=`$ECHO $path | $GREP ^.:`
14364   new_path="$path"
14365   if test "x$has_colon" = x; then
14366     # Not in mixed or Windows style, start by that.
14367     new_path=`cmd //c echo $path`
14368   fi
14369 
14370 
14371   input_path="$new_path"
14372   # Check if we need to convert this using DOS-style short mode. If the path
14373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14374   # take no chances and rewrite it.
14375   # Note: m4 eats our [], so we need to use [ and ] instead.
14376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14377   if test "x$has_forbidden_chars" != x; then
14378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14379     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14380   fi
14381 
14382 
14383   windows_path="$new_path"
14384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14385     unix_path=`$CYGPATH -u "$windows_path"`
14386     new_path="$unix_path"
14387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14389     new_path="$unix_path"
14390   fi
14391 
14392   if test "x$path" != "x$new_path"; then
14393     TOPDIR="$new_path"
14394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14395 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14396   fi
14397 
14398   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14399   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14400 
14401   else
14402     # We're on a posix platform. Hooray! :)
14403     path="$TOPDIR"
14404     has_space=`$ECHO "$path" | $GREP " "`
14405     if test "x$has_space" != x; then
14406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14407 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14408       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14409     fi
14410 
14411     # Use eval to expand a potential ~
14412     eval path="$path"
14413     if test ! -f "$path" && test ! -d "$path"; then
14414       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14415     fi
14416 
14417     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14418   fi
14419 
14420   # SRC_ROOT is a traditional alias for TOPDIR.
14421   SRC_ROOT=$TOPDIR
14422 
14423   # Locate the directory of this script.
14424   AUTOCONF_DIR=$TOPDIR/common/autoconf
14425 
14426 
14427   # Setup default logging of stdout and stderr to build.log in the output root.
14428   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14429   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14430   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14431 
14432 
14433 
14434 
14435 
14436 # Check if it's a pure open build or if custom sources are to be used.
14437 
14438   # Check whether --enable-openjdk-only was given.
14439 if test "${enable_openjdk_only+set}" = set; then :
14440   enableval=$enable_openjdk_only;
14441 else
14442   enable_openjdk_only="no"
14443 fi
14444 
14445 
14446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14447 $as_echo_n "checking for presence of closed sources... " >&6; }
14448   if test -d "$SRC_ROOT/jdk/src/closed"; then
14449     CLOSED_SOURCE_PRESENT=yes
14450   else
14451     CLOSED_SOURCE_PRESENT=no
14452   fi
14453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14454 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14455 
14456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14457 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14458   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14460 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14461 
14462   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14463     OPENJDK=true
14464     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14465       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14466 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14467     fi
14468   else
14469     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14470       OPENJDK=true
14471     else
14472       OPENJDK=false
14473     fi
14474   fi
14475 
14476   if test "x$OPENJDK" = "xtrue"; then
14477     SET_OPENJDK="OPENJDK=true"
14478   fi
14479 
14480 
14481 
14482 
14483 # These are needed to be able to create a configuration name (and thus the output directory)
14484 
14485   ###############################################################################
14486   #
14487   # Check which variant of the JDK that we want to build.
14488   # Currently we have:
14489   #    normal:   standard edition
14490   # but the custom make system may add other variants
14491   #
14492   # Effectively the JDK variant gives a name to a specific set of
14493   # modules to compile into the JDK. In the future, these modules
14494   # might even be Jigsaw modules.
14495   #
14496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14497 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14498 
14499 # Check whether --with-jdk-variant was given.
14500 if test "${with_jdk_variant+set}" = set; then :
14501   withval=$with_jdk_variant;
14502 fi
14503 
14504 
14505   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14506     JDK_VARIANT="normal"
14507   else
14508     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14509   fi
14510 
14511 
14512 
14513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14514 $as_echo "$JDK_VARIANT" >&6; }
14515 
14516 
14517 ###############################################################################
14518 #
14519 # Check which interpreter of the JVM we want to build.
14520 # Currently we have:
14521 #    template: Template interpreter (the default)
14522 #    cpp     : C++ interpreter
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14524 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14525 
14526 # Check whether --with-jvm-interpreter was given.
14527 if test "${with_jvm_interpreter+set}" = set; then :
14528   withval=$with_jvm_interpreter;
14529 fi
14530 
14531 
14532 if test "x$with_jvm_interpreter" = x; then
14533      with_jvm_interpreter="template"
14534 fi
14535 
14536 JVM_INTERPRETER="$with_jvm_interpreter"
14537 
14538 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14539    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14540 fi
14541 
14542 
14543 
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14545 $as_echo "$with_jvm_interpreter" >&6; }
14546 
14547 
14548 
14549   ###############################################################################
14550   #
14551   # Check which variants of the JVM that we want to build.
14552   # Currently we have:
14553   #    server: normal interpreter and a tiered C1/C2 compiler
14554   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14555   #    minimal1: reduced form of client with optional VM services and features stripped out
14556   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14557   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14558   #    zero: no machine code interpreter, no compiler
14559   #    zeroshark: zero interpreter and shark/llvm compiler backend
14560 #    core: interpreter only, no compiler (only works on some platforms)
14561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14562 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14563 
14564 # Check whether --with-jvm-variants was given.
14565 if test "${with_jvm_variants+set}" = set; then :
14566   withval=$with_jvm_variants;
14567 fi
14568 
14569 
14570   if test "x$with_jvm_variants" = x; then
14571     with_jvm_variants="server"
14572   fi
14573 
14574   JVM_VARIANTS=",$with_jvm_variants,"
14575   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,//'`
14576 
14577   if test "x$TEST_VARIANTS" != "x,"; then
14578      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14579   fi
14580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14581 $as_echo "$with_jvm_variants" >&6; }
14582 
14583   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14584   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14585   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14586   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14587   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14588   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14589   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14590 
14591   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14592     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14593       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14594     fi
14595   fi
14596   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14597     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14598       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14599     fi
14600   fi
14601   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14602     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14603       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14604     fi
14605   fi
14606 
14607   # Replace the commas with AND for use in the build directory name.
14608   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14609   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/'`
14610   if test "x$COUNT_VARIANTS" != "x,1"; then
14611     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14612   else
14613     BUILDING_MULTIPLE_JVM_VARIANTS=no
14614   fi
14615 
14616 
14617 
14618 
14619 
14620 
14621 
14622 
14623 
14624 
14625   INCLUDE_SA=true
14626   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14627     INCLUDE_SA=false
14628   fi
14629   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14630     INCLUDE_SA=false
14631   fi
14632   if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
14633     INCLUDE_SA=false
14634   fi
14635 
14636 
14637   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14638     MACOSX_UNIVERSAL="false"
14639   fi
14640 
14641 
14642 
14643 
14644   ###############################################################################
14645   #
14646   # Set the debug level
14647   #    release: no debug information, all optimizations, no asserts.
14648   #    fastdebug: debug information (-g), all optimizations, all asserts
14649   #    slowdebug: debug information (-g), no optimizations, all asserts
14650   #
14651   DEBUG_LEVEL="release"
14652   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14653 $as_echo_n "checking which debug level to use... " >&6; }
14654   # Check whether --enable-debug was given.
14655 if test "${enable_debug+set}" = set; then :
14656   enableval=$enable_debug;
14657         ENABLE_DEBUG="${enableval}"
14658         DEBUG_LEVEL="fastdebug"
14659 
14660 else
14661   ENABLE_DEBUG="no"
14662 fi
14663 
14664 
14665 
14666 # Check whether --with-debug-level was given.
14667 if test "${with_debug_level+set}" = set; then :
14668   withval=$with_debug_level;
14669         DEBUG_LEVEL="${withval}"
14670         if test "x$ENABLE_DEBUG" = xyes; then
14671           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14672         fi
14673 
14674 fi
14675 
14676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14677 $as_echo "$DEBUG_LEVEL" >&6; }
14678 
14679   if test "x$DEBUG_LEVEL" != xrelease && \
14680       test "x$DEBUG_LEVEL" != xfastdebug && \
14681       test "x$DEBUG_LEVEL" != xslowdebug; then
14682     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14683   fi
14684 
14685 
14686   ###############################################################################
14687   #
14688   # Setup legacy vars/targets and new vars to deal with different debug levels.
14689   #
14690 
14691   case $DEBUG_LEVEL in
14692     release )
14693       VARIANT="OPT"
14694       FASTDEBUG="false"
14695       DEBUG_CLASSFILES="false"
14696       BUILD_VARIANT_RELEASE=""
14697       HOTSPOT_DEBUG_LEVEL="product"
14698       HOTSPOT_EXPORT="product"
14699       ;;
14700     fastdebug )
14701       VARIANT="DBG"
14702       FASTDEBUG="true"
14703       DEBUG_CLASSFILES="true"
14704       BUILD_VARIANT_RELEASE="-fastdebug"
14705       HOTSPOT_DEBUG_LEVEL="fastdebug"
14706       HOTSPOT_EXPORT="fastdebug"
14707       ;;
14708     slowdebug )
14709       VARIANT="DBG"
14710       FASTDEBUG="false"
14711       DEBUG_CLASSFILES="true"
14712       BUILD_VARIANT_RELEASE="-debug"
14713       HOTSPOT_DEBUG_LEVEL="jvmg"
14714       HOTSPOT_EXPORT="debug"
14715       ;;
14716   esac
14717 
14718   #####
14719   # Generate the legacy makefile targets for hotspot.
14720   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14721   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14722   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14723   # But until then ...
14724   HOTSPOT_TARGET=""
14725 
14726   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14727     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14728   fi
14729 
14730   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14731     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14732   fi
14733 
14734   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14735     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14736   fi
14737 
14738   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14739     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14740   fi
14741 
14742   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14743     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14744   fi
14745 
14746   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14747     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14748   fi
14749 
14750   if test "x$JVM_VARIANT_CORE" = xtrue; then
14751     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14752   fi
14753 
14754   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14755 
14756   # On Macosx universal binaries are produced, but they only contain
14757   # 64 bit intel. This invalidates control of which jvms are built
14758   # from configure, but only server is valid anyway. Fix this
14759   # when hotspot makefiles are rewritten.
14760   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14761     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14762   fi
14763 
14764   #####
14765 
14766 
14767 
14768 
14769 
14770 
14771 
14772 
14773 # With basic setup done, call the custom early hook.
14774 
14775 
14776 # Check if we have devkits, extra paths or sysroot set.
14777 
14778 
14779 # Check whether --with-devkit was given.
14780 if test "${with_devkit+set}" = set; then :
14781   withval=$with_devkit;
14782 fi
14783 
14784 
14785   if test "x$with_devkit" = xyes; then
14786     as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
14787   elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
14788 
14789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14790 
14791   # Input might be given as Windows format, start by converting to
14792   # unix format.
14793   path="$with_devkit"
14794   new_path=`$CYGPATH -u "$path"`
14795 
14796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14799   # "foo.exe" is OK but "foo" is an error.
14800   #
14801   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14802   # It is also a way to make sure we got the proper file name for the real test later on.
14803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14804   if test "x$test_shortpath" = x; then
14805     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14806 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14807     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14808   fi
14809 
14810   # Call helper function which possibly converts this using DOS-style short mode.
14811   # If so, the updated path is stored in $new_path.
14812 
14813   input_path="$new_path"
14814   # Check if we need to convert this using DOS-style short mode. If the path
14815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14816   # take no chances and rewrite it.
14817   # Note: m4 eats our [], so we need to use [ and ] instead.
14818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14819   if test "x$has_forbidden_chars" != x; then
14820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14821     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14822     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14823     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14824       # Going to short mode and back again did indeed matter. Since short mode is
14825       # case insensitive, let's make it lowercase to improve readability.
14826       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14827       # Now convert it back to Unix-style (cygpath)
14828       input_path=`$CYGPATH -u "$shortmode_path"`
14829       new_path="$input_path"
14830     fi
14831   fi
14832 
14833   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14834   if test "x$test_cygdrive_prefix" = x; then
14835     # As a simple fix, exclude /usr/bin since it's not a real path.
14836     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14837       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14838       # a path prefixed by /cygdrive for fixpath to work.
14839       new_path="$CYGWIN_ROOT_PATH$input_path"
14840     fi
14841   fi
14842 
14843 
14844   if test "x$path" != "x$new_path"; then
14845     with_devkit="$new_path"
14846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14847 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14848   fi
14849 
14850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14851 
14852   path="$with_devkit"
14853   has_colon=`$ECHO $path | $GREP ^.:`
14854   new_path="$path"
14855   if test "x$has_colon" = x; then
14856     # Not in mixed or Windows style, start by that.
14857     new_path=`cmd //c echo $path`
14858   fi
14859 
14860 
14861   input_path="$new_path"
14862   # Check if we need to convert this using DOS-style short mode. If the path
14863   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14864   # take no chances and rewrite it.
14865   # Note: m4 eats our [], so we need to use [ and ] instead.
14866   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14867   if test "x$has_forbidden_chars" != x; then
14868     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14869     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14870   fi
14871 
14872 
14873   windows_path="$new_path"
14874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14875     unix_path=`$CYGPATH -u "$windows_path"`
14876     new_path="$unix_path"
14877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14879     new_path="$unix_path"
14880   fi
14881 
14882   if test "x$path" != "x$new_path"; then
14883     with_devkit="$new_path"
14884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14885 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14886   fi
14887 
14888   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14889   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14890 
14891   else
14892     # We're on a posix platform. Hooray! :)
14893     path="$with_devkit"
14894     has_space=`$ECHO "$path" | $GREP " "`
14895     if test "x$has_space" != x; then
14896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14897 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14898       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14899     fi
14900 
14901     # Use eval to expand a potential ~
14902     eval path="$path"
14903     if test ! -f "$path" && test ! -d "$path"; then
14904       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14905     fi
14906 
14907     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14908   fi
14909 
14910     DEVKIT_ROOT="$with_devkit"
14911     # Check for a meta data info file in the root of the devkit
14912     if test -f "$DEVKIT_ROOT/devkit.info"; then
14913       . $DEVKIT_ROOT/devkit.info
14914       # This potentially sets the following:
14915       # A descriptive name of the devkit
14916 
14917   if test "x$DEVKIT_NAME" = x; then
14918     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14919   fi
14920 
14921       # Corresponds to --with-extra-path
14922 
14923   if test "x$DEVKIT_EXTRA_PATH" = x; then
14924     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14925   fi
14926 
14927       # Corresponds to --with-toolchain-path
14928 
14929   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14930     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14931   fi
14932 
14933       # Corresponds to --with-sysroot
14934 
14935   if test "x$DEVKIT_SYSROOT" = x; then
14936     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14937   fi
14938 
14939 
14940       # Identifies the Visual Studio version in the devkit
14941 
14942   if test "x$DEVKIT_VS_VERSION" = x; then
14943     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14944   fi
14945 
14946       # The Visual Studio include environment variable
14947 
14948   if test "x$DEVKIT_VS_INCLUDE" = x; then
14949     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14950   fi
14951 
14952       # The Visual Studio lib environment variable
14953 
14954   if test "x$DEVKIT_VS_LIB" = x; then
14955     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14956   fi
14957 
14958       # Corresponds to --with-msvcr-dll
14959 
14960   if test "x$DEVKIT_MSVCR_DLL" = x; then
14961     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14962   fi
14963 
14964       # Corresponds to --with-msvcp-dll
14965 
14966   if test "x$DEVKIT_MSVCP_DLL" = x; then
14967     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14968   fi
14969 
14970       # Corresponds to --with-ucrt-dll-dir
14971 
14972   if test "x$DEVKIT_UCRT_DLL_DIR" = x; then
14973     eval DEVKIT_UCRT_DLL_DIR="\${DEVKIT_UCRT_DLL_DIR_${OPENJDK_TARGET_CPU}}"
14974   fi
14975 
14976     fi
14977 
14978     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14979 $as_echo_n "checking for devkit... " >&6; }
14980     if test "x$DEVKIT_NAME" != x; then
14981       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14982 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14983     else
14984       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14985 $as_echo "$DEVKIT_ROOT" >&6; }
14986     fi
14987 
14988 
14989   if test "x$DEVKIT_EXTRA_PATH" != x; then
14990     if test "x$EXTRA_PATH" = x; then
14991       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14992     else
14993       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14994     fi
14995   fi
14996 
14997 
14998     # Fallback default of just /bin if DEVKIT_PATH is not defined
14999     if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15000       DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15001     fi
15002 
15003   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15004     if test "x$TOOLCHAIN_PATH" = x; then
15005       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15006     else
15007       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15008     fi
15009   fi
15010 
15011 
15012     # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15013     # places for backwards compatiblity.
15014     if test "x$DEVKIT_SYSROOT" != x; then
15015       SYSROOT="$DEVKIT_SYSROOT"
15016     elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15017       SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15018     elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15019       SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15020     fi
15021 
15022     if test "x$DEVKIT_ROOT" != x; then
15023       DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
15024       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15025         DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
15026       fi
15027 
15028     fi
15029   fi
15030 
15031   # You can force the sysroot if the sysroot encoded into the compiler tools
15032   # is not correct.
15033 
15034 # Check whether --with-sys-root was given.
15035 if test "${with_sys_root+set}" = set; then :
15036   withval=$with_sys_root; SYSROOT=$with_sys_root
15037 
15038 fi
15039 
15040 
15041 
15042 # Check whether --with-sysroot was given.
15043 if test "${with_sysroot+set}" = set; then :
15044   withval=$with_sysroot; SYSROOT=$with_sysroot
15045 
15046 fi
15047 
15048 
15049 
15050 # Check whether --with-tools-dir was given.
15051 if test "${with_tools_dir+set}" = set; then :
15052   withval=$with_tools_dir;
15053   if test "x$with_tools_dir" != x; then
15054     if test "x$TOOLCHAIN_PATH" = x; then
15055       TOOLCHAIN_PATH="$with_tools_dir"
15056     else
15057       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15058     fi
15059   fi
15060 
15061 
15062 fi
15063 
15064 
15065 
15066 # Check whether --with-toolchain-path was given.
15067 if test "${with_toolchain_path+set}" = set; then :
15068   withval=$with_toolchain_path;
15069   if test "x$with_toolchain_path" != x; then
15070     if test "x$TOOLCHAIN_PATH" = x; then
15071       TOOLCHAIN_PATH="$with_toolchain_path"
15072     else
15073       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15074     fi
15075   fi
15076 
15077 
15078 fi
15079 
15080 
15081 
15082 # Check whether --with-extra-path was given.
15083 if test "${with_extra_path+set}" = set; then :
15084   withval=$with_extra_path;
15085   if test "x$with_extra_path" != x; then
15086     if test "x$EXTRA_PATH" = x; then
15087       EXTRA_PATH="$with_extra_path"
15088     else
15089       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15090     fi
15091   fi
15092 
15093 
15094 fi
15095 
15096 
15097   # Prepend the extra path to the global path
15098 
15099   if test "x$EXTRA_PATH" != x; then
15100     if test "x$PATH" = x; then
15101       PATH="$EXTRA_PATH"
15102     else
15103       PATH="$EXTRA_PATH:$PATH"
15104     fi
15105   fi
15106 
15107 
15108   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15109     # Add extra search paths on solaris for utilities like ar and as etc...
15110     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15111   fi
15112 
15113   # Xcode version will be validated later
15114 
15115 # Check whether --with-xcode-path was given.
15116 if test "${with_xcode_path+set}" = set; then :
15117   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
15118 
15119 fi
15120 
15121 
15122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15123 $as_echo_n "checking for sysroot... " >&6; }
15124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15125 $as_echo "$SYSROOT" >&6; }
15126   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15127 $as_echo_n "checking for toolchain path... " >&6; }
15128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15129 $as_echo "$TOOLCHAIN_PATH" >&6; }
15130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15131 $as_echo_n "checking for extra path... " >&6; }
15132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15133 $as_echo "$EXTRA_PATH" >&6; }
15134 
15135 
15136 # To properly create a configuration name, we need to have the OpenJDK target
15137 # and options (variants and debug level) parsed.
15138 
15139 
15140 
15141 # Check whether --with-conf-name was given.
15142 if test "${with_conf_name+set}" = set; then :
15143   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15144 fi
15145 
15146 
15147   # Test from where we are running configure, in or outside of src root.
15148   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15149 $as_echo_n "checking where to store configuration... " >&6; }
15150   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15151       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15152       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15153     # We are running configure from the src root.
15154     # Create a default ./build/target-variant-debuglevel output root.
15155     if test "x${CONF_NAME}" = x; then
15156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15157 $as_echo "in default location" >&6; }
15158       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15159     else
15160       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15161 $as_echo "in build directory with custom name" >&6; }
15162     fi
15163     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15164     $MKDIR -p "$OUTPUT_ROOT"
15165     if test ! -d "$OUTPUT_ROOT"; then
15166       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15167     fi
15168   else
15169     # We are running configure from outside of the src dir.
15170     # Then use the current directory as output dir!
15171     # If configuration is situated in normal build directory, just use the build
15172     # directory name as configuration name, otherwise use the complete path.
15173     if test "x${CONF_NAME}" = x; then
15174       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15175     fi
15176     OUTPUT_ROOT="$CURDIR"
15177     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15178 $as_echo "in current directory" >&6; }
15179 
15180     # WARNING: This might be a bad thing to do. You need to be sure you want to
15181     # have a configuration in this directory. Do some sanity checks!
15182 
15183     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15184       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15185       # other files
15186       files_present=`$LS $OUTPUT_ROOT`
15187       # Configure has already touched config.log and confdefs.h in the current dir when this check
15188       # is performed.
15189       filtered_files=`$ECHO "$files_present" \
15190           | $SED -e 's/config.log//g' \
15191               -e 's/confdefs.h//g' \
15192               -e 's/fixpath.exe//g' \
15193               -e 's/ //g' \
15194           | $TR -d '\n'`
15195       if test "x$filtered_files" != x; then
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15197 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15198         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15199 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15200         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15201 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15202         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15203 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15204         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15205 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15206         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15207 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15208         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15209 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15210         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15211       fi
15212     fi
15213   fi
15214   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15215 $as_echo_n "checking what configuration name to use... " >&6; }
15216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15217 $as_echo "$CONF_NAME" >&6; }
15218 
15219 
15220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15221 
15222   # Input might be given as Windows format, start by converting to
15223   # unix format.
15224   path="$OUTPUT_ROOT"
15225   new_path=`$CYGPATH -u "$path"`
15226 
15227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15230   # "foo.exe" is OK but "foo" is an error.
15231   #
15232   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15233   # It is also a way to make sure we got the proper file name for the real test later on.
15234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15235   if test "x$test_shortpath" = x; then
15236     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15237 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15238     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15239   fi
15240 
15241   # Call helper function which possibly converts this using DOS-style short mode.
15242   # If so, the updated path is stored in $new_path.
15243 
15244   input_path="$new_path"
15245   # Check if we need to convert this using DOS-style short mode. If the path
15246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15247   # take no chances and rewrite it.
15248   # Note: m4 eats our [], so we need to use [ and ] instead.
15249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15250   if test "x$has_forbidden_chars" != x; then
15251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15252     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15253     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15254     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15255       # Going to short mode and back again did indeed matter. Since short mode is
15256       # case insensitive, let's make it lowercase to improve readability.
15257       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15258       # Now convert it back to Unix-style (cygpath)
15259       input_path=`$CYGPATH -u "$shortmode_path"`
15260       new_path="$input_path"
15261     fi
15262   fi
15263 
15264   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15265   if test "x$test_cygdrive_prefix" = x; then
15266     # As a simple fix, exclude /usr/bin since it's not a real path.
15267     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15268       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15269       # a path prefixed by /cygdrive for fixpath to work.
15270       new_path="$CYGWIN_ROOT_PATH$input_path"
15271     fi
15272   fi
15273 
15274 
15275   if test "x$path" != "x$new_path"; then
15276     OUTPUT_ROOT="$new_path"
15277     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15278 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15279   fi
15280 
15281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15282 
15283   path="$OUTPUT_ROOT"
15284   has_colon=`$ECHO $path | $GREP ^.:`
15285   new_path="$path"
15286   if test "x$has_colon" = x; then
15287     # Not in mixed or Windows style, start by that.
15288     new_path=`cmd //c echo $path`
15289   fi
15290 
15291 
15292   input_path="$new_path"
15293   # Check if we need to convert this using DOS-style short mode. If the path
15294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15295   # take no chances and rewrite it.
15296   # Note: m4 eats our [], so we need to use [ and ] instead.
15297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15298   if test "x$has_forbidden_chars" != x; then
15299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15301   fi
15302 
15303 
15304   windows_path="$new_path"
15305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15306     unix_path=`$CYGPATH -u "$windows_path"`
15307     new_path="$unix_path"
15308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15310     new_path="$unix_path"
15311   fi
15312 
15313   if test "x$path" != "x$new_path"; then
15314     OUTPUT_ROOT="$new_path"
15315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15316 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15317   fi
15318 
15319   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15320   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15321 
15322   else
15323     # We're on a posix platform. Hooray! :)
15324     path="$OUTPUT_ROOT"
15325     has_space=`$ECHO "$path" | $GREP " "`
15326     if test "x$has_space" != x; then
15327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15328 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15329       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15330     fi
15331 
15332     # Use eval to expand a potential ~
15333     eval path="$path"
15334     if test ! -f "$path" && test ! -d "$path"; then
15335       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15336     fi
15337 
15338     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15339   fi
15340 
15341 
15342   SPEC=$OUTPUT_ROOT/spec.gmk
15343 
15344   CONF_NAME=$CONF_NAME
15345 
15346   OUTPUT_ROOT=$OUTPUT_ROOT
15347 
15348 
15349   # Most of the probed defines are put into config.h
15350   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15351 
15352   # The spec.gmk file contains all variables for the make system.
15353   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15354 
15355   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15356   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15357 
15358   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15359   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15360 
15361   # The compare.sh is used to compare the build output to other builds.
15362   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15363 
15364   # Spec.sh is currently used by compare-objects.sh
15365   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15366 
15367   # The generated Makefile knows where the spec.gmk is and where the source is.
15368   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15369   # which will look for generated configurations
15370   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15371 
15372 
15373 
15374 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15375 
15376   for ac_prog in apt-get yum port pkgutil pkgadd
15377 do
15378   # Extract the first word of "$ac_prog", so it can be a program name with args.
15379 set dummy $ac_prog; ac_word=$2
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15381 $as_echo_n "checking for $ac_word... " >&6; }
15382 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15383   $as_echo_n "(cached) " >&6
15384 else
15385   if test -n "$PKGHANDLER"; then
15386   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15387 else
15388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15389 for as_dir in $PATH
15390 do
15391   IFS=$as_save_IFS
15392   test -z "$as_dir" && as_dir=.
15393     for ac_exec_ext in '' $ac_executable_extensions; do
15394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15395     ac_cv_prog_PKGHANDLER="$ac_prog"
15396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15397     break 2
15398   fi
15399 done
15400   done
15401 IFS=$as_save_IFS
15402 
15403 fi
15404 fi
15405 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15406 if test -n "$PKGHANDLER"; then
15407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15408 $as_echo "$PKGHANDLER" >&6; }
15409 else
15410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15411 $as_echo "no" >&6; }
15412 fi
15413 
15414 
15415   test -n "$PKGHANDLER" && break
15416 done
15417 
15418 
15419 
15420 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15421 
15422 
15423   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15424   if test "x$MAKE" != x; then
15425     # User has supplied a make, test it.
15426     if test ! -f "$MAKE"; then
15427       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15428     fi
15429 
15430   MAKE_CANDIDATE=""$MAKE""
15431   DESCRIPTION="user supplied MAKE=$MAKE"
15432   if test "x$MAKE_CANDIDATE" != x; then
15433     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15434 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15435     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15436     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15437     if test "x$IS_GNU_MAKE" = x; then
15438       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15439 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15440     else
15441       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15442       if test "x$IS_MODERN_MAKE" = x; then
15443         { $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
15444 $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;}
15445       else
15446         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15447           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448             MAKE_EXPECTED_ENV='cygwin'
15449           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15450             MAKE_EXPECTED_ENV='msys'
15451           else
15452             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15453           fi
15454           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15455           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15456         else
15457           # Not relevant for non-Windows
15458           IS_MAKE_CORRECT_ENV=true
15459         fi
15460         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15461           { $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
15462 $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;}
15463         else
15464           FOUND_MAKE=$MAKE_CANDIDATE
15465 
15466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15467 
15468   # First separate the path from the arguments. This will split at the first
15469   # space.
15470   complete="$FOUND_MAKE"
15471   path="${complete%% *}"
15472   tmp="$complete EOL"
15473   arguments="${tmp#* }"
15474 
15475   # Input might be given as Windows format, start by converting to
15476   # unix format.
15477   new_path=`$CYGPATH -u "$path"`
15478 
15479   # Now try to locate executable using which
15480   new_path=`$WHICH "$new_path" 2> /dev/null`
15481   # bat and cmd files are not always considered executable in cygwin causing which
15482   # to not find them
15483   if test "x$new_path" = x \
15484       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15485       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15486     new_path=`$CYGPATH -u "$path"`
15487   fi
15488   if test "x$new_path" = x; then
15489     # Oops. Which didn't find the executable.
15490     # The splitting of arguments from the executable at a space might have been incorrect,
15491     # since paths with space are more likely in Windows. Give it another try with the whole
15492     # argument.
15493     path="$complete"
15494     arguments="EOL"
15495     new_path=`$CYGPATH -u "$path"`
15496     new_path=`$WHICH "$new_path" 2> /dev/null`
15497     # bat and cmd files are not always considered executable in cygwin causing which
15498     # to not find them
15499     if test "x$new_path" = x \
15500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15502       new_path=`$CYGPATH -u "$path"`
15503     fi
15504     if test "x$new_path" = x; then
15505       # It's still not found. Now this is an unrecoverable error.
15506       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15507 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15508       has_space=`$ECHO "$complete" | $GREP " "`
15509       if test "x$has_space" != x; then
15510         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15511 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15512       fi
15513       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15514     fi
15515   fi
15516 
15517   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15518   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15519   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15520   # "foo.exe" is OK but "foo" is an error.
15521   #
15522   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15523   # It is also a way to make sure we got the proper file name for the real test later on.
15524   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15525   if test "x$test_shortpath" = x; then
15526     # Short path failed, file does not exist as specified.
15527     # Try adding .exe or .cmd
15528     if test -f "${new_path}.exe"; then
15529       input_to_shortpath="${new_path}.exe"
15530     elif test -f "${new_path}.cmd"; then
15531       input_to_shortpath="${new_path}.cmd"
15532     else
15533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15534 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15535       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15536 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15537       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15538     fi
15539   else
15540     input_to_shortpath="$new_path"
15541   fi
15542 
15543   # Call helper function which possibly converts this using DOS-style short mode.
15544   # If so, the updated path is stored in $new_path.
15545   new_path="$input_to_shortpath"
15546 
15547   input_path="$input_to_shortpath"
15548   # Check if we need to convert this using DOS-style short mode. If the path
15549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15550   # take no chances and rewrite it.
15551   # Note: m4 eats our [], so we need to use [ and ] instead.
15552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15553   if test "x$has_forbidden_chars" != x; then
15554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15555     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15556     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15557     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15558       # Going to short mode and back again did indeed matter. Since short mode is
15559       # case insensitive, let's make it lowercase to improve readability.
15560       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15561       # Now convert it back to Unix-style (cygpath)
15562       input_path=`$CYGPATH -u "$shortmode_path"`
15563       new_path="$input_path"
15564     fi
15565   fi
15566 
15567   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15568   if test "x$test_cygdrive_prefix" = x; then
15569     # As a simple fix, exclude /usr/bin since it's not a real path.
15570     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15571       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15572       # a path prefixed by /cygdrive for fixpath to work.
15573       new_path="$CYGWIN_ROOT_PATH$input_path"
15574     fi
15575   fi
15576 
15577   # remove trailing .exe if any
15578   new_path="${new_path/%.exe/}"
15579 
15580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15581 
15582   # First separate the path from the arguments. This will split at the first
15583   # space.
15584   complete="$FOUND_MAKE"
15585   path="${complete%% *}"
15586   tmp="$complete EOL"
15587   arguments="${tmp#* }"
15588 
15589   # Input might be given as Windows format, start by converting to
15590   # unix format.
15591   new_path="$path"
15592 
15593   windows_path="$new_path"
15594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15595     unix_path=`$CYGPATH -u "$windows_path"`
15596     new_path="$unix_path"
15597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15599     new_path="$unix_path"
15600   fi
15601 
15602 
15603   # Now try to locate executable using which
15604   new_path=`$WHICH "$new_path" 2> /dev/null`
15605 
15606   if test "x$new_path" = x; then
15607     # Oops. Which didn't find the executable.
15608     # The splitting of arguments from the executable at a space might have been incorrect,
15609     # since paths with space are more likely in Windows. Give it another try with the whole
15610     # argument.
15611     path="$complete"
15612     arguments="EOL"
15613     new_path="$path"
15614 
15615   windows_path="$new_path"
15616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15617     unix_path=`$CYGPATH -u "$windows_path"`
15618     new_path="$unix_path"
15619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15621     new_path="$unix_path"
15622   fi
15623 
15624 
15625     new_path=`$WHICH "$new_path" 2> /dev/null`
15626     # bat and cmd files are not always considered executable in MSYS causing which
15627     # to not find them
15628     if test "x$new_path" = x \
15629         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15630         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15631       new_path="$path"
15632 
15633   windows_path="$new_path"
15634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15635     unix_path=`$CYGPATH -u "$windows_path"`
15636     new_path="$unix_path"
15637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15639     new_path="$unix_path"
15640   fi
15641 
15642     fi
15643 
15644     if test "x$new_path" = x; then
15645       # It's still not found. Now this is an unrecoverable error.
15646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15647 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15648       has_space=`$ECHO "$complete" | $GREP " "`
15649       if test "x$has_space" != x; then
15650         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15651 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15652       fi
15653       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15654     fi
15655   fi
15656 
15657   # Now new_path has a complete unix path to the binary
15658   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15659     # Keep paths in /bin as-is, but remove trailing .exe if any
15660     new_path="${new_path/%.exe/}"
15661     # Do not save /bin paths to all_fixpath_prefixes!
15662   else
15663     # Not in mixed or Windows style, start by that.
15664     new_path=`cmd //c echo $new_path`
15665 
15666   input_path="$new_path"
15667   # Check if we need to convert this using DOS-style short mode. If the path
15668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15669   # take no chances and rewrite it.
15670   # Note: m4 eats our [], so we need to use [ and ] instead.
15671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15672   if test "x$has_forbidden_chars" != x; then
15673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15675   fi
15676 
15677     # Output is in $new_path
15678 
15679   windows_path="$new_path"
15680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15681     unix_path=`$CYGPATH -u "$windows_path"`
15682     new_path="$unix_path"
15683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15685     new_path="$unix_path"
15686   fi
15687 
15688     # remove trailing .exe if any
15689     new_path="${new_path/%.exe/}"
15690 
15691     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15692     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15693   fi
15694 
15695   else
15696     # We're on a posix platform. Hooray! :)
15697     # First separate the path from the arguments. This will split at the first
15698     # space.
15699     complete="$FOUND_MAKE"
15700     path="${complete%% *}"
15701     tmp="$complete EOL"
15702     arguments="${tmp#* }"
15703 
15704     # Cannot rely on the command "which" here since it doesn't always work.
15705     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15706     if test -z "$is_absolute_path"; then
15707       # Path to executable is not absolute. Find it.
15708       IFS_save="$IFS"
15709       IFS=:
15710       for p in $PATH; do
15711         if test -f "$p/$path" && test -x "$p/$path"; then
15712           new_path="$p/$path"
15713           break
15714         fi
15715       done
15716       IFS="$IFS_save"
15717     else
15718       # This is an absolute path, we can use it without further modifications.
15719       new_path="$path"
15720     fi
15721 
15722     if test "x$new_path" = x; then
15723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15724 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15725       has_space=`$ECHO "$complete" | $GREP " "`
15726       if test "x$has_space" != x; then
15727         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15728 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15729       fi
15730       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15731     fi
15732   fi
15733 
15734   # Now join together the path and the arguments once again
15735   if test "x$arguments" != xEOL; then
15736     new_complete="$new_path ${arguments% *}"
15737   else
15738     new_complete="$new_path"
15739   fi
15740 
15741   if test "x$complete" != "x$new_complete"; then
15742     FOUND_MAKE="$new_complete"
15743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15744 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15745   fi
15746 
15747         fi
15748       fi
15749     fi
15750   fi
15751 
15752     if test "x$FOUND_MAKE" = x; then
15753       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15754     fi
15755   else
15756     # Try our hardest to locate a correct version of GNU make
15757     for ac_prog in gmake
15758 do
15759   # Extract the first word of "$ac_prog", so it can be a program name with args.
15760 set dummy $ac_prog; ac_word=$2
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15762 $as_echo_n "checking for $ac_word... " >&6; }
15763 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15764   $as_echo_n "(cached) " >&6
15765 else
15766   case $CHECK_GMAKE in
15767   [\\/]* | ?:[\\/]*)
15768   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15769   ;;
15770   *)
15771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15772 for as_dir in $PATH
15773 do
15774   IFS=$as_save_IFS
15775   test -z "$as_dir" && as_dir=.
15776     for ac_exec_ext in '' $ac_executable_extensions; do
15777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15778     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15780     break 2
15781   fi
15782 done
15783   done
15784 IFS=$as_save_IFS
15785 
15786   ;;
15787 esac
15788 fi
15789 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15790 if test -n "$CHECK_GMAKE"; then
15791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15792 $as_echo "$CHECK_GMAKE" >&6; }
15793 else
15794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15795 $as_echo "no" >&6; }
15796 fi
15797 
15798 
15799   test -n "$CHECK_GMAKE" && break
15800 done
15801 
15802 
15803   MAKE_CANDIDATE=""$CHECK_GMAKE""
15804   DESCRIPTION="gmake in PATH"
15805   if test "x$MAKE_CANDIDATE" != x; then
15806     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15807 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15808     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15809     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15810     if test "x$IS_GNU_MAKE" = x; then
15811       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15812 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15813     else
15814       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15815       if test "x$IS_MODERN_MAKE" = x; then
15816         { $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
15817 $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;}
15818       else
15819         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15820           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15821             MAKE_EXPECTED_ENV='cygwin'
15822           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15823             MAKE_EXPECTED_ENV='msys'
15824           else
15825             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15826           fi
15827           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15828           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15829         else
15830           # Not relevant for non-Windows
15831           IS_MAKE_CORRECT_ENV=true
15832         fi
15833         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15834           { $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
15835 $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;}
15836         else
15837           FOUND_MAKE=$MAKE_CANDIDATE
15838 
15839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15840 
15841   # First separate the path from the arguments. This will split at the first
15842   # space.
15843   complete="$FOUND_MAKE"
15844   path="${complete%% *}"
15845   tmp="$complete EOL"
15846   arguments="${tmp#* }"
15847 
15848   # Input might be given as Windows format, start by converting to
15849   # unix format.
15850   new_path=`$CYGPATH -u "$path"`
15851 
15852   # Now try to locate executable using which
15853   new_path=`$WHICH "$new_path" 2> /dev/null`
15854   # bat and cmd files are not always considered executable in cygwin causing which
15855   # to not find them
15856   if test "x$new_path" = x \
15857       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15858       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15859     new_path=`$CYGPATH -u "$path"`
15860   fi
15861   if test "x$new_path" = x; then
15862     # Oops. Which didn't find the executable.
15863     # The splitting of arguments from the executable at a space might have been incorrect,
15864     # since paths with space are more likely in Windows. Give it another try with the whole
15865     # argument.
15866     path="$complete"
15867     arguments="EOL"
15868     new_path=`$CYGPATH -u "$path"`
15869     new_path=`$WHICH "$new_path" 2> /dev/null`
15870     # bat and cmd files are not always considered executable in cygwin causing which
15871     # to not find them
15872     if test "x$new_path" = x \
15873         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15874         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15875       new_path=`$CYGPATH -u "$path"`
15876     fi
15877     if test "x$new_path" = x; then
15878       # It's still not found. Now this is an unrecoverable error.
15879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15880 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15881       has_space=`$ECHO "$complete" | $GREP " "`
15882       if test "x$has_space" != x; then
15883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15885       fi
15886       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15887     fi
15888   fi
15889 
15890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15893   # "foo.exe" is OK but "foo" is an error.
15894   #
15895   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15896   # It is also a way to make sure we got the proper file name for the real test later on.
15897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15898   if test "x$test_shortpath" = x; then
15899     # Short path failed, file does not exist as specified.
15900     # Try adding .exe or .cmd
15901     if test -f "${new_path}.exe"; then
15902       input_to_shortpath="${new_path}.exe"
15903     elif test -f "${new_path}.cmd"; then
15904       input_to_shortpath="${new_path}.cmd"
15905     else
15906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15907 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15908       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15909 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15910       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15911     fi
15912   else
15913     input_to_shortpath="$new_path"
15914   fi
15915 
15916   # Call helper function which possibly converts this using DOS-style short mode.
15917   # If so, the updated path is stored in $new_path.
15918   new_path="$input_to_shortpath"
15919 
15920   input_path="$input_to_shortpath"
15921   # Check if we need to convert this using DOS-style short mode. If the path
15922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15923   # take no chances and rewrite it.
15924   # Note: m4 eats our [], so we need to use [ and ] instead.
15925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15926   if test "x$has_forbidden_chars" != x; then
15927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15931       # Going to short mode and back again did indeed matter. Since short mode is
15932       # case insensitive, let's make it lowercase to improve readability.
15933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15934       # Now convert it back to Unix-style (cygpath)
15935       input_path=`$CYGPATH -u "$shortmode_path"`
15936       new_path="$input_path"
15937     fi
15938   fi
15939 
15940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15941   if test "x$test_cygdrive_prefix" = x; then
15942     # As a simple fix, exclude /usr/bin since it's not a real path.
15943     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15945       # a path prefixed by /cygdrive for fixpath to work.
15946       new_path="$CYGWIN_ROOT_PATH$input_path"
15947     fi
15948   fi
15949 
15950   # remove trailing .exe if any
15951   new_path="${new_path/%.exe/}"
15952 
15953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15954 
15955   # First separate the path from the arguments. This will split at the first
15956   # space.
15957   complete="$FOUND_MAKE"
15958   path="${complete%% *}"
15959   tmp="$complete EOL"
15960   arguments="${tmp#* }"
15961 
15962   # Input might be given as Windows format, start by converting to
15963   # unix format.
15964   new_path="$path"
15965 
15966   windows_path="$new_path"
15967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15968     unix_path=`$CYGPATH -u "$windows_path"`
15969     new_path="$unix_path"
15970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15972     new_path="$unix_path"
15973   fi
15974 
15975 
15976   # Now try to locate executable using which
15977   new_path=`$WHICH "$new_path" 2> /dev/null`
15978 
15979   if test "x$new_path" = x; then
15980     # Oops. Which didn't find the executable.
15981     # The splitting of arguments from the executable at a space might have been incorrect,
15982     # since paths with space are more likely in Windows. Give it another try with the whole
15983     # argument.
15984     path="$complete"
15985     arguments="EOL"
15986     new_path="$path"
15987 
15988   windows_path="$new_path"
15989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15990     unix_path=`$CYGPATH -u "$windows_path"`
15991     new_path="$unix_path"
15992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15994     new_path="$unix_path"
15995   fi
15996 
15997 
15998     new_path=`$WHICH "$new_path" 2> /dev/null`
15999     # bat and cmd files are not always considered executable in MSYS causing which
16000     # to not find them
16001     if test "x$new_path" = x \
16002         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16003         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16004       new_path="$path"
16005 
16006   windows_path="$new_path"
16007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16008     unix_path=`$CYGPATH -u "$windows_path"`
16009     new_path="$unix_path"
16010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16012     new_path="$unix_path"
16013   fi
16014 
16015     fi
16016 
16017     if test "x$new_path" = x; then
16018       # It's still not found. Now this is an unrecoverable error.
16019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16020 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16021       has_space=`$ECHO "$complete" | $GREP " "`
16022       if test "x$has_space" != x; then
16023         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16024 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16025       fi
16026       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16027     fi
16028   fi
16029 
16030   # Now new_path has a complete unix path to the binary
16031   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16032     # Keep paths in /bin as-is, but remove trailing .exe if any
16033     new_path="${new_path/%.exe/}"
16034     # Do not save /bin paths to all_fixpath_prefixes!
16035   else
16036     # Not in mixed or Windows style, start by that.
16037     new_path=`cmd //c echo $new_path`
16038 
16039   input_path="$new_path"
16040   # Check if we need to convert this using DOS-style short mode. If the path
16041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16042   # take no chances and rewrite it.
16043   # Note: m4 eats our [], so we need to use [ and ] instead.
16044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16045   if test "x$has_forbidden_chars" != x; then
16046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16048   fi
16049 
16050     # Output is in $new_path
16051 
16052   windows_path="$new_path"
16053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16054     unix_path=`$CYGPATH -u "$windows_path"`
16055     new_path="$unix_path"
16056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16058     new_path="$unix_path"
16059   fi
16060 
16061     # remove trailing .exe if any
16062     new_path="${new_path/%.exe/}"
16063 
16064     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16065     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16066   fi
16067 
16068   else
16069     # We're on a posix platform. Hooray! :)
16070     # First separate the path from the arguments. This will split at the first
16071     # space.
16072     complete="$FOUND_MAKE"
16073     path="${complete%% *}"
16074     tmp="$complete EOL"
16075     arguments="${tmp#* }"
16076 
16077     # Cannot rely on the command "which" here since it doesn't always work.
16078     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16079     if test -z "$is_absolute_path"; then
16080       # Path to executable is not absolute. Find it.
16081       IFS_save="$IFS"
16082       IFS=:
16083       for p in $PATH; do
16084         if test -f "$p/$path" && test -x "$p/$path"; then
16085           new_path="$p/$path"
16086           break
16087         fi
16088       done
16089       IFS="$IFS_save"
16090     else
16091       # This is an absolute path, we can use it without further modifications.
16092       new_path="$path"
16093     fi
16094 
16095     if test "x$new_path" = x; then
16096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16097 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16098       has_space=`$ECHO "$complete" | $GREP " "`
16099       if test "x$has_space" != x; then
16100         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16101 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16102       fi
16103       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16104     fi
16105   fi
16106 
16107   # Now join together the path and the arguments once again
16108   if test "x$arguments" != xEOL; then
16109     new_complete="$new_path ${arguments% *}"
16110   else
16111     new_complete="$new_path"
16112   fi
16113 
16114   if test "x$complete" != "x$new_complete"; then
16115     FOUND_MAKE="$new_complete"
16116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16117 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16118   fi
16119 
16120         fi
16121       fi
16122     fi
16123   fi
16124 
16125 
16126     if test "x$FOUND_MAKE" = x; then
16127       for ac_prog in make
16128 do
16129   # Extract the first word of "$ac_prog", so it can be a program name with args.
16130 set dummy $ac_prog; ac_word=$2
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16132 $as_echo_n "checking for $ac_word... " >&6; }
16133 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16134   $as_echo_n "(cached) " >&6
16135 else
16136   case $CHECK_MAKE in
16137   [\\/]* | ?:[\\/]*)
16138   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16139   ;;
16140   *)
16141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16142 for as_dir in $PATH
16143 do
16144   IFS=$as_save_IFS
16145   test -z "$as_dir" && as_dir=.
16146     for ac_exec_ext in '' $ac_executable_extensions; do
16147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16148     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16150     break 2
16151   fi
16152 done
16153   done
16154 IFS=$as_save_IFS
16155 
16156   ;;
16157 esac
16158 fi
16159 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16160 if test -n "$CHECK_MAKE"; then
16161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16162 $as_echo "$CHECK_MAKE" >&6; }
16163 else
16164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16165 $as_echo "no" >&6; }
16166 fi
16167 
16168 
16169   test -n "$CHECK_MAKE" && break
16170 done
16171 
16172 
16173   MAKE_CANDIDATE=""$CHECK_MAKE""
16174   DESCRIPTION="make in PATH"
16175   if test "x$MAKE_CANDIDATE" != x; then
16176     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16177 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16178     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16179     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16180     if test "x$IS_GNU_MAKE" = x; then
16181       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16182 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16183     else
16184       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16185       if test "x$IS_MODERN_MAKE" = x; then
16186         { $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
16187 $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;}
16188       else
16189         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16190           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16191             MAKE_EXPECTED_ENV='cygwin'
16192           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16193             MAKE_EXPECTED_ENV='msys'
16194           else
16195             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16196           fi
16197           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16198           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16199         else
16200           # Not relevant for non-Windows
16201           IS_MAKE_CORRECT_ENV=true
16202         fi
16203         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16204           { $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
16205 $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;}
16206         else
16207           FOUND_MAKE=$MAKE_CANDIDATE
16208 
16209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16210 
16211   # First separate the path from the arguments. This will split at the first
16212   # space.
16213   complete="$FOUND_MAKE"
16214   path="${complete%% *}"
16215   tmp="$complete EOL"
16216   arguments="${tmp#* }"
16217 
16218   # Input might be given as Windows format, start by converting to
16219   # unix format.
16220   new_path=`$CYGPATH -u "$path"`
16221 
16222   # Now try to locate executable using which
16223   new_path=`$WHICH "$new_path" 2> /dev/null`
16224   # bat and cmd files are not always considered executable in cygwin causing which
16225   # to not find them
16226   if test "x$new_path" = x \
16227       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16228       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16229     new_path=`$CYGPATH -u "$path"`
16230   fi
16231   if test "x$new_path" = x; then
16232     # Oops. Which didn't find the executable.
16233     # The splitting of arguments from the executable at a space might have been incorrect,
16234     # since paths with space are more likely in Windows. Give it another try with the whole
16235     # argument.
16236     path="$complete"
16237     arguments="EOL"
16238     new_path=`$CYGPATH -u "$path"`
16239     new_path=`$WHICH "$new_path" 2> /dev/null`
16240     # bat and cmd files are not always considered executable in cygwin causing which
16241     # to not find them
16242     if test "x$new_path" = x \
16243         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16244         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16245       new_path=`$CYGPATH -u "$path"`
16246     fi
16247     if test "x$new_path" = x; then
16248       # It's still not found. Now this is an unrecoverable error.
16249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16250 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16251       has_space=`$ECHO "$complete" | $GREP " "`
16252       if test "x$has_space" != x; then
16253         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16254 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16255       fi
16256       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16257     fi
16258   fi
16259 
16260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16263   # "foo.exe" is OK but "foo" is an error.
16264   #
16265   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16266   # It is also a way to make sure we got the proper file name for the real test later on.
16267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16268   if test "x$test_shortpath" = x; then
16269     # Short path failed, file does not exist as specified.
16270     # Try adding .exe or .cmd
16271     if test -f "${new_path}.exe"; then
16272       input_to_shortpath="${new_path}.exe"
16273     elif test -f "${new_path}.cmd"; then
16274       input_to_shortpath="${new_path}.cmd"
16275     else
16276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16277 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16278       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16279 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16280       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16281     fi
16282   else
16283     input_to_shortpath="$new_path"
16284   fi
16285 
16286   # Call helper function which possibly converts this using DOS-style short mode.
16287   # If so, the updated path is stored in $new_path.
16288   new_path="$input_to_shortpath"
16289 
16290   input_path="$input_to_shortpath"
16291   # Check if we need to convert this using DOS-style short mode. If the path
16292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16293   # take no chances and rewrite it.
16294   # Note: m4 eats our [], so we need to use [ and ] instead.
16295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16296   if test "x$has_forbidden_chars" != x; then
16297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16298     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16299     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16300     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16301       # Going to short mode and back again did indeed matter. Since short mode is
16302       # case insensitive, let's make it lowercase to improve readability.
16303       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16304       # Now convert it back to Unix-style (cygpath)
16305       input_path=`$CYGPATH -u "$shortmode_path"`
16306       new_path="$input_path"
16307     fi
16308   fi
16309 
16310   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16311   if test "x$test_cygdrive_prefix" = x; then
16312     # As a simple fix, exclude /usr/bin since it's not a real path.
16313     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16314       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16315       # a path prefixed by /cygdrive for fixpath to work.
16316       new_path="$CYGWIN_ROOT_PATH$input_path"
16317     fi
16318   fi
16319 
16320   # remove trailing .exe if any
16321   new_path="${new_path/%.exe/}"
16322 
16323   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16324 
16325   # First separate the path from the arguments. This will split at the first
16326   # space.
16327   complete="$FOUND_MAKE"
16328   path="${complete%% *}"
16329   tmp="$complete EOL"
16330   arguments="${tmp#* }"
16331 
16332   # Input might be given as Windows format, start by converting to
16333   # unix format.
16334   new_path="$path"
16335 
16336   windows_path="$new_path"
16337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338     unix_path=`$CYGPATH -u "$windows_path"`
16339     new_path="$unix_path"
16340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342     new_path="$unix_path"
16343   fi
16344 
16345 
16346   # Now try to locate executable using which
16347   new_path=`$WHICH "$new_path" 2> /dev/null`
16348 
16349   if test "x$new_path" = x; then
16350     # Oops. Which didn't find the executable.
16351     # The splitting of arguments from the executable at a space might have been incorrect,
16352     # since paths with space are more likely in Windows. Give it another try with the whole
16353     # argument.
16354     path="$complete"
16355     arguments="EOL"
16356     new_path="$path"
16357 
16358   windows_path="$new_path"
16359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16360     unix_path=`$CYGPATH -u "$windows_path"`
16361     new_path="$unix_path"
16362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16364     new_path="$unix_path"
16365   fi
16366 
16367 
16368     new_path=`$WHICH "$new_path" 2> /dev/null`
16369     # bat and cmd files are not always considered executable in MSYS causing which
16370     # to not find them
16371     if test "x$new_path" = x \
16372         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16373         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16374       new_path="$path"
16375 
16376   windows_path="$new_path"
16377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378     unix_path=`$CYGPATH -u "$windows_path"`
16379     new_path="$unix_path"
16380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382     new_path="$unix_path"
16383   fi
16384 
16385     fi
16386 
16387     if test "x$new_path" = x; then
16388       # It's still not found. Now this is an unrecoverable error.
16389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16390 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16391       has_space=`$ECHO "$complete" | $GREP " "`
16392       if test "x$has_space" != x; then
16393         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16394 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16395       fi
16396       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16397     fi
16398   fi
16399 
16400   # Now new_path has a complete unix path to the binary
16401   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16402     # Keep paths in /bin as-is, but remove trailing .exe if any
16403     new_path="${new_path/%.exe/}"
16404     # Do not save /bin paths to all_fixpath_prefixes!
16405   else
16406     # Not in mixed or Windows style, start by that.
16407     new_path=`cmd //c echo $new_path`
16408 
16409   input_path="$new_path"
16410   # Check if we need to convert this using DOS-style short mode. If the path
16411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16412   # take no chances and rewrite it.
16413   # Note: m4 eats our [], so we need to use [ and ] instead.
16414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16415   if test "x$has_forbidden_chars" != x; then
16416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16417     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16418   fi
16419 
16420     # Output is in $new_path
16421 
16422   windows_path="$new_path"
16423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16424     unix_path=`$CYGPATH -u "$windows_path"`
16425     new_path="$unix_path"
16426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16428     new_path="$unix_path"
16429   fi
16430 
16431     # remove trailing .exe if any
16432     new_path="${new_path/%.exe/}"
16433 
16434     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16435     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16436   fi
16437 
16438   else
16439     # We're on a posix platform. Hooray! :)
16440     # First separate the path from the arguments. This will split at the first
16441     # space.
16442     complete="$FOUND_MAKE"
16443     path="${complete%% *}"
16444     tmp="$complete EOL"
16445     arguments="${tmp#* }"
16446 
16447     # Cannot rely on the command "which" here since it doesn't always work.
16448     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16449     if test -z "$is_absolute_path"; then
16450       # Path to executable is not absolute. Find it.
16451       IFS_save="$IFS"
16452       IFS=:
16453       for p in $PATH; do
16454         if test -f "$p/$path" && test -x "$p/$path"; then
16455           new_path="$p/$path"
16456           break
16457         fi
16458       done
16459       IFS="$IFS_save"
16460     else
16461       # This is an absolute path, we can use it without further modifications.
16462       new_path="$path"
16463     fi
16464 
16465     if test "x$new_path" = x; then
16466       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16467 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16468       has_space=`$ECHO "$complete" | $GREP " "`
16469       if test "x$has_space" != x; then
16470         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16471 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16472       fi
16473       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16474     fi
16475   fi
16476 
16477   # Now join together the path and the arguments once again
16478   if test "x$arguments" != xEOL; then
16479     new_complete="$new_path ${arguments% *}"
16480   else
16481     new_complete="$new_path"
16482   fi
16483 
16484   if test "x$complete" != "x$new_complete"; then
16485     FOUND_MAKE="$new_complete"
16486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16487 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16488   fi
16489 
16490         fi
16491       fi
16492     fi
16493   fi
16494 
16495     fi
16496 
16497     if test "x$FOUND_MAKE" = x; then
16498       if test "x$TOOLCHAIN_PATH" != x; then
16499         # We have a toolchain path, check that as well before giving up.
16500         OLD_PATH=$PATH
16501         PATH=$TOOLCHAIN_PATH:$PATH
16502         for ac_prog in gmake
16503 do
16504   # Extract the first word of "$ac_prog", so it can be a program name with args.
16505 set dummy $ac_prog; ac_word=$2
16506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16507 $as_echo_n "checking for $ac_word... " >&6; }
16508 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16509   $as_echo_n "(cached) " >&6
16510 else
16511   case $CHECK_TOOLSDIR_GMAKE in
16512   [\\/]* | ?:[\\/]*)
16513   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16514   ;;
16515   *)
16516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16517 for as_dir in $PATH
16518 do
16519   IFS=$as_save_IFS
16520   test -z "$as_dir" && as_dir=.
16521     for ac_exec_ext in '' $ac_executable_extensions; do
16522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16523     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16525     break 2
16526   fi
16527 done
16528   done
16529 IFS=$as_save_IFS
16530 
16531   ;;
16532 esac
16533 fi
16534 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16535 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16537 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16538 else
16539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16540 $as_echo "no" >&6; }
16541 fi
16542 
16543 
16544   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16545 done
16546 
16547 
16548   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16549   DESCRIPTION="gmake in tools-dir"
16550   if test "x$MAKE_CANDIDATE" != x; then
16551     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16552 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16553     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16554     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16555     if test "x$IS_GNU_MAKE" = x; then
16556       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16557 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16558     else
16559       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16560       if test "x$IS_MODERN_MAKE" = x; then
16561         { $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
16562 $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;}
16563       else
16564         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16565           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16566             MAKE_EXPECTED_ENV='cygwin'
16567           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568             MAKE_EXPECTED_ENV='msys'
16569           else
16570             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16571           fi
16572           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16573           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16574         else
16575           # Not relevant for non-Windows
16576           IS_MAKE_CORRECT_ENV=true
16577         fi
16578         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16579           { $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
16580 $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;}
16581         else
16582           FOUND_MAKE=$MAKE_CANDIDATE
16583 
16584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16585 
16586   # First separate the path from the arguments. This will split at the first
16587   # space.
16588   complete="$FOUND_MAKE"
16589   path="${complete%% *}"
16590   tmp="$complete EOL"
16591   arguments="${tmp#* }"
16592 
16593   # Input might be given as Windows format, start by converting to
16594   # unix format.
16595   new_path=`$CYGPATH -u "$path"`
16596 
16597   # Now try to locate executable using which
16598   new_path=`$WHICH "$new_path" 2> /dev/null`
16599   # bat and cmd files are not always considered executable in cygwin causing which
16600   # to not find them
16601   if test "x$new_path" = x \
16602       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16603       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16604     new_path=`$CYGPATH -u "$path"`
16605   fi
16606   if test "x$new_path" = x; then
16607     # Oops. Which didn't find the executable.
16608     # The splitting of arguments from the executable at a space might have been incorrect,
16609     # since paths with space are more likely in Windows. Give it another try with the whole
16610     # argument.
16611     path="$complete"
16612     arguments="EOL"
16613     new_path=`$CYGPATH -u "$path"`
16614     new_path=`$WHICH "$new_path" 2> /dev/null`
16615     # bat and cmd files are not always considered executable in cygwin causing which
16616     # to not find them
16617     if test "x$new_path" = x \
16618         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16619         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16620       new_path=`$CYGPATH -u "$path"`
16621     fi
16622     if test "x$new_path" = x; then
16623       # It's still not found. Now this is an unrecoverable error.
16624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16625 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16626       has_space=`$ECHO "$complete" | $GREP " "`
16627       if test "x$has_space" != x; then
16628         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16629 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16630       fi
16631       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16632     fi
16633   fi
16634 
16635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16638   # "foo.exe" is OK but "foo" is an error.
16639   #
16640   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16641   # It is also a way to make sure we got the proper file name for the real test later on.
16642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16643   if test "x$test_shortpath" = x; then
16644     # Short path failed, file does not exist as specified.
16645     # Try adding .exe or .cmd
16646     if test -f "${new_path}.exe"; then
16647       input_to_shortpath="${new_path}.exe"
16648     elif test -f "${new_path}.cmd"; then
16649       input_to_shortpath="${new_path}.cmd"
16650     else
16651       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16652 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16653       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16654 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16655       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16656     fi
16657   else
16658     input_to_shortpath="$new_path"
16659   fi
16660 
16661   # Call helper function which possibly converts this using DOS-style short mode.
16662   # If so, the updated path is stored in $new_path.
16663   new_path="$input_to_shortpath"
16664 
16665   input_path="$input_to_shortpath"
16666   # Check if we need to convert this using DOS-style short mode. If the path
16667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16668   # take no chances and rewrite it.
16669   # Note: m4 eats our [], so we need to use [ and ] instead.
16670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16671   if test "x$has_forbidden_chars" != x; then
16672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16676       # Going to short mode and back again did indeed matter. Since short mode is
16677       # case insensitive, let's make it lowercase to improve readability.
16678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16679       # Now convert it back to Unix-style (cygpath)
16680       input_path=`$CYGPATH -u "$shortmode_path"`
16681       new_path="$input_path"
16682     fi
16683   fi
16684 
16685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16686   if test "x$test_cygdrive_prefix" = x; then
16687     # As a simple fix, exclude /usr/bin since it's not a real path.
16688     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16690       # a path prefixed by /cygdrive for fixpath to work.
16691       new_path="$CYGWIN_ROOT_PATH$input_path"
16692     fi
16693   fi
16694 
16695   # remove trailing .exe if any
16696   new_path="${new_path/%.exe/}"
16697 
16698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16699 
16700   # First separate the path from the arguments. This will split at the first
16701   # space.
16702   complete="$FOUND_MAKE"
16703   path="${complete%% *}"
16704   tmp="$complete EOL"
16705   arguments="${tmp#* }"
16706 
16707   # Input might be given as Windows format, start by converting to
16708   # unix format.
16709   new_path="$path"
16710 
16711   windows_path="$new_path"
16712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16713     unix_path=`$CYGPATH -u "$windows_path"`
16714     new_path="$unix_path"
16715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16717     new_path="$unix_path"
16718   fi
16719 
16720 
16721   # Now try to locate executable using which
16722   new_path=`$WHICH "$new_path" 2> /dev/null`
16723 
16724   if test "x$new_path" = x; then
16725     # Oops. Which didn't find the executable.
16726     # The splitting of arguments from the executable at a space might have been incorrect,
16727     # since paths with space are more likely in Windows. Give it another try with the whole
16728     # argument.
16729     path="$complete"
16730     arguments="EOL"
16731     new_path="$path"
16732 
16733   windows_path="$new_path"
16734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16735     unix_path=`$CYGPATH -u "$windows_path"`
16736     new_path="$unix_path"
16737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16739     new_path="$unix_path"
16740   fi
16741 
16742 
16743     new_path=`$WHICH "$new_path" 2> /dev/null`
16744     # bat and cmd files are not always considered executable in MSYS causing which
16745     # to not find them
16746     if test "x$new_path" = x \
16747         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16748         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16749       new_path="$path"
16750 
16751   windows_path="$new_path"
16752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16753     unix_path=`$CYGPATH -u "$windows_path"`
16754     new_path="$unix_path"
16755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16757     new_path="$unix_path"
16758   fi
16759 
16760     fi
16761 
16762     if test "x$new_path" = x; then
16763       # It's still not found. Now this is an unrecoverable error.
16764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16765 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16766       has_space=`$ECHO "$complete" | $GREP " "`
16767       if test "x$has_space" != x; then
16768         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16769 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16770       fi
16771       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16772     fi
16773   fi
16774 
16775   # Now new_path has a complete unix path to the binary
16776   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16777     # Keep paths in /bin as-is, but remove trailing .exe if any
16778     new_path="${new_path/%.exe/}"
16779     # Do not save /bin paths to all_fixpath_prefixes!
16780   else
16781     # Not in mixed or Windows style, start by that.
16782     new_path=`cmd //c echo $new_path`
16783 
16784   input_path="$new_path"
16785   # Check if we need to convert this using DOS-style short mode. If the path
16786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16787   # take no chances and rewrite it.
16788   # Note: m4 eats our [], so we need to use [ and ] instead.
16789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16790   if test "x$has_forbidden_chars" != x; then
16791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16793   fi
16794 
16795     # Output is in $new_path
16796 
16797   windows_path="$new_path"
16798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16799     unix_path=`$CYGPATH -u "$windows_path"`
16800     new_path="$unix_path"
16801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16803     new_path="$unix_path"
16804   fi
16805 
16806     # remove trailing .exe if any
16807     new_path="${new_path/%.exe/}"
16808 
16809     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16810     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16811   fi
16812 
16813   else
16814     # We're on a posix platform. Hooray! :)
16815     # First separate the path from the arguments. This will split at the first
16816     # space.
16817     complete="$FOUND_MAKE"
16818     path="${complete%% *}"
16819     tmp="$complete EOL"
16820     arguments="${tmp#* }"
16821 
16822     # Cannot rely on the command "which" here since it doesn't always work.
16823     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16824     if test -z "$is_absolute_path"; then
16825       # Path to executable is not absolute. Find it.
16826       IFS_save="$IFS"
16827       IFS=:
16828       for p in $PATH; do
16829         if test -f "$p/$path" && test -x "$p/$path"; then
16830           new_path="$p/$path"
16831           break
16832         fi
16833       done
16834       IFS="$IFS_save"
16835     else
16836       # This is an absolute path, we can use it without further modifications.
16837       new_path="$path"
16838     fi
16839 
16840     if test "x$new_path" = x; then
16841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16842 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16843       has_space=`$ECHO "$complete" | $GREP " "`
16844       if test "x$has_space" != x; then
16845         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16846 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16847       fi
16848       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16849     fi
16850   fi
16851 
16852   # Now join together the path and the arguments once again
16853   if test "x$arguments" != xEOL; then
16854     new_complete="$new_path ${arguments% *}"
16855   else
16856     new_complete="$new_path"
16857   fi
16858 
16859   if test "x$complete" != "x$new_complete"; then
16860     FOUND_MAKE="$new_complete"
16861     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16862 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16863   fi
16864 
16865         fi
16866       fi
16867     fi
16868   fi
16869 
16870         if test "x$FOUND_MAKE" = x; then
16871           for ac_prog in make
16872 do
16873   # Extract the first word of "$ac_prog", so it can be a program name with args.
16874 set dummy $ac_prog; ac_word=$2
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16876 $as_echo_n "checking for $ac_word... " >&6; }
16877 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16878   $as_echo_n "(cached) " >&6
16879 else
16880   case $CHECK_TOOLSDIR_MAKE in
16881   [\\/]* | ?:[\\/]*)
16882   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16883   ;;
16884   *)
16885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16886 for as_dir in $PATH
16887 do
16888   IFS=$as_save_IFS
16889   test -z "$as_dir" && as_dir=.
16890     for ac_exec_ext in '' $ac_executable_extensions; do
16891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16892     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16894     break 2
16895   fi
16896 done
16897   done
16898 IFS=$as_save_IFS
16899 
16900   ;;
16901 esac
16902 fi
16903 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16904 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16906 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16907 else
16908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16909 $as_echo "no" >&6; }
16910 fi
16911 
16912 
16913   test -n "$CHECK_TOOLSDIR_MAKE" && break
16914 done
16915 
16916 
16917   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16918   DESCRIPTION="make in tools-dir"
16919   if test "x$MAKE_CANDIDATE" != x; then
16920     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16921 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16922     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16923     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16924     if test "x$IS_GNU_MAKE" = x; then
16925       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16926 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16927     else
16928       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16929       if test "x$IS_MODERN_MAKE" = x; then
16930         { $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
16931 $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;}
16932       else
16933         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16934           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16935             MAKE_EXPECTED_ENV='cygwin'
16936           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16937             MAKE_EXPECTED_ENV='msys'
16938           else
16939             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16940           fi
16941           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16942           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16943         else
16944           # Not relevant for non-Windows
16945           IS_MAKE_CORRECT_ENV=true
16946         fi
16947         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16948           { $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
16949 $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;}
16950         else
16951           FOUND_MAKE=$MAKE_CANDIDATE
16952 
16953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16954 
16955   # First separate the path from the arguments. This will split at the first
16956   # space.
16957   complete="$FOUND_MAKE"
16958   path="${complete%% *}"
16959   tmp="$complete EOL"
16960   arguments="${tmp#* }"
16961 
16962   # Input might be given as Windows format, start by converting to
16963   # unix format.
16964   new_path=`$CYGPATH -u "$path"`
16965 
16966   # Now try to locate executable using which
16967   new_path=`$WHICH "$new_path" 2> /dev/null`
16968   # bat and cmd files are not always considered executable in cygwin causing which
16969   # to not find them
16970   if test "x$new_path" = x \
16971       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16972       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16973     new_path=`$CYGPATH -u "$path"`
16974   fi
16975   if test "x$new_path" = x; then
16976     # Oops. Which didn't find the executable.
16977     # The splitting of arguments from the executable at a space might have been incorrect,
16978     # since paths with space are more likely in Windows. Give it another try with the whole
16979     # argument.
16980     path="$complete"
16981     arguments="EOL"
16982     new_path=`$CYGPATH -u "$path"`
16983     new_path=`$WHICH "$new_path" 2> /dev/null`
16984     # bat and cmd files are not always considered executable in cygwin causing which
16985     # to not find them
16986     if test "x$new_path" = x \
16987         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16988         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16989       new_path=`$CYGPATH -u "$path"`
16990     fi
16991     if test "x$new_path" = x; then
16992       # It's still not found. Now this is an unrecoverable error.
16993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16994 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16995       has_space=`$ECHO "$complete" | $GREP " "`
16996       if test "x$has_space" != x; then
16997         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16998 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16999       fi
17000       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17001     fi
17002   fi
17003 
17004   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17005   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17006   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17007   # "foo.exe" is OK but "foo" is an error.
17008   #
17009   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17010   # It is also a way to make sure we got the proper file name for the real test later on.
17011   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17012   if test "x$test_shortpath" = x; then
17013     # Short path failed, file does not exist as specified.
17014     # Try adding .exe or .cmd
17015     if test -f "${new_path}.exe"; then
17016       input_to_shortpath="${new_path}.exe"
17017     elif test -f "${new_path}.cmd"; then
17018       input_to_shortpath="${new_path}.cmd"
17019     else
17020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17021 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17022       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17023 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17024       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17025     fi
17026   else
17027     input_to_shortpath="$new_path"
17028   fi
17029 
17030   # Call helper function which possibly converts this using DOS-style short mode.
17031   # If so, the updated path is stored in $new_path.
17032   new_path="$input_to_shortpath"
17033 
17034   input_path="$input_to_shortpath"
17035   # Check if we need to convert this using DOS-style short mode. If the path
17036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17037   # take no chances and rewrite it.
17038   # Note: m4 eats our [], so we need to use [ and ] instead.
17039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17040   if test "x$has_forbidden_chars" != x; then
17041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17042     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17043     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17044     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17045       # Going to short mode and back again did indeed matter. Since short mode is
17046       # case insensitive, let's make it lowercase to improve readability.
17047       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17048       # Now convert it back to Unix-style (cygpath)
17049       input_path=`$CYGPATH -u "$shortmode_path"`
17050       new_path="$input_path"
17051     fi
17052   fi
17053 
17054   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17055   if test "x$test_cygdrive_prefix" = x; then
17056     # As a simple fix, exclude /usr/bin since it's not a real path.
17057     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17058       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17059       # a path prefixed by /cygdrive for fixpath to work.
17060       new_path="$CYGWIN_ROOT_PATH$input_path"
17061     fi
17062   fi
17063 
17064   # remove trailing .exe if any
17065   new_path="${new_path/%.exe/}"
17066 
17067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17068 
17069   # First separate the path from the arguments. This will split at the first
17070   # space.
17071   complete="$FOUND_MAKE"
17072   path="${complete%% *}"
17073   tmp="$complete EOL"
17074   arguments="${tmp#* }"
17075 
17076   # Input might be given as Windows format, start by converting to
17077   # unix format.
17078   new_path="$path"
17079 
17080   windows_path="$new_path"
17081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17082     unix_path=`$CYGPATH -u "$windows_path"`
17083     new_path="$unix_path"
17084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17086     new_path="$unix_path"
17087   fi
17088 
17089 
17090   # Now try to locate executable using which
17091   new_path=`$WHICH "$new_path" 2> /dev/null`
17092 
17093   if test "x$new_path" = x; then
17094     # Oops. Which didn't find the executable.
17095     # The splitting of arguments from the executable at a space might have been incorrect,
17096     # since paths with space are more likely in Windows. Give it another try with the whole
17097     # argument.
17098     path="$complete"
17099     arguments="EOL"
17100     new_path="$path"
17101 
17102   windows_path="$new_path"
17103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17104     unix_path=`$CYGPATH -u "$windows_path"`
17105     new_path="$unix_path"
17106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17108     new_path="$unix_path"
17109   fi
17110 
17111 
17112     new_path=`$WHICH "$new_path" 2> /dev/null`
17113     # bat and cmd files are not always considered executable in MSYS causing which
17114     # to not find them
17115     if test "x$new_path" = x \
17116         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17117         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17118       new_path="$path"
17119 
17120   windows_path="$new_path"
17121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17122     unix_path=`$CYGPATH -u "$windows_path"`
17123     new_path="$unix_path"
17124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17126     new_path="$unix_path"
17127   fi
17128 
17129     fi
17130 
17131     if test "x$new_path" = x; then
17132       # It's still not found. Now this is an unrecoverable error.
17133       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17134 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17135       has_space=`$ECHO "$complete" | $GREP " "`
17136       if test "x$has_space" != x; then
17137         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17138 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17139       fi
17140       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17141     fi
17142   fi
17143 
17144   # Now new_path has a complete unix path to the binary
17145   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17146     # Keep paths in /bin as-is, but remove trailing .exe if any
17147     new_path="${new_path/%.exe/}"
17148     # Do not save /bin paths to all_fixpath_prefixes!
17149   else
17150     # Not in mixed or Windows style, start by that.
17151     new_path=`cmd //c echo $new_path`
17152 
17153   input_path="$new_path"
17154   # Check if we need to convert this using DOS-style short mode. If the path
17155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17156   # take no chances and rewrite it.
17157   # Note: m4 eats our [], so we need to use [ and ] instead.
17158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17159   if test "x$has_forbidden_chars" != x; then
17160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17161     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17162   fi
17163 
17164     # Output is in $new_path
17165 
17166   windows_path="$new_path"
17167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168     unix_path=`$CYGPATH -u "$windows_path"`
17169     new_path="$unix_path"
17170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17172     new_path="$unix_path"
17173   fi
17174 
17175     # remove trailing .exe if any
17176     new_path="${new_path/%.exe/}"
17177 
17178     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17179     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17180   fi
17181 
17182   else
17183     # We're on a posix platform. Hooray! :)
17184     # First separate the path from the arguments. This will split at the first
17185     # space.
17186     complete="$FOUND_MAKE"
17187     path="${complete%% *}"
17188     tmp="$complete EOL"
17189     arguments="${tmp#* }"
17190 
17191     # Cannot rely on the command "which" here since it doesn't always work.
17192     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17193     if test -z "$is_absolute_path"; then
17194       # Path to executable is not absolute. Find it.
17195       IFS_save="$IFS"
17196       IFS=:
17197       for p in $PATH; do
17198         if test -f "$p/$path" && test -x "$p/$path"; then
17199           new_path="$p/$path"
17200           break
17201         fi
17202       done
17203       IFS="$IFS_save"
17204     else
17205       # This is an absolute path, we can use it without further modifications.
17206       new_path="$path"
17207     fi
17208 
17209     if test "x$new_path" = x; then
17210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17211 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17212       has_space=`$ECHO "$complete" | $GREP " "`
17213       if test "x$has_space" != x; then
17214         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17215 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17216       fi
17217       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17218     fi
17219   fi
17220 
17221   # Now join together the path and the arguments once again
17222   if test "x$arguments" != xEOL; then
17223     new_complete="$new_path ${arguments% *}"
17224   else
17225     new_complete="$new_path"
17226   fi
17227 
17228   if test "x$complete" != "x$new_complete"; then
17229     FOUND_MAKE="$new_complete"
17230     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17231 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17232   fi
17233 
17234         fi
17235       fi
17236     fi
17237   fi
17238 
17239         fi
17240         PATH=$OLD_PATH
17241       fi
17242     fi
17243 
17244     if test "x$FOUND_MAKE" = x; then
17245       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
17246     fi
17247   fi
17248 
17249   MAKE=$FOUND_MAKE
17250 
17251   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17252 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17253 
17254 
17255 
17256   # Test if find supports -delete
17257   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17258 $as_echo_n "checking if find supports -delete... " >&6; }
17259   FIND_DELETE="-delete"
17260 
17261   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17262 
17263   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17264 
17265   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17266   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17267     # No, it does not.
17268     rm $DELETEDIR/TestIfFindSupportsDelete
17269     FIND_DELETE="-exec rm \{\} \+"
17270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17271 $as_echo "no" >&6; }
17272   else
17273     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17274 $as_echo "yes" >&6; }
17275   fi
17276   rmdir $DELETEDIR
17277 
17278 
17279 
17280   # These tools might not be installed by default,
17281   # need hint on how to install them.
17282 
17283 
17284 
17285   # Publish this variable in the help.
17286 
17287 
17288   if test "x$UNZIP" = x; then
17289     # The variable is not set by user, try to locate tool using the code snippet
17290     for ac_prog in unzip
17291 do
17292   # Extract the first word of "$ac_prog", so it can be a program name with args.
17293 set dummy $ac_prog; ac_word=$2
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17295 $as_echo_n "checking for $ac_word... " >&6; }
17296 if ${ac_cv_path_UNZIP+:} false; then :
17297   $as_echo_n "(cached) " >&6
17298 else
17299   case $UNZIP in
17300   [\\/]* | ?:[\\/]*)
17301   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17302   ;;
17303   *)
17304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17305 for as_dir in $PATH
17306 do
17307   IFS=$as_save_IFS
17308   test -z "$as_dir" && as_dir=.
17309     for ac_exec_ext in '' $ac_executable_extensions; do
17310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17311     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17313     break 2
17314   fi
17315 done
17316   done
17317 IFS=$as_save_IFS
17318 
17319   ;;
17320 esac
17321 fi
17322 UNZIP=$ac_cv_path_UNZIP
17323 if test -n "$UNZIP"; then
17324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17325 $as_echo "$UNZIP" >&6; }
17326 else
17327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328 $as_echo "no" >&6; }
17329 fi
17330 
17331 
17332   test -n "$UNZIP" && break
17333 done
17334 
17335   else
17336     # The variable is set, but is it from the command line or the environment?
17337 
17338     # Try to remove the string !UNZIP! from our list.
17339     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17340     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17341       # If it failed, the variable was not from the command line. Ignore it,
17342       # but warn the user (except for BASH, which is always set by the calling BASH).
17343       if test "xUNZIP" != xBASH; then
17344         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17345 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17346       fi
17347       # Try to locate tool using the code snippet
17348       for ac_prog in unzip
17349 do
17350   # Extract the first word of "$ac_prog", so it can be a program name with args.
17351 set dummy $ac_prog; ac_word=$2
17352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17353 $as_echo_n "checking for $ac_word... " >&6; }
17354 if ${ac_cv_path_UNZIP+:} false; then :
17355   $as_echo_n "(cached) " >&6
17356 else
17357   case $UNZIP in
17358   [\\/]* | ?:[\\/]*)
17359   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17360   ;;
17361   *)
17362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17363 for as_dir in $PATH
17364 do
17365   IFS=$as_save_IFS
17366   test -z "$as_dir" && as_dir=.
17367     for ac_exec_ext in '' $ac_executable_extensions; do
17368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17369     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17371     break 2
17372   fi
17373 done
17374   done
17375 IFS=$as_save_IFS
17376 
17377   ;;
17378 esac
17379 fi
17380 UNZIP=$ac_cv_path_UNZIP
17381 if test -n "$UNZIP"; then
17382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17383 $as_echo "$UNZIP" >&6; }
17384 else
17385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17386 $as_echo "no" >&6; }
17387 fi
17388 
17389 
17390   test -n "$UNZIP" && break
17391 done
17392 
17393     else
17394       # If it succeeded, then it was overridden by the user. We will use it
17395       # for the tool.
17396 
17397       # First remove it from the list of overridden variables, so we can test
17398       # for unknown variables in the end.
17399       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17400 
17401       # Check if the provided tool contains a complete path.
17402       tool_specified="$UNZIP"
17403       tool_basename="${tool_specified##*/}"
17404       if test "x$tool_basename" = "x$tool_specified"; then
17405         # A command without a complete path is provided, search $PATH.
17406         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17407 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17408         # Extract the first word of "$tool_basename", so it can be a program name with args.
17409 set dummy $tool_basename; ac_word=$2
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17411 $as_echo_n "checking for $ac_word... " >&6; }
17412 if ${ac_cv_path_UNZIP+:} false; then :
17413   $as_echo_n "(cached) " >&6
17414 else
17415   case $UNZIP in
17416   [\\/]* | ?:[\\/]*)
17417   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17418   ;;
17419   *)
17420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17421 for as_dir in $PATH
17422 do
17423   IFS=$as_save_IFS
17424   test -z "$as_dir" && as_dir=.
17425     for ac_exec_ext in '' $ac_executable_extensions; do
17426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17427     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17429     break 2
17430   fi
17431 done
17432   done
17433 IFS=$as_save_IFS
17434 
17435   ;;
17436 esac
17437 fi
17438 UNZIP=$ac_cv_path_UNZIP
17439 if test -n "$UNZIP"; then
17440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17441 $as_echo "$UNZIP" >&6; }
17442 else
17443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17444 $as_echo "no" >&6; }
17445 fi
17446 
17447 
17448         if test "x$UNZIP" = x; then
17449           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17450         fi
17451       else
17452         # Otherwise we believe it is a complete path. Use it as it is.
17453         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17454 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17455         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17456 $as_echo_n "checking for UNZIP... " >&6; }
17457         if test ! -x "$tool_specified"; then
17458           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17459 $as_echo "not found" >&6; }
17460           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17461         fi
17462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17463 $as_echo "$tool_specified" >&6; }
17464       fi
17465     fi
17466   fi
17467 
17468 
17469 
17470   if test "x$UNZIP" = x; then
17471     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17472   fi
17473 
17474 
17475 
17476 
17477 
17478   # Publish this variable in the help.
17479 
17480 
17481   if test "x$ZIP" = x; then
17482     # The variable is not set by user, try to locate tool using the code snippet
17483     for ac_prog in zip
17484 do
17485   # Extract the first word of "$ac_prog", so it can be a program name with args.
17486 set dummy $ac_prog; ac_word=$2
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488 $as_echo_n "checking for $ac_word... " >&6; }
17489 if ${ac_cv_path_ZIP+:} false; then :
17490   $as_echo_n "(cached) " >&6
17491 else
17492   case $ZIP in
17493   [\\/]* | ?:[\\/]*)
17494   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17495   ;;
17496   *)
17497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498 for as_dir in $PATH
17499 do
17500   IFS=$as_save_IFS
17501   test -z "$as_dir" && as_dir=.
17502     for ac_exec_ext in '' $ac_executable_extensions; do
17503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17504     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506     break 2
17507   fi
17508 done
17509   done
17510 IFS=$as_save_IFS
17511 
17512   ;;
17513 esac
17514 fi
17515 ZIP=$ac_cv_path_ZIP
17516 if test -n "$ZIP"; then
17517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17518 $as_echo "$ZIP" >&6; }
17519 else
17520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521 $as_echo "no" >&6; }
17522 fi
17523 
17524 
17525   test -n "$ZIP" && break
17526 done
17527 
17528   else
17529     # The variable is set, but is it from the command line or the environment?
17530 
17531     # Try to remove the string !ZIP! from our list.
17532     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17533     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17534       # If it failed, the variable was not from the command line. Ignore it,
17535       # but warn the user (except for BASH, which is always set by the calling BASH).
17536       if test "xZIP" != xBASH; then
17537         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17538 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17539       fi
17540       # Try to locate tool using the code snippet
17541       for ac_prog in zip
17542 do
17543   # Extract the first word of "$ac_prog", so it can be a program name with args.
17544 set dummy $ac_prog; ac_word=$2
17545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17546 $as_echo_n "checking for $ac_word... " >&6; }
17547 if ${ac_cv_path_ZIP+:} false; then :
17548   $as_echo_n "(cached) " >&6
17549 else
17550   case $ZIP in
17551   [\\/]* | ?:[\\/]*)
17552   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17553   ;;
17554   *)
17555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17556 for as_dir in $PATH
17557 do
17558   IFS=$as_save_IFS
17559   test -z "$as_dir" && as_dir=.
17560     for ac_exec_ext in '' $ac_executable_extensions; do
17561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17562     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17564     break 2
17565   fi
17566 done
17567   done
17568 IFS=$as_save_IFS
17569 
17570   ;;
17571 esac
17572 fi
17573 ZIP=$ac_cv_path_ZIP
17574 if test -n "$ZIP"; then
17575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17576 $as_echo "$ZIP" >&6; }
17577 else
17578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579 $as_echo "no" >&6; }
17580 fi
17581 
17582 
17583   test -n "$ZIP" && break
17584 done
17585 
17586     else
17587       # If it succeeded, then it was overridden by the user. We will use it
17588       # for the tool.
17589 
17590       # First remove it from the list of overridden variables, so we can test
17591       # for unknown variables in the end.
17592       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17593 
17594       # Check if the provided tool contains a complete path.
17595       tool_specified="$ZIP"
17596       tool_basename="${tool_specified##*/}"
17597       if test "x$tool_basename" = "x$tool_specified"; then
17598         # A command without a complete path is provided, search $PATH.
17599         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17600 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17601         # Extract the first word of "$tool_basename", so it can be a program name with args.
17602 set dummy $tool_basename; ac_word=$2
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17604 $as_echo_n "checking for $ac_word... " >&6; }
17605 if ${ac_cv_path_ZIP+:} false; then :
17606   $as_echo_n "(cached) " >&6
17607 else
17608   case $ZIP in
17609   [\\/]* | ?:[\\/]*)
17610   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17611   ;;
17612   *)
17613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17614 for as_dir in $PATH
17615 do
17616   IFS=$as_save_IFS
17617   test -z "$as_dir" && as_dir=.
17618     for ac_exec_ext in '' $ac_executable_extensions; do
17619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17620     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17622     break 2
17623   fi
17624 done
17625   done
17626 IFS=$as_save_IFS
17627 
17628   ;;
17629 esac
17630 fi
17631 ZIP=$ac_cv_path_ZIP
17632 if test -n "$ZIP"; then
17633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17634 $as_echo "$ZIP" >&6; }
17635 else
17636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17637 $as_echo "no" >&6; }
17638 fi
17639 
17640 
17641         if test "x$ZIP" = x; then
17642           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17643         fi
17644       else
17645         # Otherwise we believe it is a complete path. Use it as it is.
17646         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17647 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17648         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17649 $as_echo_n "checking for ZIP... " >&6; }
17650         if test ! -x "$tool_specified"; then
17651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17652 $as_echo "not found" >&6; }
17653           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17654         fi
17655         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17656 $as_echo "$tool_specified" >&6; }
17657       fi
17658     fi
17659   fi
17660 
17661 
17662 
17663   if test "x$ZIP" = x; then
17664     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17665   fi
17666 
17667 
17668 
17669   # Non-required basic tools
17670 
17671 
17672 
17673   # Publish this variable in the help.
17674 
17675 
17676   if test "x$LDD" = x; then
17677     # The variable is not set by user, try to locate tool using the code snippet
17678     for ac_prog in ldd
17679 do
17680   # Extract the first word of "$ac_prog", so it can be a program name with args.
17681 set dummy $ac_prog; ac_word=$2
17682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17683 $as_echo_n "checking for $ac_word... " >&6; }
17684 if ${ac_cv_path_LDD+:} false; then :
17685   $as_echo_n "(cached) " >&6
17686 else
17687   case $LDD in
17688   [\\/]* | ?:[\\/]*)
17689   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17690   ;;
17691   *)
17692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17693 for as_dir in $PATH
17694 do
17695   IFS=$as_save_IFS
17696   test -z "$as_dir" && as_dir=.
17697     for ac_exec_ext in '' $ac_executable_extensions; do
17698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17699     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17701     break 2
17702   fi
17703 done
17704   done
17705 IFS=$as_save_IFS
17706 
17707   ;;
17708 esac
17709 fi
17710 LDD=$ac_cv_path_LDD
17711 if test -n "$LDD"; then
17712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17713 $as_echo "$LDD" >&6; }
17714 else
17715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17716 $as_echo "no" >&6; }
17717 fi
17718 
17719 
17720   test -n "$LDD" && break
17721 done
17722 
17723   else
17724     # The variable is set, but is it from the command line or the environment?
17725 
17726     # Try to remove the string !LDD! from our list.
17727     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17728     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17729       # If it failed, the variable was not from the command line. Ignore it,
17730       # but warn the user (except for BASH, which is always set by the calling BASH).
17731       if test "xLDD" != xBASH; then
17732         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17733 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17734       fi
17735       # Try to locate tool using the code snippet
17736       for ac_prog in ldd
17737 do
17738   # Extract the first word of "$ac_prog", so it can be a program name with args.
17739 set dummy $ac_prog; ac_word=$2
17740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17741 $as_echo_n "checking for $ac_word... " >&6; }
17742 if ${ac_cv_path_LDD+:} false; then :
17743   $as_echo_n "(cached) " >&6
17744 else
17745   case $LDD in
17746   [\\/]* | ?:[\\/]*)
17747   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17748   ;;
17749   *)
17750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17751 for as_dir in $PATH
17752 do
17753   IFS=$as_save_IFS
17754   test -z "$as_dir" && as_dir=.
17755     for ac_exec_ext in '' $ac_executable_extensions; do
17756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17757     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17759     break 2
17760   fi
17761 done
17762   done
17763 IFS=$as_save_IFS
17764 
17765   ;;
17766 esac
17767 fi
17768 LDD=$ac_cv_path_LDD
17769 if test -n "$LDD"; then
17770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17771 $as_echo "$LDD" >&6; }
17772 else
17773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17774 $as_echo "no" >&6; }
17775 fi
17776 
17777 
17778   test -n "$LDD" && break
17779 done
17780 
17781     else
17782       # If it succeeded, then it was overridden by the user. We will use it
17783       # for the tool.
17784 
17785       # First remove it from the list of overridden variables, so we can test
17786       # for unknown variables in the end.
17787       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17788 
17789       # Check if the provided tool contains a complete path.
17790       tool_specified="$LDD"
17791       tool_basename="${tool_specified##*/}"
17792       if test "x$tool_basename" = "x$tool_specified"; then
17793         # A command without a complete path is provided, search $PATH.
17794         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17795 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17796         # Extract the first word of "$tool_basename", so it can be a program name with args.
17797 set dummy $tool_basename; ac_word=$2
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17799 $as_echo_n "checking for $ac_word... " >&6; }
17800 if ${ac_cv_path_LDD+:} false; then :
17801   $as_echo_n "(cached) " >&6
17802 else
17803   case $LDD in
17804   [\\/]* | ?:[\\/]*)
17805   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17806   ;;
17807   *)
17808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17809 for as_dir in $PATH
17810 do
17811   IFS=$as_save_IFS
17812   test -z "$as_dir" && as_dir=.
17813     for ac_exec_ext in '' $ac_executable_extensions; do
17814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17815     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17817     break 2
17818   fi
17819 done
17820   done
17821 IFS=$as_save_IFS
17822 
17823   ;;
17824 esac
17825 fi
17826 LDD=$ac_cv_path_LDD
17827 if test -n "$LDD"; then
17828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17829 $as_echo "$LDD" >&6; }
17830 else
17831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17832 $as_echo "no" >&6; }
17833 fi
17834 
17835 
17836         if test "x$LDD" = x; then
17837           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17838         fi
17839       else
17840         # Otherwise we believe it is a complete path. Use it as it is.
17841         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17842 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17843         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17844 $as_echo_n "checking for LDD... " >&6; }
17845         if test ! -x "$tool_specified"; then
17846           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17847 $as_echo "not found" >&6; }
17848           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17849         fi
17850         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17851 $as_echo "$tool_specified" >&6; }
17852       fi
17853     fi
17854   fi
17855 
17856 
17857   if test "x$LDD" = "x"; then
17858     # List shared lib dependencies is used for
17859     # debug output and checking for forbidden dependencies.
17860     # We can build without it.
17861     LDD="true"
17862   fi
17863 
17864 
17865   # Publish this variable in the help.
17866 
17867 
17868   if test "x$READELF" = x; then
17869     # The variable is not set by user, try to locate tool using the code snippet
17870     for ac_prog in readelf greadelf
17871 do
17872   # Extract the first word of "$ac_prog", so it can be a program name with args.
17873 set dummy $ac_prog; ac_word=$2
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17875 $as_echo_n "checking for $ac_word... " >&6; }
17876 if ${ac_cv_path_READELF+:} false; then :
17877   $as_echo_n "(cached) " >&6
17878 else
17879   case $READELF in
17880   [\\/]* | ?:[\\/]*)
17881   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17882   ;;
17883   *)
17884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17885 for as_dir in $PATH
17886 do
17887   IFS=$as_save_IFS
17888   test -z "$as_dir" && as_dir=.
17889     for ac_exec_ext in '' $ac_executable_extensions; do
17890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17891     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17893     break 2
17894   fi
17895 done
17896   done
17897 IFS=$as_save_IFS
17898 
17899   ;;
17900 esac
17901 fi
17902 READELF=$ac_cv_path_READELF
17903 if test -n "$READELF"; then
17904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17905 $as_echo "$READELF" >&6; }
17906 else
17907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17908 $as_echo "no" >&6; }
17909 fi
17910 
17911 
17912   test -n "$READELF" && break
17913 done
17914 
17915   else
17916     # The variable is set, but is it from the command line or the environment?
17917 
17918     # Try to remove the string !READELF! from our list.
17919     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17920     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17921       # If it failed, the variable was not from the command line. Ignore it,
17922       # but warn the user (except for BASH, which is always set by the calling BASH).
17923       if test "xREADELF" != xBASH; then
17924         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17925 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17926       fi
17927       # Try to locate tool using the code snippet
17928       for ac_prog in readelf greadelf
17929 do
17930   # Extract the first word of "$ac_prog", so it can be a program name with args.
17931 set dummy $ac_prog; ac_word=$2
17932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17933 $as_echo_n "checking for $ac_word... " >&6; }
17934 if ${ac_cv_path_READELF+:} false; then :
17935   $as_echo_n "(cached) " >&6
17936 else
17937   case $READELF in
17938   [\\/]* | ?:[\\/]*)
17939   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17940   ;;
17941   *)
17942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17943 for as_dir in $PATH
17944 do
17945   IFS=$as_save_IFS
17946   test -z "$as_dir" && as_dir=.
17947     for ac_exec_ext in '' $ac_executable_extensions; do
17948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17949     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17951     break 2
17952   fi
17953 done
17954   done
17955 IFS=$as_save_IFS
17956 
17957   ;;
17958 esac
17959 fi
17960 READELF=$ac_cv_path_READELF
17961 if test -n "$READELF"; then
17962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17963 $as_echo "$READELF" >&6; }
17964 else
17965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17966 $as_echo "no" >&6; }
17967 fi
17968 
17969 
17970   test -n "$READELF" && break
17971 done
17972 
17973     else
17974       # If it succeeded, then it was overridden by the user. We will use it
17975       # for the tool.
17976 
17977       # First remove it from the list of overridden variables, so we can test
17978       # for unknown variables in the end.
17979       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17980 
17981       # Check if the provided tool contains a complete path.
17982       tool_specified="$READELF"
17983       tool_basename="${tool_specified##*/}"
17984       if test "x$tool_basename" = "x$tool_specified"; then
17985         # A command without a complete path is provided, search $PATH.
17986         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17987 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17988         # Extract the first word of "$tool_basename", so it can be a program name with args.
17989 set dummy $tool_basename; ac_word=$2
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17991 $as_echo_n "checking for $ac_word... " >&6; }
17992 if ${ac_cv_path_READELF+:} false; then :
17993   $as_echo_n "(cached) " >&6
17994 else
17995   case $READELF in
17996   [\\/]* | ?:[\\/]*)
17997   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17998   ;;
17999   *)
18000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18001 for as_dir in $PATH
18002 do
18003   IFS=$as_save_IFS
18004   test -z "$as_dir" && as_dir=.
18005     for ac_exec_ext in '' $ac_executable_extensions; do
18006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18007     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18009     break 2
18010   fi
18011 done
18012   done
18013 IFS=$as_save_IFS
18014 
18015   ;;
18016 esac
18017 fi
18018 READELF=$ac_cv_path_READELF
18019 if test -n "$READELF"; then
18020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18021 $as_echo "$READELF" >&6; }
18022 else
18023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18024 $as_echo "no" >&6; }
18025 fi
18026 
18027 
18028         if test "x$READELF" = x; then
18029           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18030         fi
18031       else
18032         # Otherwise we believe it is a complete path. Use it as it is.
18033         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18034 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18036 $as_echo_n "checking for READELF... " >&6; }
18037         if test ! -x "$tool_specified"; then
18038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18039 $as_echo "not found" >&6; }
18040           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18041         fi
18042         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18043 $as_echo "$tool_specified" >&6; }
18044       fi
18045     fi
18046   fi
18047 
18048 
18049 
18050 
18051   # Publish this variable in the help.
18052 
18053 
18054   if test "x$HG" = x; then
18055     # The variable is not set by user, try to locate tool using the code snippet
18056     for ac_prog in hg
18057 do
18058   # Extract the first word of "$ac_prog", so it can be a program name with args.
18059 set dummy $ac_prog; ac_word=$2
18060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18061 $as_echo_n "checking for $ac_word... " >&6; }
18062 if ${ac_cv_path_HG+:} false; then :
18063   $as_echo_n "(cached) " >&6
18064 else
18065   case $HG in
18066   [\\/]* | ?:[\\/]*)
18067   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18068   ;;
18069   *)
18070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18071 for as_dir in $PATH
18072 do
18073   IFS=$as_save_IFS
18074   test -z "$as_dir" && as_dir=.
18075     for ac_exec_ext in '' $ac_executable_extensions; do
18076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18077     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18079     break 2
18080   fi
18081 done
18082   done
18083 IFS=$as_save_IFS
18084 
18085   ;;
18086 esac
18087 fi
18088 HG=$ac_cv_path_HG
18089 if test -n "$HG"; then
18090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18091 $as_echo "$HG" >&6; }
18092 else
18093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18094 $as_echo "no" >&6; }
18095 fi
18096 
18097 
18098   test -n "$HG" && break
18099 done
18100 
18101   else
18102     # The variable is set, but is it from the command line or the environment?
18103 
18104     # Try to remove the string !HG! from our list.
18105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18107       # If it failed, the variable was not from the command line. Ignore it,
18108       # but warn the user (except for BASH, which is always set by the calling BASH).
18109       if test "xHG" != xBASH; then
18110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18111 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18112       fi
18113       # Try to locate tool using the code snippet
18114       for ac_prog in hg
18115 do
18116   # Extract the first word of "$ac_prog", so it can be a program name with args.
18117 set dummy $ac_prog; ac_word=$2
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18119 $as_echo_n "checking for $ac_word... " >&6; }
18120 if ${ac_cv_path_HG+:} false; then :
18121   $as_echo_n "(cached) " >&6
18122 else
18123   case $HG in
18124   [\\/]* | ?:[\\/]*)
18125   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18126   ;;
18127   *)
18128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18129 for as_dir in $PATH
18130 do
18131   IFS=$as_save_IFS
18132   test -z "$as_dir" && as_dir=.
18133     for ac_exec_ext in '' $ac_executable_extensions; do
18134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18135     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18137     break 2
18138   fi
18139 done
18140   done
18141 IFS=$as_save_IFS
18142 
18143   ;;
18144 esac
18145 fi
18146 HG=$ac_cv_path_HG
18147 if test -n "$HG"; then
18148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18149 $as_echo "$HG" >&6; }
18150 else
18151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18152 $as_echo "no" >&6; }
18153 fi
18154 
18155 
18156   test -n "$HG" && break
18157 done
18158 
18159     else
18160       # If it succeeded, then it was overridden by the user. We will use it
18161       # for the tool.
18162 
18163       # First remove it from the list of overridden variables, so we can test
18164       # for unknown variables in the end.
18165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18166 
18167       # Check if the provided tool contains a complete path.
18168       tool_specified="$HG"
18169       tool_basename="${tool_specified##*/}"
18170       if test "x$tool_basename" = "x$tool_specified"; then
18171         # A command without a complete path is provided, search $PATH.
18172         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18173 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18174         # Extract the first word of "$tool_basename", so it can be a program name with args.
18175 set dummy $tool_basename; ac_word=$2
18176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18177 $as_echo_n "checking for $ac_word... " >&6; }
18178 if ${ac_cv_path_HG+:} false; then :
18179   $as_echo_n "(cached) " >&6
18180 else
18181   case $HG in
18182   [\\/]* | ?:[\\/]*)
18183   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18184   ;;
18185   *)
18186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18187 for as_dir in $PATH
18188 do
18189   IFS=$as_save_IFS
18190   test -z "$as_dir" && as_dir=.
18191     for ac_exec_ext in '' $ac_executable_extensions; do
18192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18193     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18195     break 2
18196   fi
18197 done
18198   done
18199 IFS=$as_save_IFS
18200 
18201   ;;
18202 esac
18203 fi
18204 HG=$ac_cv_path_HG
18205 if test -n "$HG"; then
18206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18207 $as_echo "$HG" >&6; }
18208 else
18209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18210 $as_echo "no" >&6; }
18211 fi
18212 
18213 
18214         if test "x$HG" = x; then
18215           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18216         fi
18217       else
18218         # Otherwise we believe it is a complete path. Use it as it is.
18219         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18220 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18222 $as_echo_n "checking for HG... " >&6; }
18223         if test ! -x "$tool_specified"; then
18224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18225 $as_echo "not found" >&6; }
18226           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18227         fi
18228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18229 $as_echo "$tool_specified" >&6; }
18230       fi
18231     fi
18232   fi
18233 
18234 
18235 
18236 
18237   # Publish this variable in the help.
18238 
18239 
18240   if test "x$STAT" = x; then
18241     # The variable is not set by user, try to locate tool using the code snippet
18242     for ac_prog in stat
18243 do
18244   # Extract the first word of "$ac_prog", so it can be a program name with args.
18245 set dummy $ac_prog; ac_word=$2
18246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18247 $as_echo_n "checking for $ac_word... " >&6; }
18248 if ${ac_cv_path_STAT+:} false; then :
18249   $as_echo_n "(cached) " >&6
18250 else
18251   case $STAT in
18252   [\\/]* | ?:[\\/]*)
18253   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18254   ;;
18255   *)
18256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18257 for as_dir in $PATH
18258 do
18259   IFS=$as_save_IFS
18260   test -z "$as_dir" && as_dir=.
18261     for ac_exec_ext in '' $ac_executable_extensions; do
18262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18263     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18265     break 2
18266   fi
18267 done
18268   done
18269 IFS=$as_save_IFS
18270 
18271   ;;
18272 esac
18273 fi
18274 STAT=$ac_cv_path_STAT
18275 if test -n "$STAT"; then
18276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18277 $as_echo "$STAT" >&6; }
18278 else
18279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18280 $as_echo "no" >&6; }
18281 fi
18282 
18283 
18284   test -n "$STAT" && break
18285 done
18286 
18287   else
18288     # The variable is set, but is it from the command line or the environment?
18289 
18290     # Try to remove the string !STAT! from our list.
18291     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18292     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18293       # If it failed, the variable was not from the command line. Ignore it,
18294       # but warn the user (except for BASH, which is always set by the calling BASH).
18295       if test "xSTAT" != xBASH; then
18296         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18297 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18298       fi
18299       # Try to locate tool using the code snippet
18300       for ac_prog in stat
18301 do
18302   # Extract the first word of "$ac_prog", so it can be a program name with args.
18303 set dummy $ac_prog; ac_word=$2
18304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18305 $as_echo_n "checking for $ac_word... " >&6; }
18306 if ${ac_cv_path_STAT+:} false; then :
18307   $as_echo_n "(cached) " >&6
18308 else
18309   case $STAT in
18310   [\\/]* | ?:[\\/]*)
18311   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18312   ;;
18313   *)
18314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18315 for as_dir in $PATH
18316 do
18317   IFS=$as_save_IFS
18318   test -z "$as_dir" && as_dir=.
18319     for ac_exec_ext in '' $ac_executable_extensions; do
18320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18321     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18323     break 2
18324   fi
18325 done
18326   done
18327 IFS=$as_save_IFS
18328 
18329   ;;
18330 esac
18331 fi
18332 STAT=$ac_cv_path_STAT
18333 if test -n "$STAT"; then
18334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18335 $as_echo "$STAT" >&6; }
18336 else
18337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18338 $as_echo "no" >&6; }
18339 fi
18340 
18341 
18342   test -n "$STAT" && break
18343 done
18344 
18345     else
18346       # If it succeeded, then it was overridden by the user. We will use it
18347       # for the tool.
18348 
18349       # First remove it from the list of overridden variables, so we can test
18350       # for unknown variables in the end.
18351       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18352 
18353       # Check if the provided tool contains a complete path.
18354       tool_specified="$STAT"
18355       tool_basename="${tool_specified##*/}"
18356       if test "x$tool_basename" = "x$tool_specified"; then
18357         # A command without a complete path is provided, search $PATH.
18358         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18359 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18360         # Extract the first word of "$tool_basename", so it can be a program name with args.
18361 set dummy $tool_basename; ac_word=$2
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18363 $as_echo_n "checking for $ac_word... " >&6; }
18364 if ${ac_cv_path_STAT+:} false; then :
18365   $as_echo_n "(cached) " >&6
18366 else
18367   case $STAT in
18368   [\\/]* | ?:[\\/]*)
18369   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18370   ;;
18371   *)
18372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18373 for as_dir in $PATH
18374 do
18375   IFS=$as_save_IFS
18376   test -z "$as_dir" && as_dir=.
18377     for ac_exec_ext in '' $ac_executable_extensions; do
18378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18379     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18381     break 2
18382   fi
18383 done
18384   done
18385 IFS=$as_save_IFS
18386 
18387   ;;
18388 esac
18389 fi
18390 STAT=$ac_cv_path_STAT
18391 if test -n "$STAT"; then
18392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18393 $as_echo "$STAT" >&6; }
18394 else
18395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18396 $as_echo "no" >&6; }
18397 fi
18398 
18399 
18400         if test "x$STAT" = x; then
18401           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18402         fi
18403       else
18404         # Otherwise we believe it is a complete path. Use it as it is.
18405         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18406 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18407         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18408 $as_echo_n "checking for STAT... " >&6; }
18409         if test ! -x "$tool_specified"; then
18410           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18411 $as_echo "not found" >&6; }
18412           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18413         fi
18414         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18415 $as_echo "$tool_specified" >&6; }
18416       fi
18417     fi
18418   fi
18419 
18420 
18421 
18422 
18423   # Publish this variable in the help.
18424 
18425 
18426   if test "x$TIME" = x; then
18427     # The variable is not set by user, try to locate tool using the code snippet
18428     for ac_prog in time
18429 do
18430   # Extract the first word of "$ac_prog", so it can be a program name with args.
18431 set dummy $ac_prog; ac_word=$2
18432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18433 $as_echo_n "checking for $ac_word... " >&6; }
18434 if ${ac_cv_path_TIME+:} false; then :
18435   $as_echo_n "(cached) " >&6
18436 else
18437   case $TIME in
18438   [\\/]* | ?:[\\/]*)
18439   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18440   ;;
18441   *)
18442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18443 for as_dir in $PATH
18444 do
18445   IFS=$as_save_IFS
18446   test -z "$as_dir" && as_dir=.
18447     for ac_exec_ext in '' $ac_executable_extensions; do
18448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18449     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18451     break 2
18452   fi
18453 done
18454   done
18455 IFS=$as_save_IFS
18456 
18457   ;;
18458 esac
18459 fi
18460 TIME=$ac_cv_path_TIME
18461 if test -n "$TIME"; then
18462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18463 $as_echo "$TIME" >&6; }
18464 else
18465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18466 $as_echo "no" >&6; }
18467 fi
18468 
18469 
18470   test -n "$TIME" && break
18471 done
18472 
18473   else
18474     # The variable is set, but is it from the command line or the environment?
18475 
18476     # Try to remove the string !TIME! from our list.
18477     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18478     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18479       # If it failed, the variable was not from the command line. Ignore it,
18480       # but warn the user (except for BASH, which is always set by the calling BASH).
18481       if test "xTIME" != xBASH; then
18482         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18483 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18484       fi
18485       # Try to locate tool using the code snippet
18486       for ac_prog in time
18487 do
18488   # Extract the first word of "$ac_prog", so it can be a program name with args.
18489 set dummy $ac_prog; ac_word=$2
18490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18491 $as_echo_n "checking for $ac_word... " >&6; }
18492 if ${ac_cv_path_TIME+:} false; then :
18493   $as_echo_n "(cached) " >&6
18494 else
18495   case $TIME in
18496   [\\/]* | ?:[\\/]*)
18497   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18498   ;;
18499   *)
18500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18501 for as_dir in $PATH
18502 do
18503   IFS=$as_save_IFS
18504   test -z "$as_dir" && as_dir=.
18505     for ac_exec_ext in '' $ac_executable_extensions; do
18506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18507     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18509     break 2
18510   fi
18511 done
18512   done
18513 IFS=$as_save_IFS
18514 
18515   ;;
18516 esac
18517 fi
18518 TIME=$ac_cv_path_TIME
18519 if test -n "$TIME"; then
18520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18521 $as_echo "$TIME" >&6; }
18522 else
18523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18524 $as_echo "no" >&6; }
18525 fi
18526 
18527 
18528   test -n "$TIME" && break
18529 done
18530 
18531     else
18532       # If it succeeded, then it was overridden by the user. We will use it
18533       # for the tool.
18534 
18535       # First remove it from the list of overridden variables, so we can test
18536       # for unknown variables in the end.
18537       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18538 
18539       # Check if the provided tool contains a complete path.
18540       tool_specified="$TIME"
18541       tool_basename="${tool_specified##*/}"
18542       if test "x$tool_basename" = "x$tool_specified"; then
18543         # A command without a complete path is provided, search $PATH.
18544         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18545 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18546         # Extract the first word of "$tool_basename", so it can be a program name with args.
18547 set dummy $tool_basename; ac_word=$2
18548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18549 $as_echo_n "checking for $ac_word... " >&6; }
18550 if ${ac_cv_path_TIME+:} false; then :
18551   $as_echo_n "(cached) " >&6
18552 else
18553   case $TIME in
18554   [\\/]* | ?:[\\/]*)
18555   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18556   ;;
18557   *)
18558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18559 for as_dir in $PATH
18560 do
18561   IFS=$as_save_IFS
18562   test -z "$as_dir" && as_dir=.
18563     for ac_exec_ext in '' $ac_executable_extensions; do
18564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18565     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18567     break 2
18568   fi
18569 done
18570   done
18571 IFS=$as_save_IFS
18572 
18573   ;;
18574 esac
18575 fi
18576 TIME=$ac_cv_path_TIME
18577 if test -n "$TIME"; then
18578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18579 $as_echo "$TIME" >&6; }
18580 else
18581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18582 $as_echo "no" >&6; }
18583 fi
18584 
18585 
18586         if test "x$TIME" = x; then
18587           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18588         fi
18589       else
18590         # Otherwise we believe it is a complete path. Use it as it is.
18591         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18592 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18593         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18594 $as_echo_n "checking for TIME... " >&6; }
18595         if test ! -x "$tool_specified"; then
18596           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18597 $as_echo "not found" >&6; }
18598           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18599         fi
18600         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18601 $as_echo "$tool_specified" >&6; }
18602       fi
18603     fi
18604   fi
18605 
18606 
18607   # Check if it's GNU time
18608   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18609   if test "x$IS_GNU_TIME" != x; then
18610     IS_GNU_TIME=yes
18611   else
18612     IS_GNU_TIME=no
18613   fi
18614 
18615 
18616   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18617 
18618 
18619 
18620   # Publish this variable in the help.
18621 
18622 
18623   if test "x$COMM" = x; then
18624     # The variable is not set by user, try to locate tool using the code snippet
18625     for ac_prog in comm
18626 do
18627   # Extract the first word of "$ac_prog", so it can be a program name with args.
18628 set dummy $ac_prog; ac_word=$2
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630 $as_echo_n "checking for $ac_word... " >&6; }
18631 if ${ac_cv_path_COMM+:} false; then :
18632   $as_echo_n "(cached) " >&6
18633 else
18634   case $COMM in
18635   [\\/]* | ?:[\\/]*)
18636   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18637   ;;
18638   *)
18639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640 for as_dir in $PATH
18641 do
18642   IFS=$as_save_IFS
18643   test -z "$as_dir" && as_dir=.
18644     for ac_exec_ext in '' $ac_executable_extensions; do
18645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18648     break 2
18649   fi
18650 done
18651   done
18652 IFS=$as_save_IFS
18653 
18654   ;;
18655 esac
18656 fi
18657 COMM=$ac_cv_path_COMM
18658 if test -n "$COMM"; then
18659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18660 $as_echo "$COMM" >&6; }
18661 else
18662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663 $as_echo "no" >&6; }
18664 fi
18665 
18666 
18667   test -n "$COMM" && break
18668 done
18669 
18670   else
18671     # The variable is set, but is it from the command line or the environment?
18672 
18673     # Try to remove the string !COMM! from our list.
18674     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18675     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18676       # If it failed, the variable was not from the command line. Ignore it,
18677       # but warn the user (except for BASH, which is always set by the calling BASH).
18678       if test "xCOMM" != xBASH; then
18679         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18680 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18681       fi
18682       # Try to locate tool using the code snippet
18683       for ac_prog in comm
18684 do
18685   # Extract the first word of "$ac_prog", so it can be a program name with args.
18686 set dummy $ac_prog; ac_word=$2
18687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18688 $as_echo_n "checking for $ac_word... " >&6; }
18689 if ${ac_cv_path_COMM+:} false; then :
18690   $as_echo_n "(cached) " >&6
18691 else
18692   case $COMM in
18693   [\\/]* | ?:[\\/]*)
18694   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18695   ;;
18696   *)
18697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18698 for as_dir in $PATH
18699 do
18700   IFS=$as_save_IFS
18701   test -z "$as_dir" && as_dir=.
18702     for ac_exec_ext in '' $ac_executable_extensions; do
18703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18704     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18706     break 2
18707   fi
18708 done
18709   done
18710 IFS=$as_save_IFS
18711 
18712   ;;
18713 esac
18714 fi
18715 COMM=$ac_cv_path_COMM
18716 if test -n "$COMM"; then
18717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18718 $as_echo "$COMM" >&6; }
18719 else
18720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18721 $as_echo "no" >&6; }
18722 fi
18723 
18724 
18725   test -n "$COMM" && break
18726 done
18727 
18728     else
18729       # If it succeeded, then it was overridden by the user. We will use it
18730       # for the tool.
18731 
18732       # First remove it from the list of overridden variables, so we can test
18733       # for unknown variables in the end.
18734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18735 
18736       # Check if the provided tool contains a complete path.
18737       tool_specified="$COMM"
18738       tool_basename="${tool_specified##*/}"
18739       if test "x$tool_basename" = "x$tool_specified"; then
18740         # A command without a complete path is provided, search $PATH.
18741         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18742 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18743         # Extract the first word of "$tool_basename", so it can be a program name with args.
18744 set dummy $tool_basename; ac_word=$2
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18746 $as_echo_n "checking for $ac_word... " >&6; }
18747 if ${ac_cv_path_COMM+:} false; then :
18748   $as_echo_n "(cached) " >&6
18749 else
18750   case $COMM in
18751   [\\/]* | ?:[\\/]*)
18752   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18753   ;;
18754   *)
18755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18756 for as_dir in $PATH
18757 do
18758   IFS=$as_save_IFS
18759   test -z "$as_dir" && as_dir=.
18760     for ac_exec_ext in '' $ac_executable_extensions; do
18761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18762     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18764     break 2
18765   fi
18766 done
18767   done
18768 IFS=$as_save_IFS
18769 
18770   ;;
18771 esac
18772 fi
18773 COMM=$ac_cv_path_COMM
18774 if test -n "$COMM"; then
18775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18776 $as_echo "$COMM" >&6; }
18777 else
18778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18779 $as_echo "no" >&6; }
18780 fi
18781 
18782 
18783         if test "x$COMM" = x; then
18784           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18785         fi
18786       else
18787         # Otherwise we believe it is a complete path. Use it as it is.
18788         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18789 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18791 $as_echo_n "checking for COMM... " >&6; }
18792         if test ! -x "$tool_specified"; then
18793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18794 $as_echo "not found" >&6; }
18795           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18796         fi
18797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18798 $as_echo "$tool_specified" >&6; }
18799       fi
18800     fi
18801   fi
18802 
18803 
18804 
18805   if test "x$COMM" = x; then
18806     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18807   fi
18808 
18809 
18810   fi
18811 
18812   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18813 
18814 
18815 
18816   # Publish this variable in the help.
18817 
18818 
18819   if test "x$DSYMUTIL" = x; then
18820     # The variable is not set by user, try to locate tool using the code snippet
18821     for ac_prog in dsymutil
18822 do
18823   # Extract the first word of "$ac_prog", so it can be a program name with args.
18824 set dummy $ac_prog; ac_word=$2
18825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18826 $as_echo_n "checking for $ac_word... " >&6; }
18827 if ${ac_cv_path_DSYMUTIL+:} false; then :
18828   $as_echo_n "(cached) " >&6
18829 else
18830   case $DSYMUTIL in
18831   [\\/]* | ?:[\\/]*)
18832   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18833   ;;
18834   *)
18835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18836 for as_dir in $PATH
18837 do
18838   IFS=$as_save_IFS
18839   test -z "$as_dir" && as_dir=.
18840     for ac_exec_ext in '' $ac_executable_extensions; do
18841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18842     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18844     break 2
18845   fi
18846 done
18847   done
18848 IFS=$as_save_IFS
18849 
18850   ;;
18851 esac
18852 fi
18853 DSYMUTIL=$ac_cv_path_DSYMUTIL
18854 if test -n "$DSYMUTIL"; then
18855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18856 $as_echo "$DSYMUTIL" >&6; }
18857 else
18858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18859 $as_echo "no" >&6; }
18860 fi
18861 
18862 
18863   test -n "$DSYMUTIL" && break
18864 done
18865 
18866   else
18867     # The variable is set, but is it from the command line or the environment?
18868 
18869     # Try to remove the string !DSYMUTIL! from our list.
18870     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18871     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18872       # If it failed, the variable was not from the command line. Ignore it,
18873       # but warn the user (except for BASH, which is always set by the calling BASH).
18874       if test "xDSYMUTIL" != xBASH; then
18875         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18876 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18877       fi
18878       # Try to locate tool using the code snippet
18879       for ac_prog in dsymutil
18880 do
18881   # Extract the first word of "$ac_prog", so it can be a program name with args.
18882 set dummy $ac_prog; ac_word=$2
18883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18884 $as_echo_n "checking for $ac_word... " >&6; }
18885 if ${ac_cv_path_DSYMUTIL+:} false; then :
18886   $as_echo_n "(cached) " >&6
18887 else
18888   case $DSYMUTIL in
18889   [\\/]* | ?:[\\/]*)
18890   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18891   ;;
18892   *)
18893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18894 for as_dir in $PATH
18895 do
18896   IFS=$as_save_IFS
18897   test -z "$as_dir" && as_dir=.
18898     for ac_exec_ext in '' $ac_executable_extensions; do
18899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18900     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18902     break 2
18903   fi
18904 done
18905   done
18906 IFS=$as_save_IFS
18907 
18908   ;;
18909 esac
18910 fi
18911 DSYMUTIL=$ac_cv_path_DSYMUTIL
18912 if test -n "$DSYMUTIL"; then
18913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18914 $as_echo "$DSYMUTIL" >&6; }
18915 else
18916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18917 $as_echo "no" >&6; }
18918 fi
18919 
18920 
18921   test -n "$DSYMUTIL" && break
18922 done
18923 
18924     else
18925       # If it succeeded, then it was overridden by the user. We will use it
18926       # for the tool.
18927 
18928       # First remove it from the list of overridden variables, so we can test
18929       # for unknown variables in the end.
18930       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18931 
18932       # Check if the provided tool contains a complete path.
18933       tool_specified="$DSYMUTIL"
18934       tool_basename="${tool_specified##*/}"
18935       if test "x$tool_basename" = "x$tool_specified"; then
18936         # A command without a complete path is provided, search $PATH.
18937         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18938 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18939         # Extract the first word of "$tool_basename", so it can be a program name with args.
18940 set dummy $tool_basename; ac_word=$2
18941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18942 $as_echo_n "checking for $ac_word... " >&6; }
18943 if ${ac_cv_path_DSYMUTIL+:} false; then :
18944   $as_echo_n "(cached) " >&6
18945 else
18946   case $DSYMUTIL in
18947   [\\/]* | ?:[\\/]*)
18948   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18949   ;;
18950   *)
18951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18952 for as_dir in $PATH
18953 do
18954   IFS=$as_save_IFS
18955   test -z "$as_dir" && as_dir=.
18956     for ac_exec_ext in '' $ac_executable_extensions; do
18957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18958     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18960     break 2
18961   fi
18962 done
18963   done
18964 IFS=$as_save_IFS
18965 
18966   ;;
18967 esac
18968 fi
18969 DSYMUTIL=$ac_cv_path_DSYMUTIL
18970 if test -n "$DSYMUTIL"; then
18971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18972 $as_echo "$DSYMUTIL" >&6; }
18973 else
18974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18975 $as_echo "no" >&6; }
18976 fi
18977 
18978 
18979         if test "x$DSYMUTIL" = x; then
18980           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18981         fi
18982       else
18983         # Otherwise we believe it is a complete path. Use it as it is.
18984         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18985 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18987 $as_echo_n "checking for DSYMUTIL... " >&6; }
18988         if test ! -x "$tool_specified"; then
18989           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18990 $as_echo "not found" >&6; }
18991           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18992         fi
18993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18994 $as_echo "$tool_specified" >&6; }
18995       fi
18996     fi
18997   fi
18998 
18999 
19000 
19001   if test "x$DSYMUTIL" = x; then
19002     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19003   fi
19004 
19005 
19006 
19007 
19008 
19009   # Publish this variable in the help.
19010 
19011 
19012   if test "x$XATTR" = x; then
19013     # The variable is not set by user, try to locate tool using the code snippet
19014     for ac_prog in xattr
19015 do
19016   # Extract the first word of "$ac_prog", so it can be a program name with args.
19017 set dummy $ac_prog; ac_word=$2
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19019 $as_echo_n "checking for $ac_word... " >&6; }
19020 if ${ac_cv_path_XATTR+:} false; then :
19021   $as_echo_n "(cached) " >&6
19022 else
19023   case $XATTR in
19024   [\\/]* | ?:[\\/]*)
19025   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19026   ;;
19027   *)
19028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19029 for as_dir in $PATH
19030 do
19031   IFS=$as_save_IFS
19032   test -z "$as_dir" && as_dir=.
19033     for ac_exec_ext in '' $ac_executable_extensions; do
19034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19035     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19037     break 2
19038   fi
19039 done
19040   done
19041 IFS=$as_save_IFS
19042 
19043   ;;
19044 esac
19045 fi
19046 XATTR=$ac_cv_path_XATTR
19047 if test -n "$XATTR"; then
19048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19049 $as_echo "$XATTR" >&6; }
19050 else
19051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19052 $as_echo "no" >&6; }
19053 fi
19054 
19055 
19056   test -n "$XATTR" && break
19057 done
19058 
19059   else
19060     # The variable is set, but is it from the command line or the environment?
19061 
19062     # Try to remove the string !XATTR! from our list.
19063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19065       # If it failed, the variable was not from the command line. Ignore it,
19066       # but warn the user (except for BASH, which is always set by the calling BASH).
19067       if test "xXATTR" != xBASH; then
19068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19069 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19070       fi
19071       # Try to locate tool using the code snippet
19072       for ac_prog in xattr
19073 do
19074   # Extract the first word of "$ac_prog", so it can be a program name with args.
19075 set dummy $ac_prog; ac_word=$2
19076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19077 $as_echo_n "checking for $ac_word... " >&6; }
19078 if ${ac_cv_path_XATTR+:} false; then :
19079   $as_echo_n "(cached) " >&6
19080 else
19081   case $XATTR in
19082   [\\/]* | ?:[\\/]*)
19083   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19084   ;;
19085   *)
19086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19087 for as_dir in $PATH
19088 do
19089   IFS=$as_save_IFS
19090   test -z "$as_dir" && as_dir=.
19091     for ac_exec_ext in '' $ac_executable_extensions; do
19092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19093     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19095     break 2
19096   fi
19097 done
19098   done
19099 IFS=$as_save_IFS
19100 
19101   ;;
19102 esac
19103 fi
19104 XATTR=$ac_cv_path_XATTR
19105 if test -n "$XATTR"; then
19106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19107 $as_echo "$XATTR" >&6; }
19108 else
19109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19110 $as_echo "no" >&6; }
19111 fi
19112 
19113 
19114   test -n "$XATTR" && break
19115 done
19116 
19117     else
19118       # If it succeeded, then it was overridden by the user. We will use it
19119       # for the tool.
19120 
19121       # First remove it from the list of overridden variables, so we can test
19122       # for unknown variables in the end.
19123       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19124 
19125       # Check if the provided tool contains a complete path.
19126       tool_specified="$XATTR"
19127       tool_basename="${tool_specified##*/}"
19128       if test "x$tool_basename" = "x$tool_specified"; then
19129         # A command without a complete path is provided, search $PATH.
19130         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19131 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19132         # Extract the first word of "$tool_basename", so it can be a program name with args.
19133 set dummy $tool_basename; ac_word=$2
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19135 $as_echo_n "checking for $ac_word... " >&6; }
19136 if ${ac_cv_path_XATTR+:} false; then :
19137   $as_echo_n "(cached) " >&6
19138 else
19139   case $XATTR in
19140   [\\/]* | ?:[\\/]*)
19141   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19142   ;;
19143   *)
19144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19145 for as_dir in $PATH
19146 do
19147   IFS=$as_save_IFS
19148   test -z "$as_dir" && as_dir=.
19149     for ac_exec_ext in '' $ac_executable_extensions; do
19150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19151     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19153     break 2
19154   fi
19155 done
19156   done
19157 IFS=$as_save_IFS
19158 
19159   ;;
19160 esac
19161 fi
19162 XATTR=$ac_cv_path_XATTR
19163 if test -n "$XATTR"; then
19164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19165 $as_echo "$XATTR" >&6; }
19166 else
19167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19168 $as_echo "no" >&6; }
19169 fi
19170 
19171 
19172         if test "x$XATTR" = x; then
19173           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19174         fi
19175       else
19176         # Otherwise we believe it is a complete path. Use it as it is.
19177         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19178 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19179         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19180 $as_echo_n "checking for XATTR... " >&6; }
19181         if test ! -x "$tool_specified"; then
19182           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19183 $as_echo "not found" >&6; }
19184           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19185         fi
19186         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19187 $as_echo "$tool_specified" >&6; }
19188       fi
19189     fi
19190   fi
19191 
19192 
19193 
19194   if test "x$XATTR" = x; then
19195     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19196   fi
19197 
19198 
19199 
19200 
19201   # Publish this variable in the help.
19202 
19203 
19204   if test "x$CODESIGN" = x; then
19205     # The variable is not set by user, try to locate tool using the code snippet
19206     for ac_prog in codesign
19207 do
19208   # Extract the first word of "$ac_prog", so it can be a program name with args.
19209 set dummy $ac_prog; ac_word=$2
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19211 $as_echo_n "checking for $ac_word... " >&6; }
19212 if ${ac_cv_path_CODESIGN+:} false; then :
19213   $as_echo_n "(cached) " >&6
19214 else
19215   case $CODESIGN in
19216   [\\/]* | ?:[\\/]*)
19217   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19218   ;;
19219   *)
19220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19221 for as_dir in $PATH
19222 do
19223   IFS=$as_save_IFS
19224   test -z "$as_dir" && as_dir=.
19225     for ac_exec_ext in '' $ac_executable_extensions; do
19226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19227     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19229     break 2
19230   fi
19231 done
19232   done
19233 IFS=$as_save_IFS
19234 
19235   ;;
19236 esac
19237 fi
19238 CODESIGN=$ac_cv_path_CODESIGN
19239 if test -n "$CODESIGN"; then
19240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19241 $as_echo "$CODESIGN" >&6; }
19242 else
19243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19244 $as_echo "no" >&6; }
19245 fi
19246 
19247 
19248   test -n "$CODESIGN" && break
19249 done
19250 
19251   else
19252     # The variable is set, but is it from the command line or the environment?
19253 
19254     # Try to remove the string !CODESIGN! from our list.
19255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19257       # If it failed, the variable was not from the command line. Ignore it,
19258       # but warn the user (except for BASH, which is always set by the calling BASH).
19259       if test "xCODESIGN" != xBASH; then
19260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19261 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19262       fi
19263       # Try to locate tool using the code snippet
19264       for ac_prog in codesign
19265 do
19266   # Extract the first word of "$ac_prog", so it can be a program name with args.
19267 set dummy $ac_prog; ac_word=$2
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19269 $as_echo_n "checking for $ac_word... " >&6; }
19270 if ${ac_cv_path_CODESIGN+:} false; then :
19271   $as_echo_n "(cached) " >&6
19272 else
19273   case $CODESIGN in
19274   [\\/]* | ?:[\\/]*)
19275   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19276   ;;
19277   *)
19278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19279 for as_dir in $PATH
19280 do
19281   IFS=$as_save_IFS
19282   test -z "$as_dir" && as_dir=.
19283     for ac_exec_ext in '' $ac_executable_extensions; do
19284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19285     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19287     break 2
19288   fi
19289 done
19290   done
19291 IFS=$as_save_IFS
19292 
19293   ;;
19294 esac
19295 fi
19296 CODESIGN=$ac_cv_path_CODESIGN
19297 if test -n "$CODESIGN"; then
19298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19299 $as_echo "$CODESIGN" >&6; }
19300 else
19301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19302 $as_echo "no" >&6; }
19303 fi
19304 
19305 
19306   test -n "$CODESIGN" && break
19307 done
19308 
19309     else
19310       # If it succeeded, then it was overridden by the user. We will use it
19311       # for the tool.
19312 
19313       # First remove it from the list of overridden variables, so we can test
19314       # for unknown variables in the end.
19315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19316 
19317       # Check if the provided tool contains a complete path.
19318       tool_specified="$CODESIGN"
19319       tool_basename="${tool_specified##*/}"
19320       if test "x$tool_basename" = "x$tool_specified"; then
19321         # A command without a complete path is provided, search $PATH.
19322         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19323 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19324         # Extract the first word of "$tool_basename", so it can be a program name with args.
19325 set dummy $tool_basename; ac_word=$2
19326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19327 $as_echo_n "checking for $ac_word... " >&6; }
19328 if ${ac_cv_path_CODESIGN+:} false; then :
19329   $as_echo_n "(cached) " >&6
19330 else
19331   case $CODESIGN in
19332   [\\/]* | ?:[\\/]*)
19333   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19334   ;;
19335   *)
19336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19337 for as_dir in $PATH
19338 do
19339   IFS=$as_save_IFS
19340   test -z "$as_dir" && as_dir=.
19341     for ac_exec_ext in '' $ac_executable_extensions; do
19342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19343     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19345     break 2
19346   fi
19347 done
19348   done
19349 IFS=$as_save_IFS
19350 
19351   ;;
19352 esac
19353 fi
19354 CODESIGN=$ac_cv_path_CODESIGN
19355 if test -n "$CODESIGN"; then
19356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19357 $as_echo "$CODESIGN" >&6; }
19358 else
19359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19360 $as_echo "no" >&6; }
19361 fi
19362 
19363 
19364         if test "x$CODESIGN" = x; then
19365           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19366         fi
19367       else
19368         # Otherwise we believe it is a complete path. Use it as it is.
19369         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19370 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19372 $as_echo_n "checking for CODESIGN... " >&6; }
19373         if test ! -x "$tool_specified"; then
19374           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19375 $as_echo "not found" >&6; }
19376           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19377         fi
19378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19379 $as_echo "$tool_specified" >&6; }
19380       fi
19381     fi
19382   fi
19383 
19384 
19385     if test "x$CODESIGN" != "x"; then
19386       # Verify that the openjdk_codesign certificate is present
19387       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19388 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19389       rm -f codesign-testfile
19390       touch codesign-testfile
19391       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19392       rm -f codesign-testfile
19393       if test "x$CODESIGN" = x; then
19394         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19395 $as_echo "no" >&6; }
19396       else
19397         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19398 $as_echo "yes" >&6; }
19399       fi
19400     fi
19401   fi
19402 
19403 
19404 # Check if pkg-config is available.
19405 
19406 
19407 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19408         if test -n "$ac_tool_prefix"; then
19409   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19410 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19412 $as_echo_n "checking for $ac_word... " >&6; }
19413 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19414   $as_echo_n "(cached) " >&6
19415 else
19416   case $PKG_CONFIG in
19417   [\\/]* | ?:[\\/]*)
19418   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19419   ;;
19420   *)
19421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19422 for as_dir in $PATH
19423 do
19424   IFS=$as_save_IFS
19425   test -z "$as_dir" && as_dir=.
19426     for ac_exec_ext in '' $ac_executable_extensions; do
19427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19428     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19430     break 2
19431   fi
19432 done
19433   done
19434 IFS=$as_save_IFS
19435 
19436   ;;
19437 esac
19438 fi
19439 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19440 if test -n "$PKG_CONFIG"; then
19441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19442 $as_echo "$PKG_CONFIG" >&6; }
19443 else
19444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19445 $as_echo "no" >&6; }
19446 fi
19447 
19448 
19449 fi
19450 if test -z "$ac_cv_path_PKG_CONFIG"; then
19451   ac_pt_PKG_CONFIG=$PKG_CONFIG
19452   # Extract the first word of "pkg-config", so it can be a program name with args.
19453 set dummy pkg-config; ac_word=$2
19454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19455 $as_echo_n "checking for $ac_word... " >&6; }
19456 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19457   $as_echo_n "(cached) " >&6
19458 else
19459   case $ac_pt_PKG_CONFIG in
19460   [\\/]* | ?:[\\/]*)
19461   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19462   ;;
19463   *)
19464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19465 for as_dir in $PATH
19466 do
19467   IFS=$as_save_IFS
19468   test -z "$as_dir" && as_dir=.
19469     for ac_exec_ext in '' $ac_executable_extensions; do
19470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19471     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19473     break 2
19474   fi
19475 done
19476   done
19477 IFS=$as_save_IFS
19478 
19479   ;;
19480 esac
19481 fi
19482 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19483 if test -n "$ac_pt_PKG_CONFIG"; then
19484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19485 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19486 else
19487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19488 $as_echo "no" >&6; }
19489 fi
19490 
19491   if test "x$ac_pt_PKG_CONFIG" = x; then
19492     PKG_CONFIG=""
19493   else
19494     case $cross_compiling:$ac_tool_warned in
19495 yes:)
19496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19497 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19498 ac_tool_warned=yes ;;
19499 esac
19500     PKG_CONFIG=$ac_pt_PKG_CONFIG
19501   fi
19502 else
19503   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19504 fi
19505 
19506 fi
19507 if test -n "$PKG_CONFIG"; then
19508         _pkg_min_version=0.9.0
19509         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19510 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19511         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19512                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19513 $as_echo "yes" >&6; }
19514         else
19515                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19516 $as_echo "no" >&6; }
19517                 PKG_CONFIG=""
19518         fi
19519 
19520 fi
19521 
19522 # After basic tools have been setup, we can check build os specific details.
19523 
19524   ###############################################################################
19525 
19526   # Note that this is the build platform OS version!
19527 
19528   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19529   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19530   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19531   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19532 
19533 
19534 
19535 
19536 
19537 # Setup builddeps, for automatic downloading of tools we need.
19538 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19539 # boot-jdk setup, but we need to have basic tools setup first.
19540 
19541 
19542 # Check whether --with-builddeps-conf was given.
19543 if test "${with_builddeps_conf+set}" = set; then :
19544   withval=$with_builddeps_conf;
19545 fi
19546 
19547 
19548 
19549 # Check whether --with-builddeps-server was given.
19550 if test "${with_builddeps_server+set}" = set; then :
19551   withval=$with_builddeps_server;
19552 fi
19553 
19554 
19555 
19556 # Check whether --with-builddeps-dir was given.
19557 if test "${with_builddeps_dir+set}" = set; then :
19558   withval=$with_builddeps_dir;
19559 else
19560   with_builddeps_dir=/localhome/builddeps
19561 fi
19562 
19563 
19564 
19565 # Check whether --with-builddeps-group was given.
19566 if test "${with_builddeps_group+set}" = set; then :
19567   withval=$with_builddeps_group;
19568 fi
19569 
19570 
19571 
19572 
19573   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19574     if test "x$with_builddeps_conf" != x; then
19575       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19576 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19577       builddepsfile=$with_builddeps_conf
19578       if test -s $builddepsfile; then
19579         . $builddepsfile
19580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19581 $as_echo "loaded!" >&6; }
19582       else
19583         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19584       fi
19585     else
19586       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19587 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19588       builddepsfile=`mktemp`
19589       touch $builddepsfile
19590       # Put all found confs into a single file.
19591       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19592       # Source the file to acquire the variables
19593       if test -s $builddepsfile; then
19594         . $builddepsfile
19595         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19596 $as_echo "found at least one!" >&6; }
19597       else
19598         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19599       fi
19600     fi
19601     # Create build and target names that use _ instead of "-" and ".".
19602     # This is necessary to use them in variable names.
19603     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19604     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19605     # Extract rewrite information for build and target
19606     eval rewritten_build=\${REWRITE_${build_var}}
19607     if test "x$rewritten_build" = x; then
19608       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19609       echo Build stays the same $rewritten_build
19610     else
19611       echo Rewriting build for builddeps into $rewritten_build
19612     fi
19613     eval rewritten_target=\${REWRITE_${target_var}}
19614     if test "x$rewritten_target" = x; then
19615       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19616       echo Target stays the same $rewritten_target
19617     else
19618       echo Rewriting target for builddeps into $rewritten_target
19619     fi
19620     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19621     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19622   fi
19623   for ac_prog in 7z unzip
19624 do
19625   # Extract the first word of "$ac_prog", so it can be a program name with args.
19626 set dummy $ac_prog; ac_word=$2
19627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19628 $as_echo_n "checking for $ac_word... " >&6; }
19629 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19630   $as_echo_n "(cached) " >&6
19631 else
19632   if test -n "$BDEPS_UNZIP"; then
19633   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19634 else
19635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19636 for as_dir in $PATH
19637 do
19638   IFS=$as_save_IFS
19639   test -z "$as_dir" && as_dir=.
19640     for ac_exec_ext in '' $ac_executable_extensions; do
19641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19642     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19644     break 2
19645   fi
19646 done
19647   done
19648 IFS=$as_save_IFS
19649 
19650 fi
19651 fi
19652 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19653 if test -n "$BDEPS_UNZIP"; then
19654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19655 $as_echo "$BDEPS_UNZIP" >&6; }
19656 else
19657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19658 $as_echo "no" >&6; }
19659 fi
19660 
19661 
19662   test -n "$BDEPS_UNZIP" && break
19663 done
19664 
19665   if test "x$BDEPS_UNZIP" = x7z; then
19666     BDEPS_UNZIP="7z x"
19667   fi
19668 
19669   for ac_prog in wget lftp ftp
19670 do
19671   # Extract the first word of "$ac_prog", so it can be a program name with args.
19672 set dummy $ac_prog; ac_word=$2
19673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19674 $as_echo_n "checking for $ac_word... " >&6; }
19675 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19676   $as_echo_n "(cached) " >&6
19677 else
19678   if test -n "$BDEPS_FTP"; then
19679   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19680 else
19681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19682 for as_dir in $PATH
19683 do
19684   IFS=$as_save_IFS
19685   test -z "$as_dir" && as_dir=.
19686     for ac_exec_ext in '' $ac_executable_extensions; do
19687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19688     ac_cv_prog_BDEPS_FTP="$ac_prog"
19689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19690     break 2
19691   fi
19692 done
19693   done
19694 IFS=$as_save_IFS
19695 
19696 fi
19697 fi
19698 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19699 if test -n "$BDEPS_FTP"; then
19700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19701 $as_echo "$BDEPS_FTP" >&6; }
19702 else
19703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19704 $as_echo "no" >&6; }
19705 fi
19706 
19707 
19708   test -n "$BDEPS_FTP" && break
19709 done
19710 
19711 
19712 
19713 ###############################################################################
19714 #
19715 # Determine OpenJDK variants, options and version numbers.
19716 #
19717 ###############################################################################
19718 
19719 # We need build & target for this.
19720 
19721 
19722   ###############################################################################
19723   #
19724   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19725   # We always build headless support.
19726   #
19727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19728 $as_echo_n "checking headful support... " >&6; }
19729   # Check whether --enable-headful was given.
19730 if test "${enable_headful+set}" = set; then :
19731   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19732 else
19733   SUPPORT_HEADFUL=yes
19734 fi
19735 
19736 
19737   SUPPORT_HEADLESS=yes
19738   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19739 
19740   if test "x$SUPPORT_HEADFUL" = xyes; then
19741     # We are building both headful and headless.
19742     headful_msg="include support for both headful and headless"
19743   fi
19744 
19745   if test "x$SUPPORT_HEADFUL" = xno; then
19746     # Thus we are building headless only.
19747     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19748     headful_msg="headless only"
19749   fi
19750 
19751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19752 $as_echo "$headful_msg" >&6; }
19753 
19754 
19755 
19756 
19757 
19758   # Control wether Hotspot runs Queens test after build.
19759   # Check whether --enable-hotspot-test-in-build was given.
19760 if test "${enable_hotspot_test_in_build+set}" = set; then :
19761   enableval=$enable_hotspot_test_in_build;
19762 else
19763   enable_hotspot_test_in_build=no
19764 fi
19765 
19766   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19767     TEST_IN_BUILD=true
19768   else
19769     TEST_IN_BUILD=false
19770   fi
19771 
19772 
19773   ###############################################################################
19774   #
19775   # Choose cacerts source file
19776   #
19777 
19778 # Check whether --with-cacerts-file was given.
19779 if test "${with_cacerts_file+set}" = set; then :
19780   withval=$with_cacerts_file;
19781 fi
19782 
19783   if test "x$with_cacerts_file" != x; then
19784     CACERTS_FILE=$with_cacerts_file
19785   fi
19786 
19787 
19788   ###############################################################################
19789   #
19790   # Enable or disable unlimited crypto
19791   #
19792   # Check whether --enable-unlimited-crypto was given.
19793 if test "${enable_unlimited_crypto+set}" = set; then :
19794   enableval=$enable_unlimited_crypto;
19795 else
19796   enable_unlimited_crypto=no
19797 fi
19798 
19799   if test "x$enable_unlimited_crypto" = "xyes"; then
19800     UNLIMITED_CRYPTO=true
19801   else
19802     UNLIMITED_CRYPTO=false
19803   fi
19804 
19805 
19806   ###############################################################################
19807   #
19808   # Enable or disable the elliptic curve crypto implementation
19809   #
19810 
19811 
19812   ###############################################################################
19813   #
19814   # Compress jars
19815   #
19816   COMPRESS_JARS=false
19817 
19818 
19819 
19820   ###############################################################################
19821   #
19822   # Enable or disable JFR
19823   #
19824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build JFR" >&5
19825 $as_echo_n "checking whether to build JFR... " >&6; }
19826   # Check whether --enable-jfr was given.
19827 if test "${enable_jfr+set}" = set; then :
19828   enableval=$enable_jfr;
19829 else
19830   enable_jfr=auto
19831 fi
19832 
19833   if test "x$enable_jfr" = "xno"; then
19834     ENABLE_JFR=false
19835   elif test "x$enable_jfr" = "xyes" -o "x$enable_jfr" = "xauto"; then
19836     if test "x$JVM_VARIANT_MINIMAL1" = "xtrue" -o "x$JVM_VARIANT_ZERO" = "xtrue"; then
19837       if test "x$enable_jfr" = "xyes"; then
19838         as_fn_error $? "cannot enable JFR on minimal1 VM or zero build" "$LINENO" 5
19839       else
19840         ENABLE_JFR=false
19841       fi
19842     elif test "x$OPENJDK_TARGET_OS" = xaix; then
19843       if test "x$enable_jfr" = "xyes"; then
19844         as_fn_error $? "AIX does not support JFR" "$LINENO" 5
19845       else
19846         ENABLE_JFR=false
19847       fi
19848     else
19849       ENABLE_JFR=true
19850     fi
19851   else
19852     as_fn_error $? "--enable-jfr must be set to either yes or no" "$LINENO" 5
19853   fi
19854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JFR" >&5
19855 $as_echo "$ENABLE_JFR" >&6; }
19856 
19857 
19858 
19859   # Source the version numbers
19860   . $AUTOCONF_DIR/version-numbers
19861 
19862   # Get the settings from parameters
19863 
19864 # Check whether --with-milestone was given.
19865 if test "${with_milestone+set}" = set; then :
19866   withval=$with_milestone;
19867 fi
19868 
19869   if test "x$with_milestone" = xyes; then
19870     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19871   elif test "x$with_milestone" != x; then
19872     MILESTONE="$with_milestone"
19873   fi
19874   if test "x$MILESTONE" = x; then
19875     MILESTONE=internal
19876   fi
19877 
19878 
19879 # Check whether --with-update-version was given.
19880 if test "${with_update_version+set}" = set; then :
19881   withval=$with_update_version;
19882 fi
19883 
19884   if test "x$with_update_version" = xyes; then
19885     as_fn_error $? "Update version must have a value" "$LINENO" 5
19886   elif test "x$with_update_version" != x; then
19887     JDK_UPDATE_VERSION="$with_update_version"
19888     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19889     # to a bug in expr (which reduces it to just X). To work around this, we
19890     # always add a 0 to one digit update versions.
19891     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19892       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19893     fi
19894   fi
19895 
19896 
19897 # Check whether --with-user-release-suffix was given.
19898 if test "${with_user_release_suffix+set}" = set; then :
19899   withval=$with_user_release_suffix;
19900 fi
19901 
19902   if test "x$with_user_release_suffix" = xyes; then
19903     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19904   elif test "x$with_user_release_suffix" != x; then
19905     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19906   fi
19907 
19908 
19909 # Check whether --with-build-number was given.
19910 if test "${with_build_number+set}" = set; then :
19911   withval=$with_build_number;
19912 fi
19913 
19914   if test "x$with_build_number" = xyes; then
19915     as_fn_error $? "Build number must have a value" "$LINENO" 5
19916   elif test "x$with_build_number" != x; then
19917     JDK_BUILD_NUMBER="$with_build_number"
19918   fi
19919   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19920   if test "x$JDK_BUILD_NUMBER" = x; then
19921     JDK_BUILD_NUMBER=b00
19922     if test "x$USER_RELEASE_SUFFIX" = x; then
19923       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19924       # Avoid [:alnum:] since it depends on the locale.
19925       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19926       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19927     fi
19928   fi
19929 
19930   # Now set the JDK version, milestone, build number etc.
19931 
19932 
19933 
19934 
19935 
19936 
19937 
19938 
19939 
19940 
19941 
19942 
19943 
19944 
19945   # The vendor name, if any
19946 
19947 # Check whether --with-vendor-name was given.
19948 if test "${with_vendor_name+set}" = set; then :
19949   withval=$with_vendor_name;
19950 fi
19951 
19952   if test "x$with_vendor_name" = xyes; then
19953     as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
19954   elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
19955     as_fn_error $? "--with-vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
19956   elif test "x$with_vendor_name" != x; then
19957     # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
19958     # Otherwise we will use the value from "version-numbers" included above.
19959     COMPANY_NAME="$with_vendor_name"
19960   fi
19961 
19962 
19963   # The vendor URL, if any
19964 
19965 # Check whether --with-vendor-url was given.
19966 if test "${with_vendor_url+set}" = set; then :
19967   withval=$with_vendor_url;
19968 fi
19969 
19970   if test "x$with_vendor_url" = xyes; then
19971     as_fn_error $? "--with-vendor-url must have a value" "$LINENO" 5
19972   elif  ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ; then
19973     as_fn_error $? "--with-vendor-url contains non-printing characters: $with_vendor_url" "$LINENO" 5
19974   else
19975     VENDOR_URL="$with_vendor_url"
19976   fi
19977 
19978 
19979   # The vendor bug URL, if any
19980 
19981 # Check whether --with-vendor-bug-url was given.
19982 if test "${with_vendor_bug_url+set}" = set; then :
19983   withval=$with_vendor_bug_url;
19984 fi
19985 
19986   if test "x$with_vendor_bug_url" = xyes; then
19987     as_fn_error $? "--with-vendor-bug-url must have a value" "$LINENO" 5
19988   elif  ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ; then
19989     as_fn_error $? "--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url" "$LINENO" 5
19990   else
19991     VENDOR_URL_BUG="$with_vendor_bug_url"
19992   fi
19993 
19994 
19995   # The vendor VM bug URL, if any
19996 
19997 # Check whether --with-vendor-vm-bug-url was given.
19998 if test "${with_vendor_vm_bug_url+set}" = set; then :
19999   withval=$with_vendor_vm_bug_url;
20000 fi
20001 
20002   if test "x$with_vendor_vm_bug_url" = xyes; then
20003     as_fn_error $? "--with-vendor-vm-bug-url must have a value" "$LINENO" 5
20004   elif  ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ; then
20005     as_fn_error $? "--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url" "$LINENO" 5
20006   else
20007     VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
20008   fi
20009 
20010 
20011 
20012 # Check whether --with-copyright-year was given.
20013 if test "${with_copyright_year+set}" = set; then :
20014   withval=$with_copyright_year;
20015 fi
20016 
20017   if test "x$with_copyright_year" = xyes; then
20018     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20019   elif test "x$with_copyright_year" != x; then
20020     COPYRIGHT_YEAR="$with_copyright_year"
20021   else
20022     COPYRIGHT_YEAR=`date +'%Y'`
20023   fi
20024 
20025 
20026   if test "x$JDK_UPDATE_VERSION" != x; then
20027     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20028   else
20029     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20030   fi
20031 
20032 
20033   # The cooked update version used to encode trailing letters in the update
20034   # version into a trailing number. That is no longer needed, but need to
20035   # keep the format in 8u for compatibility.
20036   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
20037 
20038 
20039   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20040 
20041 
20042 
20043 ###############################################################################
20044 #
20045 # Setup BootJDK, used to bootstrap the build.
20046 #
20047 ###############################################################################
20048 
20049 
20050   BOOT_JDK_FOUND=no
20051 
20052 # Check whether --with-boot-jdk was given.
20053 if test "${with_boot_jdk+set}" = set; then :
20054   withval=$with_boot_jdk;
20055 fi
20056 
20057 
20058   # We look for the Boot JDK through various means, going from more certain to
20059   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20060   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20061   # must check if this is indeed valid; otherwise we'll continue looking.
20062 
20063   # Test: Is bootjdk explicitely set by command line arguments?
20064 
20065   if test "x$BOOT_JDK_FOUND" = xno; then
20066     # Now execute the test
20067 
20068   if test "x$with_boot_jdk" != x; then
20069     BOOT_JDK=$with_boot_jdk
20070     BOOT_JDK_FOUND=maybe
20071     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20072 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20073   fi
20074 
20075 
20076     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20077     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20078       # Do we have a bin/java?
20079       if test ! -x "$BOOT_JDK/bin/java"; then
20080         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20081 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20082         BOOT_JDK_FOUND=no
20083       else
20084         # Do we have a bin/javac?
20085         if test ! -x "$BOOT_JDK/bin/javac"; then
20086           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20088           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20089 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20090           BOOT_JDK_FOUND=no
20091         else
20092           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20093           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20094             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20095 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20096             BOOT_JDK_FOUND=no
20097           else
20098             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20099             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20100 
20101             # Extra M4 quote needed to protect [] in grep expression.
20102             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20103             if test "x$FOUND_VERSION_78" = x; then
20104               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20106               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20107 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20108               BOOT_JDK_FOUND=no
20109             else
20110               # We're done! :-)
20111               BOOT_JDK_FOUND=yes
20112 
20113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20114 
20115   # Input might be given as Windows format, start by converting to
20116   # unix format.
20117   path="$BOOT_JDK"
20118   new_path=`$CYGPATH -u "$path"`
20119 
20120   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20121   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20122   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20123   # "foo.exe" is OK but "foo" is an error.
20124   #
20125   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20126   # It is also a way to make sure we got the proper file name for the real test later on.
20127   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20128   if test "x$test_shortpath" = x; then
20129     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20130 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20131     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20132   fi
20133 
20134   # Call helper function which possibly converts this using DOS-style short mode.
20135   # If so, the updated path is stored in $new_path.
20136 
20137   input_path="$new_path"
20138   # Check if we need to convert this using DOS-style short mode. If the path
20139   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20140   # take no chances and rewrite it.
20141   # Note: m4 eats our [], so we need to use [ and ] instead.
20142   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20143   if test "x$has_forbidden_chars" != x; then
20144     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20145     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20146     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20147     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20148       # Going to short mode and back again did indeed matter. Since short mode is
20149       # case insensitive, let's make it lowercase to improve readability.
20150       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20151       # Now convert it back to Unix-style (cygpath)
20152       input_path=`$CYGPATH -u "$shortmode_path"`
20153       new_path="$input_path"
20154     fi
20155   fi
20156 
20157   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20158   if test "x$test_cygdrive_prefix" = x; then
20159     # As a simple fix, exclude /usr/bin since it's not a real path.
20160     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20161       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20162       # a path prefixed by /cygdrive for fixpath to work.
20163       new_path="$CYGWIN_ROOT_PATH$input_path"
20164     fi
20165   fi
20166 
20167 
20168   if test "x$path" != "x$new_path"; then
20169     BOOT_JDK="$new_path"
20170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20172   fi
20173 
20174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20175 
20176   path="$BOOT_JDK"
20177   has_colon=`$ECHO $path | $GREP ^.:`
20178   new_path="$path"
20179   if test "x$has_colon" = x; then
20180     # Not in mixed or Windows style, start by that.
20181     new_path=`cmd //c echo $path`
20182   fi
20183 
20184 
20185   input_path="$new_path"
20186   # Check if we need to convert this using DOS-style short mode. If the path
20187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20188   # take no chances and rewrite it.
20189   # Note: m4 eats our [], so we need to use [ and ] instead.
20190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20191   if test "x$has_forbidden_chars" != x; then
20192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20193     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20194   fi
20195 
20196 
20197   windows_path="$new_path"
20198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20199     unix_path=`$CYGPATH -u "$windows_path"`
20200     new_path="$unix_path"
20201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20203     new_path="$unix_path"
20204   fi
20205 
20206   if test "x$path" != "x$new_path"; then
20207     BOOT_JDK="$new_path"
20208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20209 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20210   fi
20211 
20212   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20213   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20214 
20215   else
20216     # We're on a posix platform. Hooray! :)
20217     path="$BOOT_JDK"
20218     has_space=`$ECHO "$path" | $GREP " "`
20219     if test "x$has_space" != x; then
20220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20221 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20222       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20223     fi
20224 
20225     # Use eval to expand a potential ~
20226     eval path="$path"
20227     if test ! -f "$path" && test ! -d "$path"; then
20228       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20229     fi
20230 
20231     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20232   fi
20233 
20234               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20235 $as_echo_n "checking for Boot JDK... " >&6; }
20236               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20237 $as_echo "$BOOT_JDK" >&6; }
20238               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20239 $as_echo_n "checking Boot JDK version... " >&6; }
20240               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20241               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20242 $as_echo "$BOOT_JDK_VERSION" >&6; }
20243             fi # end check jdk version
20244           fi # end check rt.jar
20245         fi # end check javac
20246       fi # end check java
20247     fi # end check boot jdk found
20248   fi
20249 
20250   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20251     # Having specified an argument which is incorrect will produce an instant failure;
20252     # we should not go on looking
20253     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20254   fi
20255 
20256   # Test: Is bootjdk available from builddeps?
20257 
20258   if test "x$BOOT_JDK_FOUND" = xno; then
20259     # Now execute the test
20260 
20261 
20262 
20263   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20264     # Source the builddeps file again, to make sure it uses the latest variables!
20265     . $builddepsfile
20266     # Look for a target and build machine specific resource!
20267     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20268     if test "x$resource" = x; then
20269       # Ok, lets instead look for a target specific resource
20270       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20271     fi
20272     if test "x$resource" = x; then
20273       # Ok, lets instead look for a build specific resource
20274       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20275     fi
20276     if test "x$resource" = x; then
20277       # Ok, lets instead look for a generic resource
20278       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20279       resource=${builddep_bootjdk}
20280     fi
20281     if test "x$resource" != x; then
20282       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20283 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20284       # If the resource in the builddeps.conf file is an existing directory,
20285       # for example /java/linux/cups
20286       if test -d ${resource}; then
20287         depdir=${resource}
20288       else
20289 
20290   # bootjdk is for example mymodule
20291   # $resource is for example libs/general/libmymod_1_2_3.zip
20292   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20293   # $with_builddeps_dir is for example /localhome/builddeps
20294   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20295   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20296   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20297   filename=`basename $resource`
20298   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20299   filebase=${filename%%.*}
20300   extension=${filename#*.}
20301   installdir=$with_builddeps_dir/$filebase
20302   if test ! -f $installdir/$filename.unpacked; then
20303     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20304 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20305     if test ! -d $installdir; then
20306       mkdir -p $installdir
20307     fi
20308     if test ! -d $installdir; then
20309       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20310     fi
20311     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20312     touch $tmpfile
20313     if test ! -f $tmpfile; then
20314       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20315     fi
20316 
20317   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20318   # $tmpfile is the local file name for the downloaded file.
20319   VALID_TOOL=no
20320   if test "x$BDEPS_FTP" = xwget; then
20321     VALID_TOOL=yes
20322     wget -O $tmpfile $with_builddeps_server/$resource
20323   fi
20324   if test "x$BDEPS_FTP" = xlftp; then
20325     VALID_TOOL=yes
20326     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20327   fi
20328   if test "x$BDEPS_FTP" = xftp; then
20329     VALID_TOOL=yes
20330     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20331     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20332     FTPUSERPWD=${FTPSERVER%%@*}
20333     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20334       FTPUSER=${userpwd%%:*}
20335       FTPPWD=${userpwd#*@}
20336       FTPSERVER=${FTPSERVER#*@}
20337     else
20338       FTPUSER=ftp
20339       FTPPWD=ftp
20340     fi
20341     # the "pass" command does not work on some
20342     # ftp clients (read ftp.exe) but if it works,
20343     # passive mode is better!
20344     ( \
20345         echo "user $FTPUSER $FTPPWD"        ; \
20346         echo "pass"                         ; \
20347         echo "bin"                          ; \
20348         echo "get $FTPPATH $tmpfile"              ; \
20349     ) | ftp -in $FTPSERVER
20350   fi
20351   if test "x$VALID_TOOL" != xyes; then
20352     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20353   fi
20354 
20355     mv $tmpfile $installdir/$filename
20356     if test ! -s $installdir/$filename; then
20357       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20358     fi
20359     case "$extension" in
20360       zip)  echo "Unzipping $installdir/$filename..."
20361         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20362         ;;
20363       tar.gz) echo "Untaring $installdir/$filename..."
20364         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20365         ;;
20366       tgz) echo "Untaring $installdir/$filename..."
20367         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20368         ;;
20369       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20370         ;;
20371     esac
20372   fi
20373   if test -f $installdir/$filename.unpacked; then
20374     depdir=$installdir
20375   fi
20376 
20377       fi
20378       # Source the builddeps file again, because in the previous command, the depdir
20379       # was updated to point at the current build dependency install directory.
20380       . $builddepsfile
20381       # Now extract variables from the builddeps.conf files.
20382       theroot=${builddep_bootjdk_ROOT}
20383       thecflags=${builddep_bootjdk_CFLAGS}
20384       thelibs=${builddep_bootjdk_LIBS}
20385       if test "x$depdir" = x; then
20386         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20387       fi
20388       BOOT_JDK=$depdir
20389       if test "x$theroot" != x; then
20390         BOOT_JDK="$theroot"
20391       fi
20392       if test "x$thecflags" != x; then
20393         BOOT_JDK_CFLAGS="$thecflags"
20394       fi
20395       if test "x$thelibs" != x; then
20396         BOOT_JDK_LIBS="$thelibs"
20397       fi
20398       BOOT_JDK_FOUND=maybe
20399       else BOOT_JDK_FOUND=no
20400 
20401     fi
20402     else BOOT_JDK_FOUND=no
20403 
20404   fi
20405 
20406 
20407 
20408     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20409     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20410       # Do we have a bin/java?
20411       if test ! -x "$BOOT_JDK/bin/java"; then
20412         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20413 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20414         BOOT_JDK_FOUND=no
20415       else
20416         # Do we have a bin/javac?
20417         if test ! -x "$BOOT_JDK/bin/javac"; then
20418           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20420           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20421 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20422           BOOT_JDK_FOUND=no
20423         else
20424           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20425           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20426             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20427 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20428             BOOT_JDK_FOUND=no
20429           else
20430             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20431             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20432 
20433             # Extra M4 quote needed to protect [] in grep expression.
20434             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20435             if test "x$FOUND_VERSION_78" = x; then
20436               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20438               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20439 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20440               BOOT_JDK_FOUND=no
20441             else
20442               # We're done! :-)
20443               BOOT_JDK_FOUND=yes
20444 
20445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20446 
20447   # Input might be given as Windows format, start by converting to
20448   # unix format.
20449   path="$BOOT_JDK"
20450   new_path=`$CYGPATH -u "$path"`
20451 
20452   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20453   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20454   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20455   # "foo.exe" is OK but "foo" is an error.
20456   #
20457   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20458   # It is also a way to make sure we got the proper file name for the real test later on.
20459   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20460   if test "x$test_shortpath" = x; then
20461     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20462 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20463     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20464   fi
20465 
20466   # Call helper function which possibly converts this using DOS-style short mode.
20467   # If so, the updated path is stored in $new_path.
20468 
20469   input_path="$new_path"
20470   # Check if we need to convert this using DOS-style short mode. If the path
20471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20472   # take no chances and rewrite it.
20473   # Note: m4 eats our [], so we need to use [ and ] instead.
20474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20475   if test "x$has_forbidden_chars" != x; then
20476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20477     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20478     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20479     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20480       # Going to short mode and back again did indeed matter. Since short mode is
20481       # case insensitive, let's make it lowercase to improve readability.
20482       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20483       # Now convert it back to Unix-style (cygpath)
20484       input_path=`$CYGPATH -u "$shortmode_path"`
20485       new_path="$input_path"
20486     fi
20487   fi
20488 
20489   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20490   if test "x$test_cygdrive_prefix" = x; then
20491     # As a simple fix, exclude /usr/bin since it's not a real path.
20492     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20493       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20494       # a path prefixed by /cygdrive for fixpath to work.
20495       new_path="$CYGWIN_ROOT_PATH$input_path"
20496     fi
20497   fi
20498 
20499 
20500   if test "x$path" != "x$new_path"; then
20501     BOOT_JDK="$new_path"
20502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20503 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20504   fi
20505 
20506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20507 
20508   path="$BOOT_JDK"
20509   has_colon=`$ECHO $path | $GREP ^.:`
20510   new_path="$path"
20511   if test "x$has_colon" = x; then
20512     # Not in mixed or Windows style, start by that.
20513     new_path=`cmd //c echo $path`
20514   fi
20515 
20516 
20517   input_path="$new_path"
20518   # Check if we need to convert this using DOS-style short mode. If the path
20519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20520   # take no chances and rewrite it.
20521   # Note: m4 eats our [], so we need to use [ and ] instead.
20522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20523   if test "x$has_forbidden_chars" != x; then
20524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20525     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20526   fi
20527 
20528 
20529   windows_path="$new_path"
20530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20531     unix_path=`$CYGPATH -u "$windows_path"`
20532     new_path="$unix_path"
20533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20535     new_path="$unix_path"
20536   fi
20537 
20538   if test "x$path" != "x$new_path"; then
20539     BOOT_JDK="$new_path"
20540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20541 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20542   fi
20543 
20544   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20545   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20546 
20547   else
20548     # We're on a posix platform. Hooray! :)
20549     path="$BOOT_JDK"
20550     has_space=`$ECHO "$path" | $GREP " "`
20551     if test "x$has_space" != x; then
20552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20553 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20554       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20555     fi
20556 
20557     # Use eval to expand a potential ~
20558     eval path="$path"
20559     if test ! -f "$path" && test ! -d "$path"; then
20560       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20561     fi
20562 
20563     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20564   fi
20565 
20566               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20567 $as_echo_n "checking for Boot JDK... " >&6; }
20568               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20569 $as_echo "$BOOT_JDK" >&6; }
20570               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20571 $as_echo_n "checking Boot JDK version... " >&6; }
20572               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20573               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20574 $as_echo "$BOOT_JDK_VERSION" >&6; }
20575             fi # end check jdk version
20576           fi # end check rt.jar
20577         fi # end check javac
20578       fi # end check java
20579     fi # end check boot jdk found
20580   fi
20581 
20582 
20583   # Test: Is $JAVA_HOME set?
20584 
20585   if test "x$BOOT_JDK_FOUND" = xno; then
20586     # Now execute the test
20587 
20588   if test "x$JAVA_HOME" != x; then
20589     JAVA_HOME_PROCESSED="$JAVA_HOME"
20590 
20591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20592 
20593   # Input might be given as Windows format, start by converting to
20594   # unix format.
20595   path="$JAVA_HOME_PROCESSED"
20596   new_path=`$CYGPATH -u "$path"`
20597 
20598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20601   # "foo.exe" is OK but "foo" is an error.
20602   #
20603   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20604   # It is also a way to make sure we got the proper file name for the real test later on.
20605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20606   if test "x$test_shortpath" = x; then
20607     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20608 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20609     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20610   fi
20611 
20612   # Call helper function which possibly converts this using DOS-style short mode.
20613   # If so, the updated path is stored in $new_path.
20614 
20615   input_path="$new_path"
20616   # Check if we need to convert this using DOS-style short mode. If the path
20617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20618   # take no chances and rewrite it.
20619   # Note: m4 eats our [], so we need to use [ and ] instead.
20620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20621   if test "x$has_forbidden_chars" != x; then
20622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20623     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20624     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20625     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20626       # Going to short mode and back again did indeed matter. Since short mode is
20627       # case insensitive, let's make it lowercase to improve readability.
20628       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20629       # Now convert it back to Unix-style (cygpath)
20630       input_path=`$CYGPATH -u "$shortmode_path"`
20631       new_path="$input_path"
20632     fi
20633   fi
20634 
20635   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20636   if test "x$test_cygdrive_prefix" = x; then
20637     # As a simple fix, exclude /usr/bin since it's not a real path.
20638     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20639       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20640       # a path prefixed by /cygdrive for fixpath to work.
20641       new_path="$CYGWIN_ROOT_PATH$input_path"
20642     fi
20643   fi
20644 
20645 
20646   if test "x$path" != "x$new_path"; then
20647     JAVA_HOME_PROCESSED="$new_path"
20648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20649 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20650   fi
20651 
20652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20653 
20654   path="$JAVA_HOME_PROCESSED"
20655   has_colon=`$ECHO $path | $GREP ^.:`
20656   new_path="$path"
20657   if test "x$has_colon" = x; then
20658     # Not in mixed or Windows style, start by that.
20659     new_path=`cmd //c echo $path`
20660   fi
20661 
20662 
20663   input_path="$new_path"
20664   # Check if we need to convert this using DOS-style short mode. If the path
20665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20666   # take no chances and rewrite it.
20667   # Note: m4 eats our [], so we need to use [ and ] instead.
20668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20669   if test "x$has_forbidden_chars" != x; then
20670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20671     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20672   fi
20673 
20674 
20675   windows_path="$new_path"
20676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20677     unix_path=`$CYGPATH -u "$windows_path"`
20678     new_path="$unix_path"
20679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20681     new_path="$unix_path"
20682   fi
20683 
20684   if test "x$path" != "x$new_path"; then
20685     JAVA_HOME_PROCESSED="$new_path"
20686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20687 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20688   fi
20689 
20690   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20691   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20692 
20693   else
20694     # We're on a posix platform. Hooray! :)
20695     path="$JAVA_HOME_PROCESSED"
20696     has_space=`$ECHO "$path" | $GREP " "`
20697     if test "x$has_space" != x; then
20698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20699 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20700       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20701     fi
20702 
20703     # Use eval to expand a potential ~
20704     eval path="$path"
20705     if test ! -f "$path" && test ! -d "$path"; then
20706       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20707     fi
20708 
20709     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20710   fi
20711 
20712     if test ! -d "$JAVA_HOME_PROCESSED"; then
20713       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20714 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20715     else
20716       # Aha, the user has set a JAVA_HOME
20717       # let us use that as the Boot JDK.
20718       BOOT_JDK="$JAVA_HOME_PROCESSED"
20719       BOOT_JDK_FOUND=maybe
20720       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20721 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20722     fi
20723   fi
20724 
20725 
20726     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20727     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20728       # Do we have a bin/java?
20729       if test ! -x "$BOOT_JDK/bin/java"; then
20730         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20731 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20732         BOOT_JDK_FOUND=no
20733       else
20734         # Do we have a bin/javac?
20735         if test ! -x "$BOOT_JDK/bin/javac"; then
20736           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20738           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20739 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20740           BOOT_JDK_FOUND=no
20741         else
20742           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20743           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20744             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20745 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20746             BOOT_JDK_FOUND=no
20747           else
20748             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20749             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20750 
20751             # Extra M4 quote needed to protect [] in grep expression.
20752             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20753             if test "x$FOUND_VERSION_78" = x; then
20754               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20755 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20756               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20757 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20758               BOOT_JDK_FOUND=no
20759             else
20760               # We're done! :-)
20761               BOOT_JDK_FOUND=yes
20762 
20763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20764 
20765   # Input might be given as Windows format, start by converting to
20766   # unix format.
20767   path="$BOOT_JDK"
20768   new_path=`$CYGPATH -u "$path"`
20769 
20770   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20771   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20772   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20773   # "foo.exe" is OK but "foo" is an error.
20774   #
20775   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20776   # It is also a way to make sure we got the proper file name for the real test later on.
20777   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20778   if test "x$test_shortpath" = x; then
20779     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20780 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20781     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20782   fi
20783 
20784   # Call helper function which possibly converts this using DOS-style short mode.
20785   # If so, the updated path is stored in $new_path.
20786 
20787   input_path="$new_path"
20788   # Check if we need to convert this using DOS-style short mode. If the path
20789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20790   # take no chances and rewrite it.
20791   # Note: m4 eats our [], so we need to use [ and ] instead.
20792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20793   if test "x$has_forbidden_chars" != x; then
20794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20798       # Going to short mode and back again did indeed matter. Since short mode is
20799       # case insensitive, let's make it lowercase to improve readability.
20800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20801       # Now convert it back to Unix-style (cygpath)
20802       input_path=`$CYGPATH -u "$shortmode_path"`
20803       new_path="$input_path"
20804     fi
20805   fi
20806 
20807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20808   if test "x$test_cygdrive_prefix" = x; then
20809     # As a simple fix, exclude /usr/bin since it's not a real path.
20810     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20812       # a path prefixed by /cygdrive for fixpath to work.
20813       new_path="$CYGWIN_ROOT_PATH$input_path"
20814     fi
20815   fi
20816 
20817 
20818   if test "x$path" != "x$new_path"; then
20819     BOOT_JDK="$new_path"
20820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20821 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20822   fi
20823 
20824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20825 
20826   path="$BOOT_JDK"
20827   has_colon=`$ECHO $path | $GREP ^.:`
20828   new_path="$path"
20829   if test "x$has_colon" = x; then
20830     # Not in mixed or Windows style, start by that.
20831     new_path=`cmd //c echo $path`
20832   fi
20833 
20834 
20835   input_path="$new_path"
20836   # Check if we need to convert this using DOS-style short mode. If the path
20837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20838   # take no chances and rewrite it.
20839   # Note: m4 eats our [], so we need to use [ and ] instead.
20840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20841   if test "x$has_forbidden_chars" != x; then
20842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20843     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20844   fi
20845 
20846 
20847   windows_path="$new_path"
20848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20849     unix_path=`$CYGPATH -u "$windows_path"`
20850     new_path="$unix_path"
20851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20853     new_path="$unix_path"
20854   fi
20855 
20856   if test "x$path" != "x$new_path"; then
20857     BOOT_JDK="$new_path"
20858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20859 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20860   fi
20861 
20862   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20863   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20864 
20865   else
20866     # We're on a posix platform. Hooray! :)
20867     path="$BOOT_JDK"
20868     has_space=`$ECHO "$path" | $GREP " "`
20869     if test "x$has_space" != x; then
20870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20871 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20872       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20873     fi
20874 
20875     # Use eval to expand a potential ~
20876     eval path="$path"
20877     if test ! -f "$path" && test ! -d "$path"; then
20878       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20879     fi
20880 
20881     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20882   fi
20883 
20884               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20885 $as_echo_n "checking for Boot JDK... " >&6; }
20886               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20887 $as_echo "$BOOT_JDK" >&6; }
20888               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20889 $as_echo_n "checking Boot JDK version... " >&6; }
20890               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20891               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20892 $as_echo "$BOOT_JDK_VERSION" >&6; }
20893             fi # end check jdk version
20894           fi # end check rt.jar
20895         fi # end check javac
20896       fi # end check java
20897     fi # end check boot jdk found
20898   fi
20899 
20900 
20901   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20902 
20903   if test "x$BOOT_JDK_FOUND" = xno; then
20904     # Now execute the test
20905 
20906   if test -x /usr/libexec/java_home; then
20907     BOOT_JDK=`/usr/libexec/java_home`
20908     BOOT_JDK_FOUND=maybe
20909     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20910 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20911   fi
20912 
20913 
20914     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20915     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20916       # Do we have a bin/java?
20917       if test ! -x "$BOOT_JDK/bin/java"; then
20918         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20920         BOOT_JDK_FOUND=no
20921       else
20922         # Do we have a bin/javac?
20923         if test ! -x "$BOOT_JDK/bin/javac"; then
20924           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20925 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20926           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20927 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20928           BOOT_JDK_FOUND=no
20929         else
20930           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20931           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20932             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20933 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20934             BOOT_JDK_FOUND=no
20935           else
20936             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20937             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20938 
20939             # Extra M4 quote needed to protect [] in grep expression.
20940             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20941             if test "x$FOUND_VERSION_78" = x; then
20942               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20943 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20944               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20945 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20946               BOOT_JDK_FOUND=no
20947             else
20948               # We're done! :-)
20949               BOOT_JDK_FOUND=yes
20950 
20951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952 
20953   # Input might be given as Windows format, start by converting to
20954   # unix format.
20955   path="$BOOT_JDK"
20956   new_path=`$CYGPATH -u "$path"`
20957 
20958   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20959   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20960   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20961   # "foo.exe" is OK but "foo" is an error.
20962   #
20963   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20964   # It is also a way to make sure we got the proper file name for the real test later on.
20965   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20966   if test "x$test_shortpath" = x; then
20967     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20968 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20969     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20970   fi
20971 
20972   # Call helper function which possibly converts this using DOS-style short mode.
20973   # If so, the updated path is stored in $new_path.
20974 
20975   input_path="$new_path"
20976   # Check if we need to convert this using DOS-style short mode. If the path
20977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978   # take no chances and rewrite it.
20979   # Note: m4 eats our [], so we need to use [ and ] instead.
20980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20981   if test "x$has_forbidden_chars" != x; then
20982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20984     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20985     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20986       # Going to short mode and back again did indeed matter. Since short mode is
20987       # case insensitive, let's make it lowercase to improve readability.
20988       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20989       # Now convert it back to Unix-style (cygpath)
20990       input_path=`$CYGPATH -u "$shortmode_path"`
20991       new_path="$input_path"
20992     fi
20993   fi
20994 
20995   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20996   if test "x$test_cygdrive_prefix" = x; then
20997     # As a simple fix, exclude /usr/bin since it's not a real path.
20998     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20999       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21000       # a path prefixed by /cygdrive for fixpath to work.
21001       new_path="$CYGWIN_ROOT_PATH$input_path"
21002     fi
21003   fi
21004 
21005 
21006   if test "x$path" != "x$new_path"; then
21007     BOOT_JDK="$new_path"
21008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21009 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21010   fi
21011 
21012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21013 
21014   path="$BOOT_JDK"
21015   has_colon=`$ECHO $path | $GREP ^.:`
21016   new_path="$path"
21017   if test "x$has_colon" = x; then
21018     # Not in mixed or Windows style, start by that.
21019     new_path=`cmd //c echo $path`
21020   fi
21021 
21022 
21023   input_path="$new_path"
21024   # Check if we need to convert this using DOS-style short mode. If the path
21025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21026   # take no chances and rewrite it.
21027   # Note: m4 eats our [], so we need to use [ and ] instead.
21028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21029   if test "x$has_forbidden_chars" != x; then
21030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21032   fi
21033 
21034 
21035   windows_path="$new_path"
21036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21037     unix_path=`$CYGPATH -u "$windows_path"`
21038     new_path="$unix_path"
21039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21041     new_path="$unix_path"
21042   fi
21043 
21044   if test "x$path" != "x$new_path"; then
21045     BOOT_JDK="$new_path"
21046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21048   fi
21049 
21050   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21051   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21052 
21053   else
21054     # We're on a posix platform. Hooray! :)
21055     path="$BOOT_JDK"
21056     has_space=`$ECHO "$path" | $GREP " "`
21057     if test "x$has_space" != x; then
21058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21059 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21060       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21061     fi
21062 
21063     # Use eval to expand a potential ~
21064     eval path="$path"
21065     if test ! -f "$path" && test ! -d "$path"; then
21066       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21067     fi
21068 
21069     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21070   fi
21071 
21072               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21073 $as_echo_n "checking for Boot JDK... " >&6; }
21074               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21075 $as_echo "$BOOT_JDK" >&6; }
21076               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21077 $as_echo_n "checking Boot JDK version... " >&6; }
21078               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21079               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21080 $as_echo "$BOOT_JDK_VERSION" >&6; }
21081             fi # end check jdk version
21082           fi # end check rt.jar
21083         fi # end check javac
21084       fi # end check java
21085     fi # end check boot jdk found
21086   fi
21087 
21088 
21089   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21090 
21091   if test "x$BOOT_JDK_FOUND" = xno; then
21092     # Now execute the test
21093 
21094   # Extract the first word of "javac", so it can be a program name with args.
21095 set dummy javac; ac_word=$2
21096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21097 $as_echo_n "checking for $ac_word... " >&6; }
21098 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21099   $as_echo_n "(cached) " >&6
21100 else
21101   case $JAVAC_CHECK in
21102   [\\/]* | ?:[\\/]*)
21103   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21104   ;;
21105   *)
21106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21107 for as_dir in $PATH
21108 do
21109   IFS=$as_save_IFS
21110   test -z "$as_dir" && as_dir=.
21111     for ac_exec_ext in '' $ac_executable_extensions; do
21112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21113     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21115     break 2
21116   fi
21117 done
21118   done
21119 IFS=$as_save_IFS
21120 
21121   ;;
21122 esac
21123 fi
21124 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21125 if test -n "$JAVAC_CHECK"; then
21126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21127 $as_echo "$JAVAC_CHECK" >&6; }
21128 else
21129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21130 $as_echo "no" >&6; }
21131 fi
21132 
21133 
21134   # Extract the first word of "java", so it can be a program name with args.
21135 set dummy java; ac_word=$2
21136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21137 $as_echo_n "checking for $ac_word... " >&6; }
21138 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141   case $JAVA_CHECK in
21142   [\\/]* | ?:[\\/]*)
21143   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21144   ;;
21145   *)
21146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21147 for as_dir in $PATH
21148 do
21149   IFS=$as_save_IFS
21150   test -z "$as_dir" && as_dir=.
21151     for ac_exec_ext in '' $ac_executable_extensions; do
21152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21153     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21155     break 2
21156   fi
21157 done
21158   done
21159 IFS=$as_save_IFS
21160 
21161   ;;
21162 esac
21163 fi
21164 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21165 if test -n "$JAVA_CHECK"; then
21166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21167 $as_echo "$JAVA_CHECK" >&6; }
21168 else
21169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21170 $as_echo "no" >&6; }
21171 fi
21172 
21173 
21174   BINARY="$JAVAC_CHECK"
21175   if test "x$JAVAC_CHECK" = x; then
21176     BINARY="$JAVA_CHECK"
21177   fi
21178   if test "x$BINARY" != x; then
21179     # So there is a java(c) binary, it might be part of a JDK.
21180     # Lets find the JDK/JRE directory by following symbolic links.
21181     # Linux/GNU systems often have links from /usr/bin/java to
21182     # /etc/alternatives/java to the real JDK binary.
21183 
21184   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21185     # Follow a chain of symbolic links. Use readlink
21186     # where it exists, else fall back to horribly
21187     # complicated shell code.
21188     if test "x$READLINK_TESTED" != yes; then
21189       # On MacOSX there is a readlink tool with a different
21190       # purpose than the GNU readlink tool. Check the found readlink.
21191       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21192       if test "x$ISGNU" = x; then
21193         # A readlink that we do not know how to use.
21194         # Are there other non-GNU readlinks out there?
21195         READLINK_TESTED=yes
21196         READLINK=
21197       fi
21198     fi
21199 
21200     if test "x$READLINK" != x; then
21201       BINARY=`$READLINK -f $BINARY`
21202     else
21203       # Save the current directory for restoring afterwards
21204       STARTDIR=$PWD
21205       COUNTER=0
21206       sym_link_dir=`$DIRNAME $BINARY`
21207       sym_link_file=`$BASENAME $BINARY`
21208       cd $sym_link_dir
21209       # Use -P flag to resolve symlinks in directories.
21210       cd `$THEPWDCMD -P`
21211       sym_link_dir=`$THEPWDCMD -P`
21212       # Resolve file symlinks
21213       while test $COUNTER -lt 20; do
21214         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21215         if test "x$ISLINK" == x; then
21216           # This is not a symbolic link! We are done!
21217           break
21218         fi
21219         # Again resolve directory symlinks since the target of the just found
21220         # link could be in a different directory
21221         cd `$DIRNAME $ISLINK`
21222         sym_link_dir=`$THEPWDCMD -P`
21223         sym_link_file=`$BASENAME $ISLINK`
21224         let COUNTER=COUNTER+1
21225       done
21226       cd $STARTDIR
21227       BINARY=$sym_link_dir/$sym_link_file
21228     fi
21229   fi
21230 
21231     BOOT_JDK=`dirname "$BINARY"`
21232     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21233     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21234       # Looks like we found ourselves an JDK
21235       BOOT_JDK_FOUND=maybe
21236       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21237 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21238     fi
21239   fi
21240 
21241 
21242     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21243     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21244       # Do we have a bin/java?
21245       if test ! -x "$BOOT_JDK/bin/java"; then
21246         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21247 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21248         BOOT_JDK_FOUND=no
21249       else
21250         # Do we have a bin/javac?
21251         if test ! -x "$BOOT_JDK/bin/javac"; then
21252           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21253 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21254           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21255 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21256           BOOT_JDK_FOUND=no
21257         else
21258           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21259           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21260             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21261 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21262             BOOT_JDK_FOUND=no
21263           else
21264             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21265             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21266 
21267             # Extra M4 quote needed to protect [] in grep expression.
21268             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21269             if test "x$FOUND_VERSION_78" = x; then
21270               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21272               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21273 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21274               BOOT_JDK_FOUND=no
21275             else
21276               # We're done! :-)
21277               BOOT_JDK_FOUND=yes
21278 
21279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21280 
21281   # Input might be given as Windows format, start by converting to
21282   # unix format.
21283   path="$BOOT_JDK"
21284   new_path=`$CYGPATH -u "$path"`
21285 
21286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21289   # "foo.exe" is OK but "foo" is an error.
21290   #
21291   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21292   # It is also a way to make sure we got the proper file name for the real test later on.
21293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21294   if test "x$test_shortpath" = x; then
21295     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21296 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21297     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21298   fi
21299 
21300   # Call helper function which possibly converts this using DOS-style short mode.
21301   # If so, the updated path is stored in $new_path.
21302 
21303   input_path="$new_path"
21304   # Check if we need to convert this using DOS-style short mode. If the path
21305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21306   # take no chances and rewrite it.
21307   # Note: m4 eats our [], so we need to use [ and ] instead.
21308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21309   if test "x$has_forbidden_chars" != x; then
21310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21314       # Going to short mode and back again did indeed matter. Since short mode is
21315       # case insensitive, let's make it lowercase to improve readability.
21316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21317       # Now convert it back to Unix-style (cygpath)
21318       input_path=`$CYGPATH -u "$shortmode_path"`
21319       new_path="$input_path"
21320     fi
21321   fi
21322 
21323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21324   if test "x$test_cygdrive_prefix" = x; then
21325     # As a simple fix, exclude /usr/bin since it's not a real path.
21326     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21328       # a path prefixed by /cygdrive for fixpath to work.
21329       new_path="$CYGWIN_ROOT_PATH$input_path"
21330     fi
21331   fi
21332 
21333 
21334   if test "x$path" != "x$new_path"; then
21335     BOOT_JDK="$new_path"
21336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21337 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21338   fi
21339 
21340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21341 
21342   path="$BOOT_JDK"
21343   has_colon=`$ECHO $path | $GREP ^.:`
21344   new_path="$path"
21345   if test "x$has_colon" = x; then
21346     # Not in mixed or Windows style, start by that.
21347     new_path=`cmd //c echo $path`
21348   fi
21349 
21350 
21351   input_path="$new_path"
21352   # Check if we need to convert this using DOS-style short mode. If the path
21353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21354   # take no chances and rewrite it.
21355   # Note: m4 eats our [], so we need to use [ and ] instead.
21356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21357   if test "x$has_forbidden_chars" != x; then
21358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21359     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21360   fi
21361 
21362 
21363   windows_path="$new_path"
21364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21365     unix_path=`$CYGPATH -u "$windows_path"`
21366     new_path="$unix_path"
21367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21369     new_path="$unix_path"
21370   fi
21371 
21372   if test "x$path" != "x$new_path"; then
21373     BOOT_JDK="$new_path"
21374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21375 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21376   fi
21377 
21378   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21379   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21380 
21381   else
21382     # We're on a posix platform. Hooray! :)
21383     path="$BOOT_JDK"
21384     has_space=`$ECHO "$path" | $GREP " "`
21385     if test "x$has_space" != x; then
21386       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21387 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21388       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21389     fi
21390 
21391     # Use eval to expand a potential ~
21392     eval path="$path"
21393     if test ! -f "$path" && test ! -d "$path"; then
21394       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21395     fi
21396 
21397     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21398   fi
21399 
21400               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21401 $as_echo_n "checking for Boot JDK... " >&6; }
21402               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21403 $as_echo "$BOOT_JDK" >&6; }
21404               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21405 $as_echo_n "checking Boot JDK version... " >&6; }
21406               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21407               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21408 $as_echo "$BOOT_JDK_VERSION" >&6; }
21409             fi # end check jdk version
21410           fi # end check rt.jar
21411         fi # end check javac
21412       fi # end check java
21413     fi # end check boot jdk found
21414   fi
21415 
21416 
21417   # Test: Is there a JDK installed in default, well-known locations?
21418 
21419   if test "x$BOOT_JDK_FOUND" = xno; then
21420     # Now execute the test
21421 
21422   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21423 
21424   if test "x$BOOT_JDK_FOUND" = xno; then
21425     # Now execute the test
21426 
21427   if test "x$ProgramW6432" != x; then
21428     VIRTUAL_DIR="$ProgramW6432/Java"
21429 
21430   windows_path="$VIRTUAL_DIR"
21431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21432     unix_path=`$CYGPATH -u "$windows_path"`
21433     VIRTUAL_DIR="$unix_path"
21434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21436     VIRTUAL_DIR="$unix_path"
21437   fi
21438 
21439 
21440   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21441   BOOT_JDK_SUFFIX=""
21442   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21443   if test "x$ALL_JDKS_FOUND" != x; then
21444     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21445 
21446   if test "x$BOOT_JDK_FOUND" = xno; then
21447     # Now execute the test
21448 
21449         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21450         if test -d "$BOOT_JDK"; then
21451           BOOT_JDK_FOUND=maybe
21452           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21453 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21454         fi
21455 
21456 
21457     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21458     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21459       # Do we have a bin/java?
21460       if test ! -x "$BOOT_JDK/bin/java"; then
21461         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21463         BOOT_JDK_FOUND=no
21464       else
21465         # Do we have a bin/javac?
21466         if test ! -x "$BOOT_JDK/bin/javac"; then
21467           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21469           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21470 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21471           BOOT_JDK_FOUND=no
21472         else
21473           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21474           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21475             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21477             BOOT_JDK_FOUND=no
21478           else
21479             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21480             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21481 
21482             # Extra M4 quote needed to protect [] in grep expression.
21483             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21484             if test "x$FOUND_VERSION_78" = x; then
21485               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21486 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21487               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21488 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21489               BOOT_JDK_FOUND=no
21490             else
21491               # We're done! :-)
21492               BOOT_JDK_FOUND=yes
21493 
21494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21495 
21496   # Input might be given as Windows format, start by converting to
21497   # unix format.
21498   path="$BOOT_JDK"
21499   new_path=`$CYGPATH -u "$path"`
21500 
21501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21504   # "foo.exe" is OK but "foo" is an error.
21505   #
21506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21507   # It is also a way to make sure we got the proper file name for the real test later on.
21508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21509   if test "x$test_shortpath" = x; then
21510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21511 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21512     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21513   fi
21514 
21515   # Call helper function which possibly converts this using DOS-style short mode.
21516   # If so, the updated path is stored in $new_path.
21517 
21518   input_path="$new_path"
21519   # Check if we need to convert this using DOS-style short mode. If the path
21520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21521   # take no chances and rewrite it.
21522   # Note: m4 eats our [], so we need to use [ and ] instead.
21523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21524   if test "x$has_forbidden_chars" != x; then
21525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21529       # Going to short mode and back again did indeed matter. Since short mode is
21530       # case insensitive, let's make it lowercase to improve readability.
21531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21532       # Now convert it back to Unix-style (cygpath)
21533       input_path=`$CYGPATH -u "$shortmode_path"`
21534       new_path="$input_path"
21535     fi
21536   fi
21537 
21538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21539   if test "x$test_cygdrive_prefix" = x; then
21540     # As a simple fix, exclude /usr/bin since it's not a real path.
21541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21543       # a path prefixed by /cygdrive for fixpath to work.
21544       new_path="$CYGWIN_ROOT_PATH$input_path"
21545     fi
21546   fi
21547 
21548 
21549   if test "x$path" != "x$new_path"; then
21550     BOOT_JDK="$new_path"
21551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21552 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21553   fi
21554 
21555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21556 
21557   path="$BOOT_JDK"
21558   has_colon=`$ECHO $path | $GREP ^.:`
21559   new_path="$path"
21560   if test "x$has_colon" = x; then
21561     # Not in mixed or Windows style, start by that.
21562     new_path=`cmd //c echo $path`
21563   fi
21564 
21565 
21566   input_path="$new_path"
21567   # Check if we need to convert this using DOS-style short mode. If the path
21568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21569   # take no chances and rewrite it.
21570   # Note: m4 eats our [], so we need to use [ and ] instead.
21571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21572   if test "x$has_forbidden_chars" != x; then
21573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21575   fi
21576 
21577 
21578   windows_path="$new_path"
21579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21580     unix_path=`$CYGPATH -u "$windows_path"`
21581     new_path="$unix_path"
21582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21584     new_path="$unix_path"
21585   fi
21586 
21587   if test "x$path" != "x$new_path"; then
21588     BOOT_JDK="$new_path"
21589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21590 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21591   fi
21592 
21593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21595 
21596   else
21597     # We're on a posix platform. Hooray! :)
21598     path="$BOOT_JDK"
21599     has_space=`$ECHO "$path" | $GREP " "`
21600     if test "x$has_space" != x; then
21601       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21602 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21603       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21604     fi
21605 
21606     # Use eval to expand a potential ~
21607     eval path="$path"
21608     if test ! -f "$path" && test ! -d "$path"; then
21609       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21610     fi
21611 
21612     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21613   fi
21614 
21615               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21616 $as_echo_n "checking for Boot JDK... " >&6; }
21617               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21618 $as_echo "$BOOT_JDK" >&6; }
21619               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21620 $as_echo_n "checking Boot JDK version... " >&6; }
21621               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21622               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21623 $as_echo "$BOOT_JDK_VERSION" >&6; }
21624             fi # end check jdk version
21625           fi # end check rt.jar
21626         fi # end check javac
21627       fi # end check java
21628     fi # end check boot jdk found
21629   fi
21630 
21631     done
21632   fi
21633 
21634   fi
21635 
21636 
21637     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21638     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21639       # Do we have a bin/java?
21640       if test ! -x "$BOOT_JDK/bin/java"; then
21641         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21643         BOOT_JDK_FOUND=no
21644       else
21645         # Do we have a bin/javac?
21646         if test ! -x "$BOOT_JDK/bin/javac"; then
21647           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21649           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21650 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21651           BOOT_JDK_FOUND=no
21652         else
21653           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21654           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21655             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21656 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21657             BOOT_JDK_FOUND=no
21658           else
21659             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21660             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21661 
21662             # Extra M4 quote needed to protect [] in grep expression.
21663             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21664             if test "x$FOUND_VERSION_78" = x; then
21665               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21667               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21668 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21669               BOOT_JDK_FOUND=no
21670             else
21671               # We're done! :-)
21672               BOOT_JDK_FOUND=yes
21673 
21674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21675 
21676   # Input might be given as Windows format, start by converting to
21677   # unix format.
21678   path="$BOOT_JDK"
21679   new_path=`$CYGPATH -u "$path"`
21680 
21681   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21682   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21683   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21684   # "foo.exe" is OK but "foo" is an error.
21685   #
21686   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21687   # It is also a way to make sure we got the proper file name for the real test later on.
21688   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21689   if test "x$test_shortpath" = x; then
21690     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21691 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21692     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21693   fi
21694 
21695   # Call helper function which possibly converts this using DOS-style short mode.
21696   # If so, the updated path is stored in $new_path.
21697 
21698   input_path="$new_path"
21699   # Check if we need to convert this using DOS-style short mode. If the path
21700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21701   # take no chances and rewrite it.
21702   # Note: m4 eats our [], so we need to use [ and ] instead.
21703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21704   if test "x$has_forbidden_chars" != x; then
21705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21706     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21707     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21708     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21709       # Going to short mode and back again did indeed matter. Since short mode is
21710       # case insensitive, let's make it lowercase to improve readability.
21711       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21712       # Now convert it back to Unix-style (cygpath)
21713       input_path=`$CYGPATH -u "$shortmode_path"`
21714       new_path="$input_path"
21715     fi
21716   fi
21717 
21718   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21719   if test "x$test_cygdrive_prefix" = x; then
21720     # As a simple fix, exclude /usr/bin since it's not a real path.
21721     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21722       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21723       # a path prefixed by /cygdrive for fixpath to work.
21724       new_path="$CYGWIN_ROOT_PATH$input_path"
21725     fi
21726   fi
21727 
21728 
21729   if test "x$path" != "x$new_path"; then
21730     BOOT_JDK="$new_path"
21731     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21732 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21733   fi
21734 
21735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21736 
21737   path="$BOOT_JDK"
21738   has_colon=`$ECHO $path | $GREP ^.:`
21739   new_path="$path"
21740   if test "x$has_colon" = x; then
21741     # Not in mixed or Windows style, start by that.
21742     new_path=`cmd //c echo $path`
21743   fi
21744 
21745 
21746   input_path="$new_path"
21747   # Check if we need to convert this using DOS-style short mode. If the path
21748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21749   # take no chances and rewrite it.
21750   # Note: m4 eats our [], so we need to use [ and ] instead.
21751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21752   if test "x$has_forbidden_chars" != x; then
21753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21754     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21755   fi
21756 
21757 
21758   windows_path="$new_path"
21759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21760     unix_path=`$CYGPATH -u "$windows_path"`
21761     new_path="$unix_path"
21762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21764     new_path="$unix_path"
21765   fi
21766 
21767   if test "x$path" != "x$new_path"; then
21768     BOOT_JDK="$new_path"
21769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21771   fi
21772 
21773   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21774   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21775 
21776   else
21777     # We're on a posix platform. Hooray! :)
21778     path="$BOOT_JDK"
21779     has_space=`$ECHO "$path" | $GREP " "`
21780     if test "x$has_space" != x; then
21781       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21782 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21783       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21784     fi
21785 
21786     # Use eval to expand a potential ~
21787     eval path="$path"
21788     if test ! -f "$path" && test ! -d "$path"; then
21789       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21790     fi
21791 
21792     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21793   fi
21794 
21795               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21796 $as_echo_n "checking for Boot JDK... " >&6; }
21797               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21798 $as_echo "$BOOT_JDK" >&6; }
21799               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21800 $as_echo_n "checking Boot JDK version... " >&6; }
21801               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21802               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21803 $as_echo "$BOOT_JDK_VERSION" >&6; }
21804             fi # end check jdk version
21805           fi # end check rt.jar
21806         fi # end check javac
21807       fi # end check java
21808     fi # end check boot jdk found
21809   fi
21810 
21811 
21812   if test "x$BOOT_JDK_FOUND" = xno; then
21813     # Now execute the test
21814 
21815   if test "x$PROGRAMW6432" != x; then
21816     VIRTUAL_DIR="$PROGRAMW6432/Java"
21817 
21818   windows_path="$VIRTUAL_DIR"
21819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21820     unix_path=`$CYGPATH -u "$windows_path"`
21821     VIRTUAL_DIR="$unix_path"
21822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21824     VIRTUAL_DIR="$unix_path"
21825   fi
21826 
21827 
21828   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21829   BOOT_JDK_SUFFIX=""
21830   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21831   if test "x$ALL_JDKS_FOUND" != x; then
21832     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21833 
21834   if test "x$BOOT_JDK_FOUND" = xno; then
21835     # Now execute the test
21836 
21837         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21838         if test -d "$BOOT_JDK"; then
21839           BOOT_JDK_FOUND=maybe
21840           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21841 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21842         fi
21843 
21844 
21845     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21846     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21847       # Do we have a bin/java?
21848       if test ! -x "$BOOT_JDK/bin/java"; then
21849         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21851         BOOT_JDK_FOUND=no
21852       else
21853         # Do we have a bin/javac?
21854         if test ! -x "$BOOT_JDK/bin/javac"; then
21855           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21856 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21857           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21858 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21859           BOOT_JDK_FOUND=no
21860         else
21861           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21862           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21863             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21864 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21865             BOOT_JDK_FOUND=no
21866           else
21867             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21868             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21869 
21870             # Extra M4 quote needed to protect [] in grep expression.
21871             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21872             if test "x$FOUND_VERSION_78" = x; then
21873               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21874 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21875               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21876 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21877               BOOT_JDK_FOUND=no
21878             else
21879               # We're done! :-)
21880               BOOT_JDK_FOUND=yes
21881 
21882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21883 
21884   # Input might be given as Windows format, start by converting to
21885   # unix format.
21886   path="$BOOT_JDK"
21887   new_path=`$CYGPATH -u "$path"`
21888 
21889   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21890   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21891   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21892   # "foo.exe" is OK but "foo" is an error.
21893   #
21894   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21895   # It is also a way to make sure we got the proper file name for the real test later on.
21896   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21897   if test "x$test_shortpath" = x; then
21898     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21899 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21900     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21901   fi
21902 
21903   # Call helper function which possibly converts this using DOS-style short mode.
21904   # If so, the updated path is stored in $new_path.
21905 
21906   input_path="$new_path"
21907   # Check if we need to convert this using DOS-style short mode. If the path
21908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21909   # take no chances and rewrite it.
21910   # Note: m4 eats our [], so we need to use [ and ] instead.
21911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21912   if test "x$has_forbidden_chars" != x; then
21913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21917       # Going to short mode and back again did indeed matter. Since short mode is
21918       # case insensitive, let's make it lowercase to improve readability.
21919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21920       # Now convert it back to Unix-style (cygpath)
21921       input_path=`$CYGPATH -u "$shortmode_path"`
21922       new_path="$input_path"
21923     fi
21924   fi
21925 
21926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21927   if test "x$test_cygdrive_prefix" = x; then
21928     # As a simple fix, exclude /usr/bin since it's not a real path.
21929     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21931       # a path prefixed by /cygdrive for fixpath to work.
21932       new_path="$CYGWIN_ROOT_PATH$input_path"
21933     fi
21934   fi
21935 
21936 
21937   if test "x$path" != "x$new_path"; then
21938     BOOT_JDK="$new_path"
21939     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21940 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21941   fi
21942 
21943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21944 
21945   path="$BOOT_JDK"
21946   has_colon=`$ECHO $path | $GREP ^.:`
21947   new_path="$path"
21948   if test "x$has_colon" = x; then
21949     # Not in mixed or Windows style, start by that.
21950     new_path=`cmd //c echo $path`
21951   fi
21952 
21953 
21954   input_path="$new_path"
21955   # Check if we need to convert this using DOS-style short mode. If the path
21956   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21957   # take no chances and rewrite it.
21958   # Note: m4 eats our [], so we need to use [ and ] instead.
21959   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21960   if test "x$has_forbidden_chars" != x; then
21961     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21962     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21963   fi
21964 
21965 
21966   windows_path="$new_path"
21967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21968     unix_path=`$CYGPATH -u "$windows_path"`
21969     new_path="$unix_path"
21970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21972     new_path="$unix_path"
21973   fi
21974 
21975   if test "x$path" != "x$new_path"; then
21976     BOOT_JDK="$new_path"
21977     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21978 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21979   fi
21980 
21981   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21982   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21983 
21984   else
21985     # We're on a posix platform. Hooray! :)
21986     path="$BOOT_JDK"
21987     has_space=`$ECHO "$path" | $GREP " "`
21988     if test "x$has_space" != x; then
21989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21990 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21991       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21992     fi
21993 
21994     # Use eval to expand a potential ~
21995     eval path="$path"
21996     if test ! -f "$path" && test ! -d "$path"; then
21997       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21998     fi
21999 
22000     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22001   fi
22002 
22003               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22004 $as_echo_n "checking for Boot JDK... " >&6; }
22005               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22006 $as_echo "$BOOT_JDK" >&6; }
22007               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22008 $as_echo_n "checking Boot JDK version... " >&6; }
22009               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22010               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22011 $as_echo "$BOOT_JDK_VERSION" >&6; }
22012             fi # end check jdk version
22013           fi # end check rt.jar
22014         fi # end check javac
22015       fi # end check java
22016     fi # end check boot jdk found
22017   fi
22018 
22019     done
22020   fi
22021 
22022   fi
22023 
22024 
22025     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22026     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22027       # Do we have a bin/java?
22028       if test ! -x "$BOOT_JDK/bin/java"; then
22029         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22031         BOOT_JDK_FOUND=no
22032       else
22033         # Do we have a bin/javac?
22034         if test ! -x "$BOOT_JDK/bin/javac"; then
22035           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22036 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22037           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22038 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22039           BOOT_JDK_FOUND=no
22040         else
22041           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22042           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22043             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22044 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22045             BOOT_JDK_FOUND=no
22046           else
22047             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22048             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22049 
22050             # Extra M4 quote needed to protect [] in grep expression.
22051             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22052             if test "x$FOUND_VERSION_78" = x; then
22053               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22055               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22056 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22057               BOOT_JDK_FOUND=no
22058             else
22059               # We're done! :-)
22060               BOOT_JDK_FOUND=yes
22061 
22062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22063 
22064   # Input might be given as Windows format, start by converting to
22065   # unix format.
22066   path="$BOOT_JDK"
22067   new_path=`$CYGPATH -u "$path"`
22068 
22069   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22070   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22071   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22072   # "foo.exe" is OK but "foo" is an error.
22073   #
22074   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22075   # It is also a way to make sure we got the proper file name for the real test later on.
22076   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22077   if test "x$test_shortpath" = x; then
22078     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22079 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22080     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22081   fi
22082 
22083   # Call helper function which possibly converts this using DOS-style short mode.
22084   # If so, the updated path is stored in $new_path.
22085 
22086   input_path="$new_path"
22087   # Check if we need to convert this using DOS-style short mode. If the path
22088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22089   # take no chances and rewrite it.
22090   # Note: m4 eats our [], so we need to use [ and ] instead.
22091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22092   if test "x$has_forbidden_chars" != x; then
22093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22094     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22095     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22096     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22097       # Going to short mode and back again did indeed matter. Since short mode is
22098       # case insensitive, let's make it lowercase to improve readability.
22099       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22100       # Now convert it back to Unix-style (cygpath)
22101       input_path=`$CYGPATH -u "$shortmode_path"`
22102       new_path="$input_path"
22103     fi
22104   fi
22105 
22106   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22107   if test "x$test_cygdrive_prefix" = x; then
22108     # As a simple fix, exclude /usr/bin since it's not a real path.
22109     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22110       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22111       # a path prefixed by /cygdrive for fixpath to work.
22112       new_path="$CYGWIN_ROOT_PATH$input_path"
22113     fi
22114   fi
22115 
22116 
22117   if test "x$path" != "x$new_path"; then
22118     BOOT_JDK="$new_path"
22119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22120 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22121   fi
22122 
22123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22124 
22125   path="$BOOT_JDK"
22126   has_colon=`$ECHO $path | $GREP ^.:`
22127   new_path="$path"
22128   if test "x$has_colon" = x; then
22129     # Not in mixed or Windows style, start by that.
22130     new_path=`cmd //c echo $path`
22131   fi
22132 
22133 
22134   input_path="$new_path"
22135   # Check if we need to convert this using DOS-style short mode. If the path
22136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22137   # take no chances and rewrite it.
22138   # Note: m4 eats our [], so we need to use [ and ] instead.
22139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22140   if test "x$has_forbidden_chars" != x; then
22141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22142     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22143   fi
22144 
22145 
22146   windows_path="$new_path"
22147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22148     unix_path=`$CYGPATH -u "$windows_path"`
22149     new_path="$unix_path"
22150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22152     new_path="$unix_path"
22153   fi
22154 
22155   if test "x$path" != "x$new_path"; then
22156     BOOT_JDK="$new_path"
22157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22158 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22159   fi
22160 
22161   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22162   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22163 
22164   else
22165     # We're on a posix platform. Hooray! :)
22166     path="$BOOT_JDK"
22167     has_space=`$ECHO "$path" | $GREP " "`
22168     if test "x$has_space" != x; then
22169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22170 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22171       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22172     fi
22173 
22174     # Use eval to expand a potential ~
22175     eval path="$path"
22176     if test ! -f "$path" && test ! -d "$path"; then
22177       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22178     fi
22179 
22180     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22181   fi
22182 
22183               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22184 $as_echo_n "checking for Boot JDK... " >&6; }
22185               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22186 $as_echo "$BOOT_JDK" >&6; }
22187               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22188 $as_echo_n "checking Boot JDK version... " >&6; }
22189               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22190               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22191 $as_echo "$BOOT_JDK_VERSION" >&6; }
22192             fi # end check jdk version
22193           fi # end check rt.jar
22194         fi # end check javac
22195       fi # end check java
22196     fi # end check boot jdk found
22197   fi
22198 
22199 
22200   if test "x$BOOT_JDK_FOUND" = xno; then
22201     # Now execute the test
22202 
22203   if test "x$PROGRAMFILES" != x; then
22204     VIRTUAL_DIR="$PROGRAMFILES/Java"
22205 
22206   windows_path="$VIRTUAL_DIR"
22207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22208     unix_path=`$CYGPATH -u "$windows_path"`
22209     VIRTUAL_DIR="$unix_path"
22210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22212     VIRTUAL_DIR="$unix_path"
22213   fi
22214 
22215 
22216   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22217   BOOT_JDK_SUFFIX=""
22218   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22219   if test "x$ALL_JDKS_FOUND" != x; then
22220     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22221 
22222   if test "x$BOOT_JDK_FOUND" = xno; then
22223     # Now execute the test
22224 
22225         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22226         if test -d "$BOOT_JDK"; then
22227           BOOT_JDK_FOUND=maybe
22228           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22229 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22230         fi
22231 
22232 
22233     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22234     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22235       # Do we have a bin/java?
22236       if test ! -x "$BOOT_JDK/bin/java"; then
22237         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22238 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22239         BOOT_JDK_FOUND=no
22240       else
22241         # Do we have a bin/javac?
22242         if test ! -x "$BOOT_JDK/bin/javac"; then
22243           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22244 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22245           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22246 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22247           BOOT_JDK_FOUND=no
22248         else
22249           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22250           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22251             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22253             BOOT_JDK_FOUND=no
22254           else
22255             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22256             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22257 
22258             # Extra M4 quote needed to protect [] in grep expression.
22259             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22260             if test "x$FOUND_VERSION_78" = x; then
22261               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22263               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22264 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22265               BOOT_JDK_FOUND=no
22266             else
22267               # We're done! :-)
22268               BOOT_JDK_FOUND=yes
22269 
22270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22271 
22272   # Input might be given as Windows format, start by converting to
22273   # unix format.
22274   path="$BOOT_JDK"
22275   new_path=`$CYGPATH -u "$path"`
22276 
22277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22280   # "foo.exe" is OK but "foo" is an error.
22281   #
22282   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22283   # It is also a way to make sure we got the proper file name for the real test later on.
22284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22285   if test "x$test_shortpath" = x; then
22286     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22287 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22288     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22289   fi
22290 
22291   # Call helper function which possibly converts this using DOS-style short mode.
22292   # If so, the updated path is stored in $new_path.
22293 
22294   input_path="$new_path"
22295   # Check if we need to convert this using DOS-style short mode. If the path
22296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22297   # take no chances and rewrite it.
22298   # Note: m4 eats our [], so we need to use [ and ] instead.
22299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22300   if test "x$has_forbidden_chars" != x; then
22301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22305       # Going to short mode and back again did indeed matter. Since short mode is
22306       # case insensitive, let's make it lowercase to improve readability.
22307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22308       # Now convert it back to Unix-style (cygpath)
22309       input_path=`$CYGPATH -u "$shortmode_path"`
22310       new_path="$input_path"
22311     fi
22312   fi
22313 
22314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22315   if test "x$test_cygdrive_prefix" = x; then
22316     # As a simple fix, exclude /usr/bin since it's not a real path.
22317     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22319       # a path prefixed by /cygdrive for fixpath to work.
22320       new_path="$CYGWIN_ROOT_PATH$input_path"
22321     fi
22322   fi
22323 
22324 
22325   if test "x$path" != "x$new_path"; then
22326     BOOT_JDK="$new_path"
22327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22328 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22329   fi
22330 
22331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22332 
22333   path="$BOOT_JDK"
22334   has_colon=`$ECHO $path | $GREP ^.:`
22335   new_path="$path"
22336   if test "x$has_colon" = x; then
22337     # Not in mixed or Windows style, start by that.
22338     new_path=`cmd //c echo $path`
22339   fi
22340 
22341 
22342   input_path="$new_path"
22343   # Check if we need to convert this using DOS-style short mode. If the path
22344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22345   # take no chances and rewrite it.
22346   # Note: m4 eats our [], so we need to use [ and ] instead.
22347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22348   if test "x$has_forbidden_chars" != x; then
22349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22350     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22351   fi
22352 
22353 
22354   windows_path="$new_path"
22355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22356     unix_path=`$CYGPATH -u "$windows_path"`
22357     new_path="$unix_path"
22358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22360     new_path="$unix_path"
22361   fi
22362 
22363   if test "x$path" != "x$new_path"; then
22364     BOOT_JDK="$new_path"
22365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22366 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22367   fi
22368 
22369   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22370   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22371 
22372   else
22373     # We're on a posix platform. Hooray! :)
22374     path="$BOOT_JDK"
22375     has_space=`$ECHO "$path" | $GREP " "`
22376     if test "x$has_space" != x; then
22377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22378 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22379       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22380     fi
22381 
22382     # Use eval to expand a potential ~
22383     eval path="$path"
22384     if test ! -f "$path" && test ! -d "$path"; then
22385       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22386     fi
22387 
22388     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22389   fi
22390 
22391               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22392 $as_echo_n "checking for Boot JDK... " >&6; }
22393               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22394 $as_echo "$BOOT_JDK" >&6; }
22395               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22396 $as_echo_n "checking Boot JDK version... " >&6; }
22397               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22398               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22399 $as_echo "$BOOT_JDK_VERSION" >&6; }
22400             fi # end check jdk version
22401           fi # end check rt.jar
22402         fi # end check javac
22403       fi # end check java
22404     fi # end check boot jdk found
22405   fi
22406 
22407     done
22408   fi
22409 
22410   fi
22411 
22412 
22413     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22414     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22415       # Do we have a bin/java?
22416       if test ! -x "$BOOT_JDK/bin/java"; then
22417         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22419         BOOT_JDK_FOUND=no
22420       else
22421         # Do we have a bin/javac?
22422         if test ! -x "$BOOT_JDK/bin/javac"; then
22423           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22424 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22425           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22426 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22427           BOOT_JDK_FOUND=no
22428         else
22429           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22430           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22431             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22432 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22433             BOOT_JDK_FOUND=no
22434           else
22435             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22436             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22437 
22438             # Extra M4 quote needed to protect [] in grep expression.
22439             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22440             if test "x$FOUND_VERSION_78" = x; then
22441               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22442 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22443               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22444 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22445               BOOT_JDK_FOUND=no
22446             else
22447               # We're done! :-)
22448               BOOT_JDK_FOUND=yes
22449 
22450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22451 
22452   # Input might be given as Windows format, start by converting to
22453   # unix format.
22454   path="$BOOT_JDK"
22455   new_path=`$CYGPATH -u "$path"`
22456 
22457   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22458   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22459   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22460   # "foo.exe" is OK but "foo" is an error.
22461   #
22462   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22463   # It is also a way to make sure we got the proper file name for the real test later on.
22464   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22465   if test "x$test_shortpath" = x; then
22466     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22467 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22468     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22469   fi
22470 
22471   # Call helper function which possibly converts this using DOS-style short mode.
22472   # If so, the updated path is stored in $new_path.
22473 
22474   input_path="$new_path"
22475   # Check if we need to convert this using DOS-style short mode. If the path
22476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22477   # take no chances and rewrite it.
22478   # Note: m4 eats our [], so we need to use [ and ] instead.
22479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22480   if test "x$has_forbidden_chars" != x; then
22481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22482     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22483     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22484     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22485       # Going to short mode and back again did indeed matter. Since short mode is
22486       # case insensitive, let's make it lowercase to improve readability.
22487       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22488       # Now convert it back to Unix-style (cygpath)
22489       input_path=`$CYGPATH -u "$shortmode_path"`
22490       new_path="$input_path"
22491     fi
22492   fi
22493 
22494   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22495   if test "x$test_cygdrive_prefix" = x; then
22496     # As a simple fix, exclude /usr/bin since it's not a real path.
22497     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22498       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22499       # a path prefixed by /cygdrive for fixpath to work.
22500       new_path="$CYGWIN_ROOT_PATH$input_path"
22501     fi
22502   fi
22503 
22504 
22505   if test "x$path" != "x$new_path"; then
22506     BOOT_JDK="$new_path"
22507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22508 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22509   fi
22510 
22511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22512 
22513   path="$BOOT_JDK"
22514   has_colon=`$ECHO $path | $GREP ^.:`
22515   new_path="$path"
22516   if test "x$has_colon" = x; then
22517     # Not in mixed or Windows style, start by that.
22518     new_path=`cmd //c echo $path`
22519   fi
22520 
22521 
22522   input_path="$new_path"
22523   # Check if we need to convert this using DOS-style short mode. If the path
22524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22525   # take no chances and rewrite it.
22526   # Note: m4 eats our [], so we need to use [ and ] instead.
22527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22528   if test "x$has_forbidden_chars" != x; then
22529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22530     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22531   fi
22532 
22533 
22534   windows_path="$new_path"
22535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22536     unix_path=`$CYGPATH -u "$windows_path"`
22537     new_path="$unix_path"
22538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22540     new_path="$unix_path"
22541   fi
22542 
22543   if test "x$path" != "x$new_path"; then
22544     BOOT_JDK="$new_path"
22545     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22546 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22547   fi
22548 
22549   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22550   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22551 
22552   else
22553     # We're on a posix platform. Hooray! :)
22554     path="$BOOT_JDK"
22555     has_space=`$ECHO "$path" | $GREP " "`
22556     if test "x$has_space" != x; then
22557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22558 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22559       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22560     fi
22561 
22562     # Use eval to expand a potential ~
22563     eval path="$path"
22564     if test ! -f "$path" && test ! -d "$path"; then
22565       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22566     fi
22567 
22568     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22569   fi
22570 
22571               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22572 $as_echo_n "checking for Boot JDK... " >&6; }
22573               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22574 $as_echo "$BOOT_JDK" >&6; }
22575               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22576 $as_echo_n "checking Boot JDK version... " >&6; }
22577               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22578               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22579 $as_echo "$BOOT_JDK_VERSION" >&6; }
22580             fi # end check jdk version
22581           fi # end check rt.jar
22582         fi # end check javac
22583       fi # end check java
22584     fi # end check boot jdk found
22585   fi
22586 
22587 
22588   if test "x$BOOT_JDK_FOUND" = xno; then
22589     # Now execute the test
22590 
22591   if test "x$ProgramFiles" != x; then
22592     VIRTUAL_DIR="$ProgramFiles/Java"
22593 
22594   windows_path="$VIRTUAL_DIR"
22595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22596     unix_path=`$CYGPATH -u "$windows_path"`
22597     VIRTUAL_DIR="$unix_path"
22598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22600     VIRTUAL_DIR="$unix_path"
22601   fi
22602 
22603 
22604   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22605   BOOT_JDK_SUFFIX=""
22606   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22607   if test "x$ALL_JDKS_FOUND" != x; then
22608     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22609 
22610   if test "x$BOOT_JDK_FOUND" = xno; then
22611     # Now execute the test
22612 
22613         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22614         if test -d "$BOOT_JDK"; then
22615           BOOT_JDK_FOUND=maybe
22616           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22617 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22618         fi
22619 
22620 
22621     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22622     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22623       # Do we have a bin/java?
22624       if test ! -x "$BOOT_JDK/bin/java"; then
22625         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22626 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22627         BOOT_JDK_FOUND=no
22628       else
22629         # Do we have a bin/javac?
22630         if test ! -x "$BOOT_JDK/bin/javac"; then
22631           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22632 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22633           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22634 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22635           BOOT_JDK_FOUND=no
22636         else
22637           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22638           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22639             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22641             BOOT_JDK_FOUND=no
22642           else
22643             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22644             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22645 
22646             # Extra M4 quote needed to protect [] in grep expression.
22647             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22648             if test "x$FOUND_VERSION_78" = x; then
22649               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22651               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22652 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22653               BOOT_JDK_FOUND=no
22654             else
22655               # We're done! :-)
22656               BOOT_JDK_FOUND=yes
22657 
22658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659 
22660   # Input might be given as Windows format, start by converting to
22661   # unix format.
22662   path="$BOOT_JDK"
22663   new_path=`$CYGPATH -u "$path"`
22664 
22665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22668   # "foo.exe" is OK but "foo" is an error.
22669   #
22670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22671   # It is also a way to make sure we got the proper file name for the real test later on.
22672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22673   if test "x$test_shortpath" = x; then
22674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22675 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22676     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22677   fi
22678 
22679   # Call helper function which possibly converts this using DOS-style short mode.
22680   # If so, the updated path is stored in $new_path.
22681 
22682   input_path="$new_path"
22683   # Check if we need to convert this using DOS-style short mode. If the path
22684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22685   # take no chances and rewrite it.
22686   # Note: m4 eats our [], so we need to use [ and ] instead.
22687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22688   if test "x$has_forbidden_chars" != x; then
22689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22693       # Going to short mode and back again did indeed matter. Since short mode is
22694       # case insensitive, let's make it lowercase to improve readability.
22695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22696       # Now convert it back to Unix-style (cygpath)
22697       input_path=`$CYGPATH -u "$shortmode_path"`
22698       new_path="$input_path"
22699     fi
22700   fi
22701 
22702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22703   if test "x$test_cygdrive_prefix" = x; then
22704     # As a simple fix, exclude /usr/bin since it's not a real path.
22705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22707       # a path prefixed by /cygdrive for fixpath to work.
22708       new_path="$CYGWIN_ROOT_PATH$input_path"
22709     fi
22710   fi
22711 
22712 
22713   if test "x$path" != "x$new_path"; then
22714     BOOT_JDK="$new_path"
22715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22716 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22717   fi
22718 
22719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22720 
22721   path="$BOOT_JDK"
22722   has_colon=`$ECHO $path | $GREP ^.:`
22723   new_path="$path"
22724   if test "x$has_colon" = x; then
22725     # Not in mixed or Windows style, start by that.
22726     new_path=`cmd //c echo $path`
22727   fi
22728 
22729 
22730   input_path="$new_path"
22731   # Check if we need to convert this using DOS-style short mode. If the path
22732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22733   # take no chances and rewrite it.
22734   # Note: m4 eats our [], so we need to use [ and ] instead.
22735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22736   if test "x$has_forbidden_chars" != x; then
22737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22739   fi
22740 
22741 
22742   windows_path="$new_path"
22743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22744     unix_path=`$CYGPATH -u "$windows_path"`
22745     new_path="$unix_path"
22746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22748     new_path="$unix_path"
22749   fi
22750 
22751   if test "x$path" != "x$new_path"; then
22752     BOOT_JDK="$new_path"
22753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22754 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22755   fi
22756 
22757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22759 
22760   else
22761     # We're on a posix platform. Hooray! :)
22762     path="$BOOT_JDK"
22763     has_space=`$ECHO "$path" | $GREP " "`
22764     if test "x$has_space" != x; then
22765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22766 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22767       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22768     fi
22769 
22770     # Use eval to expand a potential ~
22771     eval path="$path"
22772     if test ! -f "$path" && test ! -d "$path"; then
22773       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22774     fi
22775 
22776     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22777   fi
22778 
22779               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22780 $as_echo_n "checking for Boot JDK... " >&6; }
22781               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22782 $as_echo "$BOOT_JDK" >&6; }
22783               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22784 $as_echo_n "checking Boot JDK version... " >&6; }
22785               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22786               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22787 $as_echo "$BOOT_JDK_VERSION" >&6; }
22788             fi # end check jdk version
22789           fi # end check rt.jar
22790         fi # end check javac
22791       fi # end check java
22792     fi # end check boot jdk found
22793   fi
22794 
22795     done
22796   fi
22797 
22798   fi
22799 
22800 
22801     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22802     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22803       # Do we have a bin/java?
22804       if test ! -x "$BOOT_JDK/bin/java"; then
22805         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22807         BOOT_JDK_FOUND=no
22808       else
22809         # Do we have a bin/javac?
22810         if test ! -x "$BOOT_JDK/bin/javac"; then
22811           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22812 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22813           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22814 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22815           BOOT_JDK_FOUND=no
22816         else
22817           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22818           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22819             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22821             BOOT_JDK_FOUND=no
22822           else
22823             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22824             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22825 
22826             # Extra M4 quote needed to protect [] in grep expression.
22827             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22828             if test "x$FOUND_VERSION_78" = x; then
22829               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22831               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22832 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22833               BOOT_JDK_FOUND=no
22834             else
22835               # We're done! :-)
22836               BOOT_JDK_FOUND=yes
22837 
22838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22839 
22840   # Input might be given as Windows format, start by converting to
22841   # unix format.
22842   path="$BOOT_JDK"
22843   new_path=`$CYGPATH -u "$path"`
22844 
22845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22848   # "foo.exe" is OK but "foo" is an error.
22849   #
22850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22851   # It is also a way to make sure we got the proper file name for the real test later on.
22852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22853   if test "x$test_shortpath" = x; then
22854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22855 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22856     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22857   fi
22858 
22859   # Call helper function which possibly converts this using DOS-style short mode.
22860   # If so, the updated path is stored in $new_path.
22861 
22862   input_path="$new_path"
22863   # Check if we need to convert this using DOS-style short mode. If the path
22864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22865   # take no chances and rewrite it.
22866   # Note: m4 eats our [], so we need to use [ and ] instead.
22867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22868   if test "x$has_forbidden_chars" != x; then
22869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22873       # Going to short mode and back again did indeed matter. Since short mode is
22874       # case insensitive, let's make it lowercase to improve readability.
22875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22876       # Now convert it back to Unix-style (cygpath)
22877       input_path=`$CYGPATH -u "$shortmode_path"`
22878       new_path="$input_path"
22879     fi
22880   fi
22881 
22882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22883   if test "x$test_cygdrive_prefix" = x; then
22884     # As a simple fix, exclude /usr/bin since it's not a real path.
22885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22887       # a path prefixed by /cygdrive for fixpath to work.
22888       new_path="$CYGWIN_ROOT_PATH$input_path"
22889     fi
22890   fi
22891 
22892 
22893   if test "x$path" != "x$new_path"; then
22894     BOOT_JDK="$new_path"
22895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22896 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22897   fi
22898 
22899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22900 
22901   path="$BOOT_JDK"
22902   has_colon=`$ECHO $path | $GREP ^.:`
22903   new_path="$path"
22904   if test "x$has_colon" = x; then
22905     # Not in mixed or Windows style, start by that.
22906     new_path=`cmd //c echo $path`
22907   fi
22908 
22909 
22910   input_path="$new_path"
22911   # Check if we need to convert this using DOS-style short mode. If the path
22912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22913   # take no chances and rewrite it.
22914   # Note: m4 eats our [], so we need to use [ and ] instead.
22915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22916   if test "x$has_forbidden_chars" != x; then
22917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22919   fi
22920 
22921 
22922   windows_path="$new_path"
22923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22924     unix_path=`$CYGPATH -u "$windows_path"`
22925     new_path="$unix_path"
22926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22928     new_path="$unix_path"
22929   fi
22930 
22931   if test "x$path" != "x$new_path"; then
22932     BOOT_JDK="$new_path"
22933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22934 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22935   fi
22936 
22937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22939 
22940   else
22941     # We're on a posix platform. Hooray! :)
22942     path="$BOOT_JDK"
22943     has_space=`$ECHO "$path" | $GREP " "`
22944     if test "x$has_space" != x; then
22945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22946 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22947       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22948     fi
22949 
22950     # Use eval to expand a potential ~
22951     eval path="$path"
22952     if test ! -f "$path" && test ! -d "$path"; then
22953       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22954     fi
22955 
22956     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22957   fi
22958 
22959               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22960 $as_echo_n "checking for Boot JDK... " >&6; }
22961               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22962 $as_echo "$BOOT_JDK" >&6; }
22963               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22964 $as_echo_n "checking Boot JDK version... " >&6; }
22965               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22966               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22967 $as_echo "$BOOT_JDK_VERSION" >&6; }
22968             fi # end check jdk version
22969           fi # end check rt.jar
22970         fi # end check javac
22971       fi # end check java
22972     fi # end check boot jdk found
22973   fi
22974 
22975 
22976   if test "x$BOOT_JDK_FOUND" = xno; then
22977     # Now execute the test
22978 
22979   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22980   BOOT_JDK_SUFFIX=""
22981   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22982   if test "x$ALL_JDKS_FOUND" != x; then
22983     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22984 
22985   if test "x$BOOT_JDK_FOUND" = xno; then
22986     # Now execute the test
22987 
22988         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22989         if test -d "$BOOT_JDK"; then
22990           BOOT_JDK_FOUND=maybe
22991           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22992 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22993         fi
22994 
22995 
22996     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22997     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22998       # Do we have a bin/java?
22999       if test ! -x "$BOOT_JDK/bin/java"; then
23000         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23002         BOOT_JDK_FOUND=no
23003       else
23004         # Do we have a bin/javac?
23005         if test ! -x "$BOOT_JDK/bin/javac"; then
23006           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23007 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23008           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23009 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23010           BOOT_JDK_FOUND=no
23011         else
23012           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23013           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23014             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23015 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23016             BOOT_JDK_FOUND=no
23017           else
23018             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23019             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23020 
23021             # Extra M4 quote needed to protect [] in grep expression.
23022             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23023             if test "x$FOUND_VERSION_78" = x; then
23024               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23026               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23027 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23028               BOOT_JDK_FOUND=no
23029             else
23030               # We're done! :-)
23031               BOOT_JDK_FOUND=yes
23032 
23033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23034 
23035   # Input might be given as Windows format, start by converting to
23036   # unix format.
23037   path="$BOOT_JDK"
23038   new_path=`$CYGPATH -u "$path"`
23039 
23040   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23041   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23042   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23043   # "foo.exe" is OK but "foo" is an error.
23044   #
23045   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23046   # It is also a way to make sure we got the proper file name for the real test later on.
23047   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23048   if test "x$test_shortpath" = x; then
23049     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23051     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23052   fi
23053 
23054   # Call helper function which possibly converts this using DOS-style short mode.
23055   # If so, the updated path is stored in $new_path.
23056 
23057   input_path="$new_path"
23058   # Check if we need to convert this using DOS-style short mode. If the path
23059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23060   # take no chances and rewrite it.
23061   # Note: m4 eats our [], so we need to use [ and ] instead.
23062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23063   if test "x$has_forbidden_chars" != x; then
23064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23068       # Going to short mode and back again did indeed matter. Since short mode is
23069       # case insensitive, let's make it lowercase to improve readability.
23070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23071       # Now convert it back to Unix-style (cygpath)
23072       input_path=`$CYGPATH -u "$shortmode_path"`
23073       new_path="$input_path"
23074     fi
23075   fi
23076 
23077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23078   if test "x$test_cygdrive_prefix" = x; then
23079     # As a simple fix, exclude /usr/bin since it's not a real path.
23080     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23082       # a path prefixed by /cygdrive for fixpath to work.
23083       new_path="$CYGWIN_ROOT_PATH$input_path"
23084     fi
23085   fi
23086 
23087 
23088   if test "x$path" != "x$new_path"; then
23089     BOOT_JDK="$new_path"
23090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23091 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23092   fi
23093 
23094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23095 
23096   path="$BOOT_JDK"
23097   has_colon=`$ECHO $path | $GREP ^.:`
23098   new_path="$path"
23099   if test "x$has_colon" = x; then
23100     # Not in mixed or Windows style, start by that.
23101     new_path=`cmd //c echo $path`
23102   fi
23103 
23104 
23105   input_path="$new_path"
23106   # Check if we need to convert this using DOS-style short mode. If the path
23107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23108   # take no chances and rewrite it.
23109   # Note: m4 eats our [], so we need to use [ and ] instead.
23110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23111   if test "x$has_forbidden_chars" != x; then
23112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23113     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23114   fi
23115 
23116 
23117   windows_path="$new_path"
23118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23119     unix_path=`$CYGPATH -u "$windows_path"`
23120     new_path="$unix_path"
23121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23123     new_path="$unix_path"
23124   fi
23125 
23126   if test "x$path" != "x$new_path"; then
23127     BOOT_JDK="$new_path"
23128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23129 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23130   fi
23131 
23132   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23133   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23134 
23135   else
23136     # We're on a posix platform. Hooray! :)
23137     path="$BOOT_JDK"
23138     has_space=`$ECHO "$path" | $GREP " "`
23139     if test "x$has_space" != x; then
23140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23142       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23143     fi
23144 
23145     # Use eval to expand a potential ~
23146     eval path="$path"
23147     if test ! -f "$path" && test ! -d "$path"; then
23148       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23149     fi
23150 
23151     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23152   fi
23153 
23154               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23155 $as_echo_n "checking for Boot JDK... " >&6; }
23156               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23157 $as_echo "$BOOT_JDK" >&6; }
23158               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23159 $as_echo_n "checking Boot JDK version... " >&6; }
23160               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23161               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23162 $as_echo "$BOOT_JDK_VERSION" >&6; }
23163             fi # end check jdk version
23164           fi # end check rt.jar
23165         fi # end check javac
23166       fi # end check java
23167     fi # end check boot jdk found
23168   fi
23169 
23170     done
23171   fi
23172 
23173 
23174     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23175     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23176       # Do we have a bin/java?
23177       if test ! -x "$BOOT_JDK/bin/java"; then
23178         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23180         BOOT_JDK_FOUND=no
23181       else
23182         # Do we have a bin/javac?
23183         if test ! -x "$BOOT_JDK/bin/javac"; then
23184           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23186           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23187 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23188           BOOT_JDK_FOUND=no
23189         else
23190           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23191           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23192             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23194             BOOT_JDK_FOUND=no
23195           else
23196             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23197             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23198 
23199             # Extra M4 quote needed to protect [] in grep expression.
23200             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23201             if test "x$FOUND_VERSION_78" = x; then
23202               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23204               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23205 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23206               BOOT_JDK_FOUND=no
23207             else
23208               # We're done! :-)
23209               BOOT_JDK_FOUND=yes
23210 
23211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23212 
23213   # Input might be given as Windows format, start by converting to
23214   # unix format.
23215   path="$BOOT_JDK"
23216   new_path=`$CYGPATH -u "$path"`
23217 
23218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23221   # "foo.exe" is OK but "foo" is an error.
23222   #
23223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23224   # It is also a way to make sure we got the proper file name for the real test later on.
23225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23226   if test "x$test_shortpath" = x; then
23227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23228 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23229     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23230   fi
23231 
23232   # Call helper function which possibly converts this using DOS-style short mode.
23233   # If so, the updated path is stored in $new_path.
23234 
23235   input_path="$new_path"
23236   # Check if we need to convert this using DOS-style short mode. If the path
23237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23238   # take no chances and rewrite it.
23239   # Note: m4 eats our [], so we need to use [ and ] instead.
23240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23241   if test "x$has_forbidden_chars" != x; then
23242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23246       # Going to short mode and back again did indeed matter. Since short mode is
23247       # case insensitive, let's make it lowercase to improve readability.
23248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23249       # Now convert it back to Unix-style (cygpath)
23250       input_path=`$CYGPATH -u "$shortmode_path"`
23251       new_path="$input_path"
23252     fi
23253   fi
23254 
23255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23256   if test "x$test_cygdrive_prefix" = x; then
23257     # As a simple fix, exclude /usr/bin since it's not a real path.
23258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23260       # a path prefixed by /cygdrive for fixpath to work.
23261       new_path="$CYGWIN_ROOT_PATH$input_path"
23262     fi
23263   fi
23264 
23265 
23266   if test "x$path" != "x$new_path"; then
23267     BOOT_JDK="$new_path"
23268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23269 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23270   fi
23271 
23272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23273 
23274   path="$BOOT_JDK"
23275   has_colon=`$ECHO $path | $GREP ^.:`
23276   new_path="$path"
23277   if test "x$has_colon" = x; then
23278     # Not in mixed or Windows style, start by that.
23279     new_path=`cmd //c echo $path`
23280   fi
23281 
23282 
23283   input_path="$new_path"
23284   # Check if we need to convert this using DOS-style short mode. If the path
23285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23286   # take no chances and rewrite it.
23287   # Note: m4 eats our [], so we need to use [ and ] instead.
23288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23289   if test "x$has_forbidden_chars" != x; then
23290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23292   fi
23293 
23294 
23295   windows_path="$new_path"
23296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297     unix_path=`$CYGPATH -u "$windows_path"`
23298     new_path="$unix_path"
23299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23301     new_path="$unix_path"
23302   fi
23303 
23304   if test "x$path" != "x$new_path"; then
23305     BOOT_JDK="$new_path"
23306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23307 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23308   fi
23309 
23310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23312 
23313   else
23314     # We're on a posix platform. Hooray! :)
23315     path="$BOOT_JDK"
23316     has_space=`$ECHO "$path" | $GREP " "`
23317     if test "x$has_space" != x; then
23318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23319 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23320       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23321     fi
23322 
23323     # Use eval to expand a potential ~
23324     eval path="$path"
23325     if test ! -f "$path" && test ! -d "$path"; then
23326       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23327     fi
23328 
23329     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23330   fi
23331 
23332               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23333 $as_echo_n "checking for Boot JDK... " >&6; }
23334               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23335 $as_echo "$BOOT_JDK" >&6; }
23336               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23337 $as_echo_n "checking Boot JDK version... " >&6; }
23338               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23339               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23340 $as_echo "$BOOT_JDK_VERSION" >&6; }
23341             fi # end check jdk version
23342           fi # end check rt.jar
23343         fi # end check javac
23344       fi # end check java
23345     fi # end check boot jdk found
23346   fi
23347 
23348   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23349 
23350   if test "x$BOOT_JDK_FOUND" = xno; then
23351     # Now execute the test
23352 
23353   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23354   BOOT_JDK_SUFFIX="/Contents/Home"
23355   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23356   if test "x$ALL_JDKS_FOUND" != x; then
23357     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23358 
23359   if test "x$BOOT_JDK_FOUND" = xno; then
23360     # Now execute the test
23361 
23362         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23363         if test -d "$BOOT_JDK"; then
23364           BOOT_JDK_FOUND=maybe
23365           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23366 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23367         fi
23368 
23369 
23370     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23371     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23372       # Do we have a bin/java?
23373       if test ! -x "$BOOT_JDK/bin/java"; then
23374         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23376         BOOT_JDK_FOUND=no
23377       else
23378         # Do we have a bin/javac?
23379         if test ! -x "$BOOT_JDK/bin/javac"; then
23380           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23382           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23383 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23384           BOOT_JDK_FOUND=no
23385         else
23386           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23387           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23388             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23389 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23390             BOOT_JDK_FOUND=no
23391           else
23392             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23393             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23394 
23395             # Extra M4 quote needed to protect [] in grep expression.
23396             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23397             if test "x$FOUND_VERSION_78" = x; then
23398               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23399 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23400               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23401 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23402               BOOT_JDK_FOUND=no
23403             else
23404               # We're done! :-)
23405               BOOT_JDK_FOUND=yes
23406 
23407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23408 
23409   # Input might be given as Windows format, start by converting to
23410   # unix format.
23411   path="$BOOT_JDK"
23412   new_path=`$CYGPATH -u "$path"`
23413 
23414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23417   # "foo.exe" is OK but "foo" is an error.
23418   #
23419   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23420   # It is also a way to make sure we got the proper file name for the real test later on.
23421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23422   if test "x$test_shortpath" = x; then
23423     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23424 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23425     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23426   fi
23427 
23428   # Call helper function which possibly converts this using DOS-style short mode.
23429   # If so, the updated path is stored in $new_path.
23430 
23431   input_path="$new_path"
23432   # Check if we need to convert this using DOS-style short mode. If the path
23433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23434   # take no chances and rewrite it.
23435   # Note: m4 eats our [], so we need to use [ and ] instead.
23436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23437   if test "x$has_forbidden_chars" != x; then
23438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23442       # Going to short mode and back again did indeed matter. Since short mode is
23443       # case insensitive, let's make it lowercase to improve readability.
23444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23445       # Now convert it back to Unix-style (cygpath)
23446       input_path=`$CYGPATH -u "$shortmode_path"`
23447       new_path="$input_path"
23448     fi
23449   fi
23450 
23451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23452   if test "x$test_cygdrive_prefix" = x; then
23453     # As a simple fix, exclude /usr/bin since it's not a real path.
23454     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23456       # a path prefixed by /cygdrive for fixpath to work.
23457       new_path="$CYGWIN_ROOT_PATH$input_path"
23458     fi
23459   fi
23460 
23461 
23462   if test "x$path" != "x$new_path"; then
23463     BOOT_JDK="$new_path"
23464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23465 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23466   fi
23467 
23468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23469 
23470   path="$BOOT_JDK"
23471   has_colon=`$ECHO $path | $GREP ^.:`
23472   new_path="$path"
23473   if test "x$has_colon" = x; then
23474     # Not in mixed or Windows style, start by that.
23475     new_path=`cmd //c echo $path`
23476   fi
23477 
23478 
23479   input_path="$new_path"
23480   # Check if we need to convert this using DOS-style short mode. If the path
23481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23482   # take no chances and rewrite it.
23483   # Note: m4 eats our [], so we need to use [ and ] instead.
23484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23485   if test "x$has_forbidden_chars" != x; then
23486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23488   fi
23489 
23490 
23491   windows_path="$new_path"
23492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493     unix_path=`$CYGPATH -u "$windows_path"`
23494     new_path="$unix_path"
23495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23497     new_path="$unix_path"
23498   fi
23499 
23500   if test "x$path" != "x$new_path"; then
23501     BOOT_JDK="$new_path"
23502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23503 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23504   fi
23505 
23506   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23507   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23508 
23509   else
23510     # We're on a posix platform. Hooray! :)
23511     path="$BOOT_JDK"
23512     has_space=`$ECHO "$path" | $GREP " "`
23513     if test "x$has_space" != x; then
23514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23515 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23516       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23517     fi
23518 
23519     # Use eval to expand a potential ~
23520     eval path="$path"
23521     if test ! -f "$path" && test ! -d "$path"; then
23522       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23523     fi
23524 
23525     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23526   fi
23527 
23528               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23529 $as_echo_n "checking for Boot JDK... " >&6; }
23530               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23531 $as_echo "$BOOT_JDK" >&6; }
23532               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23533 $as_echo_n "checking Boot JDK version... " >&6; }
23534               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23535               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23536 $as_echo "$BOOT_JDK_VERSION" >&6; }
23537             fi # end check jdk version
23538           fi # end check rt.jar
23539         fi # end check javac
23540       fi # end check java
23541     fi # end check boot jdk found
23542   fi
23543 
23544     done
23545   fi
23546 
23547 
23548     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23549     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23550       # Do we have a bin/java?
23551       if test ! -x "$BOOT_JDK/bin/java"; then
23552         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23554         BOOT_JDK_FOUND=no
23555       else
23556         # Do we have a bin/javac?
23557         if test ! -x "$BOOT_JDK/bin/javac"; then
23558           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23560           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23561 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23562           BOOT_JDK_FOUND=no
23563         else
23564           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23565           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23566             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23568             BOOT_JDK_FOUND=no
23569           else
23570             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23571             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23572 
23573             # Extra M4 quote needed to protect [] in grep expression.
23574             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23575             if test "x$FOUND_VERSION_78" = x; then
23576               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23578               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23579 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23580               BOOT_JDK_FOUND=no
23581             else
23582               # We're done! :-)
23583               BOOT_JDK_FOUND=yes
23584 
23585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23586 
23587   # Input might be given as Windows format, start by converting to
23588   # unix format.
23589   path="$BOOT_JDK"
23590   new_path=`$CYGPATH -u "$path"`
23591 
23592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23595   # "foo.exe" is OK but "foo" is an error.
23596   #
23597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23598   # It is also a way to make sure we got the proper file name for the real test later on.
23599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23600   if test "x$test_shortpath" = x; then
23601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23602 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23603     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23604   fi
23605 
23606   # Call helper function which possibly converts this using DOS-style short mode.
23607   # If so, the updated path is stored in $new_path.
23608 
23609   input_path="$new_path"
23610   # Check if we need to convert this using DOS-style short mode. If the path
23611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23612   # take no chances and rewrite it.
23613   # Note: m4 eats our [], so we need to use [ and ] instead.
23614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23615   if test "x$has_forbidden_chars" != x; then
23616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23620       # Going to short mode and back again did indeed matter. Since short mode is
23621       # case insensitive, let's make it lowercase to improve readability.
23622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623       # Now convert it back to Unix-style (cygpath)
23624       input_path=`$CYGPATH -u "$shortmode_path"`
23625       new_path="$input_path"
23626     fi
23627   fi
23628 
23629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23630   if test "x$test_cygdrive_prefix" = x; then
23631     # As a simple fix, exclude /usr/bin since it's not a real path.
23632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23634       # a path prefixed by /cygdrive for fixpath to work.
23635       new_path="$CYGWIN_ROOT_PATH$input_path"
23636     fi
23637   fi
23638 
23639 
23640   if test "x$path" != "x$new_path"; then
23641     BOOT_JDK="$new_path"
23642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23643 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23644   fi
23645 
23646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23647 
23648   path="$BOOT_JDK"
23649   has_colon=`$ECHO $path | $GREP ^.:`
23650   new_path="$path"
23651   if test "x$has_colon" = x; then
23652     # Not in mixed or Windows style, start by that.
23653     new_path=`cmd //c echo $path`
23654   fi
23655 
23656 
23657   input_path="$new_path"
23658   # Check if we need to convert this using DOS-style short mode. If the path
23659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23660   # take no chances and rewrite it.
23661   # Note: m4 eats our [], so we need to use [ and ] instead.
23662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23663   if test "x$has_forbidden_chars" != x; then
23664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23666   fi
23667 
23668 
23669   windows_path="$new_path"
23670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23671     unix_path=`$CYGPATH -u "$windows_path"`
23672     new_path="$unix_path"
23673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23675     new_path="$unix_path"
23676   fi
23677 
23678   if test "x$path" != "x$new_path"; then
23679     BOOT_JDK="$new_path"
23680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23681 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23682   fi
23683 
23684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23686 
23687   else
23688     # We're on a posix platform. Hooray! :)
23689     path="$BOOT_JDK"
23690     has_space=`$ECHO "$path" | $GREP " "`
23691     if test "x$has_space" != x; then
23692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23693 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23694       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23695     fi
23696 
23697     # Use eval to expand a potential ~
23698     eval path="$path"
23699     if test ! -f "$path" && test ! -d "$path"; then
23700       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23701     fi
23702 
23703     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23704   fi
23705 
23706               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23707 $as_echo_n "checking for Boot JDK... " >&6; }
23708               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23709 $as_echo "$BOOT_JDK" >&6; }
23710               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23711 $as_echo_n "checking Boot JDK version... " >&6; }
23712               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23713               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23714 $as_echo "$BOOT_JDK_VERSION" >&6; }
23715             fi # end check jdk version
23716           fi # end check rt.jar
23717         fi # end check javac
23718       fi # end check java
23719     fi # end check boot jdk found
23720   fi
23721 
23722 
23723   if test "x$BOOT_JDK_FOUND" = xno; then
23724     # Now execute the test
23725 
23726   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23727   BOOT_JDK_SUFFIX="/Contents/Home"
23728   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23729   if test "x$ALL_JDKS_FOUND" != x; then
23730     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23731 
23732   if test "x$BOOT_JDK_FOUND" = xno; then
23733     # Now execute the test
23734 
23735         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23736         if test -d "$BOOT_JDK"; then
23737           BOOT_JDK_FOUND=maybe
23738           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23739 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23740         fi
23741 
23742 
23743     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23744     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23745       # Do we have a bin/java?
23746       if test ! -x "$BOOT_JDK/bin/java"; then
23747         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23749         BOOT_JDK_FOUND=no
23750       else
23751         # Do we have a bin/javac?
23752         if test ! -x "$BOOT_JDK/bin/javac"; then
23753           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23754 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23755           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23756 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23757           BOOT_JDK_FOUND=no
23758         else
23759           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23760           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23761             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23763             BOOT_JDK_FOUND=no
23764           else
23765             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23766             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23767 
23768             # Extra M4 quote needed to protect [] in grep expression.
23769             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23770             if test "x$FOUND_VERSION_78" = x; then
23771               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23773               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23774 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23775               BOOT_JDK_FOUND=no
23776             else
23777               # We're done! :-)
23778               BOOT_JDK_FOUND=yes
23779 
23780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23781 
23782   # Input might be given as Windows format, start by converting to
23783   # unix format.
23784   path="$BOOT_JDK"
23785   new_path=`$CYGPATH -u "$path"`
23786 
23787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23790   # "foo.exe" is OK but "foo" is an error.
23791   #
23792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23793   # It is also a way to make sure we got the proper file name for the real test later on.
23794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23795   if test "x$test_shortpath" = x; then
23796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23797 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23798     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23799   fi
23800 
23801   # Call helper function which possibly converts this using DOS-style short mode.
23802   # If so, the updated path is stored in $new_path.
23803 
23804   input_path="$new_path"
23805   # Check if we need to convert this using DOS-style short mode. If the path
23806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23807   # take no chances and rewrite it.
23808   # Note: m4 eats our [], so we need to use [ and ] instead.
23809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23810   if test "x$has_forbidden_chars" != x; then
23811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23815       # Going to short mode and back again did indeed matter. Since short mode is
23816       # case insensitive, let's make it lowercase to improve readability.
23817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23818       # Now convert it back to Unix-style (cygpath)
23819       input_path=`$CYGPATH -u "$shortmode_path"`
23820       new_path="$input_path"
23821     fi
23822   fi
23823 
23824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23825   if test "x$test_cygdrive_prefix" = x; then
23826     # As a simple fix, exclude /usr/bin since it's not a real path.
23827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23829       # a path prefixed by /cygdrive for fixpath to work.
23830       new_path="$CYGWIN_ROOT_PATH$input_path"
23831     fi
23832   fi
23833 
23834 
23835   if test "x$path" != "x$new_path"; then
23836     BOOT_JDK="$new_path"
23837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23839   fi
23840 
23841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23842 
23843   path="$BOOT_JDK"
23844   has_colon=`$ECHO $path | $GREP ^.:`
23845   new_path="$path"
23846   if test "x$has_colon" = x; then
23847     # Not in mixed or Windows style, start by that.
23848     new_path=`cmd //c echo $path`
23849   fi
23850 
23851 
23852   input_path="$new_path"
23853   # Check if we need to convert this using DOS-style short mode. If the path
23854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23855   # take no chances and rewrite it.
23856   # Note: m4 eats our [], so we need to use [ and ] instead.
23857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23858   if test "x$has_forbidden_chars" != x; then
23859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23861   fi
23862 
23863 
23864   windows_path="$new_path"
23865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23866     unix_path=`$CYGPATH -u "$windows_path"`
23867     new_path="$unix_path"
23868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23870     new_path="$unix_path"
23871   fi
23872 
23873   if test "x$path" != "x$new_path"; then
23874     BOOT_JDK="$new_path"
23875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23877   fi
23878 
23879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23881 
23882   else
23883     # We're on a posix platform. Hooray! :)
23884     path="$BOOT_JDK"
23885     has_space=`$ECHO "$path" | $GREP " "`
23886     if test "x$has_space" != x; then
23887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23889       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23890     fi
23891 
23892     # Use eval to expand a potential ~
23893     eval path="$path"
23894     if test ! -f "$path" && test ! -d "$path"; then
23895       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23896     fi
23897 
23898     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23899   fi
23900 
23901               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23902 $as_echo_n "checking for Boot JDK... " >&6; }
23903               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23904 $as_echo "$BOOT_JDK" >&6; }
23905               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23906 $as_echo_n "checking Boot JDK version... " >&6; }
23907               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23908               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23909 $as_echo "$BOOT_JDK_VERSION" >&6; }
23910             fi # end check jdk version
23911           fi # end check rt.jar
23912         fi # end check javac
23913       fi # end check java
23914     fi # end check boot jdk found
23915   fi
23916 
23917     done
23918   fi
23919 
23920 
23921     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23922     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23923       # Do we have a bin/java?
23924       if test ! -x "$BOOT_JDK/bin/java"; then
23925         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23926 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23927         BOOT_JDK_FOUND=no
23928       else
23929         # Do we have a bin/javac?
23930         if test ! -x "$BOOT_JDK/bin/javac"; then
23931           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23932 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23933           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23934 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23935           BOOT_JDK_FOUND=no
23936         else
23937           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23938           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23939             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23941             BOOT_JDK_FOUND=no
23942           else
23943             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23944             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23945 
23946             # Extra M4 quote needed to protect [] in grep expression.
23947             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23948             if test "x$FOUND_VERSION_78" = x; then
23949               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23950 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23951               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23952 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23953               BOOT_JDK_FOUND=no
23954             else
23955               # We're done! :-)
23956               BOOT_JDK_FOUND=yes
23957 
23958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23959 
23960   # Input might be given as Windows format, start by converting to
23961   # unix format.
23962   path="$BOOT_JDK"
23963   new_path=`$CYGPATH -u "$path"`
23964 
23965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23968   # "foo.exe" is OK but "foo" is an error.
23969   #
23970   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23971   # It is also a way to make sure we got the proper file name for the real test later on.
23972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23973   if test "x$test_shortpath" = x; then
23974     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23975 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23976     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23977   fi
23978 
23979   # Call helper function which possibly converts this using DOS-style short mode.
23980   # If so, the updated path is stored in $new_path.
23981 
23982   input_path="$new_path"
23983   # Check if we need to convert this using DOS-style short mode. If the path
23984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23985   # take no chances and rewrite it.
23986   # Note: m4 eats our [], so we need to use [ and ] instead.
23987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23988   if test "x$has_forbidden_chars" != x; then
23989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23990     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23991     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23992     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23993       # Going to short mode and back again did indeed matter. Since short mode is
23994       # case insensitive, let's make it lowercase to improve readability.
23995       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23996       # Now convert it back to Unix-style (cygpath)
23997       input_path=`$CYGPATH -u "$shortmode_path"`
23998       new_path="$input_path"
23999     fi
24000   fi
24001 
24002   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24003   if test "x$test_cygdrive_prefix" = x; then
24004     # As a simple fix, exclude /usr/bin since it's not a real path.
24005     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24006       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24007       # a path prefixed by /cygdrive for fixpath to work.
24008       new_path="$CYGWIN_ROOT_PATH$input_path"
24009     fi
24010   fi
24011 
24012 
24013   if test "x$path" != "x$new_path"; then
24014     BOOT_JDK="$new_path"
24015     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24016 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24017   fi
24018 
24019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24020 
24021   path="$BOOT_JDK"
24022   has_colon=`$ECHO $path | $GREP ^.:`
24023   new_path="$path"
24024   if test "x$has_colon" = x; then
24025     # Not in mixed or Windows style, start by that.
24026     new_path=`cmd //c echo $path`
24027   fi
24028 
24029 
24030   input_path="$new_path"
24031   # Check if we need to convert this using DOS-style short mode. If the path
24032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24033   # take no chances and rewrite it.
24034   # Note: m4 eats our [], so we need to use [ and ] instead.
24035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24036   if test "x$has_forbidden_chars" != x; then
24037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24038     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24039   fi
24040 
24041 
24042   windows_path="$new_path"
24043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24044     unix_path=`$CYGPATH -u "$windows_path"`
24045     new_path="$unix_path"
24046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24048     new_path="$unix_path"
24049   fi
24050 
24051   if test "x$path" != "x$new_path"; then
24052     BOOT_JDK="$new_path"
24053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24054 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24055   fi
24056 
24057   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24058   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24059 
24060   else
24061     # We're on a posix platform. Hooray! :)
24062     path="$BOOT_JDK"
24063     has_space=`$ECHO "$path" | $GREP " "`
24064     if test "x$has_space" != x; then
24065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24066 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24067       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24068     fi
24069 
24070     # Use eval to expand a potential ~
24071     eval path="$path"
24072     if test ! -f "$path" && test ! -d "$path"; then
24073       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24074     fi
24075 
24076     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24077   fi
24078 
24079               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24080 $as_echo_n "checking for Boot JDK... " >&6; }
24081               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24082 $as_echo "$BOOT_JDK" >&6; }
24083               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24084 $as_echo_n "checking Boot JDK version... " >&6; }
24085               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24086               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24087 $as_echo "$BOOT_JDK_VERSION" >&6; }
24088             fi # end check jdk version
24089           fi # end check rt.jar
24090         fi # end check javac
24091       fi # end check java
24092     fi # end check boot jdk found
24093   fi
24094 
24095   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24096 
24097   if test "x$BOOT_JDK_FOUND" = xno; then
24098     # Now execute the test
24099 
24100   BOOT_JDK_PREFIX="/usr/lib/jvm"
24101   BOOT_JDK_SUFFIX=""
24102   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24103   if test "x$ALL_JDKS_FOUND" != x; then
24104     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24105 
24106   if test "x$BOOT_JDK_FOUND" = xno; then
24107     # Now execute the test
24108 
24109         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24110         if test -d "$BOOT_JDK"; then
24111           BOOT_JDK_FOUND=maybe
24112           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24113 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24114         fi
24115 
24116 
24117     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24118     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24119       # Do we have a bin/java?
24120       if test ! -x "$BOOT_JDK/bin/java"; then
24121         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24122 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24123         BOOT_JDK_FOUND=no
24124       else
24125         # Do we have a bin/javac?
24126         if test ! -x "$BOOT_JDK/bin/javac"; then
24127           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24129           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24130 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24131           BOOT_JDK_FOUND=no
24132         else
24133           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24134           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24135             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24136 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24137             BOOT_JDK_FOUND=no
24138           else
24139             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24140             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24141 
24142             # Extra M4 quote needed to protect [] in grep expression.
24143             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24144             if test "x$FOUND_VERSION_78" = x; then
24145               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24146 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24147               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24148 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24149               BOOT_JDK_FOUND=no
24150             else
24151               # We're done! :-)
24152               BOOT_JDK_FOUND=yes
24153 
24154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24155 
24156   # Input might be given as Windows format, start by converting to
24157   # unix format.
24158   path="$BOOT_JDK"
24159   new_path=`$CYGPATH -u "$path"`
24160 
24161   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24162   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24163   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24164   # "foo.exe" is OK but "foo" is an error.
24165   #
24166   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24167   # It is also a way to make sure we got the proper file name for the real test later on.
24168   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24169   if test "x$test_shortpath" = x; then
24170     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24171 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24172     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24173   fi
24174 
24175   # Call helper function which possibly converts this using DOS-style short mode.
24176   # If so, the updated path is stored in $new_path.
24177 
24178   input_path="$new_path"
24179   # Check if we need to convert this using DOS-style short mode. If the path
24180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24181   # take no chances and rewrite it.
24182   # Note: m4 eats our [], so we need to use [ and ] instead.
24183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24184   if test "x$has_forbidden_chars" != x; then
24185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24186     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24187     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24188     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24189       # Going to short mode and back again did indeed matter. Since short mode is
24190       # case insensitive, let's make it lowercase to improve readability.
24191       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24192       # Now convert it back to Unix-style (cygpath)
24193       input_path=`$CYGPATH -u "$shortmode_path"`
24194       new_path="$input_path"
24195     fi
24196   fi
24197 
24198   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24199   if test "x$test_cygdrive_prefix" = x; then
24200     # As a simple fix, exclude /usr/bin since it's not a real path.
24201     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24202       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24203       # a path prefixed by /cygdrive for fixpath to work.
24204       new_path="$CYGWIN_ROOT_PATH$input_path"
24205     fi
24206   fi
24207 
24208 
24209   if test "x$path" != "x$new_path"; then
24210     BOOT_JDK="$new_path"
24211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24212 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24213   fi
24214 
24215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24216 
24217   path="$BOOT_JDK"
24218   has_colon=`$ECHO $path | $GREP ^.:`
24219   new_path="$path"
24220   if test "x$has_colon" = x; then
24221     # Not in mixed or Windows style, start by that.
24222     new_path=`cmd //c echo $path`
24223   fi
24224 
24225 
24226   input_path="$new_path"
24227   # Check if we need to convert this using DOS-style short mode. If the path
24228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24229   # take no chances and rewrite it.
24230   # Note: m4 eats our [], so we need to use [ and ] instead.
24231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24232   if test "x$has_forbidden_chars" != x; then
24233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24234     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24235   fi
24236 
24237 
24238   windows_path="$new_path"
24239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24240     unix_path=`$CYGPATH -u "$windows_path"`
24241     new_path="$unix_path"
24242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24244     new_path="$unix_path"
24245   fi
24246 
24247   if test "x$path" != "x$new_path"; then
24248     BOOT_JDK="$new_path"
24249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24250 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24251   fi
24252 
24253   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24254   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24255 
24256   else
24257     # We're on a posix platform. Hooray! :)
24258     path="$BOOT_JDK"
24259     has_space=`$ECHO "$path" | $GREP " "`
24260     if test "x$has_space" != x; then
24261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24262 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24263       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24264     fi
24265 
24266     # Use eval to expand a potential ~
24267     eval path="$path"
24268     if test ! -f "$path" && test ! -d "$path"; then
24269       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24270     fi
24271 
24272     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24273   fi
24274 
24275               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24276 $as_echo_n "checking for Boot JDK... " >&6; }
24277               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24278 $as_echo "$BOOT_JDK" >&6; }
24279               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24280 $as_echo_n "checking Boot JDK version... " >&6; }
24281               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24282               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24283 $as_echo "$BOOT_JDK_VERSION" >&6; }
24284             fi # end check jdk version
24285           fi # end check rt.jar
24286         fi # end check javac
24287       fi # end check java
24288     fi # end check boot jdk found
24289   fi
24290 
24291     done
24292   fi
24293 
24294 
24295     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24296     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24297       # Do we have a bin/java?
24298       if test ! -x "$BOOT_JDK/bin/java"; then
24299         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24301         BOOT_JDK_FOUND=no
24302       else
24303         # Do we have a bin/javac?
24304         if test ! -x "$BOOT_JDK/bin/javac"; then
24305           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24307           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24308 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24309           BOOT_JDK_FOUND=no
24310         else
24311           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24312           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24313             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24314 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24315             BOOT_JDK_FOUND=no
24316           else
24317             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24318             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24319 
24320             # Extra M4 quote needed to protect [] in grep expression.
24321             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24322             if test "x$FOUND_VERSION_78" = x; then
24323               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24325               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24326 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24327               BOOT_JDK_FOUND=no
24328             else
24329               # We're done! :-)
24330               BOOT_JDK_FOUND=yes
24331 
24332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24333 
24334   # Input might be given as Windows format, start by converting to
24335   # unix format.
24336   path="$BOOT_JDK"
24337   new_path=`$CYGPATH -u "$path"`
24338 
24339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24342   # "foo.exe" is OK but "foo" is an error.
24343   #
24344   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24345   # It is also a way to make sure we got the proper file name for the real test later on.
24346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24347   if test "x$test_shortpath" = x; then
24348     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24349 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24350     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24351   fi
24352 
24353   # Call helper function which possibly converts this using DOS-style short mode.
24354   # If so, the updated path is stored in $new_path.
24355 
24356   input_path="$new_path"
24357   # Check if we need to convert this using DOS-style short mode. If the path
24358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24359   # take no chances and rewrite it.
24360   # Note: m4 eats our [], so we need to use [ and ] instead.
24361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24362   if test "x$has_forbidden_chars" != x; then
24363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24364     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24365     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24366     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24367       # Going to short mode and back again did indeed matter. Since short mode is
24368       # case insensitive, let's make it lowercase to improve readability.
24369       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24370       # Now convert it back to Unix-style (cygpath)
24371       input_path=`$CYGPATH -u "$shortmode_path"`
24372       new_path="$input_path"
24373     fi
24374   fi
24375 
24376   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24377   if test "x$test_cygdrive_prefix" = x; then
24378     # As a simple fix, exclude /usr/bin since it's not a real path.
24379     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24380       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24381       # a path prefixed by /cygdrive for fixpath to work.
24382       new_path="$CYGWIN_ROOT_PATH$input_path"
24383     fi
24384   fi
24385 
24386 
24387   if test "x$path" != "x$new_path"; then
24388     BOOT_JDK="$new_path"
24389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24390 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24391   fi
24392 
24393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24394 
24395   path="$BOOT_JDK"
24396   has_colon=`$ECHO $path | $GREP ^.:`
24397   new_path="$path"
24398   if test "x$has_colon" = x; then
24399     # Not in mixed or Windows style, start by that.
24400     new_path=`cmd //c echo $path`
24401   fi
24402 
24403 
24404   input_path="$new_path"
24405   # Check if we need to convert this using DOS-style short mode. If the path
24406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407   # take no chances and rewrite it.
24408   # Note: m4 eats our [], so we need to use [ and ] instead.
24409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24410   if test "x$has_forbidden_chars" != x; then
24411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24413   fi
24414 
24415 
24416   windows_path="$new_path"
24417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24418     unix_path=`$CYGPATH -u "$windows_path"`
24419     new_path="$unix_path"
24420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24422     new_path="$unix_path"
24423   fi
24424 
24425   if test "x$path" != "x$new_path"; then
24426     BOOT_JDK="$new_path"
24427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24428 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24429   fi
24430 
24431   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24432   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24433 
24434   else
24435     # We're on a posix platform. Hooray! :)
24436     path="$BOOT_JDK"
24437     has_space=`$ECHO "$path" | $GREP " "`
24438     if test "x$has_space" != x; then
24439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24440 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24441       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24442     fi
24443 
24444     # Use eval to expand a potential ~
24445     eval path="$path"
24446     if test ! -f "$path" && test ! -d "$path"; then
24447       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24448     fi
24449 
24450     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24451   fi
24452 
24453               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24454 $as_echo_n "checking for Boot JDK... " >&6; }
24455               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24456 $as_echo "$BOOT_JDK" >&6; }
24457               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24458 $as_echo_n "checking Boot JDK version... " >&6; }
24459               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24460               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24461 $as_echo "$BOOT_JDK_VERSION" >&6; }
24462             fi # end check jdk version
24463           fi # end check rt.jar
24464         fi # end check javac
24465       fi # end check java
24466     fi # end check boot jdk found
24467   fi
24468 
24469   fi
24470 
24471 
24472     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24473     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24474       # Do we have a bin/java?
24475       if test ! -x "$BOOT_JDK/bin/java"; then
24476         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24477 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24478         BOOT_JDK_FOUND=no
24479       else
24480         # Do we have a bin/javac?
24481         if test ! -x "$BOOT_JDK/bin/javac"; then
24482           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24483 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24484           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24485 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24486           BOOT_JDK_FOUND=no
24487         else
24488           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24489           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24490             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24492             BOOT_JDK_FOUND=no
24493           else
24494             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24495             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24496 
24497             # Extra M4 quote needed to protect [] in grep expression.
24498             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24499             if test "x$FOUND_VERSION_78" = x; then
24500               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24502               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24503 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24504               BOOT_JDK_FOUND=no
24505             else
24506               # We're done! :-)
24507               BOOT_JDK_FOUND=yes
24508 
24509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24510 
24511   # Input might be given as Windows format, start by converting to
24512   # unix format.
24513   path="$BOOT_JDK"
24514   new_path=`$CYGPATH -u "$path"`
24515 
24516   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24517   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24518   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24519   # "foo.exe" is OK but "foo" is an error.
24520   #
24521   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24522   # It is also a way to make sure we got the proper file name for the real test later on.
24523   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24524   if test "x$test_shortpath" = x; then
24525     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24526 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24527     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24528   fi
24529 
24530   # Call helper function which possibly converts this using DOS-style short mode.
24531   # If so, the updated path is stored in $new_path.
24532 
24533   input_path="$new_path"
24534   # Check if we need to convert this using DOS-style short mode. If the path
24535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24536   # take no chances and rewrite it.
24537   # Note: m4 eats our [], so we need to use [ and ] instead.
24538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24539   if test "x$has_forbidden_chars" != x; then
24540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24541     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24542     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24543     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24544       # Going to short mode and back again did indeed matter. Since short mode is
24545       # case insensitive, let's make it lowercase to improve readability.
24546       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24547       # Now convert it back to Unix-style (cygpath)
24548       input_path=`$CYGPATH -u "$shortmode_path"`
24549       new_path="$input_path"
24550     fi
24551   fi
24552 
24553   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24554   if test "x$test_cygdrive_prefix" = x; then
24555     # As a simple fix, exclude /usr/bin since it's not a real path.
24556     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24557       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24558       # a path prefixed by /cygdrive for fixpath to work.
24559       new_path="$CYGWIN_ROOT_PATH$input_path"
24560     fi
24561   fi
24562 
24563 
24564   if test "x$path" != "x$new_path"; then
24565     BOOT_JDK="$new_path"
24566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24567 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24568   fi
24569 
24570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24571 
24572   path="$BOOT_JDK"
24573   has_colon=`$ECHO $path | $GREP ^.:`
24574   new_path="$path"
24575   if test "x$has_colon" = x; then
24576     # Not in mixed or Windows style, start by that.
24577     new_path=`cmd //c echo $path`
24578   fi
24579 
24580 
24581   input_path="$new_path"
24582   # Check if we need to convert this using DOS-style short mode. If the path
24583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24584   # take no chances and rewrite it.
24585   # Note: m4 eats our [], so we need to use [ and ] instead.
24586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24587   if test "x$has_forbidden_chars" != x; then
24588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24589     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24590   fi
24591 
24592 
24593   windows_path="$new_path"
24594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24595     unix_path=`$CYGPATH -u "$windows_path"`
24596     new_path="$unix_path"
24597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24599     new_path="$unix_path"
24600   fi
24601 
24602   if test "x$path" != "x$new_path"; then
24603     BOOT_JDK="$new_path"
24604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24605 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24606   fi
24607 
24608   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24609   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24610 
24611   else
24612     # We're on a posix platform. Hooray! :)
24613     path="$BOOT_JDK"
24614     has_space=`$ECHO "$path" | $GREP " "`
24615     if test "x$has_space" != x; then
24616       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24617 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24618       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24619     fi
24620 
24621     # Use eval to expand a potential ~
24622     eval path="$path"
24623     if test ! -f "$path" && test ! -d "$path"; then
24624       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24625     fi
24626 
24627     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24628   fi
24629 
24630               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24631 $as_echo_n "checking for Boot JDK... " >&6; }
24632               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24633 $as_echo "$BOOT_JDK" >&6; }
24634               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24635 $as_echo_n "checking Boot JDK version... " >&6; }
24636               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24637               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24638 $as_echo "$BOOT_JDK_VERSION" >&6; }
24639             fi # end check jdk version
24640           fi # end check rt.jar
24641         fi # end check javac
24642       fi # end check java
24643     fi # end check boot jdk found
24644   fi
24645 
24646 
24647   # If we haven't found anything yet, we've truly lost. Give up.
24648   if test "x$BOOT_JDK_FOUND" = xno; then
24649 
24650   # Print a helpful message on how to acquire the necessary build dependency.
24651   # openjdk is the help tag: freetype, cups, pulse, alsa etc
24652   MISSING_DEPENDENCY=openjdk
24653 
24654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24655     cygwin_help $MISSING_DEPENDENCY
24656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24657     msys_help $MISSING_DEPENDENCY
24658   else
24659     PKGHANDLER_COMMAND=
24660 
24661     case $PKGHANDLER in
24662       apt-get)
24663         apt_help     $MISSING_DEPENDENCY ;;
24664       yum)
24665         yum_help     $MISSING_DEPENDENCY ;;
24666       port)
24667         port_help    $MISSING_DEPENDENCY ;;
24668       pkgutil)
24669         pkgutil_help $MISSING_DEPENDENCY ;;
24670       pkgadd)
24671         pkgadd_help  $MISSING_DEPENDENCY ;;
24672     esac
24673 
24674     if test "x$PKGHANDLER_COMMAND" != x; then
24675       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24676     fi
24677   fi
24678 
24679     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24680 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24681     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24682 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24683     as_fn_error $? "Cannot continue" "$LINENO" 5
24684   fi
24685 
24686   # Setup proper paths for what we found
24687   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24688   if test ! -f "$BOOT_RTJAR"; then
24689     # On MacOSX it is called classes.jar
24690     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24691     if test -f "$BOOT_RTJAR"; then
24692       # Remove the ..
24693       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24694     fi
24695   fi
24696   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24697   BOOT_JDK="$BOOT_JDK"
24698 
24699 
24700 
24701 
24702   # Setup tools from the Boot JDK.
24703 
24704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24705 $as_echo_n "checking for java in Boot JDK... " >&6; }
24706   JAVA=$BOOT_JDK/bin/java
24707   if test ! -x $JAVA; then
24708     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24709 $as_echo "not found" >&6; }
24710     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24711 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24712     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24713   fi
24714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24715 $as_echo "ok" >&6; }
24716 
24717 
24718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24719 $as_echo_n "checking for javac in Boot JDK... " >&6; }
24720   JAVAC=$BOOT_JDK/bin/javac
24721   if test ! -x $JAVAC; then
24722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24723 $as_echo "not found" >&6; }
24724     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24725 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24726     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24727   fi
24728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24729 $as_echo "ok" >&6; }
24730 
24731 
24732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24733 $as_echo_n "checking for javah in Boot JDK... " >&6; }
24734   JAVAH=$BOOT_JDK/bin/javah
24735   if test ! -x $JAVAH; then
24736     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24737 $as_echo "not found" >&6; }
24738     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24739 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24740     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24741   fi
24742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24743 $as_echo "ok" >&6; }
24744 
24745 
24746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24747 $as_echo_n "checking for javap in Boot JDK... " >&6; }
24748   JAVAP=$BOOT_JDK/bin/javap
24749   if test ! -x $JAVAP; then
24750     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24751 $as_echo "not found" >&6; }
24752     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24753 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24754     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24755   fi
24756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24757 $as_echo "ok" >&6; }
24758 
24759 
24760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24761 $as_echo_n "checking for jar in Boot JDK... " >&6; }
24762   JAR=$BOOT_JDK/bin/jar
24763   if test ! -x $JAR; then
24764     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24765 $as_echo "not found" >&6; }
24766     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24767 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24768     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24769   fi
24770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24771 $as_echo "ok" >&6; }
24772 
24773 
24774   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24775 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
24776   RMIC=$BOOT_JDK/bin/rmic
24777   if test ! -x $RMIC; then
24778     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24779 $as_echo "not found" >&6; }
24780     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24781 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24782     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24783   fi
24784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24785 $as_echo "ok" >&6; }
24786 
24787 
24788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24789 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24790   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24791   if test ! -x $NATIVE2ASCII; then
24792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24793 $as_echo "not found" >&6; }
24794     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24795 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24796     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24797   fi
24798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24799 $as_echo "ok" >&6; }
24800 
24801 
24802   # Finally, set some other options...
24803 
24804   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24805   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24806 
24807 
24808 
24809   # Check if the boot jdk is 32 or 64 bit
24810   if "$JAVA" -d64 -version > /dev/null 2>&1; then
24811     BOOT_JDK_BITS="64"
24812   else
24813     BOOT_JDK_BITS="32"
24814   fi
24815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
24816 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
24817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
24818 $as_echo "$BOOT_JDK_BITS" >&6; }
24819 
24820 
24821 
24822   ##############################################################################
24823   #
24824   # Specify options for anything that is run with the Boot JDK.
24825   #
24826 
24827 # Check whether --with-boot-jdk-jvmargs was given.
24828 if test "${with_boot_jdk_jvmargs+set}" = set; then :
24829   withval=$with_boot_jdk_jvmargs;
24830 fi
24831 
24832 
24833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
24834 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
24835 
24836   # Disable special log output when a debug build is used as Boot JDK...
24837 
24838   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24839   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24840   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24841   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24842   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24843   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24844     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24845     JVM_ARG_OK=true
24846   else
24847     $ECHO "Arg failed:" >&5
24848     $ECHO "$OUTPUT" >&5
24849     JVM_ARG_OK=false
24850   fi
24851 
24852 
24853   # Apply user provided options.
24854 
24855   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
24856   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
24857   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
24858   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24859   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24860   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24861     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
24862     JVM_ARG_OK=true
24863   else
24864     $ECHO "Arg failed:" >&5
24865     $ECHO "$OUTPUT" >&5
24866     JVM_ARG_OK=false
24867   fi
24868 
24869 
24870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
24871 $as_echo "$boot_jdk_jvmargs" >&6; }
24872 
24873   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
24874   JAVA_FLAGS=$boot_jdk_jvmargs
24875 
24876 
24877 
24878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
24879 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
24880 
24881   # Starting amount of heap memory.
24882 
24883   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24884   $ECHO "Command: $JAVA -Xms64M -version" >&5
24885   OUTPUT=`$JAVA -Xms64M -version 2>&1`
24886   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24887   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24888   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24889     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
24890     JVM_ARG_OK=true
24891   else
24892     $ECHO "Arg failed:" >&5
24893     $ECHO "$OUTPUT" >&5
24894     JVM_ARG_OK=false
24895   fi
24896 
24897 
24898   # Maximum amount of heap memory.
24899   # Maximum stack size.
24900   if test "x$BOOT_JDK_BITS" = x32; then
24901     JVM_MAX_HEAP=768M
24902     STACK_SIZE=768
24903   else
24904     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
24905     # pointers are used. Apparently, we need to increase the heap and stack
24906     # space for the jvm. More specifically, when running javac to build huge
24907     # jdk batch
24908     JVM_MAX_HEAP=1600M
24909     STACK_SIZE=1536
24910   fi
24911 
24912   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
24913   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
24914   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
24915   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24916   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24917   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24918     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
24919     JVM_ARG_OK=true
24920   else
24921     $ECHO "Arg failed:" >&5
24922     $ECHO "$OUTPUT" >&5
24923     JVM_ARG_OK=false
24924   fi
24925 
24926 
24927   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24928   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24929   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24930   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24931   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24932   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24933     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
24934     JVM_ARG_OK=true
24935   else
24936     $ECHO "Arg failed:" >&5
24937     $ECHO "$OUTPUT" >&5
24938     JVM_ARG_OK=false
24939   fi
24940 
24941 
24942   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
24943   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
24944   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
24945   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24946   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24947   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24948     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
24949     JVM_ARG_OK=true
24950   else
24951     $ECHO "Arg failed:" >&5
24952     $ECHO "$OUTPUT" >&5
24953     JVM_ARG_OK=false
24954   fi
24955 
24956 
24957   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
24958   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
24959   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
24960   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24961   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24962   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24963     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
24964     JVM_ARG_OK=true
24965   else
24966     $ECHO "Arg failed:" >&5
24967     $ECHO "$OUTPUT" >&5
24968     JVM_ARG_OK=false
24969   fi
24970 
24971 
24972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
24973 $as_echo "$boot_jdk_jvmargs_big" >&6; }
24974 
24975   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
24976 
24977 
24978 
24979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
24980 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
24981 
24982   # Use serial gc for small short lived tools if possible
24983 
24984   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
24985   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
24986   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
24987   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24988   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24989   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24990     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
24991     JVM_ARG_OK=true
24992   else
24993     $ECHO "Arg failed:" >&5
24994     $ECHO "$OUTPUT" >&5
24995     JVM_ARG_OK=false
24996   fi
24997 
24998 
24999   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
25000   $ECHO "Command: $JAVA -Xms32M -version" >&5
25001   OUTPUT=`$JAVA -Xms32M -version 2>&1`
25002   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25003   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25004   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25005     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
25006     JVM_ARG_OK=true
25007   else
25008     $ECHO "Arg failed:" >&5
25009     $ECHO "$OUTPUT" >&5
25010     JVM_ARG_OK=false
25011   fi
25012 
25013 
25014   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
25015   $ECHO "Command: $JAVA -Xmx512M -version" >&5
25016   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
25017   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25018   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25019   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25020     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
25021     JVM_ARG_OK=true
25022   else
25023     $ECHO "Arg failed:" >&5
25024     $ECHO "$OUTPUT" >&5
25025     JVM_ARG_OK=false
25026   fi
25027 
25028 
25029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
25030 $as_echo "$boot_jdk_jvmargs_small" >&6; }
25031 
25032   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
25033 
25034 
25035 
25036 ###############################################################################
25037 #
25038 # Configure the sources to use. We can add or override individual directories.
25039 #
25040 ###############################################################################
25041 
25042 
25043   # Where are the sources. Any of these can be overridden
25044   # using --with-override-corba and the likes.
25045   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25046   CORBA_TOPDIR="$SRC_ROOT/corba"
25047   JAXP_TOPDIR="$SRC_ROOT/jaxp"
25048   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25049   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25050   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25051   JDK_TOPDIR="$SRC_ROOT/jdk"
25052 
25053 
25054 
25055 
25056 
25057 
25058 
25059 
25060 
25061 
25062   ###############################################################################
25063   #
25064   # Pickup additional source for a component from outside of the source root
25065   # or override source for a component.
25066   #
25067 
25068 # Check whether --with-add-source-root was given.
25069 if test "${with_add_source_root+set}" = set; then :
25070   withval=$with_add_source_root;
25071 fi
25072 
25073 
25074 
25075 # Check whether --with-override-source-root was given.
25076 if test "${with_override_source_root+set}" = set; then :
25077   withval=$with_override_source_root;
25078 fi
25079 
25080 
25081 
25082 # Check whether --with-adds-and-overrides was given.
25083 if test "${with_adds_and_overrides+set}" = set; then :
25084   withval=$with_adds_and_overrides;
25085 fi
25086 
25087 
25088   if test "x$with_adds_and_overrides" != x; then
25089     with_add_source_root="$with_adds_and_overrides/adds"
25090     with_override_source_root="$with_adds_and_overrides/overrides"
25091   fi
25092 
25093   if test "x$with_add_source_root" != x; then
25094     if ! test -d $with_add_source_root; then
25095       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25096     fi
25097     CURDIR="$PWD"
25098     cd "$with_add_source_root"
25099     ADD_SRC_ROOT="`pwd`"
25100     cd "$CURDIR"
25101     # Verify that the addon source root does not have any root makefiles.
25102     # If it does, then it is usually an error, prevent this.
25103     if test -f $with_add_source_root/langtools/make/Makefile; then
25104       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
25105     fi
25106     if test -f $with_add_source_root/corba/make/Makefile; then
25107       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
25108     fi
25109     if test -f $with_add_source_root/jaxp/make/Makefile; then
25110       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
25111     fi
25112     if test -f $with_add_source_root/jaxws/make/Makefile; then
25113       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
25114     fi
25115     if test -f $with_add_source_root/hotspot/make/Makefile; then
25116       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
25117     fi
25118     if test -f $with_add_source_root/nashorn/make/Makefile; then
25119       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
25120     fi
25121     if test -f $with_add_source_root/jdk/make/Makefile; then
25122       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
25123     fi
25124   fi
25125 
25126 
25127   if test "x$with_override_source_root" != x; then
25128     if ! test -d $with_override_source_root; then
25129       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25130     fi
25131     CURDIR="$PWD"
25132     cd "$with_override_source_root"
25133     OVERRIDE_SRC_ROOT="`pwd`"
25134     cd "$CURDIR"
25135     if test -f $with_override_source_root/langtools/make/Makefile; then
25136       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
25137     fi
25138     if test -f $with_override_source_root/corba/make/Makefile; then
25139       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
25140     fi
25141     if test -f $with_override_source_root/jaxp/make/Makefile; then
25142       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
25143     fi
25144     if test -f $with_override_source_root/jaxws/make/Makefile; then
25145       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
25146     fi
25147     if test -f $with_override_source_root/hotspot/make/Makefile; then
25148       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
25149     fi
25150     if test -f $with_override_source_root/nashorn/make/Makefile; then
25151       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
25152     fi
25153     if test -f $with_override_source_root/jdk/make/Makefile; then
25154       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
25155     fi
25156   fi
25157 
25158 
25159   ###############################################################################
25160   #
25161   # Override a repo completely, this is used for example when you have 3 small
25162   # development sandboxes of the langtools sources and want to avoid having 3 full
25163   # OpenJDK sources checked out on disk.
25164   #
25165   # Assuming that the 3 langtools sandboxes are located here:
25166   # /home/fredrik/sandbox1/langtools
25167   # /home/fredrik/sandbox2/langtools
25168   # /home/fredrik/sandbox3/langtools
25169   #
25170   # From the source root you create build subdirs manually:
25171   #     mkdir -p build1 build2 build3
25172   # in each build directory run:
25173   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25174   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25175   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25176   #
25177 
25178 
25179 # Check whether --with-override-langtools was given.
25180 if test "${with_override_langtools+set}" = set; then :
25181   withval=$with_override_langtools;
25182 fi
25183 
25184 
25185 
25186 # Check whether --with-override-corba was given.
25187 if test "${with_override_corba+set}" = set; then :
25188   withval=$with_override_corba;
25189 fi
25190 
25191 
25192 
25193 # Check whether --with-override-jaxp was given.
25194 if test "${with_override_jaxp+set}" = set; then :
25195   withval=$with_override_jaxp;
25196 fi
25197 
25198 
25199 
25200 # Check whether --with-override-jaxws was given.
25201 if test "${with_override_jaxws+set}" = set; then :
25202   withval=$with_override_jaxws;
25203 fi
25204 
25205 
25206 
25207 # Check whether --with-override-hotspot was given.
25208 if test "${with_override_hotspot+set}" = set; then :
25209   withval=$with_override_hotspot;
25210 fi
25211 
25212 
25213 
25214 # Check whether --with-override-nashorn was given.
25215 if test "${with_override_nashorn+set}" = set; then :
25216   withval=$with_override_nashorn;
25217 fi
25218 
25219 
25220 
25221 # Check whether --with-override-jdk was given.
25222 if test "${with_override_jdk+set}" = set; then :
25223   withval=$with_override_jdk;
25224 fi
25225 
25226 
25227   if test "x$with_override_langtools" != x; then
25228     CURDIR="$PWD"
25229     cd "$with_override_langtools"
25230     LANGTOOLS_TOPDIR="`pwd`"
25231     cd "$CURDIR"
25232     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25233       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25234     fi
25235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25236 $as_echo_n "checking if langtools should be overridden... " >&6; }
25237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25238 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25239   fi
25240   if test "x$with_override_corba" != x; then
25241     CURDIR="$PWD"
25242     cd "$with_override_corba"
25243     CORBA_TOPDIR="`pwd`"
25244     cd "$CURDIR"
25245     if ! test -f $CORBA_TOPDIR/make/Makefile; then
25246       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
25247     fi
25248     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
25249 $as_echo_n "checking if corba should be overridden... " >&6; }
25250     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
25251 $as_echo "yes with $CORBA_TOPDIR" >&6; }
25252   fi
25253   if test "x$with_override_jaxp" != x; then
25254     CURDIR="$PWD"
25255     cd "$with_override_jaxp"
25256     JAXP_TOPDIR="`pwd`"
25257     cd "$CURDIR"
25258     if ! test -f $JAXP_TOPDIR/make/Makefile; then
25259       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
25260     fi
25261     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
25262 $as_echo_n "checking if jaxp should be overridden... " >&6; }
25263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
25264 $as_echo "yes with $JAXP_TOPDIR" >&6; }
25265   fi
25266   if test "x$with_override_jaxws" != x; then
25267     CURDIR="$PWD"
25268     cd "$with_override_jaxws"
25269     JAXWS_TOPDIR="`pwd`"
25270     cd "$CURDIR"
25271     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
25272       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
25273     fi
25274     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
25275 $as_echo_n "checking if jaxws should be overridden... " >&6; }
25276     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
25277 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
25278   fi
25279   if test "x$with_override_hotspot" != x; then
25280     CURDIR="$PWD"
25281     cd "$with_override_hotspot"
25282     HOTSPOT_TOPDIR="`pwd`"
25283     cd "$CURDIR"
25284     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
25285       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
25286     fi
25287     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
25288 $as_echo_n "checking if hotspot should be overridden... " >&6; }
25289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
25290 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
25291   fi
25292   if test "x$with_override_nashorn" != x; then
25293     CURDIR="$PWD"
25294     cd "$with_override_nashorn"
25295     NASHORN_TOPDIR="`pwd`"
25296     cd "$CURDIR"
25297     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
25298       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
25299     fi
25300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
25301 $as_echo_n "checking if nashorn should be overridden... " >&6; }
25302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
25303 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
25304   fi
25305   if test "x$with_override_jdk" != x; then
25306     CURDIR="$PWD"
25307     cd "$with_override_jdk"
25308     JDK_TOPDIR="`pwd`"
25309     cd "$CURDIR"
25310     if ! test -f $JDK_TOPDIR/make/Makefile; then
25311       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
25312     fi
25313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
25314 $as_echo_n "checking if JDK should be overridden... " >&6; }
25315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
25316 $as_echo "yes with $JDK_TOPDIR" >&6; }
25317   fi
25318 
25319 
25320   BUILD_OUTPUT="$OUTPUT_ROOT"
25321 
25322 
25323   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
25324   BUILD_HOTSPOT=true
25325 
25326 
25327 
25328 # Check whether --with-import-hotspot was given.
25329 if test "${with_import_hotspot+set}" = set; then :
25330   withval=$with_import_hotspot;
25331 fi
25332 
25333   if test "x$with_import_hotspot" != x; then
25334     CURDIR="$PWD"
25335     cd "$with_import_hotspot"
25336     HOTSPOT_DIST="`pwd`"
25337     cd "$CURDIR"
25338     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
25339       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
25340     fi
25341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
25342 $as_echo_n "checking if hotspot should be imported... " >&6; }
25343     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
25344 $as_echo "yes from $HOTSPOT_DIST" >&6; }
25345     BUILD_HOTSPOT=false
25346   fi
25347 
25348   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
25349 
25350 
25351 ###############################################################################
25352 #
25353 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
25354 # native code.
25355 #
25356 ###############################################################################
25357 
25358 # First determine the toolchain type (compiler family)
25359 
25360 
25361 # Check whether --with-toolchain-type was given.
25362 if test "${with_toolchain_type+set}" = set; then :
25363   withval=$with_toolchain_type;
25364 fi
25365 
25366 
25367   # Use indirect variable referencing
25368   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
25369   VALID_TOOLCHAINS=${!toolchain_var_name}
25370 
25371   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25372     # On Mac OS X, default toolchain to clang after Xcode 5
25373     XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
25374     $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
25375     if test $? -ne 0; then
25376       as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
25377     fi
25378     XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
25379         $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
25380         $CUT -f 1 -d .`
25381     { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
25382 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
25383     if test $XCODE_MAJOR_VERSION -ge 5; then
25384         DEFAULT_TOOLCHAIN="clang"
25385     else
25386         DEFAULT_TOOLCHAIN="gcc"
25387     fi
25388   else
25389     # First toolchain type in the list is the default
25390     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
25391   fi
25392 
25393   if test "x$with_toolchain_type" = xlist; then
25394     # List all toolchains
25395     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
25396 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
25397     for toolchain in $VALID_TOOLCHAINS; do
25398       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
25399       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25400       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
25401     done
25402 
25403     exit 0
25404   elif test "x$with_toolchain_type" != x; then
25405     # User override; check that it is valid
25406     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
25407       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
25408 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
25409       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
25410 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
25411       as_fn_error $? "Cannot continue." "$LINENO" 5
25412     fi
25413     TOOLCHAIN_TYPE=$with_toolchain_type
25414   else
25415     # No flag given, use default
25416     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
25417   fi
25418 
25419 
25420   TOOLCHAIN_CC_BINARY_clang="clang"
25421   TOOLCHAIN_CC_BINARY_gcc="gcc"
25422   TOOLCHAIN_CC_BINARY_microsoft="cl"
25423   TOOLCHAIN_CC_BINARY_solstudio="cc"
25424   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
25425 
25426   TOOLCHAIN_CXX_BINARY_clang="clang++"
25427   TOOLCHAIN_CXX_BINARY_gcc="g++"
25428   TOOLCHAIN_CXX_BINARY_microsoft="cl"
25429   TOOLCHAIN_CXX_BINARY_solstudio="CC"
25430   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
25431 
25432   # Use indirect variable referencing
25433   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
25434   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25435   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
25436   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
25437   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
25438   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
25439 
25440 
25441   # Define filename patterns
25442   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25443     LIBRARY_PREFIX=
25444     SHARED_LIBRARY_SUFFIX='.dll'
25445     STATIC_LIBRARY_SUFFIX='.lib'
25446     SHARED_LIBRARY='$1.dll'
25447     STATIC_LIBRARY='$1.lib'
25448     OBJ_SUFFIX='.obj'
25449     EXE_SUFFIX='.exe'
25450   else
25451     LIBRARY_PREFIX=lib
25452     SHARED_LIBRARY_SUFFIX='.so'
25453     STATIC_LIBRARY_SUFFIX='.a'
25454     SHARED_LIBRARY='lib$1.so'
25455     STATIC_LIBRARY='lib$1.a'
25456     OBJ_SUFFIX='.o'
25457     EXE_SUFFIX=''
25458     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25459       SHARED_LIBRARY='lib$1.dylib'
25460       SHARED_LIBRARY_SUFFIX='.dylib'
25461     fi
25462   fi
25463 
25464 
25465 
25466 
25467 
25468 
25469 
25470 
25471 
25472 
25473   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
25474     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
25475 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
25476   else
25477     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
25478 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
25479   fi
25480 
25481 
25482 # Then detect the actual binaries needed
25483 
25484   # FIXME: Is this needed?
25485   ac_ext=cpp
25486 ac_cpp='$CXXCPP $CPPFLAGS'
25487 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25488 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25489 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25490 
25491 
25492   # Store the CFLAGS etal passed to the configure script.
25493   ORG_CFLAGS="$CFLAGS"
25494   ORG_CXXFLAGS="$CXXFLAGS"
25495   ORG_OBJCFLAGS="$OBJCFLAGS"
25496 
25497   # autoconf magic only relies on PATH, so update it if tools dir is specified
25498   OLD_PATH="$PATH"
25499 
25500   # On Windows, we need to detect the visual studio installation first.
25501   # This will change the PATH, but we need to keep that new PATH even
25502   # after toolchain detection is done, since the compiler (on x86) uses
25503   # it for DLL resolution in runtime.
25504   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
25505       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
25506 
25507   # Store path to cygwin link.exe to help excluding it when searching for
25508   # VS linker. This must be done before changing the PATH when looking for VS.
25509   # Extract the first word of "link", so it can be a program name with args.
25510 set dummy link; ac_word=$2
25511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25512 $as_echo_n "checking for $ac_word... " >&6; }
25513 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25514   $as_echo_n "(cached) " >&6
25515 else
25516   case $CYGWIN_LINK in
25517   [\\/]* | ?:[\\/]*)
25518   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25519   ;;
25520   *)
25521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25522 for as_dir in $PATH
25523 do
25524   IFS=$as_save_IFS
25525   test -z "$as_dir" && as_dir=.
25526     for ac_exec_ext in '' $ac_executable_extensions; do
25527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25528     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25530     break 2
25531   fi
25532 done
25533   done
25534 IFS=$as_save_IFS
25535 
25536   ;;
25537 esac
25538 fi
25539 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25540 if test -n "$CYGWIN_LINK"; then
25541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25542 $as_echo "$CYGWIN_LINK" >&6; }
25543 else
25544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25545 $as_echo "no" >&6; }
25546 fi
25547 
25548 
25549   if test "x$CYGWIN_LINK" != x; then
25550     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25551 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25552     "$CYGWIN_LINK" --version > /dev/null
25553     if test $? -eq 0 ; then
25554       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25555 $as_echo "yes" >&6; }
25556     else
25557       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25558 $as_echo "no" >&6; }
25559       # This might be the VS linker. Don't exclude it later on.
25560       CYGWIN_LINK=""
25561     fi
25562   fi
25563 
25564   # First-hand choice is to locate and run the vsvars bat file.
25565 
25566 
25567 # Check whether --with-toolchain-version was given.
25568 if test "${with_toolchain_version+set}" = set; then :
25569   withval=$with_toolchain_version;
25570 fi
25571 
25572 
25573   if test "x$with_toolchain_version" = xlist; then
25574     # List all toolchains
25575     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
25576 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
25577     for version in $VALID_VS_VERSIONS; do
25578       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
25579       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
25580     done
25581 
25582     exit 0
25583   elif test "x$DEVKIT_VS_VERSION" != x; then
25584     VS_VERSION=$DEVKIT_VS_VERSION
25585     TOOLCHAIN_VERSION=$VS_VERSION
25586     # If the devkit has a name, use that as description
25587     VS_DESCRIPTION="$DEVKIT_NAME"
25588     if test "x$VS_DESCRIPTION" = x; then
25589       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25590     fi
25591     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25592     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25593     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25594     eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
25595     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25596     VS_PATH="$TOOLCHAIN_PATH:$PATH"
25597 
25598     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
25599     # can still be exported as INCLUDE for compiler invocations without
25600     # SYSROOT_CFLAGS
25601     OLDIFS="$IFS"
25602     IFS=";"
25603     for i in $DEVKIT_VS_INCLUDE; do
25604       ipath=$i
25605 
25606   unix_path="$ipath"
25607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25608     windows_path=`$CYGPATH -m "$unix_path"`
25609     ipath="$windows_path"
25610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25611     windows_path=`cmd //c echo $unix_path`
25612     ipath="$windows_path"
25613   fi
25614 
25615       VS_INCLUDE="$VS_INCLUDE;$ipath"
25616     done
25617     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
25618     # as LIB for compiler invocations without SYSROOT_LDFLAGS
25619     for i in $DEVKIT_VS_LIB; do
25620       libpath=$i
25621 
25622   unix_path="$libpath"
25623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25624     windows_path=`$CYGPATH -m "$unix_path"`
25625     libpath="$windows_path"
25626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25627     windows_path=`cmd //c echo $unix_path`
25628     libpath="$windows_path"
25629   fi
25630 
25631       VS_LIB="$VS_LIB;$libpath"
25632     done
25633     IFS="$OLDIFS"
25634 
25635     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
25636 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
25637 
25638   elif test "x$with_toolchain_version" != x; then
25639     # User override; check that it is valid
25640     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
25641       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
25642 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
25643       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
25644 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
25645       as_fn_error $? "Cannot continue." "$LINENO" 5
25646     fi
25647     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
25648   else
25649     # No flag given, use default
25650     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
25651   fi
25652 
25653   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
25654 
25655   VS_VERSION="$VS_VERSION"
25656   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
25657   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
25658   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
25659   eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
25660   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
25661   eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
25662 
25663   # When using --with-tools-dir, assume it points to the correct and default
25664   # version of Visual Studio or that --with-toolchain-version was also set.
25665   if test "x$with_tools_dir" != x; then
25666 
25667   if test "x$VS_ENV_CMD" = x; then
25668     VS_VERSION="${VS_VERSION}"
25669     VS_BASE="$with_tools_dir/../.."
25670     METHOD="--with-tools-dir"
25671 
25672 
25673   windows_path="$VS_BASE"
25674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25675     unix_path=`$CYGPATH -u "$windows_path"`
25676     VS_BASE="$unix_path"
25677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25679     VS_BASE="$unix_path"
25680   fi
25681 
25682     # In VS 2017, the default installation is in a subdir named after the edition.
25683     # Find the first one present and use that.
25684     if test "x$VS_EDITIONS" != x; then
25685       for edition in $VS_EDITIONS; do
25686         if test -d "$VS_BASE/$edition"; then
25687           VS_BASE="$VS_BASE/$edition"
25688           break
25689         fi
25690       done
25691     fi
25692 
25693     if test -d "$VS_BASE"; then
25694       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25695 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25696       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25697         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25698       else
25699         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25700             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25701       fi
25702 
25703       for VCVARSFILE in $VCVARSFILES; do
25704         if test -f "$VS_BASE/$VCVARSFILE"; then
25705           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25706           break
25707         fi
25708       done
25709 
25710       if test "x$VS_ENV_CMD" = x; then
25711         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25712 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25713       else
25714         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25715         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25716         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25717         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25718 
25719       fi
25720     fi
25721   fi
25722 
25723 
25724   if test "x$VS_ENV_CMD" = x; then
25725     VS_VERSION="${VS_VERSION}"
25726     VS_BASE="$with_tools_dir/../../.."
25727     METHOD="--with-tools-dir"
25728 
25729 
25730   windows_path="$VS_BASE"
25731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25732     unix_path=`$CYGPATH -u "$windows_path"`
25733     VS_BASE="$unix_path"
25734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25736     VS_BASE="$unix_path"
25737   fi
25738 
25739     # In VS 2017, the default installation is in a subdir named after the edition.
25740     # Find the first one present and use that.
25741     if test "x$VS_EDITIONS" != x; then
25742       for edition in $VS_EDITIONS; do
25743         if test -d "$VS_BASE/$edition"; then
25744           VS_BASE="$VS_BASE/$edition"
25745           break
25746         fi
25747       done
25748     fi
25749 
25750     if test -d "$VS_BASE"; then
25751       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25752 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25753       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25754         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25755       else
25756         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25757             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25758       fi
25759 
25760       for VCVARSFILE in $VCVARSFILES; do
25761         if test -f "$VS_BASE/$VCVARSFILE"; then
25762           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25763           break
25764         fi
25765       done
25766 
25767       if test "x$VS_ENV_CMD" = x; then
25768         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25769 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25770       else
25771         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25772         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25773         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25774         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25775 
25776       fi
25777     fi
25778   fi
25779 
25780     if test "x$VS_ENV_CMD" = x; then
25781       # Having specified an argument which is incorrect will produce an instant failure;
25782       # we should not go on looking
25783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
25784 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
25785       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
25786 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
25787       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
25788 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
25789       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25790     fi
25791   fi
25792 
25793   VS_ENV_CMD=""
25794 
25795   if test "x$VS_COMNTOOLS" != x; then
25796 
25797   if test "x$VS_ENV_CMD" = x; then
25798     VS_VERSION="${VS_VERSION}"
25799     VS_BASE="$VS_COMNTOOLS/../.."
25800     METHOD="$VS_COMNTOOLS_VAR variable"
25801 
25802 
25803   windows_path="$VS_BASE"
25804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25805     unix_path=`$CYGPATH -u "$windows_path"`
25806     VS_BASE="$unix_path"
25807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25809     VS_BASE="$unix_path"
25810   fi
25811 
25812     # In VS 2017, the default installation is in a subdir named after the edition.
25813     # Find the first one present and use that.
25814     if test "x$VS_EDITIONS" != x; then
25815       for edition in $VS_EDITIONS; do
25816         if test -d "$VS_BASE/$edition"; then
25817           VS_BASE="$VS_BASE/$edition"
25818           break
25819         fi
25820       done
25821     fi
25822 
25823     if test -d "$VS_BASE"; then
25824       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25825 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25826       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25827         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25828       else
25829         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25830             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25831       fi
25832 
25833       for VCVARSFILE in $VCVARSFILES; do
25834         if test -f "$VS_BASE/$VCVARSFILE"; then
25835           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25836           break
25837         fi
25838       done
25839 
25840       if test "x$VS_ENV_CMD" = x; then
25841         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25842 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25843       else
25844         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25845         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25846         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25847         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25848 
25849       fi
25850     fi
25851   fi
25852 
25853   fi
25854   if test "x$PROGRAMFILES" != x; then
25855 
25856   if test "x$VS_ENV_CMD" = x; then
25857     VS_VERSION="${VS_VERSION}"
25858     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
25859     METHOD="well-known name"
25860 
25861 
25862   windows_path="$VS_BASE"
25863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25864     unix_path=`$CYGPATH -u "$windows_path"`
25865     VS_BASE="$unix_path"
25866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25868     VS_BASE="$unix_path"
25869   fi
25870 
25871     # In VS 2017, the default installation is in a subdir named after the edition.
25872     # Find the first one present and use that.
25873     if test "x$VS_EDITIONS" != x; then
25874       for edition in $VS_EDITIONS; do
25875         if test -d "$VS_BASE/$edition"; then
25876           VS_BASE="$VS_BASE/$edition"
25877           break
25878         fi
25879       done
25880     fi
25881 
25882     if test -d "$VS_BASE"; then
25883       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25884 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25885       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25886         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25887       else
25888         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25889             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25890       fi
25891 
25892       for VCVARSFILE in $VCVARSFILES; do
25893         if test -f "$VS_BASE/$VCVARSFILE"; then
25894           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25895           break
25896         fi
25897       done
25898 
25899       if test "x$VS_ENV_CMD" = x; then
25900         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25901 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25902       else
25903         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25904         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25905         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25906         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25907 
25908       fi
25909     fi
25910   fi
25911 
25912   fi
25913   # Work around the insanely named ProgramFiles(x86) env variable
25914   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
25915   if test "x$PROGRAMFILES_X86" != x; then
25916 
25917   if test "x$VS_ENV_CMD" = x; then
25918     VS_VERSION="${VS_VERSION}"
25919     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
25920     METHOD="well-known name"
25921 
25922 
25923   windows_path="$VS_BASE"
25924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25925     unix_path=`$CYGPATH -u "$windows_path"`
25926     VS_BASE="$unix_path"
25927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25929     VS_BASE="$unix_path"
25930   fi
25931 
25932     # In VS 2017, the default installation is in a subdir named after the edition.
25933     # Find the first one present and use that.
25934     if test "x$VS_EDITIONS" != x; then
25935       for edition in $VS_EDITIONS; do
25936         if test -d "$VS_BASE/$edition"; then
25937           VS_BASE="$VS_BASE/$edition"
25938           break
25939         fi
25940       done
25941     fi
25942 
25943     if test -d "$VS_BASE"; then
25944       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25945 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25946       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25947         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
25948       else
25949         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
25950             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
25951       fi
25952 
25953       for VCVARSFILE in $VCVARSFILES; do
25954         if test -f "$VS_BASE/$VCVARSFILE"; then
25955           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25956           break
25957         fi
25958       done
25959 
25960       if test "x$VS_ENV_CMD" = x; then
25961         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
25962 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
25963       else
25964         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
25965         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
25966         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
25967         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25968 
25969       fi
25970     fi
25971   fi
25972 
25973   fi
25974 
25975   if test "x$VS_ENV_CMD" = x; then
25976     VS_VERSION="${VS_VERSION}"
25977     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
25978     METHOD="well-known name"
25979 
25980 
25981   windows_path="$VS_BASE"
25982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983     unix_path=`$CYGPATH -u "$windows_path"`
25984     VS_BASE="$unix_path"
25985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25987     VS_BASE="$unix_path"
25988   fi
25989 
25990     # In VS 2017, the default installation is in a subdir named after the edition.
25991     # Find the first one present and use that.
25992     if test "x$VS_EDITIONS" != x; then
25993       for edition in $VS_EDITIONS; do
25994         if test -d "$VS_BASE/$edition"; then
25995           VS_BASE="$VS_BASE/$edition"
25996           break
25997         fi
25998       done
25999     fi
26000 
26001     if test -d "$VS_BASE"; then
26002       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26003 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26004       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26005         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
26006       else
26007         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
26008             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
26009       fi
26010 
26011       for VCVARSFILE in $VCVARSFILES; do
26012         if test -f "$VS_BASE/$VCVARSFILE"; then
26013           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26014           break
26015         fi
26016       done
26017 
26018       if test "x$VS_ENV_CMD" = x; then
26019         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
26020 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
26021       else
26022         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
26023         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
26024         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
26025         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26026 
26027       fi
26028     fi
26029   fi
26030 
26031 
26032   if test "x$VS_ENV_CMD" = x; then
26033     VS_VERSION="${VS_VERSION}"
26034     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26035     METHOD="well-known name"
26036 
26037 
26038   windows_path="$VS_BASE"
26039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26040     unix_path=`$CYGPATH -u "$windows_path"`
26041     VS_BASE="$unix_path"
26042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26044     VS_BASE="$unix_path"
26045   fi
26046 
26047     # In VS 2017, the default installation is in a subdir named after the edition.
26048     # Find the first one present and use that.
26049     if test "x$VS_EDITIONS" != x; then
26050       for edition in $VS_EDITIONS; do
26051         if test -d "$VS_BASE/$edition"; then
26052           VS_BASE="$VS_BASE/$edition"
26053           break
26054         fi
26055       done
26056     fi
26057 
26058     if test -d "$VS_BASE"; then
26059       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26060 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26061       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26062         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
26063       else
26064         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
26065             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
26066       fi
26067 
26068       for VCVARSFILE in $VCVARSFILES; do
26069         if test -f "$VS_BASE/$VCVARSFILE"; then
26070           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26071           break
26072         fi
26073       done
26074 
26075       if test "x$VS_ENV_CMD" = x; then
26076         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
26077 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
26078       else
26079         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
26080         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
26081         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
26082         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26083 
26084       fi
26085     fi
26086   fi
26087 
26088 
26089   if test "x$SDK_INSTALL_DIR" != x; then
26090     if test "x$ProgramW6432" != x; then
26091 
26092   if test "x$VS_ENV_CMD" = x; then
26093     VS_VERSION="${VS_VERSION}"
26094     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26095     METHOD="well-known name"
26096 
26097   windows_path="$WIN_SDK_BASE"
26098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099     unix_path=`$CYGPATH -u "$windows_path"`
26100     WIN_SDK_BASE="$unix_path"
26101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26103     WIN_SDK_BASE="$unix_path"
26104   fi
26105 
26106     if test -d "$WIN_SDK_BASE"; then
26107       # There have been cases of partial or broken SDK installations. A missing
26108       # lib dir is not going to work.
26109       if test ! -d "$WIN_SDK_BASE/lib"; then
26110         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26111 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26112         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26113 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26114       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26115         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26116 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26117         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26118         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26119           VS_ENV_ARGS="/x86"
26120         else
26121           VS_ENV_ARGS="/x64"
26122         fi
26123         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26124         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26125         # TODO: improve detection for other versions of SDK
26126         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26127       else
26128         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26129 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26130         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26131 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26132       fi
26133     fi
26134   fi
26135 
26136     fi
26137     if test "x$PROGRAMW6432" != x; then
26138 
26139   if test "x$VS_ENV_CMD" = x; then
26140     VS_VERSION="${VS_VERSION}"
26141     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26142     METHOD="well-known name"
26143 
26144   windows_path="$WIN_SDK_BASE"
26145   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26146     unix_path=`$CYGPATH -u "$windows_path"`
26147     WIN_SDK_BASE="$unix_path"
26148   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26149     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26150     WIN_SDK_BASE="$unix_path"
26151   fi
26152 
26153     if test -d "$WIN_SDK_BASE"; then
26154       # There have been cases of partial or broken SDK installations. A missing
26155       # lib dir is not going to work.
26156       if test ! -d "$WIN_SDK_BASE/lib"; then
26157         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26158 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26159         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26160 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26161       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26162         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26163 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26164         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26165         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26166           VS_ENV_ARGS="/x86"
26167         else
26168           VS_ENV_ARGS="/x64"
26169         fi
26170         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26171         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26172         # TODO: improve detection for other versions of SDK
26173         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26174       else
26175         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26176 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26177         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26178 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26179       fi
26180     fi
26181   fi
26182 
26183     fi
26184     if test "x$PROGRAMFILES" != x; then
26185 
26186   if test "x$VS_ENV_CMD" = x; then
26187     VS_VERSION="${VS_VERSION}"
26188     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
26189     METHOD="well-known name"
26190 
26191   windows_path="$WIN_SDK_BASE"
26192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26193     unix_path=`$CYGPATH -u "$windows_path"`
26194     WIN_SDK_BASE="$unix_path"
26195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26197     WIN_SDK_BASE="$unix_path"
26198   fi
26199 
26200     if test -d "$WIN_SDK_BASE"; then
26201       # There have been cases of partial or broken SDK installations. A missing
26202       # lib dir is not going to work.
26203       if test ! -d "$WIN_SDK_BASE/lib"; then
26204         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26205 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26206         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26207 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26208       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26209         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26210 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26211         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26212         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26213           VS_ENV_ARGS="/x86"
26214         else
26215           VS_ENV_ARGS="/x64"
26216         fi
26217         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26218         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26219         # TODO: improve detection for other versions of SDK
26220         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26221       else
26222         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26223 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26224         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26225 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26226       fi
26227     fi
26228   fi
26229 
26230     fi
26231 
26232   if test "x$VS_ENV_CMD" = x; then
26233     VS_VERSION="${VS_VERSION}"
26234     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
26235     METHOD="well-known name"
26236 
26237   windows_path="$WIN_SDK_BASE"
26238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26239     unix_path=`$CYGPATH -u "$windows_path"`
26240     WIN_SDK_BASE="$unix_path"
26241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26243     WIN_SDK_BASE="$unix_path"
26244   fi
26245 
26246     if test -d "$WIN_SDK_BASE"; then
26247       # There have been cases of partial or broken SDK installations. A missing
26248       # lib dir is not going to work.
26249       if test ! -d "$WIN_SDK_BASE/lib"; then
26250         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26251 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26252         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26253 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26254       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26255         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26256 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26257         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26258         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26259           VS_ENV_ARGS="/x86"
26260         else
26261           VS_ENV_ARGS="/x64"
26262         fi
26263         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26264         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26265         # TODO: improve detection for other versions of SDK
26266         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26267       else
26268         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26269 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26270         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26271 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26272       fi
26273     fi
26274   fi
26275 
26276 
26277   if test "x$VS_ENV_CMD" = x; then
26278     VS_VERSION="${VS_VERSION}"
26279     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
26280     METHOD="well-known name"
26281 
26282   windows_path="$WIN_SDK_BASE"
26283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26284     unix_path=`$CYGPATH -u "$windows_path"`
26285     WIN_SDK_BASE="$unix_path"
26286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26288     WIN_SDK_BASE="$unix_path"
26289   fi
26290 
26291     if test -d "$WIN_SDK_BASE"; then
26292       # There have been cases of partial or broken SDK installations. A missing
26293       # lib dir is not going to work.
26294       if test ! -d "$WIN_SDK_BASE/lib"; then
26295         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26296 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26297         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26298 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26299       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26300         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26301 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26302         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26303         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26304           VS_ENV_ARGS="/x86"
26305         else
26306           VS_ENV_ARGS="/x64"
26307         fi
26308         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26309         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26310         # TODO: improve detection for other versions of SDK
26311         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26312       else
26313         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26314 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26315         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26316 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26317       fi
26318     fi
26319   fi
26320 
26321   fi
26322 
26323     if test "x$VS_ENV_CMD" != x; then
26324       TOOLCHAIN_VERSION=$VS_VERSION
26325       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26326       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26327       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26328       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26329       eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
26330       # The rest of the variables are already evaled while probing
26331       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
26332 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
26333       break
26334     fi
26335   done
26336 
26337   TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
26338   if test "$TOOLCHAIN_VERSION" -gt 2013; then
26339     UNSUPPORTED_TOOLCHAIN_VERSION=yes
26340   fi
26341 
26342 
26343   # If we have a devkit, skip all of the below.
26344   if test "x$DEVKIT_VS_VERSION" = x; then
26345     if test "x$VS_ENV_CMD" != x; then
26346       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26347 
26348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26349 
26350   # First separate the path from the arguments. This will split at the first
26351   # space.
26352   complete="$VS_ENV_CMD"
26353   path="${complete%% *}"
26354   tmp="$complete EOL"
26355   arguments="${tmp#* }"
26356 
26357   # Input might be given as Windows format, start by converting to
26358   # unix format.
26359   new_path=`$CYGPATH -u "$path"`
26360 
26361   # Now try to locate executable using which
26362   new_path=`$WHICH "$new_path" 2> /dev/null`
26363   # bat and cmd files are not always considered executable in cygwin causing which
26364   # to not find them
26365   if test "x$new_path" = x \
26366       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26367       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26368     new_path=`$CYGPATH -u "$path"`
26369   fi
26370   if test "x$new_path" = x; then
26371     # Oops. Which didn't find the executable.
26372     # The splitting of arguments from the executable at a space might have been incorrect,
26373     # since paths with space are more likely in Windows. Give it another try with the whole
26374     # argument.
26375     path="$complete"
26376     arguments="EOL"
26377     new_path=`$CYGPATH -u "$path"`
26378     new_path=`$WHICH "$new_path" 2> /dev/null`
26379     # bat and cmd files are not always considered executable in cygwin causing which
26380     # to not find them
26381     if test "x$new_path" = x \
26382         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26383         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26384       new_path=`$CYGPATH -u "$path"`
26385     fi
26386     if test "x$new_path" = x; then
26387       # It's still not found. Now this is an unrecoverable error.
26388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26389 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26390       has_space=`$ECHO "$complete" | $GREP " "`
26391       if test "x$has_space" != x; then
26392         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26393 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26394       fi
26395       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26396     fi
26397   fi
26398 
26399   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26400   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26401   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26402   # "foo.exe" is OK but "foo" is an error.
26403   #
26404   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26405   # It is also a way to make sure we got the proper file name for the real test later on.
26406   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26407   if test "x$test_shortpath" = x; then
26408     # Short path failed, file does not exist as specified.
26409     # Try adding .exe or .cmd
26410     if test -f "${new_path}.exe"; then
26411       input_to_shortpath="${new_path}.exe"
26412     elif test -f "${new_path}.cmd"; then
26413       input_to_shortpath="${new_path}.cmd"
26414     else
26415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26416 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26417       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26418 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26419       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26420     fi
26421   else
26422     input_to_shortpath="$new_path"
26423   fi
26424 
26425   # Call helper function which possibly converts this using DOS-style short mode.
26426   # If so, the updated path is stored in $new_path.
26427   new_path="$input_to_shortpath"
26428 
26429   input_path="$input_to_shortpath"
26430   # Check if we need to convert this using DOS-style short mode. If the path
26431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26432   # take no chances and rewrite it.
26433   # Note: m4 eats our [], so we need to use [ and ] instead.
26434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26435   if test "x$has_forbidden_chars" != x; then
26436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26440       # Going to short mode and back again did indeed matter. Since short mode is
26441       # case insensitive, let's make it lowercase to improve readability.
26442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26443       # Now convert it back to Unix-style (cygpath)
26444       input_path=`$CYGPATH -u "$shortmode_path"`
26445       new_path="$input_path"
26446     fi
26447   fi
26448 
26449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26450   if test "x$test_cygdrive_prefix" = x; then
26451     # As a simple fix, exclude /usr/bin since it's not a real path.
26452     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26454       # a path prefixed by /cygdrive for fixpath to work.
26455       new_path="$CYGWIN_ROOT_PATH$input_path"
26456     fi
26457   fi
26458 
26459   # remove trailing .exe if any
26460   new_path="${new_path/%.exe/}"
26461 
26462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26463 
26464   # First separate the path from the arguments. This will split at the first
26465   # space.
26466   complete="$VS_ENV_CMD"
26467   path="${complete%% *}"
26468   tmp="$complete EOL"
26469   arguments="${tmp#* }"
26470 
26471   # Input might be given as Windows format, start by converting to
26472   # unix format.
26473   new_path="$path"
26474 
26475   windows_path="$new_path"
26476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26477     unix_path=`$CYGPATH -u "$windows_path"`
26478     new_path="$unix_path"
26479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26481     new_path="$unix_path"
26482   fi
26483 
26484 
26485   # Now try to locate executable using which
26486   new_path=`$WHICH "$new_path" 2> /dev/null`
26487 
26488   if test "x$new_path" = x; then
26489     # Oops. Which didn't find the executable.
26490     # The splitting of arguments from the executable at a space might have been incorrect,
26491     # since paths with space are more likely in Windows. Give it another try with the whole
26492     # argument.
26493     path="$complete"
26494     arguments="EOL"
26495     new_path="$path"
26496 
26497   windows_path="$new_path"
26498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26499     unix_path=`$CYGPATH -u "$windows_path"`
26500     new_path="$unix_path"
26501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26503     new_path="$unix_path"
26504   fi
26505 
26506 
26507     new_path=`$WHICH "$new_path" 2> /dev/null`
26508     # bat and cmd files are not always considered executable in MSYS causing which
26509     # to not find them
26510     if test "x$new_path" = x \
26511         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26512         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26513       new_path="$path"
26514 
26515   windows_path="$new_path"
26516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26517     unix_path=`$CYGPATH -u "$windows_path"`
26518     new_path="$unix_path"
26519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26521     new_path="$unix_path"
26522   fi
26523 
26524     fi
26525 
26526     if test "x$new_path" = x; then
26527       # It's still not found. Now this is an unrecoverable error.
26528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26529 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26530       has_space=`$ECHO "$complete" | $GREP " "`
26531       if test "x$has_space" != x; then
26532         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26533 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26534       fi
26535       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26536     fi
26537   fi
26538 
26539   # Now new_path has a complete unix path to the binary
26540   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26541     # Keep paths in /bin as-is, but remove trailing .exe if any
26542     new_path="${new_path/%.exe/}"
26543     # Do not save /bin paths to all_fixpath_prefixes!
26544   else
26545     # Not in mixed or Windows style, start by that.
26546     new_path=`cmd //c echo $new_path`
26547 
26548   input_path="$new_path"
26549   # Check if we need to convert this using DOS-style short mode. If the path
26550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26551   # take no chances and rewrite it.
26552   # Note: m4 eats our [], so we need to use [ and ] instead.
26553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26554   if test "x$has_forbidden_chars" != x; then
26555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26557   fi
26558 
26559     # Output is in $new_path
26560 
26561   windows_path="$new_path"
26562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26563     unix_path=`$CYGPATH -u "$windows_path"`
26564     new_path="$unix_path"
26565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26567     new_path="$unix_path"
26568   fi
26569 
26570     # remove trailing .exe if any
26571     new_path="${new_path/%.exe/}"
26572 
26573     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26574     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26575   fi
26576 
26577   else
26578     # We're on a posix platform. Hooray! :)
26579     # First separate the path from the arguments. This will split at the first
26580     # space.
26581     complete="$VS_ENV_CMD"
26582     path="${complete%% *}"
26583     tmp="$complete EOL"
26584     arguments="${tmp#* }"
26585 
26586     # Cannot rely on the command "which" here since it doesn't always work.
26587     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26588     if test -z "$is_absolute_path"; then
26589       # Path to executable is not absolute. Find it.
26590       IFS_save="$IFS"
26591       IFS=:
26592       for p in $PATH; do
26593         if test -f "$p/$path" && test -x "$p/$path"; then
26594           new_path="$p/$path"
26595           break
26596         fi
26597       done
26598       IFS="$IFS_save"
26599     else
26600       # This is an absolute path, we can use it without further modifications.
26601       new_path="$path"
26602     fi
26603 
26604     if test "x$new_path" = x; then
26605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26606 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26607       has_space=`$ECHO "$complete" | $GREP " "`
26608       if test "x$has_space" != x; then
26609         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26610 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26611       fi
26612       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26613     fi
26614   fi
26615 
26616   # Now join together the path and the arguments once again
26617   if test "x$arguments" != xEOL; then
26618     new_complete="$new_path ${arguments% *}"
26619   else
26620     new_complete="$new_path"
26621   fi
26622 
26623   if test "x$complete" != "x$new_complete"; then
26624     VS_ENV_CMD="$new_complete"
26625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
26626 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
26627   fi
26628 
26629 
26630       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
26631       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
26632 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
26633 
26634       # We need to create a couple of temporary files.
26635       VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
26636       $MKDIR -p $VS_ENV_TMP_DIR
26637 
26638       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
26639       # Instead create a shell script which will set the relevant variables when run.
26640       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
26641 
26642   unix_path="$WINPATH_VS_ENV_CMD"
26643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26644     windows_path=`$CYGPATH -m "$unix_path"`
26645     WINPATH_VS_ENV_CMD="$windows_path"
26646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26647     windows_path=`cmd //c echo $unix_path`
26648     WINPATH_VS_ENV_CMD="$windows_path"
26649   fi
26650 
26651       WINPATH_BASH="$BASH"
26652 
26653   unix_path="$WINPATH_BASH"
26654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26655     windows_path=`$CYGPATH -m "$unix_path"`
26656     WINPATH_BASH="$windows_path"
26657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26658     windows_path=`cmd //c echo $unix_path`
26659     WINPATH_BASH="$windows_path"
26660   fi
26661 
26662 
26663       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
26664       # script (executable by bash) that will setup the important variables.
26665       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
26666       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
26667       # This will end up something like:
26668       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
26669       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
26670       # In some cases, the VS_ENV_CMD will change directory, change back so
26671       # the set-vs-env.sh ends up in the right place.
26672       $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
26673       # These will end up something like:
26674       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
26675       # The trailing space for everyone except PATH is no typo, but is needed due
26676       # to trailing \ in the Windows paths. These will be stripped later.
26677       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
26678           >> $EXTRACT_VC_ENV_BAT_FILE
26679       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' \
26680           >> $EXTRACT_VC_ENV_BAT_FILE
26681       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' \
26682           >> $EXTRACT_VC_ENV_BAT_FILE
26683       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
26684           >> $EXTRACT_VC_ENV_BAT_FILE
26685       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
26686           >> $EXTRACT_VC_ENV_BAT_FILE
26687       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
26688           >> $EXTRACT_VC_ENV_BAT_FILE
26689 
26690       # Now execute the newly created bat file.
26691       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
26692       # Change directory so we don't need to mess with Windows paths in redirects.
26693       cd $VS_ENV_TMP_DIR
26694       cmd /c extract-vs-env.bat | $CAT
26695       cd $CURDIR
26696 
26697       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
26698         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
26699 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
26700         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26701 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26702         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26703 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26704         as_fn_error $? "Cannot continue" "$LINENO" 5
26705       fi
26706 
26707       # Now set all paths and other env variables. This will allow the rest of
26708       # the configure script to find and run the compiler in the proper way.
26709       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
26710 $as_echo "$as_me: Setting extracted environment variables" >&6;}
26711       . $VS_ENV_TMP_DIR/set-vs-env.sh
26712       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
26713       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
26714     else
26715       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
26716      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
26717 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
26718     fi
26719   fi
26720 
26721   # At this point, we should have correct variables in the environment, or we can't continue.
26722   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
26723 $as_echo_n "checking for Visual Studio variables... " >&6; }
26724 
26725   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
26726       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
26727     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
26728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
26729 $as_echo "present but broken" >&6; }
26730       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
26731     else
26732       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26733 $as_echo "ok" >&6; }
26734       # Remove any trailing "\" and " " from the variables.
26735       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
26736       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
26737       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
26738       WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
26739       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
26740       if test -z "$WINDOWSSDKDIR"; then
26741         WINDOWSSDKDIR="$WindowsSdkDir"
26742       fi
26743       # Remove any paths containing # (typically F#) as that messes up make. This
26744       # is needed if visual studio was installed with F# support.
26745       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
26746 
26747 
26748 
26749 
26750     fi
26751   else
26752     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26753 $as_echo "not found" >&6; }
26754 
26755     if test "x$VS_ENV_CMD" = x; then
26756       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
26757 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
26758       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
26759 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
26760     else
26761       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
26762 $as_echo "$as_me: Running the extraction script failed." >&6;}
26763     fi
26764     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26765 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26766     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26767 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26768     as_fn_error $? "Cannot continue" "$LINENO" 5
26769   fi
26770 
26771     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
26772     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
26773     PATH="$VS_PATH"
26774     # The microsoft toolchain also requires INCLUDE and LIB to be set.
26775     export INCLUDE="$VS_INCLUDE"
26776     export LIB="$VS_LIB"
26777   fi
26778 
26779   # Before we locate the compilers, we need to sanitize the Xcode build environment
26780   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26781     # determine path to Xcode developer directory
26782     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
26783     SET_DEVELOPER_DIR=
26784 
26785     if test -n "$XCODE_PATH"; then
26786       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26787     fi
26788 
26789     # DEVELOPER_DIR could also be provided directly
26790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
26791 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
26792     if test -n "$DEVELOPER_DIR"; then
26793       if test ! -d "$DEVELOPER_DIR"; then
26794         as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5
26795       fi
26796       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
26797         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
26798       fi
26799       # make it visible to all the tools immediately
26800       export DEVELOPER_DIR
26801       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
26802       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
26803 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
26804     else
26805       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26806 $as_echo "no" >&6; }
26807     fi
26808 
26809 
26810     # Extract the first word of "xcodebuild", so it can be a program name with args.
26811 set dummy xcodebuild; ac_word=$2
26812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26813 $as_echo_n "checking for $ac_word... " >&6; }
26814 if ${ac_cv_path_XCODEBUILD+:} false; then :
26815   $as_echo_n "(cached) " >&6
26816 else
26817   case $XCODEBUILD in
26818   [\\/]* | ?:[\\/]*)
26819   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
26820   ;;
26821   *)
26822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26823 for as_dir in $PATH
26824 do
26825   IFS=$as_save_IFS
26826   test -z "$as_dir" && as_dir=.
26827     for ac_exec_ext in '' $ac_executable_extensions; do
26828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26829     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
26830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26831     break 2
26832   fi
26833 done
26834   done
26835 IFS=$as_save_IFS
26836 
26837   ;;
26838 esac
26839 fi
26840 XCODEBUILD=$ac_cv_path_XCODEBUILD
26841 if test -n "$XCODEBUILD"; then
26842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
26843 $as_echo "$XCODEBUILD" >&6; }
26844 else
26845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26846 $as_echo "no" >&6; }
26847 fi
26848 
26849 
26850     if test -z "$XCODEBUILD"; then
26851       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
26852     fi
26853 
26854     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
26855     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
26856     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
26857     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
26858       as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5
26859     fi
26860 
26861     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
26862     # clang and clang++, which will break the build. So handle that here if we need to.
26863     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
26864       # use xcrun to find the real gcc and add it's directory to PATH
26865       # then autoconf magic will find it
26866       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
26867 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
26868       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
26869       PATH="$XCODE_BIN_PATH":$PATH
26870     fi
26871 
26872     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
26873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
26874 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
26875     # allow SDKNAME to be set to override the default SDK selection
26876     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
26877     if test -n "$SDKPATH"; then
26878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
26879 $as_echo "$SDKPATH" >&6; }
26880     else
26881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
26882 $as_echo "(none, will use system headers and frameworks)" >&6; }
26883     fi
26884 
26885 
26886     # Perform a basic sanity test
26887     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
26888       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
26889     fi
26890 
26891     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
26892     if test -n "$SDKPATH"; then
26893       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
26894       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26895       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26896       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26897     fi
26898 
26899     if test -d "$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks" ; then
26900       # These always need to be set on macOS 10.X, or we can't find the frameworks embedded in JavaVM.framework
26901       # set this here so it doesn't have to be peppered throughout the forest
26902       CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26903       CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26904       LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26905     fi
26906   fi
26907 
26908   # For solaris we really need solaris tools, and not the GNU equivalent.
26909   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26910   # so add that to path before starting to probe.
26911   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26912   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26913     PATH="/usr/ccs/bin:$PATH"
26914   fi
26915 
26916   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
26917   # override all other locations.
26918   if test "x$TOOLCHAIN_PATH" != x; then
26919     PATH=$TOOLCHAIN_PATH:$PATH
26920   fi
26921 
26922 
26923   #
26924   # Setup the compilers (CC and CXX)
26925   #
26926 
26927   COMPILER_NAME=C
26928   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26929 
26930   if test "x$CC" != x; then
26931     # User has supplied compiler name already, always let that override.
26932     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26933 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26934     if test "x`basename $CC`" = "x$CC"; then
26935       # A command without a complete path is provided, search $PATH.
26936 
26937       for ac_prog in $CC
26938 do
26939   # Extract the first word of "$ac_prog", so it can be a program name with args.
26940 set dummy $ac_prog; ac_word=$2
26941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26942 $as_echo_n "checking for $ac_word... " >&6; }
26943 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26944   $as_echo_n "(cached) " >&6
26945 else
26946   case $POTENTIAL_CC in
26947   [\\/]* | ?:[\\/]*)
26948   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26949   ;;
26950   *)
26951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26952 for as_dir in $PATH
26953 do
26954   IFS=$as_save_IFS
26955   test -z "$as_dir" && as_dir=.
26956     for ac_exec_ext in '' $ac_executable_extensions; do
26957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26958     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26960     break 2
26961   fi
26962 done
26963   done
26964 IFS=$as_save_IFS
26965 
26966   ;;
26967 esac
26968 fi
26969 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26970 if test -n "$POTENTIAL_CC"; then
26971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26972 $as_echo "$POTENTIAL_CC" >&6; }
26973 else
26974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26975 $as_echo "no" >&6; }
26976 fi
26977 
26978 
26979   test -n "$POTENTIAL_CC" && break
26980 done
26981 
26982       if test "x$POTENTIAL_CC" != x; then
26983         CC=$POTENTIAL_CC
26984       else
26985         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26986       fi
26987     else
26988       # Otherwise it might already be a complete path
26989       if test ! -x "$CC"; then
26990         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26991       fi
26992     fi
26993   else
26994     # No user supplied value. Locate compiler ourselves.
26995 
26996     # If we are cross compiling, assume cross compilation tools follows the
26997     # cross compilation standard where they are prefixed with the autoconf
26998     # standard name for the target. For example the binary
26999     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27000     # If we are not cross compiling, then the default compiler name will be
27001     # used.
27002 
27003     CC=
27004     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27005     # before checking the rest of the PATH.
27006     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27007     # step, this should not be necessary.
27008     if test -n "$TOOLCHAIN_PATH"; then
27009       PATH_save="$PATH"
27010       PATH="$TOOLCHAIN_PATH"
27011       for ac_prog in $SEARCH_LIST
27012 do
27013   # Extract the first word of "$ac_prog", so it can be a program name with args.
27014 set dummy $ac_prog; ac_word=$2
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27016 $as_echo_n "checking for $ac_word... " >&6; }
27017 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27018   $as_echo_n "(cached) " >&6
27019 else
27020   case $TOOLCHAIN_PATH_CC in
27021   [\\/]* | ?:[\\/]*)
27022   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27023   ;;
27024   *)
27025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27026 for as_dir in $PATH
27027 do
27028   IFS=$as_save_IFS
27029   test -z "$as_dir" && as_dir=.
27030     for ac_exec_ext in '' $ac_executable_extensions; do
27031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27032     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27034     break 2
27035   fi
27036 done
27037   done
27038 IFS=$as_save_IFS
27039 
27040   ;;
27041 esac
27042 fi
27043 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27044 if test -n "$TOOLCHAIN_PATH_CC"; then
27045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27046 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27047 else
27048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27049 $as_echo "no" >&6; }
27050 fi
27051 
27052 
27053   test -n "$TOOLCHAIN_PATH_CC" && break
27054 done
27055 
27056       CC=$TOOLCHAIN_PATH_CC
27057       PATH="$PATH_save"
27058     fi
27059 
27060     # AC_PATH_PROGS can't be run multiple times with the same variable,
27061     # so create a new name for this run.
27062     if test "x$CC" = x; then
27063       for ac_prog in $TOOLCHAIN_CC_BINARY
27064 do
27065   # Extract the first word of "$ac_prog", so it can be a program name with args.
27066 set dummy $ac_prog; ac_word=$2
27067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27068 $as_echo_n "checking for $ac_word... " >&6; }
27069 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27070   $as_echo_n "(cached) " >&6
27071 else
27072   case $POTENTIAL_CC in
27073   [\\/]* | ?:[\\/]*)
27074   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27075   ;;
27076   *)
27077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27078 for as_dir in $PATH
27079 do
27080   IFS=$as_save_IFS
27081   test -z "$as_dir" && as_dir=.
27082     for ac_exec_ext in '' $ac_executable_extensions; do
27083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27084     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27086     break 2
27087   fi
27088 done
27089   done
27090 IFS=$as_save_IFS
27091 
27092   ;;
27093 esac
27094 fi
27095 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27096 if test -n "$POTENTIAL_CC"; then
27097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27098 $as_echo "$POTENTIAL_CC" >&6; }
27099 else
27100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27101 $as_echo "no" >&6; }
27102 fi
27103 
27104 
27105   test -n "$POTENTIAL_CC" && break
27106 done
27107 
27108       CC=$POTENTIAL_CC
27109     fi
27110 
27111     if test "x$CC" = x; then
27112 
27113   # Print a helpful message on how to acquire the necessary build dependency.
27114   # devkit is the help tag: freetype, cups, pulse, alsa etc
27115   MISSING_DEPENDENCY=devkit
27116 
27117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27118     cygwin_help $MISSING_DEPENDENCY
27119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27120     msys_help $MISSING_DEPENDENCY
27121   else
27122     PKGHANDLER_COMMAND=
27123 
27124     case $PKGHANDLER in
27125       apt-get)
27126         apt_help     $MISSING_DEPENDENCY ;;
27127       yum)
27128         yum_help     $MISSING_DEPENDENCY ;;
27129       port)
27130         port_help    $MISSING_DEPENDENCY ;;
27131       pkgutil)
27132         pkgutil_help $MISSING_DEPENDENCY ;;
27133       pkgadd)
27134         pkgadd_help  $MISSING_DEPENDENCY ;;
27135     esac
27136 
27137     if test "x$PKGHANDLER_COMMAND" != x; then
27138       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27139     fi
27140   fi
27141 
27142       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27143     fi
27144   fi
27145 
27146   # Now we have a compiler binary in CC. Make sure it's okay.
27147 
27148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27149 
27150   # First separate the path from the arguments. This will split at the first
27151   # space.
27152   complete="$CC"
27153   path="${complete%% *}"
27154   tmp="$complete EOL"
27155   arguments="${tmp#* }"
27156 
27157   # Input might be given as Windows format, start by converting to
27158   # unix format.
27159   new_path=`$CYGPATH -u "$path"`
27160 
27161   # Now try to locate executable using which
27162   new_path=`$WHICH "$new_path" 2> /dev/null`
27163   # bat and cmd files are not always considered executable in cygwin causing which
27164   # to not find them
27165   if test "x$new_path" = x \
27166       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27167       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27168     new_path=`$CYGPATH -u "$path"`
27169   fi
27170   if test "x$new_path" = x; then
27171     # Oops. Which didn't find the executable.
27172     # The splitting of arguments from the executable at a space might have been incorrect,
27173     # since paths with space are more likely in Windows. Give it another try with the whole
27174     # argument.
27175     path="$complete"
27176     arguments="EOL"
27177     new_path=`$CYGPATH -u "$path"`
27178     new_path=`$WHICH "$new_path" 2> /dev/null`
27179     # bat and cmd files are not always considered executable in cygwin causing which
27180     # to not find them
27181     if test "x$new_path" = x \
27182         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27183         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27184       new_path=`$CYGPATH -u "$path"`
27185     fi
27186     if test "x$new_path" = x; then
27187       # It's still not found. Now this is an unrecoverable error.
27188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27189 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27190       has_space=`$ECHO "$complete" | $GREP " "`
27191       if test "x$has_space" != x; then
27192         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27193 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27194       fi
27195       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27196     fi
27197   fi
27198 
27199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27202   # "foo.exe" is OK but "foo" is an error.
27203   #
27204   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27205   # It is also a way to make sure we got the proper file name for the real test later on.
27206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27207   if test "x$test_shortpath" = x; then
27208     # Short path failed, file does not exist as specified.
27209     # Try adding .exe or .cmd
27210     if test -f "${new_path}.exe"; then
27211       input_to_shortpath="${new_path}.exe"
27212     elif test -f "${new_path}.cmd"; then
27213       input_to_shortpath="${new_path}.cmd"
27214     else
27215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27216 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27217       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27218 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27219       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27220     fi
27221   else
27222     input_to_shortpath="$new_path"
27223   fi
27224 
27225   # Call helper function which possibly converts this using DOS-style short mode.
27226   # If so, the updated path is stored in $new_path.
27227   new_path="$input_to_shortpath"
27228 
27229   input_path="$input_to_shortpath"
27230   # Check if we need to convert this using DOS-style short mode. If the path
27231   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27232   # take no chances and rewrite it.
27233   # Note: m4 eats our [], so we need to use [ and ] instead.
27234   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27235   if test "x$has_forbidden_chars" != x; then
27236     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27237     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27238     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27239     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27240       # Going to short mode and back again did indeed matter. Since short mode is
27241       # case insensitive, let's make it lowercase to improve readability.
27242       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27243       # Now convert it back to Unix-style (cygpath)
27244       input_path=`$CYGPATH -u "$shortmode_path"`
27245       new_path="$input_path"
27246     fi
27247   fi
27248 
27249   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27250   if test "x$test_cygdrive_prefix" = x; then
27251     # As a simple fix, exclude /usr/bin since it's not a real path.
27252     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27253       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27254       # a path prefixed by /cygdrive for fixpath to work.
27255       new_path="$CYGWIN_ROOT_PATH$input_path"
27256     fi
27257   fi
27258 
27259   # remove trailing .exe if any
27260   new_path="${new_path/%.exe/}"
27261 
27262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27263 
27264   # First separate the path from the arguments. This will split at the first
27265   # space.
27266   complete="$CC"
27267   path="${complete%% *}"
27268   tmp="$complete EOL"
27269   arguments="${tmp#* }"
27270 
27271   # Input might be given as Windows format, start by converting to
27272   # unix format.
27273   new_path="$path"
27274 
27275   windows_path="$new_path"
27276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277     unix_path=`$CYGPATH -u "$windows_path"`
27278     new_path="$unix_path"
27279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281     new_path="$unix_path"
27282   fi
27283 
27284 
27285   # Now try to locate executable using which
27286   new_path=`$WHICH "$new_path" 2> /dev/null`
27287 
27288   if test "x$new_path" = x; then
27289     # Oops. Which didn't find the executable.
27290     # The splitting of arguments from the executable at a space might have been incorrect,
27291     # since paths with space are more likely in Windows. Give it another try with the whole
27292     # argument.
27293     path="$complete"
27294     arguments="EOL"
27295     new_path="$path"
27296 
27297   windows_path="$new_path"
27298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299     unix_path=`$CYGPATH -u "$windows_path"`
27300     new_path="$unix_path"
27301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27303     new_path="$unix_path"
27304   fi
27305 
27306 
27307     new_path=`$WHICH "$new_path" 2> /dev/null`
27308     # bat and cmd files are not always considered executable in MSYS causing which
27309     # to not find them
27310     if test "x$new_path" = x \
27311         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27312         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27313       new_path="$path"
27314 
27315   windows_path="$new_path"
27316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27317     unix_path=`$CYGPATH -u "$windows_path"`
27318     new_path="$unix_path"
27319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27321     new_path="$unix_path"
27322   fi
27323 
27324     fi
27325 
27326     if test "x$new_path" = x; then
27327       # It's still not found. Now this is an unrecoverable error.
27328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27329 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27330       has_space=`$ECHO "$complete" | $GREP " "`
27331       if test "x$has_space" != x; then
27332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27334       fi
27335       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27336     fi
27337   fi
27338 
27339   # Now new_path has a complete unix path to the binary
27340   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27341     # Keep paths in /bin as-is, but remove trailing .exe if any
27342     new_path="${new_path/%.exe/}"
27343     # Do not save /bin paths to all_fixpath_prefixes!
27344   else
27345     # Not in mixed or Windows style, start by that.
27346     new_path=`cmd //c echo $new_path`
27347 
27348   input_path="$new_path"
27349   # Check if we need to convert this using DOS-style short mode. If the path
27350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27351   # take no chances and rewrite it.
27352   # Note: m4 eats our [], so we need to use [ and ] instead.
27353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27354   if test "x$has_forbidden_chars" != x; then
27355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27357   fi
27358 
27359     # Output is in $new_path
27360 
27361   windows_path="$new_path"
27362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363     unix_path=`$CYGPATH -u "$windows_path"`
27364     new_path="$unix_path"
27365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27367     new_path="$unix_path"
27368   fi
27369 
27370     # remove trailing .exe if any
27371     new_path="${new_path/%.exe/}"
27372 
27373     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27374     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27375   fi
27376 
27377   else
27378     # We're on a posix platform. Hooray! :)
27379     # First separate the path from the arguments. This will split at the first
27380     # space.
27381     complete="$CC"
27382     path="${complete%% *}"
27383     tmp="$complete EOL"
27384     arguments="${tmp#* }"
27385 
27386     # Cannot rely on the command "which" here since it doesn't always work.
27387     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27388     if test -z "$is_absolute_path"; then
27389       # Path to executable is not absolute. Find it.
27390       IFS_save="$IFS"
27391       IFS=:
27392       for p in $PATH; do
27393         if test -f "$p/$path" && test -x "$p/$path"; then
27394           new_path="$p/$path"
27395           break
27396         fi
27397       done
27398       IFS="$IFS_save"
27399     else
27400       # This is an absolute path, we can use it without further modifications.
27401       new_path="$path"
27402     fi
27403 
27404     if test "x$new_path" = x; then
27405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27406 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27407       has_space=`$ECHO "$complete" | $GREP " "`
27408       if test "x$has_space" != x; then
27409         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27410 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27411       fi
27412       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27413     fi
27414   fi
27415 
27416   # Now join together the path and the arguments once again
27417   if test "x$arguments" != xEOL; then
27418     new_complete="$new_path ${arguments% *}"
27419   else
27420     new_complete="$new_path"
27421   fi
27422 
27423   if test "x$complete" != "x$new_complete"; then
27424     CC="$new_complete"
27425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27426 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27427   fi
27428 
27429   TEST_COMPILER="$CC"
27430 
27431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27432 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
27433   SYMLINK_ORIGINAL="$TEST_COMPILER"
27434 
27435   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27436     # Follow a chain of symbolic links. Use readlink
27437     # where it exists, else fall back to horribly
27438     # complicated shell code.
27439     if test "x$READLINK_TESTED" != yes; then
27440       # On MacOSX there is a readlink tool with a different
27441       # purpose than the GNU readlink tool. Check the found readlink.
27442       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27443       if test "x$ISGNU" = x; then
27444         # A readlink that we do not know how to use.
27445         # Are there other non-GNU readlinks out there?
27446         READLINK_TESTED=yes
27447         READLINK=
27448       fi
27449     fi
27450 
27451     if test "x$READLINK" != x; then
27452       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
27453     else
27454       # Save the current directory for restoring afterwards
27455       STARTDIR=$PWD
27456       COUNTER=0
27457       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
27458       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
27459       cd $sym_link_dir
27460       # Use -P flag to resolve symlinks in directories.
27461       cd `$THEPWDCMD -P`
27462       sym_link_dir=`$THEPWDCMD -P`
27463       # Resolve file symlinks
27464       while test $COUNTER -lt 20; do
27465         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27466         if test "x$ISLINK" == x; then
27467           # This is not a symbolic link! We are done!
27468           break
27469         fi
27470         # Again resolve directory symlinks since the target of the just found
27471         # link could be in a different directory
27472         cd `$DIRNAME $ISLINK`
27473         sym_link_dir=`$THEPWDCMD -P`
27474         sym_link_file=`$BASENAME $ISLINK`
27475         let COUNTER=COUNTER+1
27476       done
27477       cd $STARTDIR
27478       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
27479     fi
27480   fi
27481 
27482   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
27483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
27484 $as_echo "no symlink" >&6; }
27485   else
27486     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
27487 $as_echo "$SYMLINK_ORIGINAL" >&6; }
27488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27489 $as_echo_n "checking if CC is disguised ccache... " >&6; }
27490     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
27491     if test "x$COMPILER_BASENAME" = "xccache"; then
27492       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27493 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27494       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27495       # We want to control ccache invocation ourselves, so ignore this cc and try
27496       # searching again.
27497 
27498       # Remove the path to the fake ccache cc from the PATH
27499       RETRY_COMPILER_SAVED_PATH="$PATH"
27500       COMPILER_DIRNAME=`$DIRNAME $CC`
27501       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27502       # Try again looking for our compiler
27503       if test -n "$ac_tool_prefix"; then
27504   for ac_prog in $TOOLCHAIN_CC_BINARY
27505   do
27506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27509 $as_echo_n "checking for $ac_word... " >&6; }
27510 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27511   $as_echo_n "(cached) " >&6
27512 else
27513   if test -n "$PROPER_COMPILER_CC"; then
27514   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27515 else
27516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27517 for as_dir in $PATH
27518 do
27519   IFS=$as_save_IFS
27520   test -z "$as_dir" && as_dir=.
27521     for ac_exec_ext in '' $ac_executable_extensions; do
27522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27523     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27525     break 2
27526   fi
27527 done
27528   done
27529 IFS=$as_save_IFS
27530 
27531 fi
27532 fi
27533 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27534 if test -n "$PROPER_COMPILER_CC"; then
27535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27536 $as_echo "$PROPER_COMPILER_CC" >&6; }
27537 else
27538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27539 $as_echo "no" >&6; }
27540 fi
27541 
27542 
27543     test -n "$PROPER_COMPILER_CC" && break
27544   done
27545 fi
27546 if test -z "$PROPER_COMPILER_CC"; then
27547   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27548   for ac_prog in $TOOLCHAIN_CC_BINARY
27549 do
27550   # Extract the first word of "$ac_prog", so it can be a program name with args.
27551 set dummy $ac_prog; ac_word=$2
27552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27553 $as_echo_n "checking for $ac_word... " >&6; }
27554 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27555   $as_echo_n "(cached) " >&6
27556 else
27557   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27558   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27559 else
27560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27561 for as_dir in $PATH
27562 do
27563   IFS=$as_save_IFS
27564   test -z "$as_dir" && as_dir=.
27565     for ac_exec_ext in '' $ac_executable_extensions; do
27566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27567     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27569     break 2
27570   fi
27571 done
27572   done
27573 IFS=$as_save_IFS
27574 
27575 fi
27576 fi
27577 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27578 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27580 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27581 else
27582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27583 $as_echo "no" >&6; }
27584 fi
27585 
27586 
27587   test -n "$ac_ct_PROPER_COMPILER_CC" && break
27588 done
27589 
27590   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27591     PROPER_COMPILER_CC=""
27592   else
27593     case $cross_compiling:$ac_tool_warned in
27594 yes:)
27595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27596 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27597 ac_tool_warned=yes ;;
27598 esac
27599     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
27600   fi
27601 fi
27602 
27603 
27604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27605 
27606   # First separate the path from the arguments. This will split at the first
27607   # space.
27608   complete="$PROPER_COMPILER_CC"
27609   path="${complete%% *}"
27610   tmp="$complete EOL"
27611   arguments="${tmp#* }"
27612 
27613   # Input might be given as Windows format, start by converting to
27614   # unix format.
27615   new_path=`$CYGPATH -u "$path"`
27616 
27617   # Now try to locate executable using which
27618   new_path=`$WHICH "$new_path" 2> /dev/null`
27619   # bat and cmd files are not always considered executable in cygwin causing which
27620   # to not find them
27621   if test "x$new_path" = x \
27622       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27623       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27624     new_path=`$CYGPATH -u "$path"`
27625   fi
27626   if test "x$new_path" = x; then
27627     # Oops. Which didn't find the executable.
27628     # The splitting of arguments from the executable at a space might have been incorrect,
27629     # since paths with space are more likely in Windows. Give it another try with the whole
27630     # argument.
27631     path="$complete"
27632     arguments="EOL"
27633     new_path=`$CYGPATH -u "$path"`
27634     new_path=`$WHICH "$new_path" 2> /dev/null`
27635     # bat and cmd files are not always considered executable in cygwin causing which
27636     # to not find them
27637     if test "x$new_path" = x \
27638         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27639         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27640       new_path=`$CYGPATH -u "$path"`
27641     fi
27642     if test "x$new_path" = x; then
27643       # It's still not found. Now this is an unrecoverable error.
27644       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27645 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27646       has_space=`$ECHO "$complete" | $GREP " "`
27647       if test "x$has_space" != x; then
27648         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27649 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27650       fi
27651       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27652     fi
27653   fi
27654 
27655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27658   # "foo.exe" is OK but "foo" is an error.
27659   #
27660   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27661   # It is also a way to make sure we got the proper file name for the real test later on.
27662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27663   if test "x$test_shortpath" = x; then
27664     # Short path failed, file does not exist as specified.
27665     # Try adding .exe or .cmd
27666     if test -f "${new_path}.exe"; then
27667       input_to_shortpath="${new_path}.exe"
27668     elif test -f "${new_path}.cmd"; then
27669       input_to_shortpath="${new_path}.cmd"
27670     else
27671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
27672 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
27673       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27674 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27675       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27676     fi
27677   else
27678     input_to_shortpath="$new_path"
27679   fi
27680 
27681   # Call helper function which possibly converts this using DOS-style short mode.
27682   # If so, the updated path is stored in $new_path.
27683   new_path="$input_to_shortpath"
27684 
27685   input_path="$input_to_shortpath"
27686   # Check if we need to convert this using DOS-style short mode. If the path
27687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27688   # take no chances and rewrite it.
27689   # Note: m4 eats our [], so we need to use [ and ] instead.
27690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27691   if test "x$has_forbidden_chars" != x; then
27692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27693     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27694     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27695     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27696       # Going to short mode and back again did indeed matter. Since short mode is
27697       # case insensitive, let's make it lowercase to improve readability.
27698       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699       # Now convert it back to Unix-style (cygpath)
27700       input_path=`$CYGPATH -u "$shortmode_path"`
27701       new_path="$input_path"
27702     fi
27703   fi
27704 
27705   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27706   if test "x$test_cygdrive_prefix" = x; then
27707     # As a simple fix, exclude /usr/bin since it's not a real path.
27708     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27709       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27710       # a path prefixed by /cygdrive for fixpath to work.
27711       new_path="$CYGWIN_ROOT_PATH$input_path"
27712     fi
27713   fi
27714 
27715   # remove trailing .exe if any
27716   new_path="${new_path/%.exe/}"
27717 
27718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27719 
27720   # First separate the path from the arguments. This will split at the first
27721   # space.
27722   complete="$PROPER_COMPILER_CC"
27723   path="${complete%% *}"
27724   tmp="$complete EOL"
27725   arguments="${tmp#* }"
27726 
27727   # Input might be given as Windows format, start by converting to
27728   # unix format.
27729   new_path="$path"
27730 
27731   windows_path="$new_path"
27732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27733     unix_path=`$CYGPATH -u "$windows_path"`
27734     new_path="$unix_path"
27735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27737     new_path="$unix_path"
27738   fi
27739 
27740 
27741   # Now try to locate executable using which
27742   new_path=`$WHICH "$new_path" 2> /dev/null`
27743 
27744   if test "x$new_path" = x; then
27745     # Oops. Which didn't find the executable.
27746     # The splitting of arguments from the executable at a space might have been incorrect,
27747     # since paths with space are more likely in Windows. Give it another try with the whole
27748     # argument.
27749     path="$complete"
27750     arguments="EOL"
27751     new_path="$path"
27752 
27753   windows_path="$new_path"
27754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27755     unix_path=`$CYGPATH -u "$windows_path"`
27756     new_path="$unix_path"
27757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27759     new_path="$unix_path"
27760   fi
27761 
27762 
27763     new_path=`$WHICH "$new_path" 2> /dev/null`
27764     # bat and cmd files are not always considered executable in MSYS causing which
27765     # to not find them
27766     if test "x$new_path" = x \
27767         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27768         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27769       new_path="$path"
27770 
27771   windows_path="$new_path"
27772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773     unix_path=`$CYGPATH -u "$windows_path"`
27774     new_path="$unix_path"
27775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777     new_path="$unix_path"
27778   fi
27779 
27780     fi
27781 
27782     if test "x$new_path" = x; then
27783       # It's still not found. Now this is an unrecoverable error.
27784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27785 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27786       has_space=`$ECHO "$complete" | $GREP " "`
27787       if test "x$has_space" != x; then
27788         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27789 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27790       fi
27791       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27792     fi
27793   fi
27794 
27795   # Now new_path has a complete unix path to the binary
27796   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27797     # Keep paths in /bin as-is, but remove trailing .exe if any
27798     new_path="${new_path/%.exe/}"
27799     # Do not save /bin paths to all_fixpath_prefixes!
27800   else
27801     # Not in mixed or Windows style, start by that.
27802     new_path=`cmd //c echo $new_path`
27803 
27804   input_path="$new_path"
27805   # Check if we need to convert this using DOS-style short mode. If the path
27806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27807   # take no chances and rewrite it.
27808   # Note: m4 eats our [], so we need to use [ and ] instead.
27809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27810   if test "x$has_forbidden_chars" != x; then
27811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27812     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27813   fi
27814 
27815     # Output is in $new_path
27816 
27817   windows_path="$new_path"
27818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27819     unix_path=`$CYGPATH -u "$windows_path"`
27820     new_path="$unix_path"
27821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27823     new_path="$unix_path"
27824   fi
27825 
27826     # remove trailing .exe if any
27827     new_path="${new_path/%.exe/}"
27828 
27829     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27830     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27831   fi
27832 
27833   else
27834     # We're on a posix platform. Hooray! :)
27835     # First separate the path from the arguments. This will split at the first
27836     # space.
27837     complete="$PROPER_COMPILER_CC"
27838     path="${complete%% *}"
27839     tmp="$complete EOL"
27840     arguments="${tmp#* }"
27841 
27842     # Cannot rely on the command "which" here since it doesn't always work.
27843     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27844     if test -z "$is_absolute_path"; then
27845       # Path to executable is not absolute. Find it.
27846       IFS_save="$IFS"
27847       IFS=:
27848       for p in $PATH; do
27849         if test -f "$p/$path" && test -x "$p/$path"; then
27850           new_path="$p/$path"
27851           break
27852         fi
27853       done
27854       IFS="$IFS_save"
27855     else
27856       # This is an absolute path, we can use it without further modifications.
27857       new_path="$path"
27858     fi
27859 
27860     if test "x$new_path" = x; then
27861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27862 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27863       has_space=`$ECHO "$complete" | $GREP " "`
27864       if test "x$has_space" != x; then
27865         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27866 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27867       fi
27868       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27869     fi
27870   fi
27871 
27872   # Now join together the path and the arguments once again
27873   if test "x$arguments" != xEOL; then
27874     new_complete="$new_path ${arguments% *}"
27875   else
27876     new_complete="$new_path"
27877   fi
27878 
27879   if test "x$complete" != "x$new_complete"; then
27880     PROPER_COMPILER_CC="$new_complete"
27881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
27882 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
27883   fi
27884 
27885       PATH="$RETRY_COMPILER_SAVED_PATH"
27886 
27887       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
27888 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
27889 
27890   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27891     # Follow a chain of symbolic links. Use readlink
27892     # where it exists, else fall back to horribly
27893     # complicated shell code.
27894     if test "x$READLINK_TESTED" != yes; then
27895       # On MacOSX there is a readlink tool with a different
27896       # purpose than the GNU readlink tool. Check the found readlink.
27897       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27898       if test "x$ISGNU" = x; then
27899         # A readlink that we do not know how to use.
27900         # Are there other non-GNU readlinks out there?
27901         READLINK_TESTED=yes
27902         READLINK=
27903       fi
27904     fi
27905 
27906     if test "x$READLINK" != x; then
27907       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
27908     else
27909       # Save the current directory for restoring afterwards
27910       STARTDIR=$PWD
27911       COUNTER=0
27912       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
27913       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
27914       cd $sym_link_dir
27915       # Use -P flag to resolve symlinks in directories.
27916       cd `$THEPWDCMD -P`
27917       sym_link_dir=`$THEPWDCMD -P`
27918       # Resolve file symlinks
27919       while test $COUNTER -lt 20; do
27920         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27921         if test "x$ISLINK" == x; then
27922           # This is not a symbolic link! We are done!
27923           break
27924         fi
27925         # Again resolve directory symlinks since the target of the just found
27926         # link could be in a different directory
27927         cd `$DIRNAME $ISLINK`
27928         sym_link_dir=`$THEPWDCMD -P`
27929         sym_link_file=`$BASENAME $ISLINK`
27930         let COUNTER=COUNTER+1
27931       done
27932       cd $STARTDIR
27933       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
27934     fi
27935   fi
27936 
27937       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27938 $as_echo "$PROPER_COMPILER_CC" >&6; }
27939       CC="$PROPER_COMPILER_CC"
27940     else
27941       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
27942 $as_echo "no, keeping CC" >&6; }
27943     fi
27944   fi
27945 
27946 
27947   COMPILER=$CC
27948   COMPILER_NAME=$COMPILER_NAME
27949 
27950   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27951     # cc -V output typically looks like
27952     #     cc: Sun C 5.12 Linux_i386 2011/11/16
27953     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
27954     # Check that this is likely to be the Solaris Studio cc.
27955     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
27956     if test $? -ne 0; then
27957       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27958       { $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
27959 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27960       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27961 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27962       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27963 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27964       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27965     fi
27966     # Remove usage instructions (if present), and
27967     # collapse compiler output into a single line
27968     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27969         $SED -e 's/ *[Uu]sage:.*//'`
27970     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27971         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
27972   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
27973     # xlc -qversion output typically looks like
27974     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
27975     #     Version: 11.01.0000.0015
27976     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
27977     # Check that this is likely to be the IBM XL C compiler.
27978     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
27979     if test $? -ne 0; then
27980       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27981       { $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
27982 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27983       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27984 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27985       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27986 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27987       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27988     fi
27989     # Collapse compiler output into a single line
27990     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27991     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27992         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
27993   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
27994     # There is no specific version flag, but all output starts with a version string.
27995     # First line typically looks something like:
27996     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
27997     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
27998     # Check that this is likely to be Microsoft CL.EXE.
27999     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28000     if test $? -ne 0; then
28001       { $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
28002 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28003       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28004 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28005       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28006     fi
28007     # Collapse compiler output into a single line
28008     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28009     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28010         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28011   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28012     # gcc --version output typically looks like
28013     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28014     #     Copyright (C) 2013 Free Software Foundation, Inc.
28015     #     This is free software; see the source for copying conditions.  There is NO
28016     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28017     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28018     # Check that this is likely to be GCC.
28019     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28020     if test $? -ne 0; then
28021       { $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
28022 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28023       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28024 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28025       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28026     fi
28027     # Remove Copyright and legalese from version string, and
28028     # collapse into a single line
28029     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28030         $SED -e 's/ *Copyright .*//'`
28031     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28032         $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
28033   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28034     # clang --version output typically looks like
28035     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28036     #    clang version 3.3 (tags/RELEASE_33/final)
28037     # or
28038     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28039     #    Target: x86_64-pc-linux-gnu
28040     #    Thread model: posix
28041     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28042     # Check that this is likely to be clang
28043     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28044     if test $? -ne 0; then
28045       { $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
28046 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28047       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28048 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28049       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28050     fi
28051     # Collapse compiler output into a single line
28052     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28053     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28054         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28055 
28056   else
28057       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28058   fi
28059   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28060   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28061   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28062   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28063 
28064   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28065 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28066 
28067 
28068   # Now that we have resolved CC ourself, let autoconf have its go at it
28069   ac_ext=c
28070 ac_cpp='$CPP $CPPFLAGS'
28071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28074 if test -n "$ac_tool_prefix"; then
28075   for ac_prog in $CC
28076   do
28077     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28078 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28080 $as_echo_n "checking for $ac_word... " >&6; }
28081 if ${ac_cv_prog_CC+:} false; then :
28082   $as_echo_n "(cached) " >&6
28083 else
28084   if test -n "$CC"; then
28085   ac_cv_prog_CC="$CC" # Let the user override the test.
28086 else
28087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28088 for as_dir in $PATH
28089 do
28090   IFS=$as_save_IFS
28091   test -z "$as_dir" && as_dir=.
28092     for ac_exec_ext in '' $ac_executable_extensions; do
28093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28094     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28096     break 2
28097   fi
28098 done
28099   done
28100 IFS=$as_save_IFS
28101 
28102 fi
28103 fi
28104 CC=$ac_cv_prog_CC
28105 if test -n "$CC"; then
28106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28107 $as_echo "$CC" >&6; }
28108 else
28109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28110 $as_echo "no" >&6; }
28111 fi
28112 
28113 
28114     test -n "$CC" && break
28115   done
28116 fi
28117 if test -z "$CC"; then
28118   ac_ct_CC=$CC
28119   for ac_prog in $CC
28120 do
28121   # Extract the first word of "$ac_prog", so it can be a program name with args.
28122 set dummy $ac_prog; ac_word=$2
28123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28124 $as_echo_n "checking for $ac_word... " >&6; }
28125 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28126   $as_echo_n "(cached) " >&6
28127 else
28128   if test -n "$ac_ct_CC"; then
28129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28130 else
28131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28132 for as_dir in $PATH
28133 do
28134   IFS=$as_save_IFS
28135   test -z "$as_dir" && as_dir=.
28136     for ac_exec_ext in '' $ac_executable_extensions; do
28137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28138     ac_cv_prog_ac_ct_CC="$ac_prog"
28139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28140     break 2
28141   fi
28142 done
28143   done
28144 IFS=$as_save_IFS
28145 
28146 fi
28147 fi
28148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28149 if test -n "$ac_ct_CC"; then
28150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28151 $as_echo "$ac_ct_CC" >&6; }
28152 else
28153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28154 $as_echo "no" >&6; }
28155 fi
28156 
28157 
28158   test -n "$ac_ct_CC" && break
28159 done
28160 
28161   if test "x$ac_ct_CC" = x; then
28162     CC=""
28163   else
28164     case $cross_compiling:$ac_tool_warned in
28165 yes:)
28166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28168 ac_tool_warned=yes ;;
28169 esac
28170     CC=$ac_ct_CC
28171   fi
28172 fi
28173 
28174 
28175 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28176 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28177 as_fn_error $? "no acceptable C compiler found in \$PATH
28178 See \`config.log' for more details" "$LINENO" 5; }
28179 
28180 # Provide some information about the compiler.
28181 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28182 set X $ac_compile
28183 ac_compiler=$2
28184 for ac_option in --version -v -V -qversion; do
28185   { { ac_try="$ac_compiler $ac_option >&5"
28186 case "(($ac_try" in
28187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28188   *) ac_try_echo=$ac_try;;
28189 esac
28190 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28191 $as_echo "$ac_try_echo"; } >&5
28192   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28193   ac_status=$?
28194   if test -s conftest.err; then
28195     sed '10a\
28196 ... rest of stderr output deleted ...
28197          10q' conftest.err >conftest.er1
28198     cat conftest.er1 >&5
28199   fi
28200   rm -f conftest.er1 conftest.err
28201   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28202   test $ac_status = 0; }
28203 done
28204 
28205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206 /* end confdefs.h.  */
28207 
28208 int
28209 main ()
28210 {
28211 
28212   ;
28213   return 0;
28214 }
28215 _ACEOF
28216 ac_clean_files_save=$ac_clean_files
28217 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28218 # Try to create an executable without -o first, disregard a.out.
28219 # It will help us diagnose broken compilers, and finding out an intuition
28220 # of exeext.
28221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28222 $as_echo_n "checking whether the C compiler works... " >&6; }
28223 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28224 
28225 # The possible output files:
28226 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28227 
28228 ac_rmfiles=
28229 for ac_file in $ac_files
28230 do
28231   case $ac_file in
28232     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28233     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28234   esac
28235 done
28236 rm -f $ac_rmfiles
28237 
28238 if { { ac_try="$ac_link_default"
28239 case "(($ac_try" in
28240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28241   *) ac_try_echo=$ac_try;;
28242 esac
28243 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28244 $as_echo "$ac_try_echo"; } >&5
28245   (eval "$ac_link_default") 2>&5
28246   ac_status=$?
28247   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28248   test $ac_status = 0; }; then :
28249   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28250 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28251 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28252 # so that the user can short-circuit this test for compilers unknown to
28253 # Autoconf.
28254 for ac_file in $ac_files ''
28255 do
28256   test -f "$ac_file" || continue
28257   case $ac_file in
28258     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28259         ;;
28260     [ab].out )
28261         # We found the default executable, but exeext='' is most
28262         # certainly right.
28263         break;;
28264     *.* )
28265         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28266         then :; else
28267            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28268         fi
28269         # We set ac_cv_exeext here because the later test for it is not
28270         # safe: cross compilers may not add the suffix if given an `-o'
28271         # argument, so we may need to know it at that point already.
28272         # Even if this section looks crufty: it has the advantage of
28273         # actually working.
28274         break;;
28275     * )
28276         break;;
28277   esac
28278 done
28279 test "$ac_cv_exeext" = no && ac_cv_exeext=
28280 
28281 else
28282   ac_file=''
28283 fi
28284 if test -z "$ac_file"; then :
28285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28286 $as_echo "no" >&6; }
28287 $as_echo "$as_me: failed program was:" >&5
28288 sed 's/^/| /' conftest.$ac_ext >&5
28289 
28290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28291 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28292 as_fn_error 77 "C compiler cannot create executables
28293 See \`config.log' for more details" "$LINENO" 5; }
28294 else
28295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28296 $as_echo "yes" >&6; }
28297 fi
28298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28299 $as_echo_n "checking for C compiler default output file name... " >&6; }
28300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28301 $as_echo "$ac_file" >&6; }
28302 ac_exeext=$ac_cv_exeext
28303 
28304 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28305 ac_clean_files=$ac_clean_files_save
28306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28307 $as_echo_n "checking for suffix of executables... " >&6; }
28308 if { { ac_try="$ac_link"
28309 case "(($ac_try" in
28310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28311   *) ac_try_echo=$ac_try;;
28312 esac
28313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28314 $as_echo "$ac_try_echo"; } >&5
28315   (eval "$ac_link") 2>&5
28316   ac_status=$?
28317   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28318   test $ac_status = 0; }; then :
28319   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28320 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28321 # work properly (i.e., refer to `conftest.exe'), while it won't with
28322 # `rm'.
28323 for ac_file in conftest.exe conftest conftest.*; do
28324   test -f "$ac_file" || continue
28325   case $ac_file in
28326     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28327     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28328           break;;
28329     * ) break;;
28330   esac
28331 done
28332 else
28333   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28334 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28335 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28336 See \`config.log' for more details" "$LINENO" 5; }
28337 fi
28338 rm -f conftest conftest$ac_cv_exeext
28339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28340 $as_echo "$ac_cv_exeext" >&6; }
28341 
28342 rm -f conftest.$ac_ext
28343 EXEEXT=$ac_cv_exeext
28344 ac_exeext=$EXEEXT
28345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28346 /* end confdefs.h.  */
28347 #include <stdio.h>
28348 int
28349 main ()
28350 {
28351 FILE *f = fopen ("conftest.out", "w");
28352  return ferror (f) || fclose (f) != 0;
28353 
28354   ;
28355   return 0;
28356 }
28357 _ACEOF
28358 ac_clean_files="$ac_clean_files conftest.out"
28359 # Check that the compiler produces executables we can run.  If not, either
28360 # the compiler is broken, or we cross compile.
28361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28362 $as_echo_n "checking whether we are cross compiling... " >&6; }
28363 if test "$cross_compiling" != yes; then
28364   { { ac_try="$ac_link"
28365 case "(($ac_try" in
28366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28367   *) ac_try_echo=$ac_try;;
28368 esac
28369 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28370 $as_echo "$ac_try_echo"; } >&5
28371   (eval "$ac_link") 2>&5
28372   ac_status=$?
28373   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28374   test $ac_status = 0; }
28375   if { ac_try='./conftest$ac_cv_exeext'
28376   { { case "(($ac_try" in
28377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28378   *) ac_try_echo=$ac_try;;
28379 esac
28380 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28381 $as_echo "$ac_try_echo"; } >&5
28382   (eval "$ac_try") 2>&5
28383   ac_status=$?
28384   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28385   test $ac_status = 0; }; }; then
28386     cross_compiling=no
28387   else
28388     if test "$cross_compiling" = maybe; then
28389         cross_compiling=yes
28390     else
28391         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28393 as_fn_error $? "cannot run C compiled programs.
28394 If you meant to cross compile, use \`--host'.
28395 See \`config.log' for more details" "$LINENO" 5; }
28396     fi
28397   fi
28398 fi
28399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28400 $as_echo "$cross_compiling" >&6; }
28401 
28402 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28403 ac_clean_files=$ac_clean_files_save
28404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28405 $as_echo_n "checking for suffix of object files... " >&6; }
28406 if ${ac_cv_objext+:} false; then :
28407   $as_echo_n "(cached) " >&6
28408 else
28409   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28410 /* end confdefs.h.  */
28411 
28412 int
28413 main ()
28414 {
28415 
28416   ;
28417   return 0;
28418 }
28419 _ACEOF
28420 rm -f conftest.o conftest.obj
28421 if { { ac_try="$ac_compile"
28422 case "(($ac_try" in
28423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28424   *) ac_try_echo=$ac_try;;
28425 esac
28426 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28427 $as_echo "$ac_try_echo"; } >&5
28428   (eval "$ac_compile") 2>&5
28429   ac_status=$?
28430   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28431   test $ac_status = 0; }; then :
28432   for ac_file in conftest.o conftest.obj conftest.*; do
28433   test -f "$ac_file" || continue;
28434   case $ac_file in
28435     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28436     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28437        break;;
28438   esac
28439 done
28440 else
28441   $as_echo "$as_me: failed program was:" >&5
28442 sed 's/^/| /' conftest.$ac_ext >&5
28443 
28444 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28445 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28446 as_fn_error $? "cannot compute suffix of object files: cannot compile
28447 See \`config.log' for more details" "$LINENO" 5; }
28448 fi
28449 rm -f conftest.$ac_cv_objext conftest.$ac_ext
28450 fi
28451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28452 $as_echo "$ac_cv_objext" >&6; }
28453 OBJEXT=$ac_cv_objext
28454 ac_objext=$OBJEXT
28455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28456 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28457 if ${ac_cv_c_compiler_gnu+:} false; then :
28458   $as_echo_n "(cached) " >&6
28459 else
28460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28461 /* end confdefs.h.  */
28462 
28463 int
28464 main ()
28465 {
28466 #ifndef __GNUC__
28467        choke me
28468 #endif
28469 
28470   ;
28471   return 0;
28472 }
28473 _ACEOF
28474 if ac_fn_c_try_compile "$LINENO"; then :
28475   ac_compiler_gnu=yes
28476 else
28477   ac_compiler_gnu=no
28478 fi
28479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28480 ac_cv_c_compiler_gnu=$ac_compiler_gnu
28481 
28482 fi
28483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28484 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
28485 if test $ac_compiler_gnu = yes; then
28486   GCC=yes
28487 else
28488   GCC=
28489 fi
28490 ac_test_CFLAGS=${CFLAGS+set}
28491 ac_save_CFLAGS=$CFLAGS
28492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28493 $as_echo_n "checking whether $CC accepts -g... " >&6; }
28494 if ${ac_cv_prog_cc_g+:} false; then :
28495   $as_echo_n "(cached) " >&6
28496 else
28497   ac_save_c_werror_flag=$ac_c_werror_flag
28498    ac_c_werror_flag=yes
28499    ac_cv_prog_cc_g=no
28500    CFLAGS="-g"
28501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28502 /* end confdefs.h.  */
28503 
28504 int
28505 main ()
28506 {
28507 
28508   ;
28509   return 0;
28510 }
28511 _ACEOF
28512 if ac_fn_c_try_compile "$LINENO"; then :
28513   ac_cv_prog_cc_g=yes
28514 else
28515   CFLAGS=""
28516       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28517 /* end confdefs.h.  */
28518 
28519 int
28520 main ()
28521 {
28522 
28523   ;
28524   return 0;
28525 }
28526 _ACEOF
28527 if ac_fn_c_try_compile "$LINENO"; then :
28528 
28529 else
28530   ac_c_werror_flag=$ac_save_c_werror_flag
28531          CFLAGS="-g"
28532          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28533 /* end confdefs.h.  */
28534 
28535 int
28536 main ()
28537 {
28538 
28539   ;
28540   return 0;
28541 }
28542 _ACEOF
28543 if ac_fn_c_try_compile "$LINENO"; then :
28544   ac_cv_prog_cc_g=yes
28545 fi
28546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28547 fi
28548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28549 fi
28550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28551    ac_c_werror_flag=$ac_save_c_werror_flag
28552 fi
28553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28554 $as_echo "$ac_cv_prog_cc_g" >&6; }
28555 if test "$ac_test_CFLAGS" = set; then
28556   CFLAGS=$ac_save_CFLAGS
28557 elif test $ac_cv_prog_cc_g = yes; then
28558   if test "$GCC" = yes; then
28559     CFLAGS="-g -O2"
28560   else
28561     CFLAGS="-g"
28562   fi
28563 else
28564   if test "$GCC" = yes; then
28565     CFLAGS="-O2"
28566   else
28567     CFLAGS=
28568   fi
28569 fi
28570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28571 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28572 if ${ac_cv_prog_cc_c89+:} false; then :
28573   $as_echo_n "(cached) " >&6
28574 else
28575   ac_cv_prog_cc_c89=no
28576 ac_save_CC=$CC
28577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28578 /* end confdefs.h.  */
28579 #include <stdarg.h>
28580 #include <stdio.h>
28581 struct stat;
28582 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28583 struct buf { int x; };
28584 FILE * (*rcsopen) (struct buf *, struct stat *, int);
28585 static char *e (p, i)
28586      char **p;
28587      int i;
28588 {
28589   return p[i];
28590 }
28591 static char *f (char * (*g) (char **, int), char **p, ...)
28592 {
28593   char *s;
28594   va_list v;
28595   va_start (v,p);
28596   s = g (p, va_arg (v,int));
28597   va_end (v);
28598   return s;
28599 }
28600 
28601 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
28602    function prototypes and stuff, but not '\xHH' hex character constants.
28603    These don't provoke an error unfortunately, instead are silently treated
28604    as 'x'.  The following induces an error, until -std is added to get
28605    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
28606    array size at least.  It's necessary to write '\x00'==0 to get something
28607    that's true only with -std.  */
28608 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
28609 
28610 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
28611    inside strings and character constants.  */
28612 #define FOO(x) 'x'
28613 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
28614 
28615 int test (int i, double x);
28616 struct s1 {int (*f) (int a);};
28617 struct s2 {int (*f) (double a);};
28618 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
28619 int argc;
28620 char **argv;
28621 int
28622 main ()
28623 {
28624 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
28625   ;
28626   return 0;
28627 }
28628 _ACEOF
28629 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
28630         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
28631 do
28632   CC="$ac_save_CC $ac_arg"
28633   if ac_fn_c_try_compile "$LINENO"; then :
28634   ac_cv_prog_cc_c89=$ac_arg
28635 fi
28636 rm -f core conftest.err conftest.$ac_objext
28637   test "x$ac_cv_prog_cc_c89" != "xno" && break
28638 done
28639 rm -f conftest.$ac_ext
28640 CC=$ac_save_CC
28641 
28642 fi
28643 # AC_CACHE_VAL
28644 case "x$ac_cv_prog_cc_c89" in
28645   x)
28646     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
28647 $as_echo "none needed" >&6; } ;;
28648   xno)
28649     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
28650 $as_echo "unsupported" >&6; } ;;
28651   *)
28652     CC="$CC $ac_cv_prog_cc_c89"
28653     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
28654 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
28655 esac
28656 if test "x$ac_cv_prog_cc_c89" != xno; then :
28657 
28658 fi
28659 
28660 ac_ext=cpp
28661 ac_cpp='$CXXCPP $CPPFLAGS'
28662 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28663 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28664 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28665 
28666 
28667 
28668   COMPILER_NAME=C++
28669   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
28670 
28671   if test "x$CXX" != x; then
28672     # User has supplied compiler name already, always let that override.
28673     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
28674 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
28675     if test "x`basename $CXX`" = "x$CXX"; then
28676       # A command without a complete path is provided, search $PATH.
28677 
28678       for ac_prog in $CXX
28679 do
28680   # Extract the first word of "$ac_prog", so it can be a program name with args.
28681 set dummy $ac_prog; ac_word=$2
28682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28683 $as_echo_n "checking for $ac_word... " >&6; }
28684 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28685   $as_echo_n "(cached) " >&6
28686 else
28687   case $POTENTIAL_CXX in
28688   [\\/]* | ?:[\\/]*)
28689   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28690   ;;
28691   *)
28692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28693 for as_dir in $PATH
28694 do
28695   IFS=$as_save_IFS
28696   test -z "$as_dir" && as_dir=.
28697     for ac_exec_ext in '' $ac_executable_extensions; do
28698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28699     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28701     break 2
28702   fi
28703 done
28704   done
28705 IFS=$as_save_IFS
28706 
28707   ;;
28708 esac
28709 fi
28710 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28711 if test -n "$POTENTIAL_CXX"; then
28712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28713 $as_echo "$POTENTIAL_CXX" >&6; }
28714 else
28715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28716 $as_echo "no" >&6; }
28717 fi
28718 
28719 
28720   test -n "$POTENTIAL_CXX" && break
28721 done
28722 
28723       if test "x$POTENTIAL_CXX" != x; then
28724         CXX=$POTENTIAL_CXX
28725       else
28726         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
28727       fi
28728     else
28729       # Otherwise it might already be a complete path
28730       if test ! -x "$CXX"; then
28731         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
28732       fi
28733     fi
28734   else
28735     # No user supplied value. Locate compiler ourselves.
28736 
28737     # If we are cross compiling, assume cross compilation tools follows the
28738     # cross compilation standard where they are prefixed with the autoconf
28739     # standard name for the target. For example the binary
28740     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28741     # If we are not cross compiling, then the default compiler name will be
28742     # used.
28743 
28744     CXX=
28745     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28746     # before checking the rest of the PATH.
28747     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28748     # step, this should not be necessary.
28749     if test -n "$TOOLCHAIN_PATH"; then
28750       PATH_save="$PATH"
28751       PATH="$TOOLCHAIN_PATH"
28752       for ac_prog in $SEARCH_LIST
28753 do
28754   # Extract the first word of "$ac_prog", so it can be a program name with args.
28755 set dummy $ac_prog; ac_word=$2
28756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28757 $as_echo_n "checking for $ac_word... " >&6; }
28758 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
28759   $as_echo_n "(cached) " >&6
28760 else
28761   case $TOOLCHAIN_PATH_CXX in
28762   [\\/]* | ?:[\\/]*)
28763   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
28764   ;;
28765   *)
28766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28767 for as_dir in $PATH
28768 do
28769   IFS=$as_save_IFS
28770   test -z "$as_dir" && as_dir=.
28771     for ac_exec_ext in '' $ac_executable_extensions; do
28772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28773     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
28774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28775     break 2
28776   fi
28777 done
28778   done
28779 IFS=$as_save_IFS
28780 
28781   ;;
28782 esac
28783 fi
28784 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
28785 if test -n "$TOOLCHAIN_PATH_CXX"; then
28786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
28787 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
28788 else
28789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28790 $as_echo "no" >&6; }
28791 fi
28792 
28793 
28794   test -n "$TOOLCHAIN_PATH_CXX" && break
28795 done
28796 
28797       CXX=$TOOLCHAIN_PATH_CXX
28798       PATH="$PATH_save"
28799     fi
28800 
28801     # AC_PATH_PROGS can't be run multiple times with the same variable,
28802     # so create a new name for this run.
28803     if test "x$CXX" = x; then
28804       for ac_prog in $TOOLCHAIN_CXX_BINARY
28805 do
28806   # Extract the first word of "$ac_prog", so it can be a program name with args.
28807 set dummy $ac_prog; ac_word=$2
28808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28809 $as_echo_n "checking for $ac_word... " >&6; }
28810 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28811   $as_echo_n "(cached) " >&6
28812 else
28813   case $POTENTIAL_CXX in
28814   [\\/]* | ?:[\\/]*)
28815   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28816   ;;
28817   *)
28818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28819 for as_dir in $PATH
28820 do
28821   IFS=$as_save_IFS
28822   test -z "$as_dir" && as_dir=.
28823     for ac_exec_ext in '' $ac_executable_extensions; do
28824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28825     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28827     break 2
28828   fi
28829 done
28830   done
28831 IFS=$as_save_IFS
28832 
28833   ;;
28834 esac
28835 fi
28836 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28837 if test -n "$POTENTIAL_CXX"; then
28838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28839 $as_echo "$POTENTIAL_CXX" >&6; }
28840 else
28841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28842 $as_echo "no" >&6; }
28843 fi
28844 
28845 
28846   test -n "$POTENTIAL_CXX" && break
28847 done
28848 
28849       CXX=$POTENTIAL_CXX
28850     fi
28851 
28852     if test "x$CXX" = x; then
28853 
28854   # Print a helpful message on how to acquire the necessary build dependency.
28855   # devkit is the help tag: freetype, cups, pulse, alsa etc
28856   MISSING_DEPENDENCY=devkit
28857 
28858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28859     cygwin_help $MISSING_DEPENDENCY
28860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28861     msys_help $MISSING_DEPENDENCY
28862   else
28863     PKGHANDLER_COMMAND=
28864 
28865     case $PKGHANDLER in
28866       apt-get)
28867         apt_help     $MISSING_DEPENDENCY ;;
28868       yum)
28869         yum_help     $MISSING_DEPENDENCY ;;
28870       port)
28871         port_help    $MISSING_DEPENDENCY ;;
28872       pkgutil)
28873         pkgutil_help $MISSING_DEPENDENCY ;;
28874       pkgadd)
28875         pkgadd_help  $MISSING_DEPENDENCY ;;
28876     esac
28877 
28878     if test "x$PKGHANDLER_COMMAND" != x; then
28879       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28880     fi
28881   fi
28882 
28883       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28884     fi
28885   fi
28886 
28887   # Now we have a compiler binary in CXX. Make sure it's okay.
28888 
28889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28890 
28891   # First separate the path from the arguments. This will split at the first
28892   # space.
28893   complete="$CXX"
28894   path="${complete%% *}"
28895   tmp="$complete EOL"
28896   arguments="${tmp#* }"
28897 
28898   # Input might be given as Windows format, start by converting to
28899   # unix format.
28900   new_path=`$CYGPATH -u "$path"`
28901 
28902   # Now try to locate executable using which
28903   new_path=`$WHICH "$new_path" 2> /dev/null`
28904   # bat and cmd files are not always considered executable in cygwin causing which
28905   # to not find them
28906   if test "x$new_path" = x \
28907       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28908       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28909     new_path=`$CYGPATH -u "$path"`
28910   fi
28911   if test "x$new_path" = x; then
28912     # Oops. Which didn't find the executable.
28913     # The splitting of arguments from the executable at a space might have been incorrect,
28914     # since paths with space are more likely in Windows. Give it another try with the whole
28915     # argument.
28916     path="$complete"
28917     arguments="EOL"
28918     new_path=`$CYGPATH -u "$path"`
28919     new_path=`$WHICH "$new_path" 2> /dev/null`
28920     # bat and cmd files are not always considered executable in cygwin causing which
28921     # to not find them
28922     if test "x$new_path" = x \
28923         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28924         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28925       new_path=`$CYGPATH -u "$path"`
28926     fi
28927     if test "x$new_path" = x; then
28928       # It's still not found. Now this is an unrecoverable error.
28929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28930 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28931       has_space=`$ECHO "$complete" | $GREP " "`
28932       if test "x$has_space" != x; then
28933         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28934 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28935       fi
28936       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28937     fi
28938   fi
28939 
28940   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28941   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28942   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28943   # "foo.exe" is OK but "foo" is an error.
28944   #
28945   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28946   # It is also a way to make sure we got the proper file name for the real test later on.
28947   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28948   if test "x$test_shortpath" = x; then
28949     # Short path failed, file does not exist as specified.
28950     # Try adding .exe or .cmd
28951     if test -f "${new_path}.exe"; then
28952       input_to_shortpath="${new_path}.exe"
28953     elif test -f "${new_path}.cmd"; then
28954       input_to_shortpath="${new_path}.cmd"
28955     else
28956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
28957 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
28958       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28959 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28960       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28961     fi
28962   else
28963     input_to_shortpath="$new_path"
28964   fi
28965 
28966   # Call helper function which possibly converts this using DOS-style short mode.
28967   # If so, the updated path is stored in $new_path.
28968   new_path="$input_to_shortpath"
28969 
28970   input_path="$input_to_shortpath"
28971   # Check if we need to convert this using DOS-style short mode. If the path
28972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28973   # take no chances and rewrite it.
28974   # Note: m4 eats our [], so we need to use [ and ] instead.
28975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28976   if test "x$has_forbidden_chars" != x; then
28977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28981       # Going to short mode and back again did indeed matter. Since short mode is
28982       # case insensitive, let's make it lowercase to improve readability.
28983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28984       # Now convert it back to Unix-style (cygpath)
28985       input_path=`$CYGPATH -u "$shortmode_path"`
28986       new_path="$input_path"
28987     fi
28988   fi
28989 
28990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28991   if test "x$test_cygdrive_prefix" = x; then
28992     # As a simple fix, exclude /usr/bin since it's not a real path.
28993     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28995       # a path prefixed by /cygdrive for fixpath to work.
28996       new_path="$CYGWIN_ROOT_PATH$input_path"
28997     fi
28998   fi
28999 
29000   # remove trailing .exe if any
29001   new_path="${new_path/%.exe/}"
29002 
29003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29004 
29005   # First separate the path from the arguments. This will split at the first
29006   # space.
29007   complete="$CXX"
29008   path="${complete%% *}"
29009   tmp="$complete EOL"
29010   arguments="${tmp#* }"
29011 
29012   # Input might be given as Windows format, start by converting to
29013   # unix format.
29014   new_path="$path"
29015 
29016   windows_path="$new_path"
29017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29018     unix_path=`$CYGPATH -u "$windows_path"`
29019     new_path="$unix_path"
29020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29022     new_path="$unix_path"
29023   fi
29024 
29025 
29026   # Now try to locate executable using which
29027   new_path=`$WHICH "$new_path" 2> /dev/null`
29028 
29029   if test "x$new_path" = x; then
29030     # Oops. Which didn't find the executable.
29031     # The splitting of arguments from the executable at a space might have been incorrect,
29032     # since paths with space are more likely in Windows. Give it another try with the whole
29033     # argument.
29034     path="$complete"
29035     arguments="EOL"
29036     new_path="$path"
29037 
29038   windows_path="$new_path"
29039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29040     unix_path=`$CYGPATH -u "$windows_path"`
29041     new_path="$unix_path"
29042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29044     new_path="$unix_path"
29045   fi
29046 
29047 
29048     new_path=`$WHICH "$new_path" 2> /dev/null`
29049     # bat and cmd files are not always considered executable in MSYS causing which
29050     # to not find them
29051     if test "x$new_path" = x \
29052         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29053         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29054       new_path="$path"
29055 
29056   windows_path="$new_path"
29057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29058     unix_path=`$CYGPATH -u "$windows_path"`
29059     new_path="$unix_path"
29060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29062     new_path="$unix_path"
29063   fi
29064 
29065     fi
29066 
29067     if test "x$new_path" = x; then
29068       # It's still not found. Now this is an unrecoverable error.
29069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29070 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29071       has_space=`$ECHO "$complete" | $GREP " "`
29072       if test "x$has_space" != x; then
29073         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29074 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29075       fi
29076       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29077     fi
29078   fi
29079 
29080   # Now new_path has a complete unix path to the binary
29081   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29082     # Keep paths in /bin as-is, but remove trailing .exe if any
29083     new_path="${new_path/%.exe/}"
29084     # Do not save /bin paths to all_fixpath_prefixes!
29085   else
29086     # Not in mixed or Windows style, start by that.
29087     new_path=`cmd //c echo $new_path`
29088 
29089   input_path="$new_path"
29090   # Check if we need to convert this using DOS-style short mode. If the path
29091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29092   # take no chances and rewrite it.
29093   # Note: m4 eats our [], so we need to use [ and ] instead.
29094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29095   if test "x$has_forbidden_chars" != x; then
29096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29097     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29098   fi
29099 
29100     # Output is in $new_path
29101 
29102   windows_path="$new_path"
29103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29104     unix_path=`$CYGPATH -u "$windows_path"`
29105     new_path="$unix_path"
29106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29108     new_path="$unix_path"
29109   fi
29110 
29111     # remove trailing .exe if any
29112     new_path="${new_path/%.exe/}"
29113 
29114     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29115     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29116   fi
29117 
29118   else
29119     # We're on a posix platform. Hooray! :)
29120     # First separate the path from the arguments. This will split at the first
29121     # space.
29122     complete="$CXX"
29123     path="${complete%% *}"
29124     tmp="$complete EOL"
29125     arguments="${tmp#* }"
29126 
29127     # Cannot rely on the command "which" here since it doesn't always work.
29128     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29129     if test -z "$is_absolute_path"; then
29130       # Path to executable is not absolute. Find it.
29131       IFS_save="$IFS"
29132       IFS=:
29133       for p in $PATH; do
29134         if test -f "$p/$path" && test -x "$p/$path"; then
29135           new_path="$p/$path"
29136           break
29137         fi
29138       done
29139       IFS="$IFS_save"
29140     else
29141       # This is an absolute path, we can use it without further modifications.
29142       new_path="$path"
29143     fi
29144 
29145     if test "x$new_path" = x; then
29146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29147 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29148       has_space=`$ECHO "$complete" | $GREP " "`
29149       if test "x$has_space" != x; then
29150         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29151 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29152       fi
29153       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29154     fi
29155   fi
29156 
29157   # Now join together the path and the arguments once again
29158   if test "x$arguments" != xEOL; then
29159     new_complete="$new_path ${arguments% *}"
29160   else
29161     new_complete="$new_path"
29162   fi
29163 
29164   if test "x$complete" != "x$new_complete"; then
29165     CXX="$new_complete"
29166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29167 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29168   fi
29169 
29170   TEST_COMPILER="$CXX"
29171 
29172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29173 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29174   SYMLINK_ORIGINAL="$TEST_COMPILER"
29175 
29176   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29177     # Follow a chain of symbolic links. Use readlink
29178     # where it exists, else fall back to horribly
29179     # complicated shell code.
29180     if test "x$READLINK_TESTED" != yes; then
29181       # On MacOSX there is a readlink tool with a different
29182       # purpose than the GNU readlink tool. Check the found readlink.
29183       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29184       if test "x$ISGNU" = x; then
29185         # A readlink that we do not know how to use.
29186         # Are there other non-GNU readlinks out there?
29187         READLINK_TESTED=yes
29188         READLINK=
29189       fi
29190     fi
29191 
29192     if test "x$READLINK" != x; then
29193       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
29194     else
29195       # Save the current directory for restoring afterwards
29196       STARTDIR=$PWD
29197       COUNTER=0
29198       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
29199       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
29200       cd $sym_link_dir
29201       # Use -P flag to resolve symlinks in directories.
29202       cd `$THEPWDCMD -P`
29203       sym_link_dir=`$THEPWDCMD -P`
29204       # Resolve file symlinks
29205       while test $COUNTER -lt 20; do
29206         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29207         if test "x$ISLINK" == x; then
29208           # This is not a symbolic link! We are done!
29209           break
29210         fi
29211         # Again resolve directory symlinks since the target of the just found
29212         # link could be in a different directory
29213         cd `$DIRNAME $ISLINK`
29214         sym_link_dir=`$THEPWDCMD -P`
29215         sym_link_file=`$BASENAME $ISLINK`
29216         let COUNTER=COUNTER+1
29217       done
29218       cd $STARTDIR
29219       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
29220     fi
29221   fi
29222 
29223   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
29224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
29225 $as_echo "no symlink" >&6; }
29226   else
29227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
29228 $as_echo "$SYMLINK_ORIGINAL" >&6; }
29229     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29230 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29231     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
29232     if test "x$COMPILER_BASENAME" = "xccache"; then
29233       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29234 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29235       # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29236       # We want to control ccache invocation ourselves, so ignore this cc and try
29237       # searching again.
29238 
29239       # Remove the path to the fake ccache cc from the PATH
29240       RETRY_COMPILER_SAVED_PATH="$PATH"
29241       COMPILER_DIRNAME=`$DIRNAME $CXX`
29242       PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29243       # Try again looking for our compiler
29244       if test -n "$ac_tool_prefix"; then
29245   for ac_prog in $TOOLCHAIN_CXX_BINARY
29246   do
29247     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29248 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29250 $as_echo_n "checking for $ac_word... " >&6; }
29251 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29252   $as_echo_n "(cached) " >&6
29253 else
29254   if test -n "$PROPER_COMPILER_CXX"; then
29255   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29256 else
29257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29258 for as_dir in $PATH
29259 do
29260   IFS=$as_save_IFS
29261   test -z "$as_dir" && as_dir=.
29262     for ac_exec_ext in '' $ac_executable_extensions; do
29263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29264     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29266     break 2
29267   fi
29268 done
29269   done
29270 IFS=$as_save_IFS
29271 
29272 fi
29273 fi
29274 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29275 if test -n "$PROPER_COMPILER_CXX"; then
29276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29277 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29278 else
29279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29280 $as_echo "no" >&6; }
29281 fi
29282 
29283 
29284     test -n "$PROPER_COMPILER_CXX" && break
29285   done
29286 fi
29287 if test -z "$PROPER_COMPILER_CXX"; then
29288   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29289   for ac_prog in $TOOLCHAIN_CXX_BINARY
29290 do
29291   # Extract the first word of "$ac_prog", so it can be a program name with args.
29292 set dummy $ac_prog; ac_word=$2
29293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29294 $as_echo_n "checking for $ac_word... " >&6; }
29295 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29296   $as_echo_n "(cached) " >&6
29297 else
29298   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29299   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29300 else
29301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29302 for as_dir in $PATH
29303 do
29304   IFS=$as_save_IFS
29305   test -z "$as_dir" && as_dir=.
29306     for ac_exec_ext in '' $ac_executable_extensions; do
29307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29308     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29310     break 2
29311   fi
29312 done
29313   done
29314 IFS=$as_save_IFS
29315 
29316 fi
29317 fi
29318 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29319 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29321 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29322 else
29323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29324 $as_echo "no" >&6; }
29325 fi
29326 
29327 
29328   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29329 done
29330 
29331   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29332     PROPER_COMPILER_CXX=""
29333   else
29334     case $cross_compiling:$ac_tool_warned in
29335 yes:)
29336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29337 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29338 ac_tool_warned=yes ;;
29339 esac
29340     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29341   fi
29342 fi
29343 
29344 
29345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29346 
29347   # First separate the path from the arguments. This will split at the first
29348   # space.
29349   complete="$PROPER_COMPILER_CXX"
29350   path="${complete%% *}"
29351   tmp="$complete EOL"
29352   arguments="${tmp#* }"
29353 
29354   # Input might be given as Windows format, start by converting to
29355   # unix format.
29356   new_path=`$CYGPATH -u "$path"`
29357 
29358   # Now try to locate executable using which
29359   new_path=`$WHICH "$new_path" 2> /dev/null`
29360   # bat and cmd files are not always considered executable in cygwin causing which
29361   # to not find them
29362   if test "x$new_path" = x \
29363       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29364       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29365     new_path=`$CYGPATH -u "$path"`
29366   fi
29367   if test "x$new_path" = x; then
29368     # Oops. Which didn't find the executable.
29369     # The splitting of arguments from the executable at a space might have been incorrect,
29370     # since paths with space are more likely in Windows. Give it another try with the whole
29371     # argument.
29372     path="$complete"
29373     arguments="EOL"
29374     new_path=`$CYGPATH -u "$path"`
29375     new_path=`$WHICH "$new_path" 2> /dev/null`
29376     # bat and cmd files are not always considered executable in cygwin causing which
29377     # to not find them
29378     if test "x$new_path" = x \
29379         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29380         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29381       new_path=`$CYGPATH -u "$path"`
29382     fi
29383     if test "x$new_path" = x; then
29384       # It's still not found. Now this is an unrecoverable error.
29385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29386 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29387       has_space=`$ECHO "$complete" | $GREP " "`
29388       if test "x$has_space" != x; then
29389         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29390 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29391       fi
29392       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29393     fi
29394   fi
29395 
29396   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29397   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29398   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29399   # "foo.exe" is OK but "foo" is an error.
29400   #
29401   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29402   # It is also a way to make sure we got the proper file name for the real test later on.
29403   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29404   if test "x$test_shortpath" = x; then
29405     # Short path failed, file does not exist as specified.
29406     # Try adding .exe or .cmd
29407     if test -f "${new_path}.exe"; then
29408       input_to_shortpath="${new_path}.exe"
29409     elif test -f "${new_path}.cmd"; then
29410       input_to_shortpath="${new_path}.cmd"
29411     else
29412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29413 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29414       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29415 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29416       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29417     fi
29418   else
29419     input_to_shortpath="$new_path"
29420   fi
29421 
29422   # Call helper function which possibly converts this using DOS-style short mode.
29423   # If so, the updated path is stored in $new_path.
29424   new_path="$input_to_shortpath"
29425 
29426   input_path="$input_to_shortpath"
29427   # Check if we need to convert this using DOS-style short mode. If the path
29428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29429   # take no chances and rewrite it.
29430   # Note: m4 eats our [], so we need to use [ and ] instead.
29431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29432   if test "x$has_forbidden_chars" != x; then
29433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29434     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29435     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29436     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29437       # Going to short mode and back again did indeed matter. Since short mode is
29438       # case insensitive, let's make it lowercase to improve readability.
29439       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29440       # Now convert it back to Unix-style (cygpath)
29441       input_path=`$CYGPATH -u "$shortmode_path"`
29442       new_path="$input_path"
29443     fi
29444   fi
29445 
29446   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29447   if test "x$test_cygdrive_prefix" = x; then
29448     # As a simple fix, exclude /usr/bin since it's not a real path.
29449     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29450       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29451       # a path prefixed by /cygdrive for fixpath to work.
29452       new_path="$CYGWIN_ROOT_PATH$input_path"
29453     fi
29454   fi
29455 
29456   # remove trailing .exe if any
29457   new_path="${new_path/%.exe/}"
29458 
29459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29460 
29461   # First separate the path from the arguments. This will split at the first
29462   # space.
29463   complete="$PROPER_COMPILER_CXX"
29464   path="${complete%% *}"
29465   tmp="$complete EOL"
29466   arguments="${tmp#* }"
29467 
29468   # Input might be given as Windows format, start by converting to
29469   # unix format.
29470   new_path="$path"
29471 
29472   windows_path="$new_path"
29473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29474     unix_path=`$CYGPATH -u "$windows_path"`
29475     new_path="$unix_path"
29476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29478     new_path="$unix_path"
29479   fi
29480 
29481 
29482   # Now try to locate executable using which
29483   new_path=`$WHICH "$new_path" 2> /dev/null`
29484 
29485   if test "x$new_path" = x; then
29486     # Oops. Which didn't find the executable.
29487     # The splitting of arguments from the executable at a space might have been incorrect,
29488     # since paths with space are more likely in Windows. Give it another try with the whole
29489     # argument.
29490     path="$complete"
29491     arguments="EOL"
29492     new_path="$path"
29493 
29494   windows_path="$new_path"
29495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29496     unix_path=`$CYGPATH -u "$windows_path"`
29497     new_path="$unix_path"
29498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29500     new_path="$unix_path"
29501   fi
29502 
29503 
29504     new_path=`$WHICH "$new_path" 2> /dev/null`
29505     # bat and cmd files are not always considered executable in MSYS causing which
29506     # to not find them
29507     if test "x$new_path" = x \
29508         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29509         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29510       new_path="$path"
29511 
29512   windows_path="$new_path"
29513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29514     unix_path=`$CYGPATH -u "$windows_path"`
29515     new_path="$unix_path"
29516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29518     new_path="$unix_path"
29519   fi
29520 
29521     fi
29522 
29523     if test "x$new_path" = x; then
29524       # It's still not found. Now this is an unrecoverable error.
29525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29526 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29527       has_space=`$ECHO "$complete" | $GREP " "`
29528       if test "x$has_space" != x; then
29529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29531       fi
29532       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29533     fi
29534   fi
29535 
29536   # Now new_path has a complete unix path to the binary
29537   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29538     # Keep paths in /bin as-is, but remove trailing .exe if any
29539     new_path="${new_path/%.exe/}"
29540     # Do not save /bin paths to all_fixpath_prefixes!
29541   else
29542     # Not in mixed or Windows style, start by that.
29543     new_path=`cmd //c echo $new_path`
29544 
29545   input_path="$new_path"
29546   # Check if we need to convert this using DOS-style short mode. If the path
29547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29548   # take no chances and rewrite it.
29549   # Note: m4 eats our [], so we need to use [ and ] instead.
29550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29551   if test "x$has_forbidden_chars" != x; then
29552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29553     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29554   fi
29555 
29556     # Output is in $new_path
29557 
29558   windows_path="$new_path"
29559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29560     unix_path=`$CYGPATH -u "$windows_path"`
29561     new_path="$unix_path"
29562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29564     new_path="$unix_path"
29565   fi
29566 
29567     # remove trailing .exe if any
29568     new_path="${new_path/%.exe/}"
29569 
29570     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29571     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29572   fi
29573 
29574   else
29575     # We're on a posix platform. Hooray! :)
29576     # First separate the path from the arguments. This will split at the first
29577     # space.
29578     complete="$PROPER_COMPILER_CXX"
29579     path="${complete%% *}"
29580     tmp="$complete EOL"
29581     arguments="${tmp#* }"
29582 
29583     # Cannot rely on the command "which" here since it doesn't always work.
29584     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29585     if test -z "$is_absolute_path"; then
29586       # Path to executable is not absolute. Find it.
29587       IFS_save="$IFS"
29588       IFS=:
29589       for p in $PATH; do
29590         if test -f "$p/$path" && test -x "$p/$path"; then
29591           new_path="$p/$path"
29592           break
29593         fi
29594       done
29595       IFS="$IFS_save"
29596     else
29597       # This is an absolute path, we can use it without further modifications.
29598       new_path="$path"
29599     fi
29600 
29601     if test "x$new_path" = x; then
29602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29603 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29604       has_space=`$ECHO "$complete" | $GREP " "`
29605       if test "x$has_space" != x; then
29606         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29607 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29608       fi
29609       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29610     fi
29611   fi
29612 
29613   # Now join together the path and the arguments once again
29614   if test "x$arguments" != xEOL; then
29615     new_complete="$new_path ${arguments% *}"
29616   else
29617     new_complete="$new_path"
29618   fi
29619 
29620   if test "x$complete" != "x$new_complete"; then
29621     PROPER_COMPILER_CXX="$new_complete"
29622     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29623 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29624   fi
29625 
29626       PATH="$RETRY_COMPILER_SAVED_PATH"
29627 
29628       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
29629 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
29630 
29631   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29632     # Follow a chain of symbolic links. Use readlink
29633     # where it exists, else fall back to horribly
29634     # complicated shell code.
29635     if test "x$READLINK_TESTED" != yes; then
29636       # On MacOSX there is a readlink tool with a different
29637       # purpose than the GNU readlink tool. Check the found readlink.
29638       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29639       if test "x$ISGNU" = x; then
29640         # A readlink that we do not know how to use.
29641         # Are there other non-GNU readlinks out there?
29642         READLINK_TESTED=yes
29643         READLINK=
29644       fi
29645     fi
29646 
29647     if test "x$READLINK" != x; then
29648       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
29649     else
29650       # Save the current directory for restoring afterwards
29651       STARTDIR=$PWD
29652       COUNTER=0
29653       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
29654       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
29655       cd $sym_link_dir
29656       # Use -P flag to resolve symlinks in directories.
29657       cd `$THEPWDCMD -P`
29658       sym_link_dir=`$THEPWDCMD -P`
29659       # Resolve file symlinks
29660       while test $COUNTER -lt 20; do
29661         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29662         if test "x$ISLINK" == x; then
29663           # This is not a symbolic link! We are done!
29664           break
29665         fi
29666         # Again resolve directory symlinks since the target of the just found
29667         # link could be in a different directory
29668         cd `$DIRNAME $ISLINK`
29669         sym_link_dir=`$THEPWDCMD -P`
29670         sym_link_file=`$BASENAME $ISLINK`
29671         let COUNTER=COUNTER+1
29672       done
29673       cd $STARTDIR
29674       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
29675     fi
29676   fi
29677 
29678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29679 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29680       CXX="$PROPER_COMPILER_CXX"
29681     else
29682       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
29683 $as_echo "no, keeping CXX" >&6; }
29684     fi
29685   fi
29686 
29687 
29688   COMPILER=$CXX
29689   COMPILER_NAME=$COMPILER_NAME
29690 
29691   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29692     # cc -V output typically looks like
29693     #     cc: Sun C 5.12 Linux_i386 2011/11/16
29694     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29695     # Check that this is likely to be the Solaris Studio cc.
29696     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29697     if test $? -ne 0; then
29698       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29699       { $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
29700 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29701       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29702 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29703       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29704 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29705       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29706     fi
29707     # Remove usage instructions (if present), and
29708     # collapse compiler output into a single line
29709     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29710         $SED -e 's/ *[Uu]sage:.*//'`
29711     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29712         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29713   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29714     # xlc -qversion output typically looks like
29715     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29716     #     Version: 11.01.0000.0015
29717     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29718     # Check that this is likely to be the IBM XL C compiler.
29719     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29720     if test $? -ne 0; then
29721       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29722       { $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
29723 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29724       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29725 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29726       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29727 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29728       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29729     fi
29730     # Collapse compiler output into a single line
29731     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29732     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29733         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29734   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29735     # There is no specific version flag, but all output starts with a version string.
29736     # First line typically looks something like:
29737     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29738     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29739     # Check that this is likely to be Microsoft CL.EXE.
29740     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29741     if test $? -ne 0; then
29742       { $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
29743 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29744       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29745 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29746       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29747     fi
29748     # Collapse compiler output into a single line
29749     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29750     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29751         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29752   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29753     # gcc --version output typically looks like
29754     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29755     #     Copyright (C) 2013 Free Software Foundation, Inc.
29756     #     This is free software; see the source for copying conditions.  There is NO
29757     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29758     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29759     # Check that this is likely to be GCC.
29760     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29761     if test $? -ne 0; then
29762       { $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
29763 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29764       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29765 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29766       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29767     fi
29768     # Remove Copyright and legalese from version string, and
29769     # collapse into a single line
29770     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29771         $SED -e 's/ *Copyright .*//'`
29772     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29773         $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
29774   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29775     # clang --version output typically looks like
29776     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29777     #    clang version 3.3 (tags/RELEASE_33/final)
29778     # or
29779     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29780     #    Target: x86_64-pc-linux-gnu
29781     #    Thread model: posix
29782     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29783     # Check that this is likely to be clang
29784     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29785     if test $? -ne 0; then
29786       { $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
29787 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29788       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29789 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29790       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29791     fi
29792     # Collapse compiler output into a single line
29793     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29794     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29795         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29796 
29797   else
29798       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29799   fi
29800   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29801   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29802   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29803   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
29804 
29805   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29806 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29807 
29808 
29809   # Now that we have resolved CXX ourself, let autoconf have its go at it
29810   ac_ext=cpp
29811 ac_cpp='$CXXCPP $CPPFLAGS'
29812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29815 if test -z "$CXX"; then
29816   if test -n "$CCC"; then
29817     CXX=$CCC
29818   else
29819     if test -n "$ac_tool_prefix"; then
29820   for ac_prog in $CXX
29821   do
29822     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29823 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29825 $as_echo_n "checking for $ac_word... " >&6; }
29826 if ${ac_cv_prog_CXX+:} false; then :
29827   $as_echo_n "(cached) " >&6
29828 else
29829   if test -n "$CXX"; then
29830   ac_cv_prog_CXX="$CXX" # Let the user override the test.
29831 else
29832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29833 for as_dir in $PATH
29834 do
29835   IFS=$as_save_IFS
29836   test -z "$as_dir" && as_dir=.
29837     for ac_exec_ext in '' $ac_executable_extensions; do
29838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29839     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29841     break 2
29842   fi
29843 done
29844   done
29845 IFS=$as_save_IFS
29846 
29847 fi
29848 fi
29849 CXX=$ac_cv_prog_CXX
29850 if test -n "$CXX"; then
29851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29852 $as_echo "$CXX" >&6; }
29853 else
29854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29855 $as_echo "no" >&6; }
29856 fi
29857 
29858 
29859     test -n "$CXX" && break
29860   done
29861 fi
29862 if test -z "$CXX"; then
29863   ac_ct_CXX=$CXX
29864   for ac_prog in $CXX
29865 do
29866   # Extract the first word of "$ac_prog", so it can be a program name with args.
29867 set dummy $ac_prog; ac_word=$2
29868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29869 $as_echo_n "checking for $ac_word... " >&6; }
29870 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
29871   $as_echo_n "(cached) " >&6
29872 else
29873   if test -n "$ac_ct_CXX"; then
29874   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29875 else
29876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29877 for as_dir in $PATH
29878 do
29879   IFS=$as_save_IFS
29880   test -z "$as_dir" && as_dir=.
29881     for ac_exec_ext in '' $ac_executable_extensions; do
29882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29883     ac_cv_prog_ac_ct_CXX="$ac_prog"
29884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29885     break 2
29886   fi
29887 done
29888   done
29889 IFS=$as_save_IFS
29890 
29891 fi
29892 fi
29893 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29894 if test -n "$ac_ct_CXX"; then
29895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29896 $as_echo "$ac_ct_CXX" >&6; }
29897 else
29898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29899 $as_echo "no" >&6; }
29900 fi
29901 
29902 
29903   test -n "$ac_ct_CXX" && break
29904 done
29905 
29906   if test "x$ac_ct_CXX" = x; then
29907     CXX="g++"
29908   else
29909     case $cross_compiling:$ac_tool_warned in
29910 yes:)
29911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29912 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29913 ac_tool_warned=yes ;;
29914 esac
29915     CXX=$ac_ct_CXX
29916   fi
29917 fi
29918 
29919   fi
29920 fi
29921 # Provide some information about the compiler.
29922 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
29923 set X $ac_compile
29924 ac_compiler=$2
29925 for ac_option in --version -v -V -qversion; do
29926   { { ac_try="$ac_compiler $ac_option >&5"
29927 case "(($ac_try" in
29928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29929   *) ac_try_echo=$ac_try;;
29930 esac
29931 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29932 $as_echo "$ac_try_echo"; } >&5
29933   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29934   ac_status=$?
29935   if test -s conftest.err; then
29936     sed '10a\
29937 ... rest of stderr output deleted ...
29938          10q' conftest.err >conftest.er1
29939     cat conftest.er1 >&5
29940   fi
29941   rm -f conftest.er1 conftest.err
29942   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29943   test $ac_status = 0; }
29944 done
29945 
29946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
29947 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
29948 if ${ac_cv_cxx_compiler_gnu+:} false; then :
29949   $as_echo_n "(cached) " >&6
29950 else
29951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29952 /* end confdefs.h.  */
29953 
29954 int
29955 main ()
29956 {
29957 #ifndef __GNUC__
29958        choke me
29959 #endif
29960 
29961   ;
29962   return 0;
29963 }
29964 _ACEOF
29965 if ac_fn_cxx_try_compile "$LINENO"; then :
29966   ac_compiler_gnu=yes
29967 else
29968   ac_compiler_gnu=no
29969 fi
29970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29971 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
29972 
29973 fi
29974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
29975 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
29976 if test $ac_compiler_gnu = yes; then
29977   GXX=yes
29978 else
29979   GXX=
29980 fi
29981 ac_test_CXXFLAGS=${CXXFLAGS+set}
29982 ac_save_CXXFLAGS=$CXXFLAGS
29983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
29984 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
29985 if ${ac_cv_prog_cxx_g+:} false; then :
29986   $as_echo_n "(cached) " >&6
29987 else
29988   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
29989    ac_cxx_werror_flag=yes
29990    ac_cv_prog_cxx_g=no
29991    CXXFLAGS="-g"
29992    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29993 /* end confdefs.h.  */
29994 
29995 int
29996 main ()
29997 {
29998 
29999   ;
30000   return 0;
30001 }
30002 _ACEOF
30003 if ac_fn_cxx_try_compile "$LINENO"; then :
30004   ac_cv_prog_cxx_g=yes
30005 else
30006   CXXFLAGS=""
30007       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30008 /* end confdefs.h.  */
30009 
30010 int
30011 main ()
30012 {
30013 
30014   ;
30015   return 0;
30016 }
30017 _ACEOF
30018 if ac_fn_cxx_try_compile "$LINENO"; then :
30019 
30020 else
30021   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30022          CXXFLAGS="-g"
30023          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30024 /* end confdefs.h.  */
30025 
30026 int
30027 main ()
30028 {
30029 
30030   ;
30031   return 0;
30032 }
30033 _ACEOF
30034 if ac_fn_cxx_try_compile "$LINENO"; then :
30035   ac_cv_prog_cxx_g=yes
30036 fi
30037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30038 fi
30039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30040 fi
30041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30042    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30043 fi
30044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30045 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30046 if test "$ac_test_CXXFLAGS" = set; then
30047   CXXFLAGS=$ac_save_CXXFLAGS
30048 elif test $ac_cv_prog_cxx_g = yes; then
30049   if test "$GXX" = yes; then
30050     CXXFLAGS="-g -O2"
30051   else
30052     CXXFLAGS="-g"
30053   fi
30054 else
30055   if test "$GXX" = yes; then
30056     CXXFLAGS="-O2"
30057   else
30058     CXXFLAGS=
30059   fi
30060 fi
30061 ac_ext=cpp
30062 ac_cpp='$CXXCPP $CPPFLAGS'
30063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30066 
30067 
30068   # This is the compiler version number on the form X.Y[.Z]
30069 
30070 
30071 
30072 
30073   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
30074     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
30075 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
30076     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
30077 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
30078   fi
30079 
30080   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
30081   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
30082     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
30083 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
30084   fi
30085 
30086   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
30087     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
30088 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
30089   fi
30090 
30091   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
30092 
30093 
30094   #
30095   # Setup the preprocessor (CPP and CXXCPP)
30096   #
30097   ac_ext=c
30098 ac_cpp='$CPP $CPPFLAGS'
30099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30103 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30104 # On Suns, sometimes $CPP names a directory.
30105 if test -n "$CPP" && test -d "$CPP"; then
30106   CPP=
30107 fi
30108 if test -z "$CPP"; then
30109   if ${ac_cv_prog_CPP+:} false; then :
30110   $as_echo_n "(cached) " >&6
30111 else
30112       # Double quotes because CPP needs to be expanded
30113     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30114     do
30115       ac_preproc_ok=false
30116 for ac_c_preproc_warn_flag in '' yes
30117 do
30118   # Use a header file that comes with gcc, so configuring glibc
30119   # with a fresh cross-compiler works.
30120   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30121   # <limits.h> exists even on freestanding compilers.
30122   # On the NeXT, cc -E runs the code through the compiler's parser,
30123   # not just through cpp. "Syntax error" is here to catch this case.
30124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30125 /* end confdefs.h.  */
30126 #ifdef __STDC__
30127 # include <limits.h>
30128 #else
30129 # include <assert.h>
30130 #endif
30131                      Syntax error
30132 _ACEOF
30133 if ac_fn_c_try_cpp "$LINENO"; then :
30134 
30135 else
30136   # Broken: fails on valid input.
30137 continue
30138 fi
30139 rm -f conftest.err conftest.i conftest.$ac_ext
30140 
30141   # OK, works on sane cases.  Now check whether nonexistent headers
30142   # can be detected and how.
30143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30144 /* end confdefs.h.  */
30145 #include <ac_nonexistent.h>
30146 _ACEOF
30147 if ac_fn_c_try_cpp "$LINENO"; then :
30148   # Broken: success on invalid input.
30149 continue
30150 else
30151   # Passes both tests.
30152 ac_preproc_ok=:
30153 break
30154 fi
30155 rm -f conftest.err conftest.i conftest.$ac_ext
30156 
30157 done
30158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30159 rm -f conftest.i conftest.err conftest.$ac_ext
30160 if $ac_preproc_ok; then :
30161   break
30162 fi
30163 
30164     done
30165     ac_cv_prog_CPP=$CPP
30166 
30167 fi
30168   CPP=$ac_cv_prog_CPP
30169 else
30170   ac_cv_prog_CPP=$CPP
30171 fi
30172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30173 $as_echo "$CPP" >&6; }
30174 ac_preproc_ok=false
30175 for ac_c_preproc_warn_flag in '' yes
30176 do
30177   # Use a header file that comes with gcc, so configuring glibc
30178   # with a fresh cross-compiler works.
30179   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30180   # <limits.h> exists even on freestanding compilers.
30181   # On the NeXT, cc -E runs the code through the compiler's parser,
30182   # not just through cpp. "Syntax error" is here to catch this case.
30183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30184 /* end confdefs.h.  */
30185 #ifdef __STDC__
30186 # include <limits.h>
30187 #else
30188 # include <assert.h>
30189 #endif
30190                      Syntax error
30191 _ACEOF
30192 if ac_fn_c_try_cpp "$LINENO"; then :
30193 
30194 else
30195   # Broken: fails on valid input.
30196 continue
30197 fi
30198 rm -f conftest.err conftest.i conftest.$ac_ext
30199 
30200   # OK, works on sane cases.  Now check whether nonexistent headers
30201   # can be detected and how.
30202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30203 /* end confdefs.h.  */
30204 #include <ac_nonexistent.h>
30205 _ACEOF
30206 if ac_fn_c_try_cpp "$LINENO"; then :
30207   # Broken: success on invalid input.
30208 continue
30209 else
30210   # Passes both tests.
30211 ac_preproc_ok=:
30212 break
30213 fi
30214 rm -f conftest.err conftest.i conftest.$ac_ext
30215 
30216 done
30217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30218 rm -f conftest.i conftest.err conftest.$ac_ext
30219 if $ac_preproc_ok; then :
30220 
30221 else
30222   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30224 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30225 See \`config.log' for more details" "$LINENO" 5; }
30226 fi
30227 
30228 ac_ext=cpp
30229 ac_cpp='$CXXCPP $CPPFLAGS'
30230 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30231 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30232 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30233 
30234 
30235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30236 
30237   # First separate the path from the arguments. This will split at the first
30238   # space.
30239   complete="$CPP"
30240   path="${complete%% *}"
30241   tmp="$complete EOL"
30242   arguments="${tmp#* }"
30243 
30244   # Input might be given as Windows format, start by converting to
30245   # unix format.
30246   new_path=`$CYGPATH -u "$path"`
30247 
30248   # Now try to locate executable using which
30249   new_path=`$WHICH "$new_path" 2> /dev/null`
30250   # bat and cmd files are not always considered executable in cygwin causing which
30251   # to not find them
30252   if test "x$new_path" = x \
30253       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30254       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30255     new_path=`$CYGPATH -u "$path"`
30256   fi
30257   if test "x$new_path" = x; then
30258     # Oops. Which didn't find the executable.
30259     # The splitting of arguments from the executable at a space might have been incorrect,
30260     # since paths with space are more likely in Windows. Give it another try with the whole
30261     # argument.
30262     path="$complete"
30263     arguments="EOL"
30264     new_path=`$CYGPATH -u "$path"`
30265     new_path=`$WHICH "$new_path" 2> /dev/null`
30266     # bat and cmd files are not always considered executable in cygwin causing which
30267     # to not find them
30268     if test "x$new_path" = x \
30269         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30270         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30271       new_path=`$CYGPATH -u "$path"`
30272     fi
30273     if test "x$new_path" = x; then
30274       # It's still not found. Now this is an unrecoverable error.
30275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30276 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30277       has_space=`$ECHO "$complete" | $GREP " "`
30278       if test "x$has_space" != x; then
30279         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30281       fi
30282       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30283     fi
30284   fi
30285 
30286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30289   # "foo.exe" is OK but "foo" is an error.
30290   #
30291   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30292   # It is also a way to make sure we got the proper file name for the real test later on.
30293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30294   if test "x$test_shortpath" = x; then
30295     # Short path failed, file does not exist as specified.
30296     # Try adding .exe or .cmd
30297     if test -f "${new_path}.exe"; then
30298       input_to_shortpath="${new_path}.exe"
30299     elif test -f "${new_path}.cmd"; then
30300       input_to_shortpath="${new_path}.cmd"
30301     else
30302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30303 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30304       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30306       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30307     fi
30308   else
30309     input_to_shortpath="$new_path"
30310   fi
30311 
30312   # Call helper function which possibly converts this using DOS-style short mode.
30313   # If so, the updated path is stored in $new_path.
30314   new_path="$input_to_shortpath"
30315 
30316   input_path="$input_to_shortpath"
30317   # Check if we need to convert this using DOS-style short mode. If the path
30318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30319   # take no chances and rewrite it.
30320   # Note: m4 eats our [], so we need to use [ and ] instead.
30321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30322   if test "x$has_forbidden_chars" != x; then
30323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30327       # Going to short mode and back again did indeed matter. Since short mode is
30328       # case insensitive, let's make it lowercase to improve readability.
30329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30330       # Now convert it back to Unix-style (cygpath)
30331       input_path=`$CYGPATH -u "$shortmode_path"`
30332       new_path="$input_path"
30333     fi
30334   fi
30335 
30336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30337   if test "x$test_cygdrive_prefix" = x; then
30338     # As a simple fix, exclude /usr/bin since it's not a real path.
30339     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30341       # a path prefixed by /cygdrive for fixpath to work.
30342       new_path="$CYGWIN_ROOT_PATH$input_path"
30343     fi
30344   fi
30345 
30346   # remove trailing .exe if any
30347   new_path="${new_path/%.exe/}"
30348 
30349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30350 
30351   # First separate the path from the arguments. This will split at the first
30352   # space.
30353   complete="$CPP"
30354   path="${complete%% *}"
30355   tmp="$complete EOL"
30356   arguments="${tmp#* }"
30357 
30358   # Input might be given as Windows format, start by converting to
30359   # unix format.
30360   new_path="$path"
30361 
30362   windows_path="$new_path"
30363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30364     unix_path=`$CYGPATH -u "$windows_path"`
30365     new_path="$unix_path"
30366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30368     new_path="$unix_path"
30369   fi
30370 
30371 
30372   # Now try to locate executable using which
30373   new_path=`$WHICH "$new_path" 2> /dev/null`
30374 
30375   if test "x$new_path" = x; then
30376     # Oops. Which didn't find the executable.
30377     # The splitting of arguments from the executable at a space might have been incorrect,
30378     # since paths with space are more likely in Windows. Give it another try with the whole
30379     # argument.
30380     path="$complete"
30381     arguments="EOL"
30382     new_path="$path"
30383 
30384   windows_path="$new_path"
30385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30386     unix_path=`$CYGPATH -u "$windows_path"`
30387     new_path="$unix_path"
30388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30390     new_path="$unix_path"
30391   fi
30392 
30393 
30394     new_path=`$WHICH "$new_path" 2> /dev/null`
30395     # bat and cmd files are not always considered executable in MSYS causing which
30396     # to not find them
30397     if test "x$new_path" = x \
30398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30400       new_path="$path"
30401 
30402   windows_path="$new_path"
30403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30404     unix_path=`$CYGPATH -u "$windows_path"`
30405     new_path="$unix_path"
30406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30408     new_path="$unix_path"
30409   fi
30410 
30411     fi
30412 
30413     if test "x$new_path" = x; then
30414       # It's still not found. Now this is an unrecoverable error.
30415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30416 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30417       has_space=`$ECHO "$complete" | $GREP " "`
30418       if test "x$has_space" != x; then
30419         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30420 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30421       fi
30422       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30423     fi
30424   fi
30425 
30426   # Now new_path has a complete unix path to the binary
30427   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30428     # Keep paths in /bin as-is, but remove trailing .exe if any
30429     new_path="${new_path/%.exe/}"
30430     # Do not save /bin paths to all_fixpath_prefixes!
30431   else
30432     # Not in mixed or Windows style, start by that.
30433     new_path=`cmd //c echo $new_path`
30434 
30435   input_path="$new_path"
30436   # Check if we need to convert this using DOS-style short mode. If the path
30437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30438   # take no chances and rewrite it.
30439   # Note: m4 eats our [], so we need to use [ and ] instead.
30440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30441   if test "x$has_forbidden_chars" != x; then
30442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30444   fi
30445 
30446     # Output is in $new_path
30447 
30448   windows_path="$new_path"
30449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30450     unix_path=`$CYGPATH -u "$windows_path"`
30451     new_path="$unix_path"
30452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30454     new_path="$unix_path"
30455   fi
30456 
30457     # remove trailing .exe if any
30458     new_path="${new_path/%.exe/}"
30459 
30460     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30461     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30462   fi
30463 
30464   else
30465     # We're on a posix platform. Hooray! :)
30466     # First separate the path from the arguments. This will split at the first
30467     # space.
30468     complete="$CPP"
30469     path="${complete%% *}"
30470     tmp="$complete EOL"
30471     arguments="${tmp#* }"
30472 
30473     # Cannot rely on the command "which" here since it doesn't always work.
30474     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30475     if test -z "$is_absolute_path"; then
30476       # Path to executable is not absolute. Find it.
30477       IFS_save="$IFS"
30478       IFS=:
30479       for p in $PATH; do
30480         if test -f "$p/$path" && test -x "$p/$path"; then
30481           new_path="$p/$path"
30482           break
30483         fi
30484       done
30485       IFS="$IFS_save"
30486     else
30487       # This is an absolute path, we can use it without further modifications.
30488       new_path="$path"
30489     fi
30490 
30491     if test "x$new_path" = x; then
30492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30493 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30494       has_space=`$ECHO "$complete" | $GREP " "`
30495       if test "x$has_space" != x; then
30496         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30498       fi
30499       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30500     fi
30501   fi
30502 
30503   # Now join together the path and the arguments once again
30504   if test "x$arguments" != xEOL; then
30505     new_complete="$new_path ${arguments% *}"
30506   else
30507     new_complete="$new_path"
30508   fi
30509 
30510   if test "x$complete" != "x$new_complete"; then
30511     CPP="$new_complete"
30512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30513 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30514   fi
30515 
30516   ac_ext=cpp
30517 ac_cpp='$CXXCPP $CPPFLAGS'
30518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30522 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30523 if test -z "$CXXCPP"; then
30524   if ${ac_cv_prog_CXXCPP+:} false; then :
30525   $as_echo_n "(cached) " >&6
30526 else
30527       # Double quotes because CXXCPP needs to be expanded
30528     for CXXCPP in "$CXX -E" "/lib/cpp"
30529     do
30530       ac_preproc_ok=false
30531 for ac_cxx_preproc_warn_flag in '' yes
30532 do
30533   # Use a header file that comes with gcc, so configuring glibc
30534   # with a fresh cross-compiler works.
30535   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30536   # <limits.h> exists even on freestanding compilers.
30537   # On the NeXT, cc -E runs the code through the compiler's parser,
30538   # not just through cpp. "Syntax error" is here to catch this case.
30539   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30540 /* end confdefs.h.  */
30541 #ifdef __STDC__
30542 # include <limits.h>
30543 #else
30544 # include <assert.h>
30545 #endif
30546                      Syntax error
30547 _ACEOF
30548 if ac_fn_cxx_try_cpp "$LINENO"; then :
30549 
30550 else
30551   # Broken: fails on valid input.
30552 continue
30553 fi
30554 rm -f conftest.err conftest.i conftest.$ac_ext
30555 
30556   # OK, works on sane cases.  Now check whether nonexistent headers
30557   # can be detected and how.
30558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559 /* end confdefs.h.  */
30560 #include <ac_nonexistent.h>
30561 _ACEOF
30562 if ac_fn_cxx_try_cpp "$LINENO"; then :
30563   # Broken: success on invalid input.
30564 continue
30565 else
30566   # Passes both tests.
30567 ac_preproc_ok=:
30568 break
30569 fi
30570 rm -f conftest.err conftest.i conftest.$ac_ext
30571 
30572 done
30573 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30574 rm -f conftest.i conftest.err conftest.$ac_ext
30575 if $ac_preproc_ok; then :
30576   break
30577 fi
30578 
30579     done
30580     ac_cv_prog_CXXCPP=$CXXCPP
30581 
30582 fi
30583   CXXCPP=$ac_cv_prog_CXXCPP
30584 else
30585   ac_cv_prog_CXXCPP=$CXXCPP
30586 fi
30587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30588 $as_echo "$CXXCPP" >&6; }
30589 ac_preproc_ok=false
30590 for ac_cxx_preproc_warn_flag in '' yes
30591 do
30592   # Use a header file that comes with gcc, so configuring glibc
30593   # with a fresh cross-compiler works.
30594   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30595   # <limits.h> exists even on freestanding compilers.
30596   # On the NeXT, cc -E runs the code through the compiler's parser,
30597   # not just through cpp. "Syntax error" is here to catch this case.
30598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30599 /* end confdefs.h.  */
30600 #ifdef __STDC__
30601 # include <limits.h>
30602 #else
30603 # include <assert.h>
30604 #endif
30605                      Syntax error
30606 _ACEOF
30607 if ac_fn_cxx_try_cpp "$LINENO"; then :
30608 
30609 else
30610   # Broken: fails on valid input.
30611 continue
30612 fi
30613 rm -f conftest.err conftest.i conftest.$ac_ext
30614 
30615   # OK, works on sane cases.  Now check whether nonexistent headers
30616   # can be detected and how.
30617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30618 /* end confdefs.h.  */
30619 #include <ac_nonexistent.h>
30620 _ACEOF
30621 if ac_fn_cxx_try_cpp "$LINENO"; then :
30622   # Broken: success on invalid input.
30623 continue
30624 else
30625   # Passes both tests.
30626 ac_preproc_ok=:
30627 break
30628 fi
30629 rm -f conftest.err conftest.i conftest.$ac_ext
30630 
30631 done
30632 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30633 rm -f conftest.i conftest.err conftest.$ac_ext
30634 if $ac_preproc_ok; then :
30635 
30636 else
30637   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30638 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30639 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30640 See \`config.log' for more details" "$LINENO" 5; }
30641 fi
30642 
30643 ac_ext=cpp
30644 ac_cpp='$CXXCPP $CPPFLAGS'
30645 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30646 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30647 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30648 
30649 
30650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30651 
30652   # First separate the path from the arguments. This will split at the first
30653   # space.
30654   complete="$CXXCPP"
30655   path="${complete%% *}"
30656   tmp="$complete EOL"
30657   arguments="${tmp#* }"
30658 
30659   # Input might be given as Windows format, start by converting to
30660   # unix format.
30661   new_path=`$CYGPATH -u "$path"`
30662 
30663   # Now try to locate executable using which
30664   new_path=`$WHICH "$new_path" 2> /dev/null`
30665   # bat and cmd files are not always considered executable in cygwin causing which
30666   # to not find them
30667   if test "x$new_path" = x \
30668       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30669       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30670     new_path=`$CYGPATH -u "$path"`
30671   fi
30672   if test "x$new_path" = x; then
30673     # Oops. Which didn't find the executable.
30674     # The splitting of arguments from the executable at a space might have been incorrect,
30675     # since paths with space are more likely in Windows. Give it another try with the whole
30676     # argument.
30677     path="$complete"
30678     arguments="EOL"
30679     new_path=`$CYGPATH -u "$path"`
30680     new_path=`$WHICH "$new_path" 2> /dev/null`
30681     # bat and cmd files are not always considered executable in cygwin causing which
30682     # to not find them
30683     if test "x$new_path" = x \
30684         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30685         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30686       new_path=`$CYGPATH -u "$path"`
30687     fi
30688     if test "x$new_path" = x; then
30689       # It's still not found. Now this is an unrecoverable error.
30690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30691 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30692       has_space=`$ECHO "$complete" | $GREP " "`
30693       if test "x$has_space" != x; then
30694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30696       fi
30697       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30698     fi
30699   fi
30700 
30701   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30702   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30703   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30704   # "foo.exe" is OK but "foo" is an error.
30705   #
30706   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30707   # It is also a way to make sure we got the proper file name for the real test later on.
30708   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30709   if test "x$test_shortpath" = x; then
30710     # Short path failed, file does not exist as specified.
30711     # Try adding .exe or .cmd
30712     if test -f "${new_path}.exe"; then
30713       input_to_shortpath="${new_path}.exe"
30714     elif test -f "${new_path}.cmd"; then
30715       input_to_shortpath="${new_path}.cmd"
30716     else
30717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
30718 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
30719       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30720 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30721       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30722     fi
30723   else
30724     input_to_shortpath="$new_path"
30725   fi
30726 
30727   # Call helper function which possibly converts this using DOS-style short mode.
30728   # If so, the updated path is stored in $new_path.
30729   new_path="$input_to_shortpath"
30730 
30731   input_path="$input_to_shortpath"
30732   # Check if we need to convert this using DOS-style short mode. If the path
30733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30734   # take no chances and rewrite it.
30735   # Note: m4 eats our [], so we need to use [ and ] instead.
30736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30737   if test "x$has_forbidden_chars" != x; then
30738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30739     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30740     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30741     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30742       # Going to short mode and back again did indeed matter. Since short mode is
30743       # case insensitive, let's make it lowercase to improve readability.
30744       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30745       # Now convert it back to Unix-style (cygpath)
30746       input_path=`$CYGPATH -u "$shortmode_path"`
30747       new_path="$input_path"
30748     fi
30749   fi
30750 
30751   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30752   if test "x$test_cygdrive_prefix" = x; then
30753     # As a simple fix, exclude /usr/bin since it's not a real path.
30754     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30755       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30756       # a path prefixed by /cygdrive for fixpath to work.
30757       new_path="$CYGWIN_ROOT_PATH$input_path"
30758     fi
30759   fi
30760 
30761   # remove trailing .exe if any
30762   new_path="${new_path/%.exe/}"
30763 
30764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30765 
30766   # First separate the path from the arguments. This will split at the first
30767   # space.
30768   complete="$CXXCPP"
30769   path="${complete%% *}"
30770   tmp="$complete EOL"
30771   arguments="${tmp#* }"
30772 
30773   # Input might be given as Windows format, start by converting to
30774   # unix format.
30775   new_path="$path"
30776 
30777   windows_path="$new_path"
30778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30779     unix_path=`$CYGPATH -u "$windows_path"`
30780     new_path="$unix_path"
30781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30783     new_path="$unix_path"
30784   fi
30785 
30786 
30787   # Now try to locate executable using which
30788   new_path=`$WHICH "$new_path" 2> /dev/null`
30789 
30790   if test "x$new_path" = x; then
30791     # Oops. Which didn't find the executable.
30792     # The splitting of arguments from the executable at a space might have been incorrect,
30793     # since paths with space are more likely in Windows. Give it another try with the whole
30794     # argument.
30795     path="$complete"
30796     arguments="EOL"
30797     new_path="$path"
30798 
30799   windows_path="$new_path"
30800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30801     unix_path=`$CYGPATH -u "$windows_path"`
30802     new_path="$unix_path"
30803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30805     new_path="$unix_path"
30806   fi
30807 
30808 
30809     new_path=`$WHICH "$new_path" 2> /dev/null`
30810     # bat and cmd files are not always considered executable in MSYS causing which
30811     # to not find them
30812     if test "x$new_path" = x \
30813         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30814         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30815       new_path="$path"
30816 
30817   windows_path="$new_path"
30818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30819     unix_path=`$CYGPATH -u "$windows_path"`
30820     new_path="$unix_path"
30821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30823     new_path="$unix_path"
30824   fi
30825 
30826     fi
30827 
30828     if test "x$new_path" = x; then
30829       # It's still not found. Now this is an unrecoverable error.
30830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30831 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30832       has_space=`$ECHO "$complete" | $GREP " "`
30833       if test "x$has_space" != x; then
30834         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30835 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30836       fi
30837       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30838     fi
30839   fi
30840 
30841   # Now new_path has a complete unix path to the binary
30842   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30843     # Keep paths in /bin as-is, but remove trailing .exe if any
30844     new_path="${new_path/%.exe/}"
30845     # Do not save /bin paths to all_fixpath_prefixes!
30846   else
30847     # Not in mixed or Windows style, start by that.
30848     new_path=`cmd //c echo $new_path`
30849 
30850   input_path="$new_path"
30851   # Check if we need to convert this using DOS-style short mode. If the path
30852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30853   # take no chances and rewrite it.
30854   # Note: m4 eats our [], so we need to use [ and ] instead.
30855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30856   if test "x$has_forbidden_chars" != x; then
30857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30859   fi
30860 
30861     # Output is in $new_path
30862 
30863   windows_path="$new_path"
30864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30865     unix_path=`$CYGPATH -u "$windows_path"`
30866     new_path="$unix_path"
30867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30869     new_path="$unix_path"
30870   fi
30871 
30872     # remove trailing .exe if any
30873     new_path="${new_path/%.exe/}"
30874 
30875     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30876     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30877   fi
30878 
30879   else
30880     # We're on a posix platform. Hooray! :)
30881     # First separate the path from the arguments. This will split at the first
30882     # space.
30883     complete="$CXXCPP"
30884     path="${complete%% *}"
30885     tmp="$complete EOL"
30886     arguments="${tmp#* }"
30887 
30888     # Cannot rely on the command "which" here since it doesn't always work.
30889     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30890     if test -z "$is_absolute_path"; then
30891       # Path to executable is not absolute. Find it.
30892       IFS_save="$IFS"
30893       IFS=:
30894       for p in $PATH; do
30895         if test -f "$p/$path" && test -x "$p/$path"; then
30896           new_path="$p/$path"
30897           break
30898         fi
30899       done
30900       IFS="$IFS_save"
30901     else
30902       # This is an absolute path, we can use it without further modifications.
30903       new_path="$path"
30904     fi
30905 
30906     if test "x$new_path" = x; then
30907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30908 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30909       has_space=`$ECHO "$complete" | $GREP " "`
30910       if test "x$has_space" != x; then
30911         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30912 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30913       fi
30914       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30915     fi
30916   fi
30917 
30918   # Now join together the path and the arguments once again
30919   if test "x$arguments" != xEOL; then
30920     new_complete="$new_path ${arguments% *}"
30921   else
30922     new_complete="$new_path"
30923   fi
30924 
30925   if test "x$complete" != "x$new_complete"; then
30926     CXXCPP="$new_complete"
30927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
30928 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
30929   fi
30930 
30931 
30932   #
30933   # Setup the linker (LD)
30934   #
30935   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30936     # In the Microsoft toolchain we have a separate LD command "link".
30937     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
30938     # a cygwin program for something completely different.
30939     # Extract the first word of "link", so it can be a program name with args.
30940 set dummy link; ac_word=$2
30941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30942 $as_echo_n "checking for $ac_word... " >&6; }
30943 if ${ac_cv_prog_LD+:} false; then :
30944   $as_echo_n "(cached) " >&6
30945 else
30946   if test -n "$LD"; then
30947   ac_cv_prog_LD="$LD" # Let the user override the test.
30948 else
30949   ac_prog_rejected=no
30950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30951 for as_dir in $PATH
30952 do
30953   IFS=$as_save_IFS
30954   test -z "$as_dir" && as_dir=.
30955     for ac_exec_ext in '' $ac_executable_extensions; do
30956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30957     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
30958        ac_prog_rejected=yes
30959        continue
30960      fi
30961     ac_cv_prog_LD="link"
30962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30963     break 2
30964   fi
30965 done
30966   done
30967 IFS=$as_save_IFS
30968 
30969 if test $ac_prog_rejected = yes; then
30970   # We found a bogon in the path, so make sure we never use it.
30971   set dummy $ac_cv_prog_LD
30972   shift
30973   if test $# != 0; then
30974     # We chose a different compiler from the bogus one.
30975     # However, it has the same basename, so the bogon will be chosen
30976     # first if we set LD to just the basename; use the full file name.
30977     shift
30978     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
30979   fi
30980 fi
30981 fi
30982 fi
30983 LD=$ac_cv_prog_LD
30984 if test -n "$LD"; then
30985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
30986 $as_echo "$LD" >&6; }
30987 else
30988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30989 $as_echo "no" >&6; }
30990 fi
30991 
30992 
30993 
30994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30995 
30996   # First separate the path from the arguments. This will split at the first
30997   # space.
30998   complete="$LD"
30999   path="${complete%% *}"
31000   tmp="$complete EOL"
31001   arguments="${tmp#* }"
31002 
31003   # Input might be given as Windows format, start by converting to
31004   # unix format.
31005   new_path=`$CYGPATH -u "$path"`
31006 
31007   # Now try to locate executable using which
31008   new_path=`$WHICH "$new_path" 2> /dev/null`
31009   # bat and cmd files are not always considered executable in cygwin causing which
31010   # to not find them
31011   if test "x$new_path" = x \
31012       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31013       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31014     new_path=`$CYGPATH -u "$path"`
31015   fi
31016   if test "x$new_path" = x; then
31017     # Oops. Which didn't find the executable.
31018     # The splitting of arguments from the executable at a space might have been incorrect,
31019     # since paths with space are more likely in Windows. Give it another try with the whole
31020     # argument.
31021     path="$complete"
31022     arguments="EOL"
31023     new_path=`$CYGPATH -u "$path"`
31024     new_path=`$WHICH "$new_path" 2> /dev/null`
31025     # bat and cmd files are not always considered executable in cygwin causing which
31026     # to not find them
31027     if test "x$new_path" = x \
31028         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31029         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31030       new_path=`$CYGPATH -u "$path"`
31031     fi
31032     if test "x$new_path" = x; then
31033       # It's still not found. Now this is an unrecoverable error.
31034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31035 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31036       has_space=`$ECHO "$complete" | $GREP " "`
31037       if test "x$has_space" != x; then
31038         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31039 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31040       fi
31041       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31042     fi
31043   fi
31044 
31045   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31046   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31047   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31048   # "foo.exe" is OK but "foo" is an error.
31049   #
31050   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31051   # It is also a way to make sure we got the proper file name for the real test later on.
31052   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31053   if test "x$test_shortpath" = x; then
31054     # Short path failed, file does not exist as specified.
31055     # Try adding .exe or .cmd
31056     if test -f "${new_path}.exe"; then
31057       input_to_shortpath="${new_path}.exe"
31058     elif test -f "${new_path}.cmd"; then
31059       input_to_shortpath="${new_path}.cmd"
31060     else
31061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31062 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31063       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31064 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31065       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31066     fi
31067   else
31068     input_to_shortpath="$new_path"
31069   fi
31070 
31071   # Call helper function which possibly converts this using DOS-style short mode.
31072   # If so, the updated path is stored in $new_path.
31073   new_path="$input_to_shortpath"
31074 
31075   input_path="$input_to_shortpath"
31076   # Check if we need to convert this using DOS-style short mode. If the path
31077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31078   # take no chances and rewrite it.
31079   # Note: m4 eats our [], so we need to use [ and ] instead.
31080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31081   if test "x$has_forbidden_chars" != x; then
31082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31083     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31084     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31085     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31086       # Going to short mode and back again did indeed matter. Since short mode is
31087       # case insensitive, let's make it lowercase to improve readability.
31088       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31089       # Now convert it back to Unix-style (cygpath)
31090       input_path=`$CYGPATH -u "$shortmode_path"`
31091       new_path="$input_path"
31092     fi
31093   fi
31094 
31095   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31096   if test "x$test_cygdrive_prefix" = x; then
31097     # As a simple fix, exclude /usr/bin since it's not a real path.
31098     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31099       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31100       # a path prefixed by /cygdrive for fixpath to work.
31101       new_path="$CYGWIN_ROOT_PATH$input_path"
31102     fi
31103   fi
31104 
31105   # remove trailing .exe if any
31106   new_path="${new_path/%.exe/}"
31107 
31108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31109 
31110   # First separate the path from the arguments. This will split at the first
31111   # space.
31112   complete="$LD"
31113   path="${complete%% *}"
31114   tmp="$complete EOL"
31115   arguments="${tmp#* }"
31116 
31117   # Input might be given as Windows format, start by converting to
31118   # unix format.
31119   new_path="$path"
31120 
31121   windows_path="$new_path"
31122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123     unix_path=`$CYGPATH -u "$windows_path"`
31124     new_path="$unix_path"
31125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127     new_path="$unix_path"
31128   fi
31129 
31130 
31131   # Now try to locate executable using which
31132   new_path=`$WHICH "$new_path" 2> /dev/null`
31133 
31134   if test "x$new_path" = x; then
31135     # Oops. Which didn't find the executable.
31136     # The splitting of arguments from the executable at a space might have been incorrect,
31137     # since paths with space are more likely in Windows. Give it another try with the whole
31138     # argument.
31139     path="$complete"
31140     arguments="EOL"
31141     new_path="$path"
31142 
31143   windows_path="$new_path"
31144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31145     unix_path=`$CYGPATH -u "$windows_path"`
31146     new_path="$unix_path"
31147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31148     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31149     new_path="$unix_path"
31150   fi
31151 
31152 
31153     new_path=`$WHICH "$new_path" 2> /dev/null`
31154     # bat and cmd files are not always considered executable in MSYS causing which
31155     # to not find them
31156     if test "x$new_path" = x \
31157         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31158         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31159       new_path="$path"
31160 
31161   windows_path="$new_path"
31162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31163     unix_path=`$CYGPATH -u "$windows_path"`
31164     new_path="$unix_path"
31165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31166     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31167     new_path="$unix_path"
31168   fi
31169 
31170     fi
31171 
31172     if test "x$new_path" = x; then
31173       # It's still not found. Now this is an unrecoverable error.
31174       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31175 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31176       has_space=`$ECHO "$complete" | $GREP " "`
31177       if test "x$has_space" != x; then
31178         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31179 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31180       fi
31181       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31182     fi
31183   fi
31184 
31185   # Now new_path has a complete unix path to the binary
31186   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31187     # Keep paths in /bin as-is, but remove trailing .exe if any
31188     new_path="${new_path/%.exe/}"
31189     # Do not save /bin paths to all_fixpath_prefixes!
31190   else
31191     # Not in mixed or Windows style, start by that.
31192     new_path=`cmd //c echo $new_path`
31193 
31194   input_path="$new_path"
31195   # Check if we need to convert this using DOS-style short mode. If the path
31196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31197   # take no chances and rewrite it.
31198   # Note: m4 eats our [], so we need to use [ and ] instead.
31199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31200   if test "x$has_forbidden_chars" != x; then
31201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31202     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31203   fi
31204 
31205     # Output is in $new_path
31206 
31207   windows_path="$new_path"
31208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31209     unix_path=`$CYGPATH -u "$windows_path"`
31210     new_path="$unix_path"
31211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31213     new_path="$unix_path"
31214   fi
31215 
31216     # remove trailing .exe if any
31217     new_path="${new_path/%.exe/}"
31218 
31219     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31220     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31221   fi
31222 
31223   else
31224     # We're on a posix platform. Hooray! :)
31225     # First separate the path from the arguments. This will split at the first
31226     # space.
31227     complete="$LD"
31228     path="${complete%% *}"
31229     tmp="$complete EOL"
31230     arguments="${tmp#* }"
31231 
31232     # Cannot rely on the command "which" here since it doesn't always work.
31233     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31234     if test -z "$is_absolute_path"; then
31235       # Path to executable is not absolute. Find it.
31236       IFS_save="$IFS"
31237       IFS=:
31238       for p in $PATH; do
31239         if test -f "$p/$path" && test -x "$p/$path"; then
31240           new_path="$p/$path"
31241           break
31242         fi
31243       done
31244       IFS="$IFS_save"
31245     else
31246       # This is an absolute path, we can use it without further modifications.
31247       new_path="$path"
31248     fi
31249 
31250     if test "x$new_path" = x; then
31251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31252 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31253       has_space=`$ECHO "$complete" | $GREP " "`
31254       if test "x$has_space" != x; then
31255         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31256 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31257       fi
31258       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31259     fi
31260   fi
31261 
31262   # Now join together the path and the arguments once again
31263   if test "x$arguments" != xEOL; then
31264     new_complete="$new_path ${arguments% *}"
31265   else
31266     new_complete="$new_path"
31267   fi
31268 
31269   if test "x$complete" != "x$new_complete"; then
31270     LD="$new_complete"
31271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31272 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31273   fi
31274 
31275     # Verify that we indeed succeeded with this trick.
31276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31277 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31278     "$LD" --version > /dev/null
31279     if test $? -eq 0 ; then
31280       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31281 $as_echo "no" >&6; }
31282       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31283     else
31284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31285 $as_echo "yes" >&6; }
31286     fi
31287     LDCXX="$LD"
31288   else
31289     # All other toolchains use the compiler to link.
31290     LD="$CC"
31291     LDCXX="$CXX"
31292   fi
31293 
31294   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31295 
31296 
31297   #
31298   # Setup the assembler (AS)
31299   #
31300   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31301     # FIXME: should this really be solaris, or solstudio?
31302 
31303 
31304   # Publish this variable in the help.
31305 
31306 
31307   if test "x$AS" = x; then
31308     # The variable is not set by user, try to locate tool using the code snippet
31309     for ac_prog in as
31310 do
31311   # Extract the first word of "$ac_prog", so it can be a program name with args.
31312 set dummy $ac_prog; ac_word=$2
31313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31314 $as_echo_n "checking for $ac_word... " >&6; }
31315 if ${ac_cv_path_AS+:} false; then :
31316   $as_echo_n "(cached) " >&6
31317 else
31318   case $AS in
31319   [\\/]* | ?:[\\/]*)
31320   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31321   ;;
31322   *)
31323   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31324 for as_dir in $PATH
31325 do
31326   IFS=$as_save_IFS
31327   test -z "$as_dir" && as_dir=.
31328     for ac_exec_ext in '' $ac_executable_extensions; do
31329   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31330     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31331     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31332     break 2
31333   fi
31334 done
31335   done
31336 IFS=$as_save_IFS
31337 
31338   ;;
31339 esac
31340 fi
31341 AS=$ac_cv_path_AS
31342 if test -n "$AS"; then
31343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31344 $as_echo "$AS" >&6; }
31345 else
31346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31347 $as_echo "no" >&6; }
31348 fi
31349 
31350 
31351   test -n "$AS" && break
31352 done
31353 
31354   else
31355     # The variable is set, but is it from the command line or the environment?
31356 
31357     # Try to remove the string !AS! from our list.
31358     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31359     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31360       # If it failed, the variable was not from the command line. Ignore it,
31361       # but warn the user (except for BASH, which is always set by the calling BASH).
31362       if test "xAS" != xBASH; then
31363         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31364 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31365       fi
31366       # Try to locate tool using the code snippet
31367       for ac_prog in as
31368 do
31369   # Extract the first word of "$ac_prog", so it can be a program name with args.
31370 set dummy $ac_prog; ac_word=$2
31371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31372 $as_echo_n "checking for $ac_word... " >&6; }
31373 if ${ac_cv_path_AS+:} false; then :
31374   $as_echo_n "(cached) " >&6
31375 else
31376   case $AS in
31377   [\\/]* | ?:[\\/]*)
31378   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31379   ;;
31380   *)
31381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31382 for as_dir in $PATH
31383 do
31384   IFS=$as_save_IFS
31385   test -z "$as_dir" && as_dir=.
31386     for ac_exec_ext in '' $ac_executable_extensions; do
31387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31388     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31390     break 2
31391   fi
31392 done
31393   done
31394 IFS=$as_save_IFS
31395 
31396   ;;
31397 esac
31398 fi
31399 AS=$ac_cv_path_AS
31400 if test -n "$AS"; then
31401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31402 $as_echo "$AS" >&6; }
31403 else
31404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31405 $as_echo "no" >&6; }
31406 fi
31407 
31408 
31409   test -n "$AS" && break
31410 done
31411 
31412     else
31413       # If it succeeded, then it was overridden by the user. We will use it
31414       # for the tool.
31415 
31416       # First remove it from the list of overridden variables, so we can test
31417       # for unknown variables in the end.
31418       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31419 
31420       # Check if the provided tool contains a complete path.
31421       tool_specified="$AS"
31422       tool_basename="${tool_specified##*/}"
31423       if test "x$tool_basename" = "x$tool_specified"; then
31424         # A command without a complete path is provided, search $PATH.
31425         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31426 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31427         # Extract the first word of "$tool_basename", so it can be a program name with args.
31428 set dummy $tool_basename; ac_word=$2
31429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31430 $as_echo_n "checking for $ac_word... " >&6; }
31431 if ${ac_cv_path_AS+:} false; then :
31432   $as_echo_n "(cached) " >&6
31433 else
31434   case $AS in
31435   [\\/]* | ?:[\\/]*)
31436   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31437   ;;
31438   *)
31439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31440 for as_dir in $PATH
31441 do
31442   IFS=$as_save_IFS
31443   test -z "$as_dir" && as_dir=.
31444     for ac_exec_ext in '' $ac_executable_extensions; do
31445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31446     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31448     break 2
31449   fi
31450 done
31451   done
31452 IFS=$as_save_IFS
31453 
31454   ;;
31455 esac
31456 fi
31457 AS=$ac_cv_path_AS
31458 if test -n "$AS"; then
31459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31460 $as_echo "$AS" >&6; }
31461 else
31462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31463 $as_echo "no" >&6; }
31464 fi
31465 
31466 
31467         if test "x$AS" = x; then
31468           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31469         fi
31470       else
31471         # Otherwise we believe it is a complete path. Use it as it is.
31472         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31473 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31474         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31475 $as_echo_n "checking for AS... " >&6; }
31476         if test ! -x "$tool_specified"; then
31477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31478 $as_echo "not found" >&6; }
31479           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31480         fi
31481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31482 $as_echo "$tool_specified" >&6; }
31483       fi
31484     fi
31485   fi
31486 
31487 
31488 
31489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31490 
31491   # First separate the path from the arguments. This will split at the first
31492   # space.
31493   complete="$AS"
31494   path="${complete%% *}"
31495   tmp="$complete EOL"
31496   arguments="${tmp#* }"
31497 
31498   # Input might be given as Windows format, start by converting to
31499   # unix format.
31500   new_path=`$CYGPATH -u "$path"`
31501 
31502   # Now try to locate executable using which
31503   new_path=`$WHICH "$new_path" 2> /dev/null`
31504   # bat and cmd files are not always considered executable in cygwin causing which
31505   # to not find them
31506   if test "x$new_path" = x \
31507       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31508       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31509     new_path=`$CYGPATH -u "$path"`
31510   fi
31511   if test "x$new_path" = x; then
31512     # Oops. Which didn't find the executable.
31513     # The splitting of arguments from the executable at a space might have been incorrect,
31514     # since paths with space are more likely in Windows. Give it another try with the whole
31515     # argument.
31516     path="$complete"
31517     arguments="EOL"
31518     new_path=`$CYGPATH -u "$path"`
31519     new_path=`$WHICH "$new_path" 2> /dev/null`
31520     # bat and cmd files are not always considered executable in cygwin causing which
31521     # to not find them
31522     if test "x$new_path" = x \
31523         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31524         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31525       new_path=`$CYGPATH -u "$path"`
31526     fi
31527     if test "x$new_path" = x; then
31528       # It's still not found. Now this is an unrecoverable error.
31529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31530 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31531       has_space=`$ECHO "$complete" | $GREP " "`
31532       if test "x$has_space" != x; then
31533         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31534 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31535       fi
31536       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31537     fi
31538   fi
31539 
31540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31543   # "foo.exe" is OK but "foo" is an error.
31544   #
31545   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31546   # It is also a way to make sure we got the proper file name for the real test later on.
31547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31548   if test "x$test_shortpath" = x; then
31549     # Short path failed, file does not exist as specified.
31550     # Try adding .exe or .cmd
31551     if test -f "${new_path}.exe"; then
31552       input_to_shortpath="${new_path}.exe"
31553     elif test -f "${new_path}.cmd"; then
31554       input_to_shortpath="${new_path}.cmd"
31555     else
31556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31557 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31558       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31559 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31560       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31561     fi
31562   else
31563     input_to_shortpath="$new_path"
31564   fi
31565 
31566   # Call helper function which possibly converts this using DOS-style short mode.
31567   # If so, the updated path is stored in $new_path.
31568   new_path="$input_to_shortpath"
31569 
31570   input_path="$input_to_shortpath"
31571   # Check if we need to convert this using DOS-style short mode. If the path
31572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31573   # take no chances and rewrite it.
31574   # Note: m4 eats our [], so we need to use [ and ] instead.
31575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31576   if test "x$has_forbidden_chars" != x; then
31577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31578     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31579     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31580     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31581       # Going to short mode and back again did indeed matter. Since short mode is
31582       # case insensitive, let's make it lowercase to improve readability.
31583       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31584       # Now convert it back to Unix-style (cygpath)
31585       input_path=`$CYGPATH -u "$shortmode_path"`
31586       new_path="$input_path"
31587     fi
31588   fi
31589 
31590   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31591   if test "x$test_cygdrive_prefix" = x; then
31592     # As a simple fix, exclude /usr/bin since it's not a real path.
31593     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31594       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31595       # a path prefixed by /cygdrive for fixpath to work.
31596       new_path="$CYGWIN_ROOT_PATH$input_path"
31597     fi
31598   fi
31599 
31600   # remove trailing .exe if any
31601   new_path="${new_path/%.exe/}"
31602 
31603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31604 
31605   # First separate the path from the arguments. This will split at the first
31606   # space.
31607   complete="$AS"
31608   path="${complete%% *}"
31609   tmp="$complete EOL"
31610   arguments="${tmp#* }"
31611 
31612   # Input might be given as Windows format, start by converting to
31613   # unix format.
31614   new_path="$path"
31615 
31616   windows_path="$new_path"
31617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31618     unix_path=`$CYGPATH -u "$windows_path"`
31619     new_path="$unix_path"
31620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31622     new_path="$unix_path"
31623   fi
31624 
31625 
31626   # Now try to locate executable using which
31627   new_path=`$WHICH "$new_path" 2> /dev/null`
31628 
31629   if test "x$new_path" = x; then
31630     # Oops. Which didn't find the executable.
31631     # The splitting of arguments from the executable at a space might have been incorrect,
31632     # since paths with space are more likely in Windows. Give it another try with the whole
31633     # argument.
31634     path="$complete"
31635     arguments="EOL"
31636     new_path="$path"
31637 
31638   windows_path="$new_path"
31639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31640     unix_path=`$CYGPATH -u "$windows_path"`
31641     new_path="$unix_path"
31642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31644     new_path="$unix_path"
31645   fi
31646 
31647 
31648     new_path=`$WHICH "$new_path" 2> /dev/null`
31649     # bat and cmd files are not always considered executable in MSYS causing which
31650     # to not find them
31651     if test "x$new_path" = x \
31652         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31653         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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     fi
31666 
31667     if test "x$new_path" = x; then
31668       # It's still not found. Now this is an unrecoverable error.
31669       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31670 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31671       has_space=`$ECHO "$complete" | $GREP " "`
31672       if test "x$has_space" != x; then
31673         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31674 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31675       fi
31676       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31677     fi
31678   fi
31679 
31680   # Now new_path has a complete unix path to the binary
31681   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31682     # Keep paths in /bin as-is, but remove trailing .exe if any
31683     new_path="${new_path/%.exe/}"
31684     # Do not save /bin paths to all_fixpath_prefixes!
31685   else
31686     # Not in mixed or Windows style, start by that.
31687     new_path=`cmd //c echo $new_path`
31688 
31689   input_path="$new_path"
31690   # Check if we need to convert this using DOS-style short mode. If the path
31691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31692   # take no chances and rewrite it.
31693   # Note: m4 eats our [], so we need to use [ and ] instead.
31694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31695   if test "x$has_forbidden_chars" != x; then
31696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31698   fi
31699 
31700     # Output is in $new_path
31701 
31702   windows_path="$new_path"
31703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31704     unix_path=`$CYGPATH -u "$windows_path"`
31705     new_path="$unix_path"
31706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31708     new_path="$unix_path"
31709   fi
31710 
31711     # remove trailing .exe if any
31712     new_path="${new_path/%.exe/}"
31713 
31714     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31715     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31716   fi
31717 
31718   else
31719     # We're on a posix platform. Hooray! :)
31720     # First separate the path from the arguments. This will split at the first
31721     # space.
31722     complete="$AS"
31723     path="${complete%% *}"
31724     tmp="$complete EOL"
31725     arguments="${tmp#* }"
31726 
31727     # Cannot rely on the command "which" here since it doesn't always work.
31728     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31729     if test -z "$is_absolute_path"; then
31730       # Path to executable is not absolute. Find it.
31731       IFS_save="$IFS"
31732       IFS=:
31733       for p in $PATH; do
31734         if test -f "$p/$path" && test -x "$p/$path"; then
31735           new_path="$p/$path"
31736           break
31737         fi
31738       done
31739       IFS="$IFS_save"
31740     else
31741       # This is an absolute path, we can use it without further modifications.
31742       new_path="$path"
31743     fi
31744 
31745     if test "x$new_path" = x; then
31746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31747 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31748       has_space=`$ECHO "$complete" | $GREP " "`
31749       if test "x$has_space" != x; then
31750         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31751 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31752       fi
31753       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31754     fi
31755   fi
31756 
31757   # Now join together the path and the arguments once again
31758   if test "x$arguments" != xEOL; then
31759     new_complete="$new_path ${arguments% *}"
31760   else
31761     new_complete="$new_path"
31762   fi
31763 
31764   if test "x$complete" != "x$new_complete"; then
31765     AS="$new_complete"
31766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
31767 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
31768   fi
31769 
31770   else
31771     # FIXME: is this correct for microsoft?
31772     AS="$CC -c"
31773   fi
31774 
31775 
31776   #
31777   # Setup the archiver (AR)
31778   #
31779   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31780     # The corresponding ar tool is lib.exe (used to create static libraries)
31781     # Extract the first word of "lib", so it can be a program name with args.
31782 set dummy lib; ac_word=$2
31783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31784 $as_echo_n "checking for $ac_word... " >&6; }
31785 if ${ac_cv_prog_AR+:} false; then :
31786   $as_echo_n "(cached) " >&6
31787 else
31788   if test -n "$AR"; then
31789   ac_cv_prog_AR="$AR" # Let the user override the test.
31790 else
31791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31792 for as_dir in $PATH
31793 do
31794   IFS=$as_save_IFS
31795   test -z "$as_dir" && as_dir=.
31796     for ac_exec_ext in '' $ac_executable_extensions; do
31797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31798     ac_cv_prog_AR="lib"
31799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31800     break 2
31801   fi
31802 done
31803   done
31804 IFS=$as_save_IFS
31805 
31806 fi
31807 fi
31808 AR=$ac_cv_prog_AR
31809 if test -n "$AR"; then
31810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31811 $as_echo "$AR" >&6; }
31812 else
31813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31814 $as_echo "no" >&6; }
31815 fi
31816 
31817 
31818   else
31819 
31820 
31821   # Publish this variable in the help.
31822 
31823 
31824   if test "x$AR" = x; then
31825     # The variable is not set by user, try to locate tool using the code snippet
31826     if test -n "$ac_tool_prefix"; then
31827   for ac_prog in ar
31828   do
31829     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31830 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31832 $as_echo_n "checking for $ac_word... " >&6; }
31833 if ${ac_cv_prog_AR+:} false; then :
31834   $as_echo_n "(cached) " >&6
31835 else
31836   if test -n "$AR"; then
31837   ac_cv_prog_AR="$AR" # Let the user override the test.
31838 else
31839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31840 for as_dir in $PATH
31841 do
31842   IFS=$as_save_IFS
31843   test -z "$as_dir" && as_dir=.
31844     for ac_exec_ext in '' $ac_executable_extensions; do
31845   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31846     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31847     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31848     break 2
31849   fi
31850 done
31851   done
31852 IFS=$as_save_IFS
31853 
31854 fi
31855 fi
31856 AR=$ac_cv_prog_AR
31857 if test -n "$AR"; then
31858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31859 $as_echo "$AR" >&6; }
31860 else
31861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31862 $as_echo "no" >&6; }
31863 fi
31864 
31865 
31866     test -n "$AR" && break
31867   done
31868 fi
31869 if test -z "$AR"; then
31870   ac_ct_AR=$AR
31871   for ac_prog in ar
31872 do
31873   # Extract the first word of "$ac_prog", so it can be a program name with args.
31874 set dummy $ac_prog; ac_word=$2
31875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31876 $as_echo_n "checking for $ac_word... " >&6; }
31877 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31878   $as_echo_n "(cached) " >&6
31879 else
31880   if test -n "$ac_ct_AR"; then
31881   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31882 else
31883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31884 for as_dir in $PATH
31885 do
31886   IFS=$as_save_IFS
31887   test -z "$as_dir" && as_dir=.
31888     for ac_exec_ext in '' $ac_executable_extensions; do
31889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31890     ac_cv_prog_ac_ct_AR="$ac_prog"
31891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31892     break 2
31893   fi
31894 done
31895   done
31896 IFS=$as_save_IFS
31897 
31898 fi
31899 fi
31900 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31901 if test -n "$ac_ct_AR"; then
31902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31903 $as_echo "$ac_ct_AR" >&6; }
31904 else
31905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31906 $as_echo "no" >&6; }
31907 fi
31908 
31909 
31910   test -n "$ac_ct_AR" && break
31911 done
31912 
31913   if test "x$ac_ct_AR" = x; then
31914     AR=""
31915   else
31916     case $cross_compiling:$ac_tool_warned in
31917 yes:)
31918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31919 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31920 ac_tool_warned=yes ;;
31921 esac
31922     AR=$ac_ct_AR
31923   fi
31924 fi
31925 
31926   else
31927     # The variable is set, but is it from the command line or the environment?
31928 
31929     # Try to remove the string !AR! from our list.
31930     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31931     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31932       # If it failed, the variable was not from the command line. Ignore it,
31933       # but warn the user (except for BASH, which is always set by the calling BASH).
31934       if test "xAR" != xBASH; then
31935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31936 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31937       fi
31938       # Try to locate tool using the code snippet
31939       if test -n "$ac_tool_prefix"; then
31940   for ac_prog in ar
31941   do
31942     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31943 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31945 $as_echo_n "checking for $ac_word... " >&6; }
31946 if ${ac_cv_prog_AR+:} false; then :
31947   $as_echo_n "(cached) " >&6
31948 else
31949   if test -n "$AR"; then
31950   ac_cv_prog_AR="$AR" # Let the user override the test.
31951 else
31952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31953 for as_dir in $PATH
31954 do
31955   IFS=$as_save_IFS
31956   test -z "$as_dir" && as_dir=.
31957     for ac_exec_ext in '' $ac_executable_extensions; do
31958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31959     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31961     break 2
31962   fi
31963 done
31964   done
31965 IFS=$as_save_IFS
31966 
31967 fi
31968 fi
31969 AR=$ac_cv_prog_AR
31970 if test -n "$AR"; then
31971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31972 $as_echo "$AR" >&6; }
31973 else
31974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31975 $as_echo "no" >&6; }
31976 fi
31977 
31978 
31979     test -n "$AR" && break
31980   done
31981 fi
31982 if test -z "$AR"; then
31983   ac_ct_AR=$AR
31984   for ac_prog in ar
31985 do
31986   # Extract the first word of "$ac_prog", so it can be a program name with args.
31987 set dummy $ac_prog; ac_word=$2
31988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31989 $as_echo_n "checking for $ac_word... " >&6; }
31990 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31991   $as_echo_n "(cached) " >&6
31992 else
31993   if test -n "$ac_ct_AR"; then
31994   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31995 else
31996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31997 for as_dir in $PATH
31998 do
31999   IFS=$as_save_IFS
32000   test -z "$as_dir" && as_dir=.
32001     for ac_exec_ext in '' $ac_executable_extensions; do
32002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32003     ac_cv_prog_ac_ct_AR="$ac_prog"
32004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32005     break 2
32006   fi
32007 done
32008   done
32009 IFS=$as_save_IFS
32010 
32011 fi
32012 fi
32013 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32014 if test -n "$ac_ct_AR"; then
32015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32016 $as_echo "$ac_ct_AR" >&6; }
32017 else
32018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32019 $as_echo "no" >&6; }
32020 fi
32021 
32022 
32023   test -n "$ac_ct_AR" && break
32024 done
32025 
32026   if test "x$ac_ct_AR" = x; then
32027     AR=""
32028   else
32029     case $cross_compiling:$ac_tool_warned in
32030 yes:)
32031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32032 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32033 ac_tool_warned=yes ;;
32034 esac
32035     AR=$ac_ct_AR
32036   fi
32037 fi
32038 
32039     else
32040       # If it succeeded, then it was overridden by the user. We will use it
32041       # for the tool.
32042 
32043       # First remove it from the list of overridden variables, so we can test
32044       # for unknown variables in the end.
32045       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32046 
32047       # Check if the provided tool contains a complete path.
32048       tool_specified="$AR"
32049       tool_basename="${tool_specified##*/}"
32050       if test "x$tool_basename" = "x$tool_specified"; then
32051         # A command without a complete path is provided, search $PATH.
32052         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32053 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32054         # Extract the first word of "$tool_basename", so it can be a program name with args.
32055 set dummy $tool_basename; ac_word=$2
32056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32057 $as_echo_n "checking for $ac_word... " >&6; }
32058 if ${ac_cv_path_AR+:} false; then :
32059   $as_echo_n "(cached) " >&6
32060 else
32061   case $AR in
32062   [\\/]* | ?:[\\/]*)
32063   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32064   ;;
32065   *)
32066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32067 for as_dir in $PATH
32068 do
32069   IFS=$as_save_IFS
32070   test -z "$as_dir" && as_dir=.
32071     for ac_exec_ext in '' $ac_executable_extensions; do
32072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32073     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32075     break 2
32076   fi
32077 done
32078   done
32079 IFS=$as_save_IFS
32080 
32081   ;;
32082 esac
32083 fi
32084 AR=$ac_cv_path_AR
32085 if test -n "$AR"; then
32086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32087 $as_echo "$AR" >&6; }
32088 else
32089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32090 $as_echo "no" >&6; }
32091 fi
32092 
32093 
32094         if test "x$AR" = x; then
32095           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32096         fi
32097       else
32098         # Otherwise we believe it is a complete path. Use it as it is.
32099         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32100 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32102 $as_echo_n "checking for AR... " >&6; }
32103         if test ! -x "$tool_specified"; then
32104           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32105 $as_echo "not found" >&6; }
32106           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32107         fi
32108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32109 $as_echo "$tool_specified" >&6; }
32110       fi
32111     fi
32112   fi
32113 
32114 
32115   fi
32116 
32117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32118 
32119   # First separate the path from the arguments. This will split at the first
32120   # space.
32121   complete="$AR"
32122   path="${complete%% *}"
32123   tmp="$complete EOL"
32124   arguments="${tmp#* }"
32125 
32126   # Input might be given as Windows format, start by converting to
32127   # unix format.
32128   new_path=`$CYGPATH -u "$path"`
32129 
32130   # Now try to locate executable using which
32131   new_path=`$WHICH "$new_path" 2> /dev/null`
32132   # bat and cmd files are not always considered executable in cygwin causing which
32133   # to not find them
32134   if test "x$new_path" = x \
32135       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32136       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32137     new_path=`$CYGPATH -u "$path"`
32138   fi
32139   if test "x$new_path" = x; then
32140     # Oops. Which didn't find the executable.
32141     # The splitting of arguments from the executable at a space might have been incorrect,
32142     # since paths with space are more likely in Windows. Give it another try with the whole
32143     # argument.
32144     path="$complete"
32145     arguments="EOL"
32146     new_path=`$CYGPATH -u "$path"`
32147     new_path=`$WHICH "$new_path" 2> /dev/null`
32148     # bat and cmd files are not always considered executable in cygwin causing which
32149     # to not find them
32150     if test "x$new_path" = x \
32151         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32152         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32153       new_path=`$CYGPATH -u "$path"`
32154     fi
32155     if test "x$new_path" = x; then
32156       # It's still not found. Now this is an unrecoverable error.
32157       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32158 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32159       has_space=`$ECHO "$complete" | $GREP " "`
32160       if test "x$has_space" != x; then
32161         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32162 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32163       fi
32164       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32165     fi
32166   fi
32167 
32168   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32169   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32170   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32171   # "foo.exe" is OK but "foo" is an error.
32172   #
32173   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32174   # It is also a way to make sure we got the proper file name for the real test later on.
32175   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32176   if test "x$test_shortpath" = x; then
32177     # Short path failed, file does not exist as specified.
32178     # Try adding .exe or .cmd
32179     if test -f "${new_path}.exe"; then
32180       input_to_shortpath="${new_path}.exe"
32181     elif test -f "${new_path}.cmd"; then
32182       input_to_shortpath="${new_path}.cmd"
32183     else
32184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32185 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32186       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32187 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32188       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32189     fi
32190   else
32191     input_to_shortpath="$new_path"
32192   fi
32193 
32194   # Call helper function which possibly converts this using DOS-style short mode.
32195   # If so, the updated path is stored in $new_path.
32196   new_path="$input_to_shortpath"
32197 
32198   input_path="$input_to_shortpath"
32199   # Check if we need to convert this using DOS-style short mode. If the path
32200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32201   # take no chances and rewrite it.
32202   # Note: m4 eats our [], so we need to use [ and ] instead.
32203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32204   if test "x$has_forbidden_chars" != x; then
32205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32206     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32207     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32208     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32209       # Going to short mode and back again did indeed matter. Since short mode is
32210       # case insensitive, let's make it lowercase to improve readability.
32211       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32212       # Now convert it back to Unix-style (cygpath)
32213       input_path=`$CYGPATH -u "$shortmode_path"`
32214       new_path="$input_path"
32215     fi
32216   fi
32217 
32218   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32219   if test "x$test_cygdrive_prefix" = x; then
32220     # As a simple fix, exclude /usr/bin since it's not a real path.
32221     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32222       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32223       # a path prefixed by /cygdrive for fixpath to work.
32224       new_path="$CYGWIN_ROOT_PATH$input_path"
32225     fi
32226   fi
32227 
32228   # remove trailing .exe if any
32229   new_path="${new_path/%.exe/}"
32230 
32231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32232 
32233   # First separate the path from the arguments. This will split at the first
32234   # space.
32235   complete="$AR"
32236   path="${complete%% *}"
32237   tmp="$complete EOL"
32238   arguments="${tmp#* }"
32239 
32240   # Input might be given as Windows format, start by converting to
32241   # unix format.
32242   new_path="$path"
32243 
32244   windows_path="$new_path"
32245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32246     unix_path=`$CYGPATH -u "$windows_path"`
32247     new_path="$unix_path"
32248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32250     new_path="$unix_path"
32251   fi
32252 
32253 
32254   # Now try to locate executable using which
32255   new_path=`$WHICH "$new_path" 2> /dev/null`
32256 
32257   if test "x$new_path" = x; then
32258     # Oops. Which didn't find the executable.
32259     # The splitting of arguments from the executable at a space might have been incorrect,
32260     # since paths with space are more likely in Windows. Give it another try with the whole
32261     # argument.
32262     path="$complete"
32263     arguments="EOL"
32264     new_path="$path"
32265 
32266   windows_path="$new_path"
32267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32268     unix_path=`$CYGPATH -u "$windows_path"`
32269     new_path="$unix_path"
32270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32272     new_path="$unix_path"
32273   fi
32274 
32275 
32276     new_path=`$WHICH "$new_path" 2> /dev/null`
32277     # bat and cmd files are not always considered executable in MSYS causing which
32278     # to not find them
32279     if test "x$new_path" = x \
32280         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32281         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32282       new_path="$path"
32283 
32284   windows_path="$new_path"
32285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32286     unix_path=`$CYGPATH -u "$windows_path"`
32287     new_path="$unix_path"
32288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32290     new_path="$unix_path"
32291   fi
32292 
32293     fi
32294 
32295     if test "x$new_path" = x; then
32296       # It's still not found. Now this is an unrecoverable error.
32297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32298 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32299       has_space=`$ECHO "$complete" | $GREP " "`
32300       if test "x$has_space" != x; then
32301         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32302 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32303       fi
32304       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32305     fi
32306   fi
32307 
32308   # Now new_path has a complete unix path to the binary
32309   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32310     # Keep paths in /bin as-is, but remove trailing .exe if any
32311     new_path="${new_path/%.exe/}"
32312     # Do not save /bin paths to all_fixpath_prefixes!
32313   else
32314     # Not in mixed or Windows style, start by that.
32315     new_path=`cmd //c echo $new_path`
32316 
32317   input_path="$new_path"
32318   # Check if we need to convert this using DOS-style short mode. If the path
32319   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32320   # take no chances and rewrite it.
32321   # Note: m4 eats our [], so we need to use [ and ] instead.
32322   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32323   if test "x$has_forbidden_chars" != x; then
32324     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32325     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32326   fi
32327 
32328     # Output is in $new_path
32329 
32330   windows_path="$new_path"
32331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32332     unix_path=`$CYGPATH -u "$windows_path"`
32333     new_path="$unix_path"
32334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32336     new_path="$unix_path"
32337   fi
32338 
32339     # remove trailing .exe if any
32340     new_path="${new_path/%.exe/}"
32341 
32342     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32343     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32344   fi
32345 
32346   else
32347     # We're on a posix platform. Hooray! :)
32348     # First separate the path from the arguments. This will split at the first
32349     # space.
32350     complete="$AR"
32351     path="${complete%% *}"
32352     tmp="$complete EOL"
32353     arguments="${tmp#* }"
32354 
32355     # Cannot rely on the command "which" here since it doesn't always work.
32356     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32357     if test -z "$is_absolute_path"; then
32358       # Path to executable is not absolute. Find it.
32359       IFS_save="$IFS"
32360       IFS=:
32361       for p in $PATH; do
32362         if test -f "$p/$path" && test -x "$p/$path"; then
32363           new_path="$p/$path"
32364           break
32365         fi
32366       done
32367       IFS="$IFS_save"
32368     else
32369       # This is an absolute path, we can use it without further modifications.
32370       new_path="$path"
32371     fi
32372 
32373     if test "x$new_path" = x; then
32374       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32375 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32376       has_space=`$ECHO "$complete" | $GREP " "`
32377       if test "x$has_space" != x; then
32378         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32379 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32380       fi
32381       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32382     fi
32383   fi
32384 
32385   # Now join together the path and the arguments once again
32386   if test "x$arguments" != xEOL; then
32387     new_complete="$new_path ${arguments% *}"
32388   else
32389     new_complete="$new_path"
32390   fi
32391 
32392   if test "x$complete" != "x$new_complete"; then
32393     AR="$new_complete"
32394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32395 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32396   fi
32397 
32398 
32399 
32400   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32401     ac_ext=m
32402 ac_cpp='$OBJCPP $CPPFLAGS'
32403 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32404 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32405 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32406 if test -n "$ac_tool_prefix"; then
32407   for ac_prog in gcc objcc objc cc CC
32408   do
32409     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32410 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32412 $as_echo_n "checking for $ac_word... " >&6; }
32413 if ${ac_cv_prog_OBJC+:} false; then :
32414   $as_echo_n "(cached) " >&6
32415 else
32416   if test -n "$OBJC"; then
32417   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32418 else
32419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32420 for as_dir in $PATH
32421 do
32422   IFS=$as_save_IFS
32423   test -z "$as_dir" && as_dir=.
32424     for ac_exec_ext in '' $ac_executable_extensions; do
32425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32426     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32428     break 2
32429   fi
32430 done
32431   done
32432 IFS=$as_save_IFS
32433 
32434 fi
32435 fi
32436 OBJC=$ac_cv_prog_OBJC
32437 if test -n "$OBJC"; then
32438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32439 $as_echo "$OBJC" >&6; }
32440 else
32441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32442 $as_echo "no" >&6; }
32443 fi
32444 
32445 
32446     test -n "$OBJC" && break
32447   done
32448 fi
32449 if test -z "$OBJC"; then
32450   ac_ct_OBJC=$OBJC
32451   for ac_prog in gcc objcc objc cc CC
32452 do
32453   # Extract the first word of "$ac_prog", so it can be a program name with args.
32454 set dummy $ac_prog; ac_word=$2
32455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32456 $as_echo_n "checking for $ac_word... " >&6; }
32457 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32458   $as_echo_n "(cached) " >&6
32459 else
32460   if test -n "$ac_ct_OBJC"; then
32461   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32462 else
32463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32464 for as_dir in $PATH
32465 do
32466   IFS=$as_save_IFS
32467   test -z "$as_dir" && as_dir=.
32468     for ac_exec_ext in '' $ac_executable_extensions; do
32469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32470     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32472     break 2
32473   fi
32474 done
32475   done
32476 IFS=$as_save_IFS
32477 
32478 fi
32479 fi
32480 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32481 if test -n "$ac_ct_OBJC"; then
32482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32483 $as_echo "$ac_ct_OBJC" >&6; }
32484 else
32485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32486 $as_echo "no" >&6; }
32487 fi
32488 
32489 
32490   test -n "$ac_ct_OBJC" && break
32491 done
32492 
32493   if test "x$ac_ct_OBJC" = x; then
32494     OBJC="gcc"
32495   else
32496     case $cross_compiling:$ac_tool_warned in
32497 yes:)
32498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32499 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32500 ac_tool_warned=yes ;;
32501 esac
32502     OBJC=$ac_ct_OBJC
32503   fi
32504 fi
32505 
32506 # Provide some information about the compiler.
32507 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32508 set X $ac_compile
32509 ac_compiler=$2
32510 for ac_option in --version -v -V -qversion; do
32511   { { ac_try="$ac_compiler $ac_option >&5"
32512 case "(($ac_try" in
32513   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32514   *) ac_try_echo=$ac_try;;
32515 esac
32516 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32517 $as_echo "$ac_try_echo"; } >&5
32518   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32519   ac_status=$?
32520   if test -s conftest.err; then
32521     sed '10a\
32522 ... rest of stderr output deleted ...
32523          10q' conftest.err >conftest.er1
32524     cat conftest.er1 >&5
32525   fi
32526   rm -f conftest.er1 conftest.err
32527   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32528   test $ac_status = 0; }
32529 done
32530 
32531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32532 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32533 if ${ac_cv_objc_compiler_gnu+:} false; then :
32534   $as_echo_n "(cached) " >&6
32535 else
32536   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32537 /* end confdefs.h.  */
32538 
32539 int
32540 main ()
32541 {
32542 #ifndef __GNUC__
32543        choke me
32544 #endif
32545 
32546   ;
32547   return 0;
32548 }
32549 _ACEOF
32550 if ac_fn_objc_try_compile "$LINENO"; then :
32551   ac_compiler_gnu=yes
32552 else
32553   ac_compiler_gnu=no
32554 fi
32555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32556 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32557 
32558 fi
32559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32560 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32561 if test $ac_compiler_gnu = yes; then
32562   GOBJC=yes
32563 else
32564   GOBJC=
32565 fi
32566 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32567 ac_save_OBJCFLAGS=$OBJCFLAGS
32568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32569 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32570 if ${ac_cv_prog_objc_g+:} false; then :
32571   $as_echo_n "(cached) " >&6
32572 else
32573   ac_save_objc_werror_flag=$ac_objc_werror_flag
32574    ac_objc_werror_flag=yes
32575    ac_cv_prog_objc_g=no
32576    OBJCFLAGS="-g"
32577    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32578 /* end confdefs.h.  */
32579 
32580 int
32581 main ()
32582 {
32583 
32584   ;
32585   return 0;
32586 }
32587 _ACEOF
32588 if ac_fn_objc_try_compile "$LINENO"; then :
32589   ac_cv_prog_objc_g=yes
32590 else
32591   OBJCFLAGS=""
32592       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32593 /* end confdefs.h.  */
32594 
32595 int
32596 main ()
32597 {
32598 
32599   ;
32600   return 0;
32601 }
32602 _ACEOF
32603 if ac_fn_objc_try_compile "$LINENO"; then :
32604 
32605 else
32606   ac_objc_werror_flag=$ac_save_objc_werror_flag
32607          OBJCFLAGS="-g"
32608          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32609 /* end confdefs.h.  */
32610 
32611 int
32612 main ()
32613 {
32614 
32615   ;
32616   return 0;
32617 }
32618 _ACEOF
32619 if ac_fn_objc_try_compile "$LINENO"; then :
32620   ac_cv_prog_objc_g=yes
32621 fi
32622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32623 fi
32624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32625 fi
32626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32627    ac_objc_werror_flag=$ac_save_objc_werror_flag
32628 fi
32629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32630 $as_echo "$ac_cv_prog_objc_g" >&6; }
32631 if test "$ac_test_OBJCFLAGS" = set; then
32632   OBJCFLAGS=$ac_save_OBJCFLAGS
32633 elif test $ac_cv_prog_objc_g = yes; then
32634   if test "$GOBJC" = yes; then
32635     OBJCFLAGS="-g -O2"
32636   else
32637     OBJCFLAGS="-g"
32638   fi
32639 else
32640   if test "$GOBJC" = yes; then
32641     OBJCFLAGS="-O2"
32642   else
32643     OBJCFLAGS=
32644   fi
32645 fi
32646 ac_ext=cpp
32647 ac_cpp='$CXXCPP $CPPFLAGS'
32648 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32649 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32650 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32651 
32652 
32653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32654 
32655   # First separate the path from the arguments. This will split at the first
32656   # space.
32657   complete="$OBJC"
32658   path="${complete%% *}"
32659   tmp="$complete EOL"
32660   arguments="${tmp#* }"
32661 
32662   # Input might be given as Windows format, start by converting to
32663   # unix format.
32664   new_path=`$CYGPATH -u "$path"`
32665 
32666   # Now try to locate executable using which
32667   new_path=`$WHICH "$new_path" 2> /dev/null`
32668   # bat and cmd files are not always considered executable in cygwin causing which
32669   # to not find them
32670   if test "x$new_path" = x \
32671       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32672       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32673     new_path=`$CYGPATH -u "$path"`
32674   fi
32675   if test "x$new_path" = x; then
32676     # Oops. Which didn't find the executable.
32677     # The splitting of arguments from the executable at a space might have been incorrect,
32678     # since paths with space are more likely in Windows. Give it another try with the whole
32679     # argument.
32680     path="$complete"
32681     arguments="EOL"
32682     new_path=`$CYGPATH -u "$path"`
32683     new_path=`$WHICH "$new_path" 2> /dev/null`
32684     # bat and cmd files are not always considered executable in cygwin causing which
32685     # to not find them
32686     if test "x$new_path" = x \
32687         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32688         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32689       new_path=`$CYGPATH -u "$path"`
32690     fi
32691     if test "x$new_path" = x; then
32692       # It's still not found. Now this is an unrecoverable error.
32693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32694 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32695       has_space=`$ECHO "$complete" | $GREP " "`
32696       if test "x$has_space" != x; then
32697         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32698 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32699       fi
32700       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32701     fi
32702   fi
32703 
32704   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32705   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32706   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32707   # "foo.exe" is OK but "foo" is an error.
32708   #
32709   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32710   # It is also a way to make sure we got the proper file name for the real test later on.
32711   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32712   if test "x$test_shortpath" = x; then
32713     # Short path failed, file does not exist as specified.
32714     # Try adding .exe or .cmd
32715     if test -f "${new_path}.exe"; then
32716       input_to_shortpath="${new_path}.exe"
32717     elif test -f "${new_path}.cmd"; then
32718       input_to_shortpath="${new_path}.cmd"
32719     else
32720       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32721 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32722       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32723 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32724       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32725     fi
32726   else
32727     input_to_shortpath="$new_path"
32728   fi
32729 
32730   # Call helper function which possibly converts this using DOS-style short mode.
32731   # If so, the updated path is stored in $new_path.
32732   new_path="$input_to_shortpath"
32733 
32734   input_path="$input_to_shortpath"
32735   # Check if we need to convert this using DOS-style short mode. If the path
32736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737   # take no chances and rewrite it.
32738   # Note: m4 eats our [], so we need to use [ and ] instead.
32739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32740   if test "x$has_forbidden_chars" != x; then
32741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32743     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32744     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32745       # Going to short mode and back again did indeed matter. Since short mode is
32746       # case insensitive, let's make it lowercase to improve readability.
32747       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32748       # Now convert it back to Unix-style (cygpath)
32749       input_path=`$CYGPATH -u "$shortmode_path"`
32750       new_path="$input_path"
32751     fi
32752   fi
32753 
32754   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32755   if test "x$test_cygdrive_prefix" = x; then
32756     # As a simple fix, exclude /usr/bin since it's not a real path.
32757     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32758       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32759       # a path prefixed by /cygdrive for fixpath to work.
32760       new_path="$CYGWIN_ROOT_PATH$input_path"
32761     fi
32762   fi
32763 
32764   # remove trailing .exe if any
32765   new_path="${new_path/%.exe/}"
32766 
32767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32768 
32769   # First separate the path from the arguments. This will split at the first
32770   # space.
32771   complete="$OBJC"
32772   path="${complete%% *}"
32773   tmp="$complete EOL"
32774   arguments="${tmp#* }"
32775 
32776   # Input might be given as Windows format, start by converting to
32777   # unix format.
32778   new_path="$path"
32779 
32780   windows_path="$new_path"
32781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32782     unix_path=`$CYGPATH -u "$windows_path"`
32783     new_path="$unix_path"
32784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32786     new_path="$unix_path"
32787   fi
32788 
32789 
32790   # Now try to locate executable using which
32791   new_path=`$WHICH "$new_path" 2> /dev/null`
32792 
32793   if test "x$new_path" = x; then
32794     # Oops. Which didn't find the executable.
32795     # The splitting of arguments from the executable at a space might have been incorrect,
32796     # since paths with space are more likely in Windows. Give it another try with the whole
32797     # argument.
32798     path="$complete"
32799     arguments="EOL"
32800     new_path="$path"
32801 
32802   windows_path="$new_path"
32803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32804     unix_path=`$CYGPATH -u "$windows_path"`
32805     new_path="$unix_path"
32806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32808     new_path="$unix_path"
32809   fi
32810 
32811 
32812     new_path=`$WHICH "$new_path" 2> /dev/null`
32813     # bat and cmd files are not always considered executable in MSYS causing which
32814     # to not find them
32815     if test "x$new_path" = x \
32816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32818       new_path="$path"
32819 
32820   windows_path="$new_path"
32821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822     unix_path=`$CYGPATH -u "$windows_path"`
32823     new_path="$unix_path"
32824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32826     new_path="$unix_path"
32827   fi
32828 
32829     fi
32830 
32831     if test "x$new_path" = x; then
32832       # It's still not found. Now this is an unrecoverable error.
32833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32834 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32835       has_space=`$ECHO "$complete" | $GREP " "`
32836       if test "x$has_space" != x; then
32837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32839       fi
32840       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32841     fi
32842   fi
32843 
32844   # Now new_path has a complete unix path to the binary
32845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32846     # Keep paths in /bin as-is, but remove trailing .exe if any
32847     new_path="${new_path/%.exe/}"
32848     # Do not save /bin paths to all_fixpath_prefixes!
32849   else
32850     # Not in mixed or Windows style, start by that.
32851     new_path=`cmd //c echo $new_path`
32852 
32853   input_path="$new_path"
32854   # Check if we need to convert this using DOS-style short mode. If the path
32855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32856   # take no chances and rewrite it.
32857   # Note: m4 eats our [], so we need to use [ and ] instead.
32858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32859   if test "x$has_forbidden_chars" != x; then
32860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32862   fi
32863 
32864     # Output is in $new_path
32865 
32866   windows_path="$new_path"
32867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32868     unix_path=`$CYGPATH -u "$windows_path"`
32869     new_path="$unix_path"
32870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32872     new_path="$unix_path"
32873   fi
32874 
32875     # remove trailing .exe if any
32876     new_path="${new_path/%.exe/}"
32877 
32878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32880   fi
32881 
32882   else
32883     # We're on a posix platform. Hooray! :)
32884     # First separate the path from the arguments. This will split at the first
32885     # space.
32886     complete="$OBJC"
32887     path="${complete%% *}"
32888     tmp="$complete EOL"
32889     arguments="${tmp#* }"
32890 
32891     # Cannot rely on the command "which" here since it doesn't always work.
32892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32893     if test -z "$is_absolute_path"; then
32894       # Path to executable is not absolute. Find it.
32895       IFS_save="$IFS"
32896       IFS=:
32897       for p in $PATH; do
32898         if test -f "$p/$path" && test -x "$p/$path"; then
32899           new_path="$p/$path"
32900           break
32901         fi
32902       done
32903       IFS="$IFS_save"
32904     else
32905       # This is an absolute path, we can use it without further modifications.
32906       new_path="$path"
32907     fi
32908 
32909     if test "x$new_path" = x; then
32910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32911 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32912       has_space=`$ECHO "$complete" | $GREP " "`
32913       if test "x$has_space" != x; then
32914         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32916       fi
32917       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32918     fi
32919   fi
32920 
32921   # Now join together the path and the arguments once again
32922   if test "x$arguments" != xEOL; then
32923     new_complete="$new_path ${arguments% *}"
32924   else
32925     new_complete="$new_path"
32926   fi
32927 
32928   if test "x$complete" != "x$new_complete"; then
32929     OBJC="$new_complete"
32930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32931 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32932   fi
32933 
32934 
32935 
32936   # Publish this variable in the help.
32937 
32938 
32939   if test "x$LIPO" = x; then
32940     # The variable is not set by user, try to locate tool using the code snippet
32941     for ac_prog in lipo
32942 do
32943   # Extract the first word of "$ac_prog", so it can be a program name with args.
32944 set dummy $ac_prog; ac_word=$2
32945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32946 $as_echo_n "checking for $ac_word... " >&6; }
32947 if ${ac_cv_path_LIPO+:} false; then :
32948   $as_echo_n "(cached) " >&6
32949 else
32950   case $LIPO in
32951   [\\/]* | ?:[\\/]*)
32952   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32953   ;;
32954   *)
32955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32956 for as_dir in $PATH
32957 do
32958   IFS=$as_save_IFS
32959   test -z "$as_dir" && as_dir=.
32960     for ac_exec_ext in '' $ac_executable_extensions; do
32961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32962     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32964     break 2
32965   fi
32966 done
32967   done
32968 IFS=$as_save_IFS
32969 
32970   ;;
32971 esac
32972 fi
32973 LIPO=$ac_cv_path_LIPO
32974 if test -n "$LIPO"; then
32975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32976 $as_echo "$LIPO" >&6; }
32977 else
32978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32979 $as_echo "no" >&6; }
32980 fi
32981 
32982 
32983   test -n "$LIPO" && break
32984 done
32985 
32986   else
32987     # The variable is set, but is it from the command line or the environment?
32988 
32989     # Try to remove the string !LIPO! from our list.
32990     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
32991     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32992       # If it failed, the variable was not from the command line. Ignore it,
32993       # but warn the user (except for BASH, which is always set by the calling BASH).
32994       if test "xLIPO" != xBASH; then
32995         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
32996 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
32997       fi
32998       # Try to locate tool using the code snippet
32999       for ac_prog in lipo
33000 do
33001   # Extract the first word of "$ac_prog", so it can be a program name with args.
33002 set dummy $ac_prog; ac_word=$2
33003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33004 $as_echo_n "checking for $ac_word... " >&6; }
33005 if ${ac_cv_path_LIPO+:} false; then :
33006   $as_echo_n "(cached) " >&6
33007 else
33008   case $LIPO in
33009   [\\/]* | ?:[\\/]*)
33010   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33011   ;;
33012   *)
33013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33014 for as_dir in $PATH
33015 do
33016   IFS=$as_save_IFS
33017   test -z "$as_dir" && as_dir=.
33018     for ac_exec_ext in '' $ac_executable_extensions; do
33019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33020     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33022     break 2
33023   fi
33024 done
33025   done
33026 IFS=$as_save_IFS
33027 
33028   ;;
33029 esac
33030 fi
33031 LIPO=$ac_cv_path_LIPO
33032 if test -n "$LIPO"; then
33033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33034 $as_echo "$LIPO" >&6; }
33035 else
33036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33037 $as_echo "no" >&6; }
33038 fi
33039 
33040 
33041   test -n "$LIPO" && break
33042 done
33043 
33044     else
33045       # If it succeeded, then it was overridden by the user. We will use it
33046       # for the tool.
33047 
33048       # First remove it from the list of overridden variables, so we can test
33049       # for unknown variables in the end.
33050       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33051 
33052       # Check if the provided tool contains a complete path.
33053       tool_specified="$LIPO"
33054       tool_basename="${tool_specified##*/}"
33055       if test "x$tool_basename" = "x$tool_specified"; then
33056         # A command without a complete path is provided, search $PATH.
33057         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33058 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33059         # Extract the first word of "$tool_basename", so it can be a program name with args.
33060 set dummy $tool_basename; ac_word=$2
33061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33062 $as_echo_n "checking for $ac_word... " >&6; }
33063 if ${ac_cv_path_LIPO+:} false; then :
33064   $as_echo_n "(cached) " >&6
33065 else
33066   case $LIPO in
33067   [\\/]* | ?:[\\/]*)
33068   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33069   ;;
33070   *)
33071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33072 for as_dir in $PATH
33073 do
33074   IFS=$as_save_IFS
33075   test -z "$as_dir" && as_dir=.
33076     for ac_exec_ext in '' $ac_executable_extensions; do
33077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33078     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33080     break 2
33081   fi
33082 done
33083   done
33084 IFS=$as_save_IFS
33085 
33086   ;;
33087 esac
33088 fi
33089 LIPO=$ac_cv_path_LIPO
33090 if test -n "$LIPO"; then
33091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33092 $as_echo "$LIPO" >&6; }
33093 else
33094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33095 $as_echo "no" >&6; }
33096 fi
33097 
33098 
33099         if test "x$LIPO" = x; then
33100           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33101         fi
33102       else
33103         # Otherwise we believe it is a complete path. Use it as it is.
33104         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33105 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33106         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33107 $as_echo_n "checking for LIPO... " >&6; }
33108         if test ! -x "$tool_specified"; then
33109           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33110 $as_echo "not found" >&6; }
33111           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33112         fi
33113         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33114 $as_echo "$tool_specified" >&6; }
33115       fi
33116     fi
33117   fi
33118 
33119 
33120 
33121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33122 
33123   # First separate the path from the arguments. This will split at the first
33124   # space.
33125   complete="$LIPO"
33126   path="${complete%% *}"
33127   tmp="$complete EOL"
33128   arguments="${tmp#* }"
33129 
33130   # Input might be given as Windows format, start by converting to
33131   # unix format.
33132   new_path=`$CYGPATH -u "$path"`
33133 
33134   # Now try to locate executable using which
33135   new_path=`$WHICH "$new_path" 2> /dev/null`
33136   # bat and cmd files are not always considered executable in cygwin causing which
33137   # to not find them
33138   if test "x$new_path" = x \
33139       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33140       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33141     new_path=`$CYGPATH -u "$path"`
33142   fi
33143   if test "x$new_path" = x; then
33144     # Oops. Which didn't find the executable.
33145     # The splitting of arguments from the executable at a space might have been incorrect,
33146     # since paths with space are more likely in Windows. Give it another try with the whole
33147     # argument.
33148     path="$complete"
33149     arguments="EOL"
33150     new_path=`$CYGPATH -u "$path"`
33151     new_path=`$WHICH "$new_path" 2> /dev/null`
33152     # bat and cmd files are not always considered executable in cygwin causing which
33153     # to not find them
33154     if test "x$new_path" = x \
33155         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33156         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33157       new_path=`$CYGPATH -u "$path"`
33158     fi
33159     if test "x$new_path" = x; then
33160       # It's still not found. Now this is an unrecoverable error.
33161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33162 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33163       has_space=`$ECHO "$complete" | $GREP " "`
33164       if test "x$has_space" != x; then
33165         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33166 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33167       fi
33168       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33169     fi
33170   fi
33171 
33172   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33173   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33174   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33175   # "foo.exe" is OK but "foo" is an error.
33176   #
33177   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33178   # It is also a way to make sure we got the proper file name for the real test later on.
33179   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33180   if test "x$test_shortpath" = x; then
33181     # Short path failed, file does not exist as specified.
33182     # Try adding .exe or .cmd
33183     if test -f "${new_path}.exe"; then
33184       input_to_shortpath="${new_path}.exe"
33185     elif test -f "${new_path}.cmd"; then
33186       input_to_shortpath="${new_path}.cmd"
33187     else
33188       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33189 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33190       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33191 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33192       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33193     fi
33194   else
33195     input_to_shortpath="$new_path"
33196   fi
33197 
33198   # Call helper function which possibly converts this using DOS-style short mode.
33199   # If so, the updated path is stored in $new_path.
33200   new_path="$input_to_shortpath"
33201 
33202   input_path="$input_to_shortpath"
33203   # Check if we need to convert this using DOS-style short mode. If the path
33204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33205   # take no chances and rewrite it.
33206   # Note: m4 eats our [], so we need to use [ and ] instead.
33207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33208   if test "x$has_forbidden_chars" != x; then
33209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33210     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33211     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33212     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33213       # Going to short mode and back again did indeed matter. Since short mode is
33214       # case insensitive, let's make it lowercase to improve readability.
33215       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33216       # Now convert it back to Unix-style (cygpath)
33217       input_path=`$CYGPATH -u "$shortmode_path"`
33218       new_path="$input_path"
33219     fi
33220   fi
33221 
33222   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33223   if test "x$test_cygdrive_prefix" = x; then
33224     # As a simple fix, exclude /usr/bin since it's not a real path.
33225     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33226       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33227       # a path prefixed by /cygdrive for fixpath to work.
33228       new_path="$CYGWIN_ROOT_PATH$input_path"
33229     fi
33230   fi
33231 
33232   # remove trailing .exe if any
33233   new_path="${new_path/%.exe/}"
33234 
33235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33236 
33237   # First separate the path from the arguments. This will split at the first
33238   # space.
33239   complete="$LIPO"
33240   path="${complete%% *}"
33241   tmp="$complete EOL"
33242   arguments="${tmp#* }"
33243 
33244   # Input might be given as Windows format, start by converting to
33245   # unix format.
33246   new_path="$path"
33247 
33248   windows_path="$new_path"
33249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33250     unix_path=`$CYGPATH -u "$windows_path"`
33251     new_path="$unix_path"
33252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33254     new_path="$unix_path"
33255   fi
33256 
33257 
33258   # Now try to locate executable using which
33259   new_path=`$WHICH "$new_path" 2> /dev/null`
33260 
33261   if test "x$new_path" = x; then
33262     # Oops. Which didn't find the executable.
33263     # The splitting of arguments from the executable at a space might have been incorrect,
33264     # since paths with space are more likely in Windows. Give it another try with the whole
33265     # argument.
33266     path="$complete"
33267     arguments="EOL"
33268     new_path="$path"
33269 
33270   windows_path="$new_path"
33271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33272     unix_path=`$CYGPATH -u "$windows_path"`
33273     new_path="$unix_path"
33274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33276     new_path="$unix_path"
33277   fi
33278 
33279 
33280     new_path=`$WHICH "$new_path" 2> /dev/null`
33281     # bat and cmd files are not always considered executable in MSYS causing which
33282     # to not find them
33283     if test "x$new_path" = x \
33284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33286       new_path="$path"
33287 
33288   windows_path="$new_path"
33289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33290     unix_path=`$CYGPATH -u "$windows_path"`
33291     new_path="$unix_path"
33292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33294     new_path="$unix_path"
33295   fi
33296 
33297     fi
33298 
33299     if test "x$new_path" = x; then
33300       # It's still not found. Now this is an unrecoverable error.
33301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33302 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33303       has_space=`$ECHO "$complete" | $GREP " "`
33304       if test "x$has_space" != x; then
33305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33307       fi
33308       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33309     fi
33310   fi
33311 
33312   # Now new_path has a complete unix path to the binary
33313   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33314     # Keep paths in /bin as-is, but remove trailing .exe if any
33315     new_path="${new_path/%.exe/}"
33316     # Do not save /bin paths to all_fixpath_prefixes!
33317   else
33318     # Not in mixed or Windows style, start by that.
33319     new_path=`cmd //c echo $new_path`
33320 
33321   input_path="$new_path"
33322   # Check if we need to convert this using DOS-style short mode. If the path
33323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33324   # take no chances and rewrite it.
33325   # Note: m4 eats our [], so we need to use [ and ] instead.
33326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33327   if test "x$has_forbidden_chars" != x; then
33328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33330   fi
33331 
33332     # Output is in $new_path
33333 
33334   windows_path="$new_path"
33335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33336     unix_path=`$CYGPATH -u "$windows_path"`
33337     new_path="$unix_path"
33338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33340     new_path="$unix_path"
33341   fi
33342 
33343     # remove trailing .exe if any
33344     new_path="${new_path/%.exe/}"
33345 
33346     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33347     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33348   fi
33349 
33350   else
33351     # We're on a posix platform. Hooray! :)
33352     # First separate the path from the arguments. This will split at the first
33353     # space.
33354     complete="$LIPO"
33355     path="${complete%% *}"
33356     tmp="$complete EOL"
33357     arguments="${tmp#* }"
33358 
33359     # Cannot rely on the command "which" here since it doesn't always work.
33360     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33361     if test -z "$is_absolute_path"; then
33362       # Path to executable is not absolute. Find it.
33363       IFS_save="$IFS"
33364       IFS=:
33365       for p in $PATH; do
33366         if test -f "$p/$path" && test -x "$p/$path"; then
33367           new_path="$p/$path"
33368           break
33369         fi
33370       done
33371       IFS="$IFS_save"
33372     else
33373       # This is an absolute path, we can use it without further modifications.
33374       new_path="$path"
33375     fi
33376 
33377     if test "x$new_path" = x; then
33378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33379 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33380       has_space=`$ECHO "$complete" | $GREP " "`
33381       if test "x$has_space" != x; then
33382         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33383 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33384       fi
33385       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33386     fi
33387   fi
33388 
33389   # Now join together the path and the arguments once again
33390   if test "x$arguments" != xEOL; then
33391     new_complete="$new_path ${arguments% *}"
33392   else
33393     new_complete="$new_path"
33394   fi
33395 
33396   if test "x$complete" != "x$new_complete"; then
33397     LIPO="$new_complete"
33398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33399 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33400   fi
33401 
33402   else
33403     OBJC=
33404   fi
33405 
33406   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33407     # Extract the first word of "mt", so it can be a program name with args.
33408 set dummy mt; ac_word=$2
33409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33410 $as_echo_n "checking for $ac_word... " >&6; }
33411 if ${ac_cv_prog_MT+:} false; then :
33412   $as_echo_n "(cached) " >&6
33413 else
33414   if test -n "$MT"; then
33415   ac_cv_prog_MT="$MT" # Let the user override the test.
33416 else
33417   ac_prog_rejected=no
33418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33419 for as_dir in $PATH
33420 do
33421   IFS=$as_save_IFS
33422   test -z "$as_dir" && as_dir=.
33423     for ac_exec_ext in '' $ac_executable_extensions; do
33424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33425     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33426        ac_prog_rejected=yes
33427        continue
33428      fi
33429     ac_cv_prog_MT="mt"
33430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33431     break 2
33432   fi
33433 done
33434   done
33435 IFS=$as_save_IFS
33436 
33437 if test $ac_prog_rejected = yes; then
33438   # We found a bogon in the path, so make sure we never use it.
33439   set dummy $ac_cv_prog_MT
33440   shift
33441   if test $# != 0; then
33442     # We chose a different compiler from the bogus one.
33443     # However, it has the same basename, so the bogon will be chosen
33444     # first if we set MT to just the basename; use the full file name.
33445     shift
33446     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33447   fi
33448 fi
33449 fi
33450 fi
33451 MT=$ac_cv_prog_MT
33452 if test -n "$MT"; then
33453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33454 $as_echo "$MT" >&6; }
33455 else
33456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33457 $as_echo "no" >&6; }
33458 fi
33459 
33460 
33461 
33462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33463 
33464   # First separate the path from the arguments. This will split at the first
33465   # space.
33466   complete="$MT"
33467   path="${complete%% *}"
33468   tmp="$complete EOL"
33469   arguments="${tmp#* }"
33470 
33471   # Input might be given as Windows format, start by converting to
33472   # unix format.
33473   new_path=`$CYGPATH -u "$path"`
33474 
33475   # Now try to locate executable using which
33476   new_path=`$WHICH "$new_path" 2> /dev/null`
33477   # bat and cmd files are not always considered executable in cygwin causing which
33478   # to not find them
33479   if test "x$new_path" = x \
33480       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33481       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33482     new_path=`$CYGPATH -u "$path"`
33483   fi
33484   if test "x$new_path" = x; then
33485     # Oops. Which didn't find the executable.
33486     # The splitting of arguments from the executable at a space might have been incorrect,
33487     # since paths with space are more likely in Windows. Give it another try with the whole
33488     # argument.
33489     path="$complete"
33490     arguments="EOL"
33491     new_path=`$CYGPATH -u "$path"`
33492     new_path=`$WHICH "$new_path" 2> /dev/null`
33493     # bat and cmd files are not always considered executable in cygwin causing which
33494     # to not find them
33495     if test "x$new_path" = x \
33496         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33497         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33498       new_path=`$CYGPATH -u "$path"`
33499     fi
33500     if test "x$new_path" = x; then
33501       # It's still not found. Now this is an unrecoverable error.
33502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33503 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33504       has_space=`$ECHO "$complete" | $GREP " "`
33505       if test "x$has_space" != x; then
33506         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33507 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33508       fi
33509       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33510     fi
33511   fi
33512 
33513   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33514   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33515   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33516   # "foo.exe" is OK but "foo" is an error.
33517   #
33518   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33519   # It is also a way to make sure we got the proper file name for the real test later on.
33520   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33521   if test "x$test_shortpath" = x; then
33522     # Short path failed, file does not exist as specified.
33523     # Try adding .exe or .cmd
33524     if test -f "${new_path}.exe"; then
33525       input_to_shortpath="${new_path}.exe"
33526     elif test -f "${new_path}.cmd"; then
33527       input_to_shortpath="${new_path}.cmd"
33528     else
33529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33530 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33531       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33532 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33533       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33534     fi
33535   else
33536     input_to_shortpath="$new_path"
33537   fi
33538 
33539   # Call helper function which possibly converts this using DOS-style short mode.
33540   # If so, the updated path is stored in $new_path.
33541   new_path="$input_to_shortpath"
33542 
33543   input_path="$input_to_shortpath"
33544   # Check if we need to convert this using DOS-style short mode. If the path
33545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33546   # take no chances and rewrite it.
33547   # Note: m4 eats our [], so we need to use [ and ] instead.
33548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33549   if test "x$has_forbidden_chars" != x; then
33550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33551     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33554       # Going to short mode and back again did indeed matter. Since short mode is
33555       # case insensitive, let's make it lowercase to improve readability.
33556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33557       # Now convert it back to Unix-style (cygpath)
33558       input_path=`$CYGPATH -u "$shortmode_path"`
33559       new_path="$input_path"
33560     fi
33561   fi
33562 
33563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33564   if test "x$test_cygdrive_prefix" = x; then
33565     # As a simple fix, exclude /usr/bin since it's not a real path.
33566     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33568       # a path prefixed by /cygdrive for fixpath to work.
33569       new_path="$CYGWIN_ROOT_PATH$input_path"
33570     fi
33571   fi
33572 
33573   # remove trailing .exe if any
33574   new_path="${new_path/%.exe/}"
33575 
33576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33577 
33578   # First separate the path from the arguments. This will split at the first
33579   # space.
33580   complete="$MT"
33581   path="${complete%% *}"
33582   tmp="$complete EOL"
33583   arguments="${tmp#* }"
33584 
33585   # Input might be given as Windows format, start by converting to
33586   # unix format.
33587   new_path="$path"
33588 
33589   windows_path="$new_path"
33590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33591     unix_path=`$CYGPATH -u "$windows_path"`
33592     new_path="$unix_path"
33593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33595     new_path="$unix_path"
33596   fi
33597 
33598 
33599   # Now try to locate executable using which
33600   new_path=`$WHICH "$new_path" 2> /dev/null`
33601 
33602   if test "x$new_path" = x; then
33603     # Oops. Which didn't find the executable.
33604     # The splitting of arguments from the executable at a space might have been incorrect,
33605     # since paths with space are more likely in Windows. Give it another try with the whole
33606     # argument.
33607     path="$complete"
33608     arguments="EOL"
33609     new_path="$path"
33610 
33611   windows_path="$new_path"
33612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33613     unix_path=`$CYGPATH -u "$windows_path"`
33614     new_path="$unix_path"
33615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33617     new_path="$unix_path"
33618   fi
33619 
33620 
33621     new_path=`$WHICH "$new_path" 2> /dev/null`
33622     # bat and cmd files are not always considered executable in MSYS causing which
33623     # to not find them
33624     if test "x$new_path" = x \
33625         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33626         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33627       new_path="$path"
33628 
33629   windows_path="$new_path"
33630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33631     unix_path=`$CYGPATH -u "$windows_path"`
33632     new_path="$unix_path"
33633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33635     new_path="$unix_path"
33636   fi
33637 
33638     fi
33639 
33640     if test "x$new_path" = x; then
33641       # It's still not found. Now this is an unrecoverable error.
33642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33643 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33644       has_space=`$ECHO "$complete" | $GREP " "`
33645       if test "x$has_space" != x; then
33646         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33647 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33648       fi
33649       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33650     fi
33651   fi
33652 
33653   # Now new_path has a complete unix path to the binary
33654   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33655     # Keep paths in /bin as-is, but remove trailing .exe if any
33656     new_path="${new_path/%.exe/}"
33657     # Do not save /bin paths to all_fixpath_prefixes!
33658   else
33659     # Not in mixed or Windows style, start by that.
33660     new_path=`cmd //c echo $new_path`
33661 
33662   input_path="$new_path"
33663   # Check if we need to convert this using DOS-style short mode. If the path
33664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33665   # take no chances and rewrite it.
33666   # Note: m4 eats our [], so we need to use [ and ] instead.
33667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33668   if test "x$has_forbidden_chars" != x; then
33669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33671   fi
33672 
33673     # Output is in $new_path
33674 
33675   windows_path="$new_path"
33676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33677     unix_path=`$CYGPATH -u "$windows_path"`
33678     new_path="$unix_path"
33679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33681     new_path="$unix_path"
33682   fi
33683 
33684     # remove trailing .exe if any
33685     new_path="${new_path/%.exe/}"
33686 
33687     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33688     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33689   fi
33690 
33691   else
33692     # We're on a posix platform. Hooray! :)
33693     # First separate the path from the arguments. This will split at the first
33694     # space.
33695     complete="$MT"
33696     path="${complete%% *}"
33697     tmp="$complete EOL"
33698     arguments="${tmp#* }"
33699 
33700     # Cannot rely on the command "which" here since it doesn't always work.
33701     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33702     if test -z "$is_absolute_path"; then
33703       # Path to executable is not absolute. Find it.
33704       IFS_save="$IFS"
33705       IFS=:
33706       for p in $PATH; do
33707         if test -f "$p/$path" && test -x "$p/$path"; then
33708           new_path="$p/$path"
33709           break
33710         fi
33711       done
33712       IFS="$IFS_save"
33713     else
33714       # This is an absolute path, we can use it without further modifications.
33715       new_path="$path"
33716     fi
33717 
33718     if test "x$new_path" = x; then
33719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33720 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33721       has_space=`$ECHO "$complete" | $GREP " "`
33722       if test "x$has_space" != x; then
33723         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33724 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33725       fi
33726       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33727     fi
33728   fi
33729 
33730   # Now join together the path and the arguments once again
33731   if test "x$arguments" != xEOL; then
33732     new_complete="$new_path ${arguments% *}"
33733   else
33734     new_complete="$new_path"
33735   fi
33736 
33737   if test "x$complete" != "x$new_complete"; then
33738     MT="$new_complete"
33739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33740 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33741   fi
33742 
33743     # Setup the resource compiler (RC)
33744     # Extract the first word of "rc", so it can be a program name with args.
33745 set dummy rc; ac_word=$2
33746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747 $as_echo_n "checking for $ac_word... " >&6; }
33748 if ${ac_cv_prog_RC+:} false; then :
33749   $as_echo_n "(cached) " >&6
33750 else
33751   if test -n "$RC"; then
33752   ac_cv_prog_RC="$RC" # Let the user override the test.
33753 else
33754   ac_prog_rejected=no
33755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33756 for as_dir in $PATH
33757 do
33758   IFS=$as_save_IFS
33759   test -z "$as_dir" && as_dir=.
33760     for ac_exec_ext in '' $ac_executable_extensions; do
33761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33762     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33763        ac_prog_rejected=yes
33764        continue
33765      fi
33766     ac_cv_prog_RC="rc"
33767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33768     break 2
33769   fi
33770 done
33771   done
33772 IFS=$as_save_IFS
33773 
33774 if test $ac_prog_rejected = yes; then
33775   # We found a bogon in the path, so make sure we never use it.
33776   set dummy $ac_cv_prog_RC
33777   shift
33778   if test $# != 0; then
33779     # We chose a different compiler from the bogus one.
33780     # However, it has the same basename, so the bogon will be chosen
33781     # first if we set RC to just the basename; use the full file name.
33782     shift
33783     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33784   fi
33785 fi
33786 fi
33787 fi
33788 RC=$ac_cv_prog_RC
33789 if test -n "$RC"; then
33790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
33791 $as_echo "$RC" >&6; }
33792 else
33793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33794 $as_echo "no" >&6; }
33795 fi
33796 
33797 
33798 
33799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33800 
33801   # First separate the path from the arguments. This will split at the first
33802   # space.
33803   complete="$RC"
33804   path="${complete%% *}"
33805   tmp="$complete EOL"
33806   arguments="${tmp#* }"
33807 
33808   # Input might be given as Windows format, start by converting to
33809   # unix format.
33810   new_path=`$CYGPATH -u "$path"`
33811 
33812   # Now try to locate executable using which
33813   new_path=`$WHICH "$new_path" 2> /dev/null`
33814   # bat and cmd files are not always considered executable in cygwin causing which
33815   # to not find them
33816   if test "x$new_path" = x \
33817       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33818       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33819     new_path=`$CYGPATH -u "$path"`
33820   fi
33821   if test "x$new_path" = x; then
33822     # Oops. Which didn't find the executable.
33823     # The splitting of arguments from the executable at a space might have been incorrect,
33824     # since paths with space are more likely in Windows. Give it another try with the whole
33825     # argument.
33826     path="$complete"
33827     arguments="EOL"
33828     new_path=`$CYGPATH -u "$path"`
33829     new_path=`$WHICH "$new_path" 2> /dev/null`
33830     # bat and cmd files are not always considered executable in cygwin causing which
33831     # to not find them
33832     if test "x$new_path" = x \
33833         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33834         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33835       new_path=`$CYGPATH -u "$path"`
33836     fi
33837     if test "x$new_path" = x; then
33838       # It's still not found. Now this is an unrecoverable error.
33839       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33840 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33841       has_space=`$ECHO "$complete" | $GREP " "`
33842       if test "x$has_space" != x; then
33843         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33844 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33845       fi
33846       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33847     fi
33848   fi
33849 
33850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33853   # "foo.exe" is OK but "foo" is an error.
33854   #
33855   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33856   # It is also a way to make sure we got the proper file name for the real test later on.
33857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33858   if test "x$test_shortpath" = x; then
33859     # Short path failed, file does not exist as specified.
33860     # Try adding .exe or .cmd
33861     if test -f "${new_path}.exe"; then
33862       input_to_shortpath="${new_path}.exe"
33863     elif test -f "${new_path}.cmd"; then
33864       input_to_shortpath="${new_path}.cmd"
33865     else
33866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
33867 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
33868       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33869 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33870       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33871     fi
33872   else
33873     input_to_shortpath="$new_path"
33874   fi
33875 
33876   # Call helper function which possibly converts this using DOS-style short mode.
33877   # If so, the updated path is stored in $new_path.
33878   new_path="$input_to_shortpath"
33879 
33880   input_path="$input_to_shortpath"
33881   # Check if we need to convert this using DOS-style short mode. If the path
33882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33883   # take no chances and rewrite it.
33884   # Note: m4 eats our [], so we need to use [ and ] instead.
33885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33886   if test "x$has_forbidden_chars" != x; then
33887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33891       # Going to short mode and back again did indeed matter. Since short mode is
33892       # case insensitive, let's make it lowercase to improve readability.
33893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33894       # Now convert it back to Unix-style (cygpath)
33895       input_path=`$CYGPATH -u "$shortmode_path"`
33896       new_path="$input_path"
33897     fi
33898   fi
33899 
33900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33901   if test "x$test_cygdrive_prefix" = x; then
33902     # As a simple fix, exclude /usr/bin since it's not a real path.
33903     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33905       # a path prefixed by /cygdrive for fixpath to work.
33906       new_path="$CYGWIN_ROOT_PATH$input_path"
33907     fi
33908   fi
33909 
33910   # remove trailing .exe if any
33911   new_path="${new_path/%.exe/}"
33912 
33913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33914 
33915   # First separate the path from the arguments. This will split at the first
33916   # space.
33917   complete="$RC"
33918   path="${complete%% *}"
33919   tmp="$complete EOL"
33920   arguments="${tmp#* }"
33921 
33922   # Input might be given as Windows format, start by converting to
33923   # unix format.
33924   new_path="$path"
33925 
33926   windows_path="$new_path"
33927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33928     unix_path=`$CYGPATH -u "$windows_path"`
33929     new_path="$unix_path"
33930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33932     new_path="$unix_path"
33933   fi
33934 
33935 
33936   # Now try to locate executable using which
33937   new_path=`$WHICH "$new_path" 2> /dev/null`
33938 
33939   if test "x$new_path" = x; then
33940     # Oops. Which didn't find the executable.
33941     # The splitting of arguments from the executable at a space might have been incorrect,
33942     # since paths with space are more likely in Windows. Give it another try with the whole
33943     # argument.
33944     path="$complete"
33945     arguments="EOL"
33946     new_path="$path"
33947 
33948   windows_path="$new_path"
33949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33950     unix_path=`$CYGPATH -u "$windows_path"`
33951     new_path="$unix_path"
33952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33954     new_path="$unix_path"
33955   fi
33956 
33957 
33958     new_path=`$WHICH "$new_path" 2> /dev/null`
33959     # bat and cmd files are not always considered executable in MSYS causing which
33960     # to not find them
33961     if test "x$new_path" = x \
33962         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33963         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33964       new_path="$path"
33965 
33966   windows_path="$new_path"
33967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33968     unix_path=`$CYGPATH -u "$windows_path"`
33969     new_path="$unix_path"
33970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33972     new_path="$unix_path"
33973   fi
33974 
33975     fi
33976 
33977     if test "x$new_path" = x; then
33978       # It's still not found. Now this is an unrecoverable error.
33979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33980 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33981       has_space=`$ECHO "$complete" | $GREP " "`
33982       if test "x$has_space" != x; then
33983         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33984 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33985       fi
33986       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33987     fi
33988   fi
33989 
33990   # Now new_path has a complete unix path to the binary
33991   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33992     # Keep paths in /bin as-is, but remove trailing .exe if any
33993     new_path="${new_path/%.exe/}"
33994     # Do not save /bin paths to all_fixpath_prefixes!
33995   else
33996     # Not in mixed or Windows style, start by that.
33997     new_path=`cmd //c echo $new_path`
33998 
33999   input_path="$new_path"
34000   # Check if we need to convert this using DOS-style short mode. If the path
34001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34002   # take no chances and rewrite it.
34003   # Note: m4 eats our [], so we need to use [ and ] instead.
34004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34005   if test "x$has_forbidden_chars" != x; then
34006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34008   fi
34009 
34010     # Output is in $new_path
34011 
34012   windows_path="$new_path"
34013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34014     unix_path=`$CYGPATH -u "$windows_path"`
34015     new_path="$unix_path"
34016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34018     new_path="$unix_path"
34019   fi
34020 
34021     # remove trailing .exe if any
34022     new_path="${new_path/%.exe/}"
34023 
34024     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34025     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34026   fi
34027 
34028   else
34029     # We're on a posix platform. Hooray! :)
34030     # First separate the path from the arguments. This will split at the first
34031     # space.
34032     complete="$RC"
34033     path="${complete%% *}"
34034     tmp="$complete EOL"
34035     arguments="${tmp#* }"
34036 
34037     # Cannot rely on the command "which" here since it doesn't always work.
34038     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34039     if test -z "$is_absolute_path"; then
34040       # Path to executable is not absolute. Find it.
34041       IFS_save="$IFS"
34042       IFS=:
34043       for p in $PATH; do
34044         if test -f "$p/$path" && test -x "$p/$path"; then
34045           new_path="$p/$path"
34046           break
34047         fi
34048       done
34049       IFS="$IFS_save"
34050     else
34051       # This is an absolute path, we can use it without further modifications.
34052       new_path="$path"
34053     fi
34054 
34055     if test "x$new_path" = x; then
34056       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34057 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34058       has_space=`$ECHO "$complete" | $GREP " "`
34059       if test "x$has_space" != x; then
34060         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34061 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34062       fi
34063       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34064     fi
34065   fi
34066 
34067   # Now join together the path and the arguments once again
34068   if test "x$arguments" != xEOL; then
34069     new_complete="$new_path ${arguments% *}"
34070   else
34071     new_complete="$new_path"
34072   fi
34073 
34074   if test "x$complete" != "x$new_complete"; then
34075     RC="$new_complete"
34076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34077 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34078   fi
34079 
34080     # Extract the first word of "dumpbin", so it can be a program name with args.
34081 set dummy dumpbin; ac_word=$2
34082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34083 $as_echo_n "checking for $ac_word... " >&6; }
34084 if ${ac_cv_prog_DUMPBIN+:} false; then :
34085   $as_echo_n "(cached) " >&6
34086 else
34087   if test -n "$DUMPBIN"; then
34088   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34089 else
34090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34091 for as_dir in $PATH
34092 do
34093   IFS=$as_save_IFS
34094   test -z "$as_dir" && as_dir=.
34095     for ac_exec_ext in '' $ac_executable_extensions; do
34096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34097     ac_cv_prog_DUMPBIN="dumpbin"
34098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34099     break 2
34100   fi
34101 done
34102   done
34103 IFS=$as_save_IFS
34104 
34105 fi
34106 fi
34107 DUMPBIN=$ac_cv_prog_DUMPBIN
34108 if test -n "$DUMPBIN"; then
34109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34110 $as_echo "$DUMPBIN" >&6; }
34111 else
34112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34113 $as_echo "no" >&6; }
34114 fi
34115 
34116 
34117 
34118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34119 
34120   # First separate the path from the arguments. This will split at the first
34121   # space.
34122   complete="$DUMPBIN"
34123   path="${complete%% *}"
34124   tmp="$complete EOL"
34125   arguments="${tmp#* }"
34126 
34127   # Input might be given as Windows format, start by converting to
34128   # unix format.
34129   new_path=`$CYGPATH -u "$path"`
34130 
34131   # Now try to locate executable using which
34132   new_path=`$WHICH "$new_path" 2> /dev/null`
34133   # bat and cmd files are not always considered executable in cygwin causing which
34134   # to not find them
34135   if test "x$new_path" = x \
34136       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34137       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34138     new_path=`$CYGPATH -u "$path"`
34139   fi
34140   if test "x$new_path" = x; then
34141     # Oops. Which didn't find the executable.
34142     # The splitting of arguments from the executable at a space might have been incorrect,
34143     # since paths with space are more likely in Windows. Give it another try with the whole
34144     # argument.
34145     path="$complete"
34146     arguments="EOL"
34147     new_path=`$CYGPATH -u "$path"`
34148     new_path=`$WHICH "$new_path" 2> /dev/null`
34149     # bat and cmd files are not always considered executable in cygwin causing which
34150     # to not find them
34151     if test "x$new_path" = x \
34152         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34153         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34154       new_path=`$CYGPATH -u "$path"`
34155     fi
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 DUMPBIN, which resolves as \"$complete\", is not found." >&5
34159 $as_echo "$as_me: The path of DUMPBIN, 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 DUMPBIN" "$LINENO" 5
34166     fi
34167   fi
34168 
34169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34172   # "foo.exe" is OK but "foo" is an error.
34173   #
34174   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34175   # It is also a way to make sure we got the proper file name for the real test later on.
34176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34177   if test "x$test_shortpath" = x; then
34178     # Short path failed, file does not exist as specified.
34179     # Try adding .exe or .cmd
34180     if test -f "${new_path}.exe"; then
34181       input_to_shortpath="${new_path}.exe"
34182     elif test -f "${new_path}.cmd"; then
34183       input_to_shortpath="${new_path}.cmd"
34184     else
34185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34186 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34187       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34188 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34189       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34190     fi
34191   else
34192     input_to_shortpath="$new_path"
34193   fi
34194 
34195   # Call helper function which possibly converts this using DOS-style short mode.
34196   # If so, the updated path is stored in $new_path.
34197   new_path="$input_to_shortpath"
34198 
34199   input_path="$input_to_shortpath"
34200   # Check if we need to convert this using DOS-style short mode. If the path
34201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34202   # take no chances and rewrite it.
34203   # Note: m4 eats our [], so we need to use [ and ] instead.
34204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34205   if test "x$has_forbidden_chars" != x; then
34206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34210       # Going to short mode and back again did indeed matter. Since short mode is
34211       # case insensitive, let's make it lowercase to improve readability.
34212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34213       # Now convert it back to Unix-style (cygpath)
34214       input_path=`$CYGPATH -u "$shortmode_path"`
34215       new_path="$input_path"
34216     fi
34217   fi
34218 
34219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34220   if test "x$test_cygdrive_prefix" = x; then
34221     # As a simple fix, exclude /usr/bin since it's not a real path.
34222     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34224       # a path prefixed by /cygdrive for fixpath to work.
34225       new_path="$CYGWIN_ROOT_PATH$input_path"
34226     fi
34227   fi
34228 
34229   # remove trailing .exe if any
34230   new_path="${new_path/%.exe/}"
34231 
34232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34233 
34234   # First separate the path from the arguments. This will split at the first
34235   # space.
34236   complete="$DUMPBIN"
34237   path="${complete%% *}"
34238   tmp="$complete EOL"
34239   arguments="${tmp#* }"
34240 
34241   # Input might be given as Windows format, start by converting to
34242   # unix format.
34243   new_path="$path"
34244 
34245   windows_path="$new_path"
34246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34247     unix_path=`$CYGPATH -u "$windows_path"`
34248     new_path="$unix_path"
34249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34251     new_path="$unix_path"
34252   fi
34253 
34254 
34255   # Now try to locate executable using which
34256   new_path=`$WHICH "$new_path" 2> /dev/null`
34257 
34258   if test "x$new_path" = x; then
34259     # Oops. Which didn't find the executable.
34260     # The splitting of arguments from the executable at a space might have been incorrect,
34261     # since paths with space are more likely in Windows. Give it another try with the whole
34262     # argument.
34263     path="$complete"
34264     arguments="EOL"
34265     new_path="$path"
34266 
34267   windows_path="$new_path"
34268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34269     unix_path=`$CYGPATH -u "$windows_path"`
34270     new_path="$unix_path"
34271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34273     new_path="$unix_path"
34274   fi
34275 
34276 
34277     new_path=`$WHICH "$new_path" 2> /dev/null`
34278     # bat and cmd files are not always considered executable in MSYS causing which
34279     # to not find them
34280     if test "x$new_path" = x \
34281         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34282         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34283       new_path="$path"
34284 
34285   windows_path="$new_path"
34286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34287     unix_path=`$CYGPATH -u "$windows_path"`
34288     new_path="$unix_path"
34289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34291     new_path="$unix_path"
34292   fi
34293 
34294     fi
34295 
34296     if test "x$new_path" = x; then
34297       # It's still not found. Now this is an unrecoverable error.
34298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34299 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34300       has_space=`$ECHO "$complete" | $GREP " "`
34301       if test "x$has_space" != x; then
34302         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34303 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34304       fi
34305       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34306     fi
34307   fi
34308 
34309   # Now new_path has a complete unix path to the binary
34310   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34311     # Keep paths in /bin as-is, but remove trailing .exe if any
34312     new_path="${new_path/%.exe/}"
34313     # Do not save /bin paths to all_fixpath_prefixes!
34314   else
34315     # Not in mixed or Windows style, start by that.
34316     new_path=`cmd //c echo $new_path`
34317 
34318   input_path="$new_path"
34319   # Check if we need to convert this using DOS-style short mode. If the path
34320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34321   # take no chances and rewrite it.
34322   # Note: m4 eats our [], so we need to use [ and ] instead.
34323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34324   if test "x$has_forbidden_chars" != x; then
34325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34327   fi
34328 
34329     # Output is in $new_path
34330 
34331   windows_path="$new_path"
34332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34333     unix_path=`$CYGPATH -u "$windows_path"`
34334     new_path="$unix_path"
34335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34337     new_path="$unix_path"
34338   fi
34339 
34340     # remove trailing .exe if any
34341     new_path="${new_path/%.exe/}"
34342 
34343     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34344     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34345   fi
34346 
34347   else
34348     # We're on a posix platform. Hooray! :)
34349     # First separate the path from the arguments. This will split at the first
34350     # space.
34351     complete="$DUMPBIN"
34352     path="${complete%% *}"
34353     tmp="$complete EOL"
34354     arguments="${tmp#* }"
34355 
34356     # Cannot rely on the command "which" here since it doesn't always work.
34357     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34358     if test -z "$is_absolute_path"; then
34359       # Path to executable is not absolute. Find it.
34360       IFS_save="$IFS"
34361       IFS=:
34362       for p in $PATH; do
34363         if test -f "$p/$path" && test -x "$p/$path"; then
34364           new_path="$p/$path"
34365           break
34366         fi
34367       done
34368       IFS="$IFS_save"
34369     else
34370       # This is an absolute path, we can use it without further modifications.
34371       new_path="$path"
34372     fi
34373 
34374     if test "x$new_path" = x; then
34375       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34376 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34377       has_space=`$ECHO "$complete" | $GREP " "`
34378       if test "x$has_space" != x; then
34379         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34380 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34381       fi
34382       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34383     fi
34384   fi
34385 
34386   # Now join together the path and the arguments once again
34387   if test "x$arguments" != xEOL; then
34388     new_complete="$new_path ${arguments% *}"
34389   else
34390     new_complete="$new_path"
34391   fi
34392 
34393   if test "x$complete" != "x$new_complete"; then
34394     DUMPBIN="$new_complete"
34395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34396 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34397   fi
34398 
34399     # We need to check for 'msbuild.exe' because at the place where we expect to
34400     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34401     # won't find the 'msbuild.exe' executable in that case (and the
34402     # 'ac_executable_extensions' is unusable due to performance reasons).
34403     # Notice that we intentionally don't fix up the path to MSBUILD because we
34404     # will call it in a DOS shell during freetype detection on Windows (see
34405     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34406     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34407 set dummy msbuild.exe; ac_word=$2
34408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34409 $as_echo_n "checking for $ac_word... " >&6; }
34410 if ${ac_cv_prog_MSBUILD+:} false; then :
34411   $as_echo_n "(cached) " >&6
34412 else
34413   if test -n "$MSBUILD"; then
34414   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34415 else
34416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34417 for as_dir in $PATH
34418 do
34419   IFS=$as_save_IFS
34420   test -z "$as_dir" && as_dir=.
34421     for ac_exec_ext in '' $ac_executable_extensions; do
34422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34423     ac_cv_prog_MSBUILD="msbuild.exe"
34424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34425     break 2
34426   fi
34427 done
34428   done
34429 IFS=$as_save_IFS
34430 
34431 fi
34432 fi
34433 MSBUILD=$ac_cv_prog_MSBUILD
34434 if test -n "$MSBUILD"; then
34435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34436 $as_echo "$MSBUILD" >&6; }
34437 else
34438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34439 $as_echo "no" >&6; }
34440 fi
34441 
34442 
34443   fi
34444 
34445   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34446 
34447 
34448   # Publish this variable in the help.
34449 
34450 
34451   if test "x$STRIP" = x; then
34452     # The variable is not set by user, try to locate tool using the code snippet
34453     for ac_prog in strip
34454 do
34455   # Extract the first word of "$ac_prog", so it can be a program name with args.
34456 set dummy $ac_prog; ac_word=$2
34457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34458 $as_echo_n "checking for $ac_word... " >&6; }
34459 if ${ac_cv_path_STRIP+:} false; then :
34460   $as_echo_n "(cached) " >&6
34461 else
34462   case $STRIP in
34463   [\\/]* | ?:[\\/]*)
34464   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34465   ;;
34466   *)
34467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34468 for as_dir in $PATH
34469 do
34470   IFS=$as_save_IFS
34471   test -z "$as_dir" && as_dir=.
34472     for ac_exec_ext in '' $ac_executable_extensions; do
34473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34474     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34476     break 2
34477   fi
34478 done
34479   done
34480 IFS=$as_save_IFS
34481 
34482   ;;
34483 esac
34484 fi
34485 STRIP=$ac_cv_path_STRIP
34486 if test -n "$STRIP"; then
34487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34488 $as_echo "$STRIP" >&6; }
34489 else
34490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34491 $as_echo "no" >&6; }
34492 fi
34493 
34494 
34495   test -n "$STRIP" && break
34496 done
34497 
34498   else
34499     # The variable is set, but is it from the command line or the environment?
34500 
34501     # Try to remove the string !STRIP! from our list.
34502     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34503     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34504       # If it failed, the variable was not from the command line. Ignore it,
34505       # but warn the user (except for BASH, which is always set by the calling BASH).
34506       if test "xSTRIP" != xBASH; then
34507         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34508 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34509       fi
34510       # Try to locate tool using the code snippet
34511       for ac_prog in strip
34512 do
34513   # Extract the first word of "$ac_prog", so it can be a program name with args.
34514 set dummy $ac_prog; ac_word=$2
34515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34516 $as_echo_n "checking for $ac_word... " >&6; }
34517 if ${ac_cv_path_STRIP+:} false; then :
34518   $as_echo_n "(cached) " >&6
34519 else
34520   case $STRIP in
34521   [\\/]* | ?:[\\/]*)
34522   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34523   ;;
34524   *)
34525   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34526 for as_dir in $PATH
34527 do
34528   IFS=$as_save_IFS
34529   test -z "$as_dir" && as_dir=.
34530     for ac_exec_ext in '' $ac_executable_extensions; do
34531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34532     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34534     break 2
34535   fi
34536 done
34537   done
34538 IFS=$as_save_IFS
34539 
34540   ;;
34541 esac
34542 fi
34543 STRIP=$ac_cv_path_STRIP
34544 if test -n "$STRIP"; then
34545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34546 $as_echo "$STRIP" >&6; }
34547 else
34548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34549 $as_echo "no" >&6; }
34550 fi
34551 
34552 
34553   test -n "$STRIP" && break
34554 done
34555 
34556     else
34557       # If it succeeded, then it was overridden by the user. We will use it
34558       # for the tool.
34559 
34560       # First remove it from the list of overridden variables, so we can test
34561       # for unknown variables in the end.
34562       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34563 
34564       # Check if the provided tool contains a complete path.
34565       tool_specified="$STRIP"
34566       tool_basename="${tool_specified##*/}"
34567       if test "x$tool_basename" = "x$tool_specified"; then
34568         # A command without a complete path is provided, search $PATH.
34569         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34570 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34571         # Extract the first word of "$tool_basename", so it can be a program name with args.
34572 set dummy $tool_basename; ac_word=$2
34573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34574 $as_echo_n "checking for $ac_word... " >&6; }
34575 if ${ac_cv_path_STRIP+:} false; then :
34576   $as_echo_n "(cached) " >&6
34577 else
34578   case $STRIP in
34579   [\\/]* | ?:[\\/]*)
34580   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34581   ;;
34582   *)
34583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34584 for as_dir in $PATH
34585 do
34586   IFS=$as_save_IFS
34587   test -z "$as_dir" && as_dir=.
34588     for ac_exec_ext in '' $ac_executable_extensions; do
34589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34590     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34592     break 2
34593   fi
34594 done
34595   done
34596 IFS=$as_save_IFS
34597 
34598   ;;
34599 esac
34600 fi
34601 STRIP=$ac_cv_path_STRIP
34602 if test -n "$STRIP"; then
34603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34604 $as_echo "$STRIP" >&6; }
34605 else
34606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34607 $as_echo "no" >&6; }
34608 fi
34609 
34610 
34611         if test "x$STRIP" = x; then
34612           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34613         fi
34614       else
34615         # Otherwise we believe it is a complete path. Use it as it is.
34616         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34617 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34618         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34619 $as_echo_n "checking for STRIP... " >&6; }
34620         if test ! -x "$tool_specified"; then
34621           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34622 $as_echo "not found" >&6; }
34623           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34624         fi
34625         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34626 $as_echo "$tool_specified" >&6; }
34627       fi
34628     fi
34629   fi
34630 
34631 
34632 
34633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34634 
34635   # First separate the path from the arguments. This will split at the first
34636   # space.
34637   complete="$STRIP"
34638   path="${complete%% *}"
34639   tmp="$complete EOL"
34640   arguments="${tmp#* }"
34641 
34642   # Input might be given as Windows format, start by converting to
34643   # unix format.
34644   new_path=`$CYGPATH -u "$path"`
34645 
34646   # Now try to locate executable using which
34647   new_path=`$WHICH "$new_path" 2> /dev/null`
34648   # bat and cmd files are not always considered executable in cygwin causing which
34649   # to not find them
34650   if test "x$new_path" = x \
34651       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34652       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34653     new_path=`$CYGPATH -u "$path"`
34654   fi
34655   if test "x$new_path" = x; then
34656     # Oops. Which didn't find the executable.
34657     # The splitting of arguments from the executable at a space might have been incorrect,
34658     # since paths with space are more likely in Windows. Give it another try with the whole
34659     # argument.
34660     path="$complete"
34661     arguments="EOL"
34662     new_path=`$CYGPATH -u "$path"`
34663     new_path=`$WHICH "$new_path" 2> /dev/null`
34664     # bat and cmd files are not always considered executable in cygwin causing which
34665     # to not find them
34666     if test "x$new_path" = x \
34667         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34668         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34669       new_path=`$CYGPATH -u "$path"`
34670     fi
34671     if test "x$new_path" = x; then
34672       # It's still not found. Now this is an unrecoverable error.
34673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34674 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34675       has_space=`$ECHO "$complete" | $GREP " "`
34676       if test "x$has_space" != x; then
34677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34679       fi
34680       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34681     fi
34682   fi
34683 
34684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34687   # "foo.exe" is OK but "foo" is an error.
34688   #
34689   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34690   # It is also a way to make sure we got the proper file name for the real test later on.
34691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34692   if test "x$test_shortpath" = x; then
34693     # Short path failed, file does not exist as specified.
34694     # Try adding .exe or .cmd
34695     if test -f "${new_path}.exe"; then
34696       input_to_shortpath="${new_path}.exe"
34697     elif test -f "${new_path}.cmd"; then
34698       input_to_shortpath="${new_path}.cmd"
34699     else
34700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34701 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34702       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34703 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34704       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34705     fi
34706   else
34707     input_to_shortpath="$new_path"
34708   fi
34709 
34710   # Call helper function which possibly converts this using DOS-style short mode.
34711   # If so, the updated path is stored in $new_path.
34712   new_path="$input_to_shortpath"
34713 
34714   input_path="$input_to_shortpath"
34715   # Check if we need to convert this using DOS-style short mode. If the path
34716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34717   # take no chances and rewrite it.
34718   # Note: m4 eats our [], so we need to use [ and ] instead.
34719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34720   if test "x$has_forbidden_chars" != x; then
34721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34722     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34723     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34724     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34725       # Going to short mode and back again did indeed matter. Since short mode is
34726       # case insensitive, let's make it lowercase to improve readability.
34727       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34728       # Now convert it back to Unix-style (cygpath)
34729       input_path=`$CYGPATH -u "$shortmode_path"`
34730       new_path="$input_path"
34731     fi
34732   fi
34733 
34734   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34735   if test "x$test_cygdrive_prefix" = x; then
34736     # As a simple fix, exclude /usr/bin since it's not a real path.
34737     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34738       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34739       # a path prefixed by /cygdrive for fixpath to work.
34740       new_path="$CYGWIN_ROOT_PATH$input_path"
34741     fi
34742   fi
34743 
34744   # remove trailing .exe if any
34745   new_path="${new_path/%.exe/}"
34746 
34747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34748 
34749   # First separate the path from the arguments. This will split at the first
34750   # space.
34751   complete="$STRIP"
34752   path="${complete%% *}"
34753   tmp="$complete EOL"
34754   arguments="${tmp#* }"
34755 
34756   # Input might be given as Windows format, start by converting to
34757   # unix format.
34758   new_path="$path"
34759 
34760   windows_path="$new_path"
34761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34762     unix_path=`$CYGPATH -u "$windows_path"`
34763     new_path="$unix_path"
34764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34766     new_path="$unix_path"
34767   fi
34768 
34769 
34770   # Now try to locate executable using which
34771   new_path=`$WHICH "$new_path" 2> /dev/null`
34772 
34773   if test "x$new_path" = x; then
34774     # Oops. Which didn't find the executable.
34775     # The splitting of arguments from the executable at a space might have been incorrect,
34776     # since paths with space are more likely in Windows. Give it another try with the whole
34777     # argument.
34778     path="$complete"
34779     arguments="EOL"
34780     new_path="$path"
34781 
34782   windows_path="$new_path"
34783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34784     unix_path=`$CYGPATH -u "$windows_path"`
34785     new_path="$unix_path"
34786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34788     new_path="$unix_path"
34789   fi
34790 
34791 
34792     new_path=`$WHICH "$new_path" 2> /dev/null`
34793     # bat and cmd files are not always considered executable in MSYS causing which
34794     # to not find them
34795     if test "x$new_path" = x \
34796         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34797         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34798       new_path="$path"
34799 
34800   windows_path="$new_path"
34801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34802     unix_path=`$CYGPATH -u "$windows_path"`
34803     new_path="$unix_path"
34804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34806     new_path="$unix_path"
34807   fi
34808 
34809     fi
34810 
34811     if test "x$new_path" = x; then
34812       # It's still not found. Now this is an unrecoverable error.
34813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34814 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34815       has_space=`$ECHO "$complete" | $GREP " "`
34816       if test "x$has_space" != x; then
34817         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34819       fi
34820       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34821     fi
34822   fi
34823 
34824   # Now new_path has a complete unix path to the binary
34825   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34826     # Keep paths in /bin as-is, but remove trailing .exe if any
34827     new_path="${new_path/%.exe/}"
34828     # Do not save /bin paths to all_fixpath_prefixes!
34829   else
34830     # Not in mixed or Windows style, start by that.
34831     new_path=`cmd //c echo $new_path`
34832 
34833   input_path="$new_path"
34834   # Check if we need to convert this using DOS-style short mode. If the path
34835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34836   # take no chances and rewrite it.
34837   # Note: m4 eats our [], so we need to use [ and ] instead.
34838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34839   if test "x$has_forbidden_chars" != x; then
34840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34841     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34842   fi
34843 
34844     # Output is in $new_path
34845 
34846   windows_path="$new_path"
34847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34848     unix_path=`$CYGPATH -u "$windows_path"`
34849     new_path="$unix_path"
34850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34852     new_path="$unix_path"
34853   fi
34854 
34855     # remove trailing .exe if any
34856     new_path="${new_path/%.exe/}"
34857 
34858     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34859     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34860   fi
34861 
34862   else
34863     # We're on a posix platform. Hooray! :)
34864     # First separate the path from the arguments. This will split at the first
34865     # space.
34866     complete="$STRIP"
34867     path="${complete%% *}"
34868     tmp="$complete EOL"
34869     arguments="${tmp#* }"
34870 
34871     # Cannot rely on the command "which" here since it doesn't always work.
34872     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34873     if test -z "$is_absolute_path"; then
34874       # Path to executable is not absolute. Find it.
34875       IFS_save="$IFS"
34876       IFS=:
34877       for p in $PATH; do
34878         if test -f "$p/$path" && test -x "$p/$path"; then
34879           new_path="$p/$path"
34880           break
34881         fi
34882       done
34883       IFS="$IFS_save"
34884     else
34885       # This is an absolute path, we can use it without further modifications.
34886       new_path="$path"
34887     fi
34888 
34889     if test "x$new_path" = x; then
34890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34891 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34892       has_space=`$ECHO "$complete" | $GREP " "`
34893       if test "x$has_space" != x; then
34894         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34895 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34896       fi
34897       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34898     fi
34899   fi
34900 
34901   # Now join together the path and the arguments once again
34902   if test "x$arguments" != xEOL; then
34903     new_complete="$new_path ${arguments% *}"
34904   else
34905     new_complete="$new_path"
34906   fi
34907 
34908   if test "x$complete" != "x$new_complete"; then
34909     STRIP="$new_complete"
34910     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
34911 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
34912   fi
34913 
34914 
34915 
34916   # Publish this variable in the help.
34917 
34918 
34919   if test "x$NM" = x; then
34920     # The variable is not set by user, try to locate tool using the code snippet
34921     for ac_prog in nm
34922 do
34923   # Extract the first word of "$ac_prog", so it can be a program name with args.
34924 set dummy $ac_prog; ac_word=$2
34925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34926 $as_echo_n "checking for $ac_word... " >&6; }
34927 if ${ac_cv_path_NM+:} false; then :
34928   $as_echo_n "(cached) " >&6
34929 else
34930   case $NM in
34931   [\\/]* | ?:[\\/]*)
34932   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34933   ;;
34934   *)
34935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34936 for as_dir in $PATH
34937 do
34938   IFS=$as_save_IFS
34939   test -z "$as_dir" && as_dir=.
34940     for ac_exec_ext in '' $ac_executable_extensions; do
34941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34942     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34944     break 2
34945   fi
34946 done
34947   done
34948 IFS=$as_save_IFS
34949 
34950   ;;
34951 esac
34952 fi
34953 NM=$ac_cv_path_NM
34954 if test -n "$NM"; then
34955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34956 $as_echo "$NM" >&6; }
34957 else
34958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34959 $as_echo "no" >&6; }
34960 fi
34961 
34962 
34963   test -n "$NM" && break
34964 done
34965 
34966   else
34967     # The variable is set, but is it from the command line or the environment?
34968 
34969     # Try to remove the string !NM! from our list.
34970     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34971     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34972       # If it failed, the variable was not from the command line. Ignore it,
34973       # but warn the user (except for BASH, which is always set by the calling BASH).
34974       if test "xNM" != xBASH; then
34975         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34976 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34977       fi
34978       # Try to locate tool using the code snippet
34979       for ac_prog in nm
34980 do
34981   # Extract the first word of "$ac_prog", so it can be a program name with args.
34982 set dummy $ac_prog; ac_word=$2
34983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34984 $as_echo_n "checking for $ac_word... " >&6; }
34985 if ${ac_cv_path_NM+:} false; then :
34986   $as_echo_n "(cached) " >&6
34987 else
34988   case $NM in
34989   [\\/]* | ?:[\\/]*)
34990   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34991   ;;
34992   *)
34993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34994 for as_dir in $PATH
34995 do
34996   IFS=$as_save_IFS
34997   test -z "$as_dir" && as_dir=.
34998     for ac_exec_ext in '' $ac_executable_extensions; do
34999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35000     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35002     break 2
35003   fi
35004 done
35005   done
35006 IFS=$as_save_IFS
35007 
35008   ;;
35009 esac
35010 fi
35011 NM=$ac_cv_path_NM
35012 if test -n "$NM"; then
35013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35014 $as_echo "$NM" >&6; }
35015 else
35016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35017 $as_echo "no" >&6; }
35018 fi
35019 
35020 
35021   test -n "$NM" && break
35022 done
35023 
35024     else
35025       # If it succeeded, then it was overridden by the user. We will use it
35026       # for the tool.
35027 
35028       # First remove it from the list of overridden variables, so we can test
35029       # for unknown variables in the end.
35030       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35031 
35032       # Check if the provided tool contains a complete path.
35033       tool_specified="$NM"
35034       tool_basename="${tool_specified##*/}"
35035       if test "x$tool_basename" = "x$tool_specified"; then
35036         # A command without a complete path is provided, search $PATH.
35037         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35038 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35039         # Extract the first word of "$tool_basename", so it can be a program name with args.
35040 set dummy $tool_basename; ac_word=$2
35041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35042 $as_echo_n "checking for $ac_word... " >&6; }
35043 if ${ac_cv_path_NM+:} false; then :
35044   $as_echo_n "(cached) " >&6
35045 else
35046   case $NM in
35047   [\\/]* | ?:[\\/]*)
35048   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35049   ;;
35050   *)
35051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35052 for as_dir in $PATH
35053 do
35054   IFS=$as_save_IFS
35055   test -z "$as_dir" && as_dir=.
35056     for ac_exec_ext in '' $ac_executable_extensions; do
35057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35058     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35060     break 2
35061   fi
35062 done
35063   done
35064 IFS=$as_save_IFS
35065 
35066   ;;
35067 esac
35068 fi
35069 NM=$ac_cv_path_NM
35070 if test -n "$NM"; then
35071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35072 $as_echo "$NM" >&6; }
35073 else
35074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35075 $as_echo "no" >&6; }
35076 fi
35077 
35078 
35079         if test "x$NM" = x; then
35080           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35081         fi
35082       else
35083         # Otherwise we believe it is a complete path. Use it as it is.
35084         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35085 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35086         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35087 $as_echo_n "checking for NM... " >&6; }
35088         if test ! -x "$tool_specified"; then
35089           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35090 $as_echo "not found" >&6; }
35091           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35092         fi
35093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35094 $as_echo "$tool_specified" >&6; }
35095       fi
35096     fi
35097   fi
35098 
35099 
35100 
35101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35102 
35103   # First separate the path from the arguments. This will split at the first
35104   # space.
35105   complete="$NM"
35106   path="${complete%% *}"
35107   tmp="$complete EOL"
35108   arguments="${tmp#* }"
35109 
35110   # Input might be given as Windows format, start by converting to
35111   # unix format.
35112   new_path=`$CYGPATH -u "$path"`
35113 
35114   # Now try to locate executable using which
35115   new_path=`$WHICH "$new_path" 2> /dev/null`
35116   # bat and cmd files are not always considered executable in cygwin causing which
35117   # to not find them
35118   if test "x$new_path" = x \
35119       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35120       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35121     new_path=`$CYGPATH -u "$path"`
35122   fi
35123   if test "x$new_path" = x; then
35124     # Oops. Which didn't find the executable.
35125     # The splitting of arguments from the executable at a space might have been incorrect,
35126     # since paths with space are more likely in Windows. Give it another try with the whole
35127     # argument.
35128     path="$complete"
35129     arguments="EOL"
35130     new_path=`$CYGPATH -u "$path"`
35131     new_path=`$WHICH "$new_path" 2> /dev/null`
35132     # bat and cmd files are not always considered executable in cygwin causing which
35133     # to not find them
35134     if test "x$new_path" = x \
35135         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35136         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35137       new_path=`$CYGPATH -u "$path"`
35138     fi
35139     if test "x$new_path" = x; then
35140       # It's still not found. Now this is an unrecoverable error.
35141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35142 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35143       has_space=`$ECHO "$complete" | $GREP " "`
35144       if test "x$has_space" != x; then
35145         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35146 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35147       fi
35148       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35149     fi
35150   fi
35151 
35152   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35153   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35154   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35155   # "foo.exe" is OK but "foo" is an error.
35156   #
35157   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35158   # It is also a way to make sure we got the proper file name for the real test later on.
35159   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35160   if test "x$test_shortpath" = x; then
35161     # Short path failed, file does not exist as specified.
35162     # Try adding .exe or .cmd
35163     if test -f "${new_path}.exe"; then
35164       input_to_shortpath="${new_path}.exe"
35165     elif test -f "${new_path}.cmd"; then
35166       input_to_shortpath="${new_path}.cmd"
35167     else
35168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35169 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35170       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35171 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35172       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35173     fi
35174   else
35175     input_to_shortpath="$new_path"
35176   fi
35177 
35178   # Call helper function which possibly converts this using DOS-style short mode.
35179   # If so, the updated path is stored in $new_path.
35180   new_path="$input_to_shortpath"
35181 
35182   input_path="$input_to_shortpath"
35183   # Check if we need to convert this using DOS-style short mode. If the path
35184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35185   # take no chances and rewrite it.
35186   # Note: m4 eats our [], so we need to use [ and ] instead.
35187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35188   if test "x$has_forbidden_chars" != x; then
35189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35193       # Going to short mode and back again did indeed matter. Since short mode is
35194       # case insensitive, let's make it lowercase to improve readability.
35195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35196       # Now convert it back to Unix-style (cygpath)
35197       input_path=`$CYGPATH -u "$shortmode_path"`
35198       new_path="$input_path"
35199     fi
35200   fi
35201 
35202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35203   if test "x$test_cygdrive_prefix" = x; then
35204     # As a simple fix, exclude /usr/bin since it's not a real path.
35205     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35207       # a path prefixed by /cygdrive for fixpath to work.
35208       new_path="$CYGWIN_ROOT_PATH$input_path"
35209     fi
35210   fi
35211 
35212   # remove trailing .exe if any
35213   new_path="${new_path/%.exe/}"
35214 
35215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35216 
35217   # First separate the path from the arguments. This will split at the first
35218   # space.
35219   complete="$NM"
35220   path="${complete%% *}"
35221   tmp="$complete EOL"
35222   arguments="${tmp#* }"
35223 
35224   # Input might be given as Windows format, start by converting to
35225   # unix format.
35226   new_path="$path"
35227 
35228   windows_path="$new_path"
35229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35230     unix_path=`$CYGPATH -u "$windows_path"`
35231     new_path="$unix_path"
35232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35234     new_path="$unix_path"
35235   fi
35236 
35237 
35238   # Now try to locate executable using which
35239   new_path=`$WHICH "$new_path" 2> /dev/null`
35240 
35241   if test "x$new_path" = x; then
35242     # Oops. Which didn't find the executable.
35243     # The splitting of arguments from the executable at a space might have been incorrect,
35244     # since paths with space are more likely in Windows. Give it another try with the whole
35245     # argument.
35246     path="$complete"
35247     arguments="EOL"
35248     new_path="$path"
35249 
35250   windows_path="$new_path"
35251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35252     unix_path=`$CYGPATH -u "$windows_path"`
35253     new_path="$unix_path"
35254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35256     new_path="$unix_path"
35257   fi
35258 
35259 
35260     new_path=`$WHICH "$new_path" 2> /dev/null`
35261     # bat and cmd files are not always considered executable in MSYS causing which
35262     # to not find them
35263     if test "x$new_path" = x \
35264         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35265         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35266       new_path="$path"
35267 
35268   windows_path="$new_path"
35269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35270     unix_path=`$CYGPATH -u "$windows_path"`
35271     new_path="$unix_path"
35272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35274     new_path="$unix_path"
35275   fi
35276 
35277     fi
35278 
35279     if test "x$new_path" = x; then
35280       # It's still not found. Now this is an unrecoverable error.
35281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35282 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35283       has_space=`$ECHO "$complete" | $GREP " "`
35284       if test "x$has_space" != x; then
35285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35287       fi
35288       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35289     fi
35290   fi
35291 
35292   # Now new_path has a complete unix path to the binary
35293   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35294     # Keep paths in /bin as-is, but remove trailing .exe if any
35295     new_path="${new_path/%.exe/}"
35296     # Do not save /bin paths to all_fixpath_prefixes!
35297   else
35298     # Not in mixed or Windows style, start by that.
35299     new_path=`cmd //c echo $new_path`
35300 
35301   input_path="$new_path"
35302   # Check if we need to convert this using DOS-style short mode. If the path
35303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35304   # take no chances and rewrite it.
35305   # Note: m4 eats our [], so we need to use [ and ] instead.
35306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35307   if test "x$has_forbidden_chars" != x; then
35308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35310   fi
35311 
35312     # Output is in $new_path
35313 
35314   windows_path="$new_path"
35315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35316     unix_path=`$CYGPATH -u "$windows_path"`
35317     new_path="$unix_path"
35318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35320     new_path="$unix_path"
35321   fi
35322 
35323     # remove trailing .exe if any
35324     new_path="${new_path/%.exe/}"
35325 
35326     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35327     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35328   fi
35329 
35330   else
35331     # We're on a posix platform. Hooray! :)
35332     # First separate the path from the arguments. This will split at the first
35333     # space.
35334     complete="$NM"
35335     path="${complete%% *}"
35336     tmp="$complete EOL"
35337     arguments="${tmp#* }"
35338 
35339     # Cannot rely on the command "which" here since it doesn't always work.
35340     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35341     if test -z "$is_absolute_path"; then
35342       # Path to executable is not absolute. Find it.
35343       IFS_save="$IFS"
35344       IFS=:
35345       for p in $PATH; do
35346         if test -f "$p/$path" && test -x "$p/$path"; then
35347           new_path="$p/$path"
35348           break
35349         fi
35350       done
35351       IFS="$IFS_save"
35352     else
35353       # This is an absolute path, we can use it without further modifications.
35354       new_path="$path"
35355     fi
35356 
35357     if test "x$new_path" = x; then
35358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35359 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35360       has_space=`$ECHO "$complete" | $GREP " "`
35361       if test "x$has_space" != x; then
35362         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35363 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35364       fi
35365       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35366     fi
35367   fi
35368 
35369   # Now join together the path and the arguments once again
35370   if test "x$arguments" != xEOL; then
35371     new_complete="$new_path ${arguments% *}"
35372   else
35373     new_complete="$new_path"
35374   fi
35375 
35376   if test "x$complete" != "x$new_complete"; then
35377     NM="$new_complete"
35378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35379 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35380   fi
35381 
35382 
35383 
35384   # Publish this variable in the help.
35385 
35386 
35387   if test "x$GNM" = x; then
35388     # The variable is not set by user, try to locate tool using the code snippet
35389     for ac_prog in gnm
35390 do
35391   # Extract the first word of "$ac_prog", so it can be a program name with args.
35392 set dummy $ac_prog; ac_word=$2
35393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35394 $as_echo_n "checking for $ac_word... " >&6; }
35395 if ${ac_cv_path_GNM+:} false; then :
35396   $as_echo_n "(cached) " >&6
35397 else
35398   case $GNM in
35399   [\\/]* | ?:[\\/]*)
35400   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35401   ;;
35402   *)
35403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35404 for as_dir in $PATH
35405 do
35406   IFS=$as_save_IFS
35407   test -z "$as_dir" && as_dir=.
35408     for ac_exec_ext in '' $ac_executable_extensions; do
35409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35410     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35412     break 2
35413   fi
35414 done
35415   done
35416 IFS=$as_save_IFS
35417 
35418   ;;
35419 esac
35420 fi
35421 GNM=$ac_cv_path_GNM
35422 if test -n "$GNM"; then
35423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35424 $as_echo "$GNM" >&6; }
35425 else
35426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35427 $as_echo "no" >&6; }
35428 fi
35429 
35430 
35431   test -n "$GNM" && break
35432 done
35433 
35434   else
35435     # The variable is set, but is it from the command line or the environment?
35436 
35437     # Try to remove the string !GNM! from our list.
35438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35440       # If it failed, the variable was not from the command line. Ignore it,
35441       # but warn the user (except for BASH, which is always set by the calling BASH).
35442       if test "xGNM" != xBASH; then
35443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35444 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35445       fi
35446       # Try to locate tool using the code snippet
35447       for ac_prog in gnm
35448 do
35449   # Extract the first word of "$ac_prog", so it can be a program name with args.
35450 set dummy $ac_prog; ac_word=$2
35451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35452 $as_echo_n "checking for $ac_word... " >&6; }
35453 if ${ac_cv_path_GNM+:} false; then :
35454   $as_echo_n "(cached) " >&6
35455 else
35456   case $GNM in
35457   [\\/]* | ?:[\\/]*)
35458   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35459   ;;
35460   *)
35461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35462 for as_dir in $PATH
35463 do
35464   IFS=$as_save_IFS
35465   test -z "$as_dir" && as_dir=.
35466     for ac_exec_ext in '' $ac_executable_extensions; do
35467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35468     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35470     break 2
35471   fi
35472 done
35473   done
35474 IFS=$as_save_IFS
35475 
35476   ;;
35477 esac
35478 fi
35479 GNM=$ac_cv_path_GNM
35480 if test -n "$GNM"; then
35481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35482 $as_echo "$GNM" >&6; }
35483 else
35484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35485 $as_echo "no" >&6; }
35486 fi
35487 
35488 
35489   test -n "$GNM" && break
35490 done
35491 
35492     else
35493       # If it succeeded, then it was overridden by the user. We will use it
35494       # for the tool.
35495 
35496       # First remove it from the list of overridden variables, so we can test
35497       # for unknown variables in the end.
35498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35499 
35500       # Check if the provided tool contains a complete path.
35501       tool_specified="$GNM"
35502       tool_basename="${tool_specified##*/}"
35503       if test "x$tool_basename" = "x$tool_specified"; then
35504         # A command without a complete path is provided, search $PATH.
35505         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35506 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35507         # Extract the first word of "$tool_basename", so it can be a program name with args.
35508 set dummy $tool_basename; ac_word=$2
35509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35510 $as_echo_n "checking for $ac_word... " >&6; }
35511 if ${ac_cv_path_GNM+:} false; then :
35512   $as_echo_n "(cached) " >&6
35513 else
35514   case $GNM in
35515   [\\/]* | ?:[\\/]*)
35516   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35517   ;;
35518   *)
35519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35520 for as_dir in $PATH
35521 do
35522   IFS=$as_save_IFS
35523   test -z "$as_dir" && as_dir=.
35524     for ac_exec_ext in '' $ac_executable_extensions; do
35525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35526     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35528     break 2
35529   fi
35530 done
35531   done
35532 IFS=$as_save_IFS
35533 
35534   ;;
35535 esac
35536 fi
35537 GNM=$ac_cv_path_GNM
35538 if test -n "$GNM"; then
35539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35540 $as_echo "$GNM" >&6; }
35541 else
35542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35543 $as_echo "no" >&6; }
35544 fi
35545 
35546 
35547         if test "x$GNM" = x; then
35548           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35549         fi
35550       else
35551         # Otherwise we believe it is a complete path. Use it as it is.
35552         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35553 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35555 $as_echo_n "checking for GNM... " >&6; }
35556         if test ! -x "$tool_specified"; then
35557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35558 $as_echo "not found" >&6; }
35559           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35560         fi
35561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35562 $as_echo "$tool_specified" >&6; }
35563       fi
35564     fi
35565   fi
35566 
35567 
35568 
35569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35570 
35571   # First separate the path from the arguments. This will split at the first
35572   # space.
35573   complete="$GNM"
35574   path="${complete%% *}"
35575   tmp="$complete EOL"
35576   arguments="${tmp#* }"
35577 
35578   # Input might be given as Windows format, start by converting to
35579   # unix format.
35580   new_path=`$CYGPATH -u "$path"`
35581 
35582   # Now try to locate executable using which
35583   new_path=`$WHICH "$new_path" 2> /dev/null`
35584   # bat and cmd files are not always considered executable in cygwin causing which
35585   # to not find them
35586   if test "x$new_path" = x \
35587       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35588       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35589     new_path=`$CYGPATH -u "$path"`
35590   fi
35591   if test "x$new_path" = x; then
35592     # Oops. Which didn't find the executable.
35593     # The splitting of arguments from the executable at a space might have been incorrect,
35594     # since paths with space are more likely in Windows. Give it another try with the whole
35595     # argument.
35596     path="$complete"
35597     arguments="EOL"
35598     new_path=`$CYGPATH -u "$path"`
35599     new_path=`$WHICH "$new_path" 2> /dev/null`
35600     # bat and cmd files are not always considered executable in cygwin causing which
35601     # to not find them
35602     if test "x$new_path" = x \
35603         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35604         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35605       new_path=`$CYGPATH -u "$path"`
35606     fi
35607     if test "x$new_path" = x; then
35608       # It's still not found. Now this is an unrecoverable error.
35609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35610 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35611       has_space=`$ECHO "$complete" | $GREP " "`
35612       if test "x$has_space" != x; then
35613         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35614 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35615       fi
35616       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35617     fi
35618   fi
35619 
35620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35623   # "foo.exe" is OK but "foo" is an error.
35624   #
35625   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35626   # It is also a way to make sure we got the proper file name for the real test later on.
35627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35628   if test "x$test_shortpath" = x; then
35629     # Short path failed, file does not exist as specified.
35630     # Try adding .exe or .cmd
35631     if test -f "${new_path}.exe"; then
35632       input_to_shortpath="${new_path}.exe"
35633     elif test -f "${new_path}.cmd"; then
35634       input_to_shortpath="${new_path}.cmd"
35635     else
35636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35637 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35638       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35639 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35640       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35641     fi
35642   else
35643     input_to_shortpath="$new_path"
35644   fi
35645 
35646   # Call helper function which possibly converts this using DOS-style short mode.
35647   # If so, the updated path is stored in $new_path.
35648   new_path="$input_to_shortpath"
35649 
35650   input_path="$input_to_shortpath"
35651   # Check if we need to convert this using DOS-style short mode. If the path
35652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35653   # take no chances and rewrite it.
35654   # Note: m4 eats our [], so we need to use [ and ] instead.
35655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35656   if test "x$has_forbidden_chars" != x; then
35657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35658     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35659     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35660     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35661       # Going to short mode and back again did indeed matter. Since short mode is
35662       # case insensitive, let's make it lowercase to improve readability.
35663       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35664       # Now convert it back to Unix-style (cygpath)
35665       input_path=`$CYGPATH -u "$shortmode_path"`
35666       new_path="$input_path"
35667     fi
35668   fi
35669 
35670   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35671   if test "x$test_cygdrive_prefix" = x; then
35672     # As a simple fix, exclude /usr/bin since it's not a real path.
35673     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35674       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35675       # a path prefixed by /cygdrive for fixpath to work.
35676       new_path="$CYGWIN_ROOT_PATH$input_path"
35677     fi
35678   fi
35679 
35680   # remove trailing .exe if any
35681   new_path="${new_path/%.exe/}"
35682 
35683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35684 
35685   # First separate the path from the arguments. This will split at the first
35686   # space.
35687   complete="$GNM"
35688   path="${complete%% *}"
35689   tmp="$complete EOL"
35690   arguments="${tmp#* }"
35691 
35692   # Input might be given as Windows format, start by converting to
35693   # unix format.
35694   new_path="$path"
35695 
35696   windows_path="$new_path"
35697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35698     unix_path=`$CYGPATH -u "$windows_path"`
35699     new_path="$unix_path"
35700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35702     new_path="$unix_path"
35703   fi
35704 
35705 
35706   # Now try to locate executable using which
35707   new_path=`$WHICH "$new_path" 2> /dev/null`
35708 
35709   if test "x$new_path" = x; then
35710     # Oops. Which didn't find the executable.
35711     # The splitting of arguments from the executable at a space might have been incorrect,
35712     # since paths with space are more likely in Windows. Give it another try with the whole
35713     # argument.
35714     path="$complete"
35715     arguments="EOL"
35716     new_path="$path"
35717 
35718   windows_path="$new_path"
35719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35720     unix_path=`$CYGPATH -u "$windows_path"`
35721     new_path="$unix_path"
35722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35724     new_path="$unix_path"
35725   fi
35726 
35727 
35728     new_path=`$WHICH "$new_path" 2> /dev/null`
35729     # bat and cmd files are not always considered executable in MSYS causing which
35730     # to not find them
35731     if test "x$new_path" = x \
35732         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35733         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35734       new_path="$path"
35735 
35736   windows_path="$new_path"
35737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35738     unix_path=`$CYGPATH -u "$windows_path"`
35739     new_path="$unix_path"
35740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35742     new_path="$unix_path"
35743   fi
35744 
35745     fi
35746 
35747     if test "x$new_path" = x; then
35748       # It's still not found. Now this is an unrecoverable error.
35749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35750 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35751       has_space=`$ECHO "$complete" | $GREP " "`
35752       if test "x$has_space" != x; then
35753         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35754 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35755       fi
35756       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35757     fi
35758   fi
35759 
35760   # Now new_path has a complete unix path to the binary
35761   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35762     # Keep paths in /bin as-is, but remove trailing .exe if any
35763     new_path="${new_path/%.exe/}"
35764     # Do not save /bin paths to all_fixpath_prefixes!
35765   else
35766     # Not in mixed or Windows style, start by that.
35767     new_path=`cmd //c echo $new_path`
35768 
35769   input_path="$new_path"
35770   # Check if we need to convert this using DOS-style short mode. If the path
35771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35772   # take no chances and rewrite it.
35773   # Note: m4 eats our [], so we need to use [ and ] instead.
35774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35775   if test "x$has_forbidden_chars" != x; then
35776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35777     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35778   fi
35779 
35780     # Output is in $new_path
35781 
35782   windows_path="$new_path"
35783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35784     unix_path=`$CYGPATH -u "$windows_path"`
35785     new_path="$unix_path"
35786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35788     new_path="$unix_path"
35789   fi
35790 
35791     # remove trailing .exe if any
35792     new_path="${new_path/%.exe/}"
35793 
35794     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35795     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35796   fi
35797 
35798   else
35799     # We're on a posix platform. Hooray! :)
35800     # First separate the path from the arguments. This will split at the first
35801     # space.
35802     complete="$GNM"
35803     path="${complete%% *}"
35804     tmp="$complete EOL"
35805     arguments="${tmp#* }"
35806 
35807     # Cannot rely on the command "which" here since it doesn't always work.
35808     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35809     if test -z "$is_absolute_path"; then
35810       # Path to executable is not absolute. Find it.
35811       IFS_save="$IFS"
35812       IFS=:
35813       for p in $PATH; do
35814         if test -f "$p/$path" && test -x "$p/$path"; then
35815           new_path="$p/$path"
35816           break
35817         fi
35818       done
35819       IFS="$IFS_save"
35820     else
35821       # This is an absolute path, we can use it without further modifications.
35822       new_path="$path"
35823     fi
35824 
35825     if test "x$new_path" = x; then
35826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35827 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35828       has_space=`$ECHO "$complete" | $GREP " "`
35829       if test "x$has_space" != x; then
35830         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35831 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35832       fi
35833       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35834     fi
35835   fi
35836 
35837   # Now join together the path and the arguments once again
35838   if test "x$arguments" != xEOL; then
35839     new_complete="$new_path ${arguments% *}"
35840   else
35841     new_complete="$new_path"
35842   fi
35843 
35844   if test "x$complete" != "x$new_complete"; then
35845     GNM="$new_complete"
35846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35847 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35848   fi
35849 
35850 
35851 
35852 
35853   # Publish this variable in the help.
35854 
35855 
35856   if test "x$MCS" = x; then
35857     # The variable is not set by user, try to locate tool using the code snippet
35858     for ac_prog in mcs
35859 do
35860   # Extract the first word of "$ac_prog", so it can be a program name with args.
35861 set dummy $ac_prog; ac_word=$2
35862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35863 $as_echo_n "checking for $ac_word... " >&6; }
35864 if ${ac_cv_path_MCS+:} false; then :
35865   $as_echo_n "(cached) " >&6
35866 else
35867   case $MCS in
35868   [\\/]* | ?:[\\/]*)
35869   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35870   ;;
35871   *)
35872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35873 for as_dir in $PATH
35874 do
35875   IFS=$as_save_IFS
35876   test -z "$as_dir" && as_dir=.
35877     for ac_exec_ext in '' $ac_executable_extensions; do
35878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35879     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35881     break 2
35882   fi
35883 done
35884   done
35885 IFS=$as_save_IFS
35886 
35887   ;;
35888 esac
35889 fi
35890 MCS=$ac_cv_path_MCS
35891 if test -n "$MCS"; then
35892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35893 $as_echo "$MCS" >&6; }
35894 else
35895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35896 $as_echo "no" >&6; }
35897 fi
35898 
35899 
35900   test -n "$MCS" && break
35901 done
35902 
35903   else
35904     # The variable is set, but is it from the command line or the environment?
35905 
35906     # Try to remove the string !MCS! from our list.
35907     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35908     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35909       # If it failed, the variable was not from the command line. Ignore it,
35910       # but warn the user (except for BASH, which is always set by the calling BASH).
35911       if test "xMCS" != xBASH; then
35912         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35913 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35914       fi
35915       # Try to locate tool using the code snippet
35916       for ac_prog in mcs
35917 do
35918   # Extract the first word of "$ac_prog", so it can be a program name with args.
35919 set dummy $ac_prog; ac_word=$2
35920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35921 $as_echo_n "checking for $ac_word... " >&6; }
35922 if ${ac_cv_path_MCS+:} false; then :
35923   $as_echo_n "(cached) " >&6
35924 else
35925   case $MCS in
35926   [\\/]* | ?:[\\/]*)
35927   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35928   ;;
35929   *)
35930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35931 for as_dir in $PATH
35932 do
35933   IFS=$as_save_IFS
35934   test -z "$as_dir" && as_dir=.
35935     for ac_exec_ext in '' $ac_executable_extensions; do
35936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35937     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35939     break 2
35940   fi
35941 done
35942   done
35943 IFS=$as_save_IFS
35944 
35945   ;;
35946 esac
35947 fi
35948 MCS=$ac_cv_path_MCS
35949 if test -n "$MCS"; then
35950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35951 $as_echo "$MCS" >&6; }
35952 else
35953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35954 $as_echo "no" >&6; }
35955 fi
35956 
35957 
35958   test -n "$MCS" && break
35959 done
35960 
35961     else
35962       # If it succeeded, then it was overridden by the user. We will use it
35963       # for the tool.
35964 
35965       # First remove it from the list of overridden variables, so we can test
35966       # for unknown variables in the end.
35967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35968 
35969       # Check if the provided tool contains a complete path.
35970       tool_specified="$MCS"
35971       tool_basename="${tool_specified##*/}"
35972       if test "x$tool_basename" = "x$tool_specified"; then
35973         # A command without a complete path is provided, search $PATH.
35974         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
35975 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
35976         # Extract the first word of "$tool_basename", so it can be a program name with args.
35977 set dummy $tool_basename; ac_word=$2
35978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35979 $as_echo_n "checking for $ac_word... " >&6; }
35980 if ${ac_cv_path_MCS+:} false; then :
35981   $as_echo_n "(cached) " >&6
35982 else
35983   case $MCS in
35984   [\\/]* | ?:[\\/]*)
35985   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35986   ;;
35987   *)
35988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35989 for as_dir in $PATH
35990 do
35991   IFS=$as_save_IFS
35992   test -z "$as_dir" && as_dir=.
35993     for ac_exec_ext in '' $ac_executable_extensions; do
35994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35995     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35997     break 2
35998   fi
35999 done
36000   done
36001 IFS=$as_save_IFS
36002 
36003   ;;
36004 esac
36005 fi
36006 MCS=$ac_cv_path_MCS
36007 if test -n "$MCS"; then
36008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36009 $as_echo "$MCS" >&6; }
36010 else
36011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36012 $as_echo "no" >&6; }
36013 fi
36014 
36015 
36016         if test "x$MCS" = x; then
36017           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36018         fi
36019       else
36020         # Otherwise we believe it is a complete path. Use it as it is.
36021         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36022 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36023         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36024 $as_echo_n "checking for MCS... " >&6; }
36025         if test ! -x "$tool_specified"; then
36026           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36027 $as_echo "not found" >&6; }
36028           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36029         fi
36030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36031 $as_echo "$tool_specified" >&6; }
36032       fi
36033     fi
36034   fi
36035 
36036 
36037 
36038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36039 
36040   # First separate the path from the arguments. This will split at the first
36041   # space.
36042   complete="$MCS"
36043   path="${complete%% *}"
36044   tmp="$complete EOL"
36045   arguments="${tmp#* }"
36046 
36047   # Input might be given as Windows format, start by converting to
36048   # unix format.
36049   new_path=`$CYGPATH -u "$path"`
36050 
36051   # Now try to locate executable using which
36052   new_path=`$WHICH "$new_path" 2> /dev/null`
36053   # bat and cmd files are not always considered executable in cygwin causing which
36054   # to not find them
36055   if test "x$new_path" = x \
36056       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36057       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36058     new_path=`$CYGPATH -u "$path"`
36059   fi
36060   if test "x$new_path" = x; then
36061     # Oops. Which didn't find the executable.
36062     # The splitting of arguments from the executable at a space might have been incorrect,
36063     # since paths with space are more likely in Windows. Give it another try with the whole
36064     # argument.
36065     path="$complete"
36066     arguments="EOL"
36067     new_path=`$CYGPATH -u "$path"`
36068     new_path=`$WHICH "$new_path" 2> /dev/null`
36069     # bat and cmd files are not always considered executable in cygwin causing which
36070     # to not find them
36071     if test "x$new_path" = x \
36072         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36073         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36074       new_path=`$CYGPATH -u "$path"`
36075     fi
36076     if test "x$new_path" = x; then
36077       # It's still not found. Now this is an unrecoverable error.
36078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36079 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36080       has_space=`$ECHO "$complete" | $GREP " "`
36081       if test "x$has_space" != x; then
36082         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36083 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36084       fi
36085       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36086     fi
36087   fi
36088 
36089   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36090   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36091   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36092   # "foo.exe" is OK but "foo" is an error.
36093   #
36094   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36095   # It is also a way to make sure we got the proper file name for the real test later on.
36096   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36097   if test "x$test_shortpath" = x; then
36098     # Short path failed, file does not exist as specified.
36099     # Try adding .exe or .cmd
36100     if test -f "${new_path}.exe"; then
36101       input_to_shortpath="${new_path}.exe"
36102     elif test -f "${new_path}.cmd"; then
36103       input_to_shortpath="${new_path}.cmd"
36104     else
36105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36106 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36107       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36108 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36109       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36110     fi
36111   else
36112     input_to_shortpath="$new_path"
36113   fi
36114 
36115   # Call helper function which possibly converts this using DOS-style short mode.
36116   # If so, the updated path is stored in $new_path.
36117   new_path="$input_to_shortpath"
36118 
36119   input_path="$input_to_shortpath"
36120   # Check if we need to convert this using DOS-style short mode. If the path
36121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36122   # take no chances and rewrite it.
36123   # Note: m4 eats our [], so we need to use [ and ] instead.
36124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36125   if test "x$has_forbidden_chars" != x; then
36126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36127     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36128     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36129     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36130       # Going to short mode and back again did indeed matter. Since short mode is
36131       # case insensitive, let's make it lowercase to improve readability.
36132       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36133       # Now convert it back to Unix-style (cygpath)
36134       input_path=`$CYGPATH -u "$shortmode_path"`
36135       new_path="$input_path"
36136     fi
36137   fi
36138 
36139   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36140   if test "x$test_cygdrive_prefix" = x; then
36141     # As a simple fix, exclude /usr/bin since it's not a real path.
36142     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36143       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36144       # a path prefixed by /cygdrive for fixpath to work.
36145       new_path="$CYGWIN_ROOT_PATH$input_path"
36146     fi
36147   fi
36148 
36149   # remove trailing .exe if any
36150   new_path="${new_path/%.exe/}"
36151 
36152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36153 
36154   # First separate the path from the arguments. This will split at the first
36155   # space.
36156   complete="$MCS"
36157   path="${complete%% *}"
36158   tmp="$complete EOL"
36159   arguments="${tmp#* }"
36160 
36161   # Input might be given as Windows format, start by converting to
36162   # unix format.
36163   new_path="$path"
36164 
36165   windows_path="$new_path"
36166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36167     unix_path=`$CYGPATH -u "$windows_path"`
36168     new_path="$unix_path"
36169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36171     new_path="$unix_path"
36172   fi
36173 
36174 
36175   # Now try to locate executable using which
36176   new_path=`$WHICH "$new_path" 2> /dev/null`
36177 
36178   if test "x$new_path" = x; then
36179     # Oops. Which didn't find the executable.
36180     # The splitting of arguments from the executable at a space might have been incorrect,
36181     # since paths with space are more likely in Windows. Give it another try with the whole
36182     # argument.
36183     path="$complete"
36184     arguments="EOL"
36185     new_path="$path"
36186 
36187   windows_path="$new_path"
36188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36189     unix_path=`$CYGPATH -u "$windows_path"`
36190     new_path="$unix_path"
36191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36193     new_path="$unix_path"
36194   fi
36195 
36196 
36197     new_path=`$WHICH "$new_path" 2> /dev/null`
36198     # bat and cmd files are not always considered executable in MSYS causing which
36199     # to not find them
36200     if test "x$new_path" = x \
36201         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36202         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36203       new_path="$path"
36204 
36205   windows_path="$new_path"
36206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36207     unix_path=`$CYGPATH -u "$windows_path"`
36208     new_path="$unix_path"
36209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36211     new_path="$unix_path"
36212   fi
36213 
36214     fi
36215 
36216     if test "x$new_path" = x; then
36217       # It's still not found. Now this is an unrecoverable error.
36218       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36219 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36220       has_space=`$ECHO "$complete" | $GREP " "`
36221       if test "x$has_space" != x; then
36222         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36223 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36224       fi
36225       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36226     fi
36227   fi
36228 
36229   # Now new_path has a complete unix path to the binary
36230   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36231     # Keep paths in /bin as-is, but remove trailing .exe if any
36232     new_path="${new_path/%.exe/}"
36233     # Do not save /bin paths to all_fixpath_prefixes!
36234   else
36235     # Not in mixed or Windows style, start by that.
36236     new_path=`cmd //c echo $new_path`
36237 
36238   input_path="$new_path"
36239   # Check if we need to convert this using DOS-style short mode. If the path
36240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36241   # take no chances and rewrite it.
36242   # Note: m4 eats our [], so we need to use [ and ] instead.
36243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36244   if test "x$has_forbidden_chars" != x; then
36245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36246     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36247   fi
36248 
36249     # Output is in $new_path
36250 
36251   windows_path="$new_path"
36252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36253     unix_path=`$CYGPATH -u "$windows_path"`
36254     new_path="$unix_path"
36255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36257     new_path="$unix_path"
36258   fi
36259 
36260     # remove trailing .exe if any
36261     new_path="${new_path/%.exe/}"
36262 
36263     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36264     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36265   fi
36266 
36267   else
36268     # We're on a posix platform. Hooray! :)
36269     # First separate the path from the arguments. This will split at the first
36270     # space.
36271     complete="$MCS"
36272     path="${complete%% *}"
36273     tmp="$complete EOL"
36274     arguments="${tmp#* }"
36275 
36276     # Cannot rely on the command "which" here since it doesn't always work.
36277     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36278     if test -z "$is_absolute_path"; then
36279       # Path to executable is not absolute. Find it.
36280       IFS_save="$IFS"
36281       IFS=:
36282       for p in $PATH; do
36283         if test -f "$p/$path" && test -x "$p/$path"; then
36284           new_path="$p/$path"
36285           break
36286         fi
36287       done
36288       IFS="$IFS_save"
36289     else
36290       # This is an absolute path, we can use it without further modifications.
36291       new_path="$path"
36292     fi
36293 
36294     if test "x$new_path" = x; then
36295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36296 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36297       has_space=`$ECHO "$complete" | $GREP " "`
36298       if test "x$has_space" != x; then
36299         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36300 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36301       fi
36302       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36303     fi
36304   fi
36305 
36306   # Now join together the path and the arguments once again
36307   if test "x$arguments" != xEOL; then
36308     new_complete="$new_path ${arguments% *}"
36309   else
36310     new_complete="$new_path"
36311   fi
36312 
36313   if test "x$complete" != "x$new_complete"; then
36314     MCS="$new_complete"
36315     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36316 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36317   fi
36318 
36319   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36320     # FIXME: we should unify this with the solaris case above.
36321 
36322 
36323   # Publish this variable in the help.
36324 
36325 
36326   if test "x$STRIP" = x; then
36327     # The variable is not set by user, try to locate tool using the code snippet
36328     if test -n "$ac_tool_prefix"; then
36329   for ac_prog in strip
36330   do
36331     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36332 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36334 $as_echo_n "checking for $ac_word... " >&6; }
36335 if ${ac_cv_prog_STRIP+:} false; then :
36336   $as_echo_n "(cached) " >&6
36337 else
36338   if test -n "$STRIP"; then
36339   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36340 else
36341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36342 for as_dir in $PATH
36343 do
36344   IFS=$as_save_IFS
36345   test -z "$as_dir" && as_dir=.
36346     for ac_exec_ext in '' $ac_executable_extensions; do
36347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36348     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36350     break 2
36351   fi
36352 done
36353   done
36354 IFS=$as_save_IFS
36355 
36356 fi
36357 fi
36358 STRIP=$ac_cv_prog_STRIP
36359 if test -n "$STRIP"; then
36360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36361 $as_echo "$STRIP" >&6; }
36362 else
36363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36364 $as_echo "no" >&6; }
36365 fi
36366 
36367 
36368     test -n "$STRIP" && break
36369   done
36370 fi
36371 if test -z "$STRIP"; then
36372   ac_ct_STRIP=$STRIP
36373   for ac_prog in strip
36374 do
36375   # Extract the first word of "$ac_prog", so it can be a program name with args.
36376 set dummy $ac_prog; ac_word=$2
36377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36378 $as_echo_n "checking for $ac_word... " >&6; }
36379 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36380   $as_echo_n "(cached) " >&6
36381 else
36382   if test -n "$ac_ct_STRIP"; then
36383   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36384 else
36385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36386 for as_dir in $PATH
36387 do
36388   IFS=$as_save_IFS
36389   test -z "$as_dir" && as_dir=.
36390     for ac_exec_ext in '' $ac_executable_extensions; do
36391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36392     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36394     break 2
36395   fi
36396 done
36397   done
36398 IFS=$as_save_IFS
36399 
36400 fi
36401 fi
36402 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36403 if test -n "$ac_ct_STRIP"; then
36404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36405 $as_echo "$ac_ct_STRIP" >&6; }
36406 else
36407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36408 $as_echo "no" >&6; }
36409 fi
36410 
36411 
36412   test -n "$ac_ct_STRIP" && break
36413 done
36414 
36415   if test "x$ac_ct_STRIP" = x; then
36416     STRIP=""
36417   else
36418     case $cross_compiling:$ac_tool_warned in
36419 yes:)
36420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36421 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36422 ac_tool_warned=yes ;;
36423 esac
36424     STRIP=$ac_ct_STRIP
36425   fi
36426 fi
36427 
36428   else
36429     # The variable is set, but is it from the command line or the environment?
36430 
36431     # Try to remove the string !STRIP! from our list.
36432     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36433     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36434       # If it failed, the variable was not from the command line. Ignore it,
36435       # but warn the user (except for BASH, which is always set by the calling BASH).
36436       if test "xSTRIP" != xBASH; then
36437         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36438 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36439       fi
36440       # Try to locate tool using the code snippet
36441       if test -n "$ac_tool_prefix"; then
36442   for ac_prog in strip
36443   do
36444     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36445 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36447 $as_echo_n "checking for $ac_word... " >&6; }
36448 if ${ac_cv_prog_STRIP+:} false; then :
36449   $as_echo_n "(cached) " >&6
36450 else
36451   if test -n "$STRIP"; then
36452   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36453 else
36454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36455 for as_dir in $PATH
36456 do
36457   IFS=$as_save_IFS
36458   test -z "$as_dir" && as_dir=.
36459     for ac_exec_ext in '' $ac_executable_extensions; do
36460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36461     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36463     break 2
36464   fi
36465 done
36466   done
36467 IFS=$as_save_IFS
36468 
36469 fi
36470 fi
36471 STRIP=$ac_cv_prog_STRIP
36472 if test -n "$STRIP"; then
36473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36474 $as_echo "$STRIP" >&6; }
36475 else
36476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36477 $as_echo "no" >&6; }
36478 fi
36479 
36480 
36481     test -n "$STRIP" && break
36482   done
36483 fi
36484 if test -z "$STRIP"; then
36485   ac_ct_STRIP=$STRIP
36486   for ac_prog in strip
36487 do
36488   # Extract the first word of "$ac_prog", so it can be a program name with args.
36489 set dummy $ac_prog; ac_word=$2
36490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36491 $as_echo_n "checking for $ac_word... " >&6; }
36492 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36493   $as_echo_n "(cached) " >&6
36494 else
36495   if test -n "$ac_ct_STRIP"; then
36496   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36497 else
36498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36499 for as_dir in $PATH
36500 do
36501   IFS=$as_save_IFS
36502   test -z "$as_dir" && as_dir=.
36503     for ac_exec_ext in '' $ac_executable_extensions; do
36504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36505     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36507     break 2
36508   fi
36509 done
36510   done
36511 IFS=$as_save_IFS
36512 
36513 fi
36514 fi
36515 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36516 if test -n "$ac_ct_STRIP"; then
36517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36518 $as_echo "$ac_ct_STRIP" >&6; }
36519 else
36520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36521 $as_echo "no" >&6; }
36522 fi
36523 
36524 
36525   test -n "$ac_ct_STRIP" && break
36526 done
36527 
36528   if test "x$ac_ct_STRIP" = x; then
36529     STRIP=""
36530   else
36531     case $cross_compiling:$ac_tool_warned in
36532 yes:)
36533 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36534 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36535 ac_tool_warned=yes ;;
36536 esac
36537     STRIP=$ac_ct_STRIP
36538   fi
36539 fi
36540 
36541     else
36542       # If it succeeded, then it was overridden by the user. We will use it
36543       # for the tool.
36544 
36545       # First remove it from the list of overridden variables, so we can test
36546       # for unknown variables in the end.
36547       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36548 
36549       # Check if the provided tool contains a complete path.
36550       tool_specified="$STRIP"
36551       tool_basename="${tool_specified##*/}"
36552       if test "x$tool_basename" = "x$tool_specified"; then
36553         # A command without a complete path is provided, search $PATH.
36554         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36555 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36556         # Extract the first word of "$tool_basename", so it can be a program name with args.
36557 set dummy $tool_basename; ac_word=$2
36558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36559 $as_echo_n "checking for $ac_word... " >&6; }
36560 if ${ac_cv_path_STRIP+:} false; then :
36561   $as_echo_n "(cached) " >&6
36562 else
36563   case $STRIP in
36564   [\\/]* | ?:[\\/]*)
36565   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36566   ;;
36567   *)
36568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36569 for as_dir in $PATH
36570 do
36571   IFS=$as_save_IFS
36572   test -z "$as_dir" && as_dir=.
36573     for ac_exec_ext in '' $ac_executable_extensions; do
36574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36575     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36577     break 2
36578   fi
36579 done
36580   done
36581 IFS=$as_save_IFS
36582 
36583   ;;
36584 esac
36585 fi
36586 STRIP=$ac_cv_path_STRIP
36587 if test -n "$STRIP"; then
36588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36589 $as_echo "$STRIP" >&6; }
36590 else
36591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36592 $as_echo "no" >&6; }
36593 fi
36594 
36595 
36596         if test "x$STRIP" = x; then
36597           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36598         fi
36599       else
36600         # Otherwise we believe it is a complete path. Use it as it is.
36601         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36602 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36604 $as_echo_n "checking for STRIP... " >&6; }
36605         if test ! -x "$tool_specified"; then
36606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36607 $as_echo "not found" >&6; }
36608           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36609         fi
36610         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36611 $as_echo "$tool_specified" >&6; }
36612       fi
36613     fi
36614   fi
36615 
36616 
36617 
36618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36619 
36620   # First separate the path from the arguments. This will split at the first
36621   # space.
36622   complete="$STRIP"
36623   path="${complete%% *}"
36624   tmp="$complete EOL"
36625   arguments="${tmp#* }"
36626 
36627   # Input might be given as Windows format, start by converting to
36628   # unix format.
36629   new_path=`$CYGPATH -u "$path"`
36630 
36631   # Now try to locate executable using which
36632   new_path=`$WHICH "$new_path" 2> /dev/null`
36633   # bat and cmd files are not always considered executable in cygwin causing which
36634   # to not find them
36635   if test "x$new_path" = x \
36636       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36637       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36638     new_path=`$CYGPATH -u "$path"`
36639   fi
36640   if test "x$new_path" = x; then
36641     # Oops. Which didn't find the executable.
36642     # The splitting of arguments from the executable at a space might have been incorrect,
36643     # since paths with space are more likely in Windows. Give it another try with the whole
36644     # argument.
36645     path="$complete"
36646     arguments="EOL"
36647     new_path=`$CYGPATH -u "$path"`
36648     new_path=`$WHICH "$new_path" 2> /dev/null`
36649     # bat and cmd files are not always considered executable in cygwin causing which
36650     # to not find them
36651     if test "x$new_path" = x \
36652         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36653         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36654       new_path=`$CYGPATH -u "$path"`
36655     fi
36656     if test "x$new_path" = x; then
36657       # It's still not found. Now this is an unrecoverable error.
36658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36659 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36660       has_space=`$ECHO "$complete" | $GREP " "`
36661       if test "x$has_space" != x; then
36662         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36663 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36664       fi
36665       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36666     fi
36667   fi
36668 
36669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36672   # "foo.exe" is OK but "foo" is an error.
36673   #
36674   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36675   # It is also a way to make sure we got the proper file name for the real test later on.
36676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36677   if test "x$test_shortpath" = x; then
36678     # Short path failed, file does not exist as specified.
36679     # Try adding .exe or .cmd
36680     if test -f "${new_path}.exe"; then
36681       input_to_shortpath="${new_path}.exe"
36682     elif test -f "${new_path}.cmd"; then
36683       input_to_shortpath="${new_path}.cmd"
36684     else
36685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36686 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36687       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36688 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36689       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36690     fi
36691   else
36692     input_to_shortpath="$new_path"
36693   fi
36694 
36695   # Call helper function which possibly converts this using DOS-style short mode.
36696   # If so, the updated path is stored in $new_path.
36697   new_path="$input_to_shortpath"
36698 
36699   input_path="$input_to_shortpath"
36700   # Check if we need to convert this using DOS-style short mode. If the path
36701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36702   # take no chances and rewrite it.
36703   # Note: m4 eats our [], so we need to use [ and ] instead.
36704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36705   if test "x$has_forbidden_chars" != x; then
36706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36710       # Going to short mode and back again did indeed matter. Since short mode is
36711       # case insensitive, let's make it lowercase to improve readability.
36712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36713       # Now convert it back to Unix-style (cygpath)
36714       input_path=`$CYGPATH -u "$shortmode_path"`
36715       new_path="$input_path"
36716     fi
36717   fi
36718 
36719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36720   if test "x$test_cygdrive_prefix" = x; then
36721     # As a simple fix, exclude /usr/bin since it's not a real path.
36722     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36724       # a path prefixed by /cygdrive for fixpath to work.
36725       new_path="$CYGWIN_ROOT_PATH$input_path"
36726     fi
36727   fi
36728 
36729   # remove trailing .exe if any
36730   new_path="${new_path/%.exe/}"
36731 
36732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36733 
36734   # First separate the path from the arguments. This will split at the first
36735   # space.
36736   complete="$STRIP"
36737   path="${complete%% *}"
36738   tmp="$complete EOL"
36739   arguments="${tmp#* }"
36740 
36741   # Input might be given as Windows format, start by converting to
36742   # unix format.
36743   new_path="$path"
36744 
36745   windows_path="$new_path"
36746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36747     unix_path=`$CYGPATH -u "$windows_path"`
36748     new_path="$unix_path"
36749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36751     new_path="$unix_path"
36752   fi
36753 
36754 
36755   # Now try to locate executable using which
36756   new_path=`$WHICH "$new_path" 2> /dev/null`
36757 
36758   if test "x$new_path" = x; then
36759     # Oops. Which didn't find the executable.
36760     # The splitting of arguments from the executable at a space might have been incorrect,
36761     # since paths with space are more likely in Windows. Give it another try with the whole
36762     # argument.
36763     path="$complete"
36764     arguments="EOL"
36765     new_path="$path"
36766 
36767   windows_path="$new_path"
36768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36769     unix_path=`$CYGPATH -u "$windows_path"`
36770     new_path="$unix_path"
36771   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36772     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36773     new_path="$unix_path"
36774   fi
36775 
36776 
36777     new_path=`$WHICH "$new_path" 2> /dev/null`
36778     # bat and cmd files are not always considered executable in MSYS causing which
36779     # to not find them
36780     if test "x$new_path" = x \
36781         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36782         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36783       new_path="$path"
36784 
36785   windows_path="$new_path"
36786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36787     unix_path=`$CYGPATH -u "$windows_path"`
36788     new_path="$unix_path"
36789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36791     new_path="$unix_path"
36792   fi
36793 
36794     fi
36795 
36796     if test "x$new_path" = x; then
36797       # It's still not found. Now this is an unrecoverable error.
36798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36799 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36800       has_space=`$ECHO "$complete" | $GREP " "`
36801       if test "x$has_space" != x; then
36802         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36803 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36804       fi
36805       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36806     fi
36807   fi
36808 
36809   # Now new_path has a complete unix path to the binary
36810   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36811     # Keep paths in /bin as-is, but remove trailing .exe if any
36812     new_path="${new_path/%.exe/}"
36813     # Do not save /bin paths to all_fixpath_prefixes!
36814   else
36815     # Not in mixed or Windows style, start by that.
36816     new_path=`cmd //c echo $new_path`
36817 
36818   input_path="$new_path"
36819   # Check if we need to convert this using DOS-style short mode. If the path
36820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36821   # take no chances and rewrite it.
36822   # Note: m4 eats our [], so we need to use [ and ] instead.
36823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36824   if test "x$has_forbidden_chars" != x; then
36825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36827   fi
36828 
36829     # Output is in $new_path
36830 
36831   windows_path="$new_path"
36832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36833     unix_path=`$CYGPATH -u "$windows_path"`
36834     new_path="$unix_path"
36835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36836     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36837     new_path="$unix_path"
36838   fi
36839 
36840     # remove trailing .exe if any
36841     new_path="${new_path/%.exe/}"
36842 
36843     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36844     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36845   fi
36846 
36847   else
36848     # We're on a posix platform. Hooray! :)
36849     # First separate the path from the arguments. This will split at the first
36850     # space.
36851     complete="$STRIP"
36852     path="${complete%% *}"
36853     tmp="$complete EOL"
36854     arguments="${tmp#* }"
36855 
36856     # Cannot rely on the command "which" here since it doesn't always work.
36857     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36858     if test -z "$is_absolute_path"; then
36859       # Path to executable is not absolute. Find it.
36860       IFS_save="$IFS"
36861       IFS=:
36862       for p in $PATH; do
36863         if test -f "$p/$path" && test -x "$p/$path"; then
36864           new_path="$p/$path"
36865           break
36866         fi
36867       done
36868       IFS="$IFS_save"
36869     else
36870       # This is an absolute path, we can use it without further modifications.
36871       new_path="$path"
36872     fi
36873 
36874     if test "x$new_path" = x; then
36875       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36876 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36877       has_space=`$ECHO "$complete" | $GREP " "`
36878       if test "x$has_space" != x; then
36879         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36880 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36881       fi
36882       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36883     fi
36884   fi
36885 
36886   # Now join together the path and the arguments once again
36887   if test "x$arguments" != xEOL; then
36888     new_complete="$new_path ${arguments% *}"
36889   else
36890     new_complete="$new_path"
36891   fi
36892 
36893   if test "x$complete" != "x$new_complete"; then
36894     STRIP="$new_complete"
36895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36896 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36897   fi
36898 
36899     # Extract the first word of "otool", so it can be a program name with args.
36900 set dummy otool; ac_word=$2
36901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36902 $as_echo_n "checking for $ac_word... " >&6; }
36903 if ${ac_cv_path_OTOOL+:} false; then :
36904   $as_echo_n "(cached) " >&6
36905 else
36906   case $OTOOL in
36907   [\\/]* | ?:[\\/]*)
36908   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
36909   ;;
36910   *)
36911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36912 for as_dir in $PATH
36913 do
36914   IFS=$as_save_IFS
36915   test -z "$as_dir" && as_dir=.
36916     for ac_exec_ext in '' $ac_executable_extensions; do
36917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36918     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
36919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36920     break 2
36921   fi
36922 done
36923   done
36924 IFS=$as_save_IFS
36925 
36926   ;;
36927 esac
36928 fi
36929 OTOOL=$ac_cv_path_OTOOL
36930 if test -n "$OTOOL"; then
36931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
36932 $as_echo "$OTOOL" >&6; }
36933 else
36934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36935 $as_echo "no" >&6; }
36936 fi
36937 
36938 
36939     if test "x$OTOOL" = "x"; then
36940       OTOOL="true"
36941     fi
36942 
36943 
36944   # Publish this variable in the help.
36945 
36946 
36947   if test "x$NM" = x; then
36948     # The variable is not set by user, try to locate tool using the code snippet
36949     if test -n "$ac_tool_prefix"; then
36950   for ac_prog in nm
36951   do
36952     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36953 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36955 $as_echo_n "checking for $ac_word... " >&6; }
36956 if ${ac_cv_prog_NM+:} false; then :
36957   $as_echo_n "(cached) " >&6
36958 else
36959   if test -n "$NM"; then
36960   ac_cv_prog_NM="$NM" # Let the user override the test.
36961 else
36962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36963 for as_dir in $PATH
36964 do
36965   IFS=$as_save_IFS
36966   test -z "$as_dir" && as_dir=.
36967     for ac_exec_ext in '' $ac_executable_extensions; do
36968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36969     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36971     break 2
36972   fi
36973 done
36974   done
36975 IFS=$as_save_IFS
36976 
36977 fi
36978 fi
36979 NM=$ac_cv_prog_NM
36980 if test -n "$NM"; then
36981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36982 $as_echo "$NM" >&6; }
36983 else
36984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36985 $as_echo "no" >&6; }
36986 fi
36987 
36988 
36989     test -n "$NM" && break
36990   done
36991 fi
36992 if test -z "$NM"; then
36993   ac_ct_NM=$NM
36994   for ac_prog in nm
36995 do
36996   # Extract the first word of "$ac_prog", so it can be a program name with args.
36997 set dummy $ac_prog; ac_word=$2
36998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36999 $as_echo_n "checking for $ac_word... " >&6; }
37000 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37001   $as_echo_n "(cached) " >&6
37002 else
37003   if test -n "$ac_ct_NM"; then
37004   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37005 else
37006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37007 for as_dir in $PATH
37008 do
37009   IFS=$as_save_IFS
37010   test -z "$as_dir" && as_dir=.
37011     for ac_exec_ext in '' $ac_executable_extensions; do
37012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37013     ac_cv_prog_ac_ct_NM="$ac_prog"
37014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37015     break 2
37016   fi
37017 done
37018   done
37019 IFS=$as_save_IFS
37020 
37021 fi
37022 fi
37023 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37024 if test -n "$ac_ct_NM"; then
37025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37026 $as_echo "$ac_ct_NM" >&6; }
37027 else
37028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37029 $as_echo "no" >&6; }
37030 fi
37031 
37032 
37033   test -n "$ac_ct_NM" && break
37034 done
37035 
37036   if test "x$ac_ct_NM" = x; then
37037     NM=""
37038   else
37039     case $cross_compiling:$ac_tool_warned in
37040 yes:)
37041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37042 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37043 ac_tool_warned=yes ;;
37044 esac
37045     NM=$ac_ct_NM
37046   fi
37047 fi
37048 
37049   else
37050     # The variable is set, but is it from the command line or the environment?
37051 
37052     # Try to remove the string !NM! from our list.
37053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37055       # If it failed, the variable was not from the command line. Ignore it,
37056       # but warn the user (except for BASH, which is always set by the calling BASH).
37057       if test "xNM" != xBASH; then
37058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37059 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37060       fi
37061       # Try to locate tool using the code snippet
37062       if test -n "$ac_tool_prefix"; then
37063   for ac_prog in nm
37064   do
37065     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37066 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37068 $as_echo_n "checking for $ac_word... " >&6; }
37069 if ${ac_cv_prog_NM+:} false; then :
37070   $as_echo_n "(cached) " >&6
37071 else
37072   if test -n "$NM"; then
37073   ac_cv_prog_NM="$NM" # Let the user override the test.
37074 else
37075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37076 for as_dir in $PATH
37077 do
37078   IFS=$as_save_IFS
37079   test -z "$as_dir" && as_dir=.
37080     for ac_exec_ext in '' $ac_executable_extensions; do
37081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37082     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37084     break 2
37085   fi
37086 done
37087   done
37088 IFS=$as_save_IFS
37089 
37090 fi
37091 fi
37092 NM=$ac_cv_prog_NM
37093 if test -n "$NM"; then
37094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37095 $as_echo "$NM" >&6; }
37096 else
37097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37098 $as_echo "no" >&6; }
37099 fi
37100 
37101 
37102     test -n "$NM" && break
37103   done
37104 fi
37105 if test -z "$NM"; then
37106   ac_ct_NM=$NM
37107   for ac_prog in nm
37108 do
37109   # Extract the first word of "$ac_prog", so it can be a program name with args.
37110 set dummy $ac_prog; ac_word=$2
37111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37112 $as_echo_n "checking for $ac_word... " >&6; }
37113 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37114   $as_echo_n "(cached) " >&6
37115 else
37116   if test -n "$ac_ct_NM"; then
37117   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37118 else
37119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37120 for as_dir in $PATH
37121 do
37122   IFS=$as_save_IFS
37123   test -z "$as_dir" && as_dir=.
37124     for ac_exec_ext in '' $ac_executable_extensions; do
37125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37126     ac_cv_prog_ac_ct_NM="$ac_prog"
37127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37128     break 2
37129   fi
37130 done
37131   done
37132 IFS=$as_save_IFS
37133 
37134 fi
37135 fi
37136 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37137 if test -n "$ac_ct_NM"; then
37138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37139 $as_echo "$ac_ct_NM" >&6; }
37140 else
37141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37142 $as_echo "no" >&6; }
37143 fi
37144 
37145 
37146   test -n "$ac_ct_NM" && break
37147 done
37148 
37149   if test "x$ac_ct_NM" = x; then
37150     NM=""
37151   else
37152     case $cross_compiling:$ac_tool_warned in
37153 yes:)
37154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37155 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37156 ac_tool_warned=yes ;;
37157 esac
37158     NM=$ac_ct_NM
37159   fi
37160 fi
37161 
37162     else
37163       # If it succeeded, then it was overridden by the user. We will use it
37164       # for the tool.
37165 
37166       # First remove it from the list of overridden variables, so we can test
37167       # for unknown variables in the end.
37168       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37169 
37170       # Check if the provided tool contains a complete path.
37171       tool_specified="$NM"
37172       tool_basename="${tool_specified##*/}"
37173       if test "x$tool_basename" = "x$tool_specified"; then
37174         # A command without a complete path is provided, search $PATH.
37175         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37176 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37177         # Extract the first word of "$tool_basename", so it can be a program name with args.
37178 set dummy $tool_basename; ac_word=$2
37179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180 $as_echo_n "checking for $ac_word... " >&6; }
37181 if ${ac_cv_path_NM+:} false; then :
37182   $as_echo_n "(cached) " >&6
37183 else
37184   case $NM in
37185   [\\/]* | ?:[\\/]*)
37186   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37187   ;;
37188   *)
37189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37190 for as_dir in $PATH
37191 do
37192   IFS=$as_save_IFS
37193   test -z "$as_dir" && as_dir=.
37194     for ac_exec_ext in '' $ac_executable_extensions; do
37195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37196     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198     break 2
37199   fi
37200 done
37201   done
37202 IFS=$as_save_IFS
37203 
37204   ;;
37205 esac
37206 fi
37207 NM=$ac_cv_path_NM
37208 if test -n "$NM"; then
37209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37210 $as_echo "$NM" >&6; }
37211 else
37212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37213 $as_echo "no" >&6; }
37214 fi
37215 
37216 
37217         if test "x$NM" = x; then
37218           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37219         fi
37220       else
37221         # Otherwise we believe it is a complete path. Use it as it is.
37222         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37223 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37225 $as_echo_n "checking for NM... " >&6; }
37226         if test ! -x "$tool_specified"; then
37227           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37228 $as_echo "not found" >&6; }
37229           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37230         fi
37231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37232 $as_echo "$tool_specified" >&6; }
37233       fi
37234     fi
37235   fi
37236 
37237 
37238 
37239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37240 
37241   # First separate the path from the arguments. This will split at the first
37242   # space.
37243   complete="$NM"
37244   path="${complete%% *}"
37245   tmp="$complete EOL"
37246   arguments="${tmp#* }"
37247 
37248   # Input might be given as Windows format, start by converting to
37249   # unix format.
37250   new_path=`$CYGPATH -u "$path"`
37251 
37252   # Now try to locate executable using which
37253   new_path=`$WHICH "$new_path" 2> /dev/null`
37254   # bat and cmd files are not always considered executable in cygwin causing which
37255   # to not find them
37256   if test "x$new_path" = x \
37257       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37258       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37259     new_path=`$CYGPATH -u "$path"`
37260   fi
37261   if test "x$new_path" = x; then
37262     # Oops. Which didn't find the executable.
37263     # The splitting of arguments from the executable at a space might have been incorrect,
37264     # since paths with space are more likely in Windows. Give it another try with the whole
37265     # argument.
37266     path="$complete"
37267     arguments="EOL"
37268     new_path=`$CYGPATH -u "$path"`
37269     new_path=`$WHICH "$new_path" 2> /dev/null`
37270     # bat and cmd files are not always considered executable in cygwin causing which
37271     # to not find them
37272     if test "x$new_path" = x \
37273         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37274         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37275       new_path=`$CYGPATH -u "$path"`
37276     fi
37277     if test "x$new_path" = x; then
37278       # It's still not found. Now this is an unrecoverable error.
37279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37280 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37281       has_space=`$ECHO "$complete" | $GREP " "`
37282       if test "x$has_space" != x; then
37283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37285       fi
37286       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37287     fi
37288   fi
37289 
37290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37293   # "foo.exe" is OK but "foo" is an error.
37294   #
37295   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37296   # It is also a way to make sure we got the proper file name for the real test later on.
37297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37298   if test "x$test_shortpath" = x; then
37299     # Short path failed, file does not exist as specified.
37300     # Try adding .exe or .cmd
37301     if test -f "${new_path}.exe"; then
37302       input_to_shortpath="${new_path}.exe"
37303     elif test -f "${new_path}.cmd"; then
37304       input_to_shortpath="${new_path}.cmd"
37305     else
37306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37307 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37308       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37309 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37310       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37311     fi
37312   else
37313     input_to_shortpath="$new_path"
37314   fi
37315 
37316   # Call helper function which possibly converts this using DOS-style short mode.
37317   # If so, the updated path is stored in $new_path.
37318   new_path="$input_to_shortpath"
37319 
37320   input_path="$input_to_shortpath"
37321   # Check if we need to convert this using DOS-style short mode. If the path
37322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37323   # take no chances and rewrite it.
37324   # Note: m4 eats our [], so we need to use [ and ] instead.
37325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37326   if test "x$has_forbidden_chars" != x; then
37327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37328     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37329     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37330     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37331       # Going to short mode and back again did indeed matter. Since short mode is
37332       # case insensitive, let's make it lowercase to improve readability.
37333       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37334       # Now convert it back to Unix-style (cygpath)
37335       input_path=`$CYGPATH -u "$shortmode_path"`
37336       new_path="$input_path"
37337     fi
37338   fi
37339 
37340   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37341   if test "x$test_cygdrive_prefix" = x; then
37342     # As a simple fix, exclude /usr/bin since it's not a real path.
37343     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37344       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37345       # a path prefixed by /cygdrive for fixpath to work.
37346       new_path="$CYGWIN_ROOT_PATH$input_path"
37347     fi
37348   fi
37349 
37350   # remove trailing .exe if any
37351   new_path="${new_path/%.exe/}"
37352 
37353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37354 
37355   # First separate the path from the arguments. This will split at the first
37356   # space.
37357   complete="$NM"
37358   path="${complete%% *}"
37359   tmp="$complete EOL"
37360   arguments="${tmp#* }"
37361 
37362   # Input might be given as Windows format, start by converting to
37363   # unix format.
37364   new_path="$path"
37365 
37366   windows_path="$new_path"
37367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37368     unix_path=`$CYGPATH -u "$windows_path"`
37369     new_path="$unix_path"
37370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37372     new_path="$unix_path"
37373   fi
37374 
37375 
37376   # Now try to locate executable using which
37377   new_path=`$WHICH "$new_path" 2> /dev/null`
37378 
37379   if test "x$new_path" = x; then
37380     # Oops. Which didn't find the executable.
37381     # The splitting of arguments from the executable at a space might have been incorrect,
37382     # since paths with space are more likely in Windows. Give it another try with the whole
37383     # argument.
37384     path="$complete"
37385     arguments="EOL"
37386     new_path="$path"
37387 
37388   windows_path="$new_path"
37389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37390     unix_path=`$CYGPATH -u "$windows_path"`
37391     new_path="$unix_path"
37392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37394     new_path="$unix_path"
37395   fi
37396 
37397 
37398     new_path=`$WHICH "$new_path" 2> /dev/null`
37399     # bat and cmd files are not always considered executable in MSYS causing which
37400     # to not find them
37401     if test "x$new_path" = x \
37402         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37403         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37404       new_path="$path"
37405 
37406   windows_path="$new_path"
37407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37408     unix_path=`$CYGPATH -u "$windows_path"`
37409     new_path="$unix_path"
37410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37412     new_path="$unix_path"
37413   fi
37414 
37415     fi
37416 
37417     if test "x$new_path" = x; then
37418       # It's still not found. Now this is an unrecoverable error.
37419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37420 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37421       has_space=`$ECHO "$complete" | $GREP " "`
37422       if test "x$has_space" != x; then
37423         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37424 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37425       fi
37426       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37427     fi
37428   fi
37429 
37430   # Now new_path has a complete unix path to the binary
37431   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37432     # Keep paths in /bin as-is, but remove trailing .exe if any
37433     new_path="${new_path/%.exe/}"
37434     # Do not save /bin paths to all_fixpath_prefixes!
37435   else
37436     # Not in mixed or Windows style, start by that.
37437     new_path=`cmd //c echo $new_path`
37438 
37439   input_path="$new_path"
37440   # Check if we need to convert this using DOS-style short mode. If the path
37441   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37442   # take no chances and rewrite it.
37443   # Note: m4 eats our [], so we need to use [ and ] instead.
37444   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37445   if test "x$has_forbidden_chars" != x; then
37446     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37447     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37448   fi
37449 
37450     # Output is in $new_path
37451 
37452   windows_path="$new_path"
37453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37454     unix_path=`$CYGPATH -u "$windows_path"`
37455     new_path="$unix_path"
37456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37458     new_path="$unix_path"
37459   fi
37460 
37461     # remove trailing .exe if any
37462     new_path="${new_path/%.exe/}"
37463 
37464     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37465     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37466   fi
37467 
37468   else
37469     # We're on a posix platform. Hooray! :)
37470     # First separate the path from the arguments. This will split at the first
37471     # space.
37472     complete="$NM"
37473     path="${complete%% *}"
37474     tmp="$complete EOL"
37475     arguments="${tmp#* }"
37476 
37477     # Cannot rely on the command "which" here since it doesn't always work.
37478     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37479     if test -z "$is_absolute_path"; then
37480       # Path to executable is not absolute. Find it.
37481       IFS_save="$IFS"
37482       IFS=:
37483       for p in $PATH; do
37484         if test -f "$p/$path" && test -x "$p/$path"; then
37485           new_path="$p/$path"
37486           break
37487         fi
37488       done
37489       IFS="$IFS_save"
37490     else
37491       # This is an absolute path, we can use it without further modifications.
37492       new_path="$path"
37493     fi
37494 
37495     if test "x$new_path" = x; then
37496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37497 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37498       has_space=`$ECHO "$complete" | $GREP " "`
37499       if test "x$has_space" != x; then
37500         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37502       fi
37503       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37504     fi
37505   fi
37506 
37507   # Now join together the path and the arguments once again
37508   if test "x$arguments" != xEOL; then
37509     new_complete="$new_path ${arguments% *}"
37510   else
37511     new_complete="$new_path"
37512   fi
37513 
37514   if test "x$complete" != "x$new_complete"; then
37515     NM="$new_complete"
37516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37517 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37518   fi
37519 
37520     GNM="$NM"
37521 
37522   fi
37523 
37524   # objcopy is used for moving debug symbols to separate files when
37525   # full debug symbols are enabled.
37526   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37527 
37528 
37529   # Publish this variable in the help.
37530 
37531 
37532   if test "x$OBJCOPY" = x; then
37533     # The variable is not set by user, try to locate tool using the code snippet
37534     if test -n "$ac_tool_prefix"; then
37535   for ac_prog in gobjcopy objcopy
37536   do
37537     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37538 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37540 $as_echo_n "checking for $ac_word... " >&6; }
37541 if ${ac_cv_prog_OBJCOPY+:} false; then :
37542   $as_echo_n "(cached) " >&6
37543 else
37544   if test -n "$OBJCOPY"; then
37545   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37546 else
37547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37548 for as_dir in $PATH
37549 do
37550   IFS=$as_save_IFS
37551   test -z "$as_dir" && as_dir=.
37552     for ac_exec_ext in '' $ac_executable_extensions; do
37553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37554     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37556     break 2
37557   fi
37558 done
37559   done
37560 IFS=$as_save_IFS
37561 
37562 fi
37563 fi
37564 OBJCOPY=$ac_cv_prog_OBJCOPY
37565 if test -n "$OBJCOPY"; then
37566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37567 $as_echo "$OBJCOPY" >&6; }
37568 else
37569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37570 $as_echo "no" >&6; }
37571 fi
37572 
37573 
37574     test -n "$OBJCOPY" && break
37575   done
37576 fi
37577 if test -z "$OBJCOPY"; then
37578   ac_ct_OBJCOPY=$OBJCOPY
37579   for ac_prog in gobjcopy objcopy
37580 do
37581   # Extract the first word of "$ac_prog", so it can be a program name with args.
37582 set dummy $ac_prog; ac_word=$2
37583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584 $as_echo_n "checking for $ac_word... " >&6; }
37585 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37586   $as_echo_n "(cached) " >&6
37587 else
37588   if test -n "$ac_ct_OBJCOPY"; then
37589   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37590 else
37591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592 for as_dir in $PATH
37593 do
37594   IFS=$as_save_IFS
37595   test -z "$as_dir" && as_dir=.
37596     for ac_exec_ext in '' $ac_executable_extensions; do
37597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600     break 2
37601   fi
37602 done
37603   done
37604 IFS=$as_save_IFS
37605 
37606 fi
37607 fi
37608 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37609 if test -n "$ac_ct_OBJCOPY"; then
37610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37611 $as_echo "$ac_ct_OBJCOPY" >&6; }
37612 else
37613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614 $as_echo "no" >&6; }
37615 fi
37616 
37617 
37618   test -n "$ac_ct_OBJCOPY" && break
37619 done
37620 
37621   if test "x$ac_ct_OBJCOPY" = x; then
37622     OBJCOPY=""
37623   else
37624     case $cross_compiling:$ac_tool_warned in
37625 yes:)
37626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37627 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37628 ac_tool_warned=yes ;;
37629 esac
37630     OBJCOPY=$ac_ct_OBJCOPY
37631   fi
37632 fi
37633 
37634   else
37635     # The variable is set, but is it from the command line or the environment?
37636 
37637     # Try to remove the string !OBJCOPY! from our list.
37638     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37639     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37640       # If it failed, the variable was not from the command line. Ignore it,
37641       # but warn the user (except for BASH, which is always set by the calling BASH).
37642       if test "xOBJCOPY" != xBASH; then
37643         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37644 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37645       fi
37646       # Try to locate tool using the code snippet
37647       if test -n "$ac_tool_prefix"; then
37648   for ac_prog in gobjcopy objcopy
37649   do
37650     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37653 $as_echo_n "checking for $ac_word... " >&6; }
37654 if ${ac_cv_prog_OBJCOPY+:} false; then :
37655   $as_echo_n "(cached) " >&6
37656 else
37657   if test -n "$OBJCOPY"; then
37658   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37659 else
37660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37661 for as_dir in $PATH
37662 do
37663   IFS=$as_save_IFS
37664   test -z "$as_dir" && as_dir=.
37665     for ac_exec_ext in '' $ac_executable_extensions; do
37666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37667     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37669     break 2
37670   fi
37671 done
37672   done
37673 IFS=$as_save_IFS
37674 
37675 fi
37676 fi
37677 OBJCOPY=$ac_cv_prog_OBJCOPY
37678 if test -n "$OBJCOPY"; then
37679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37680 $as_echo "$OBJCOPY" >&6; }
37681 else
37682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37683 $as_echo "no" >&6; }
37684 fi
37685 
37686 
37687     test -n "$OBJCOPY" && break
37688   done
37689 fi
37690 if test -z "$OBJCOPY"; then
37691   ac_ct_OBJCOPY=$OBJCOPY
37692   for ac_prog in gobjcopy objcopy
37693 do
37694   # Extract the first word of "$ac_prog", so it can be a program name with args.
37695 set dummy $ac_prog; ac_word=$2
37696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697 $as_echo_n "checking for $ac_word... " >&6; }
37698 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37699   $as_echo_n "(cached) " >&6
37700 else
37701   if test -n "$ac_ct_OBJCOPY"; then
37702   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37703 else
37704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705 for as_dir in $PATH
37706 do
37707   IFS=$as_save_IFS
37708   test -z "$as_dir" && as_dir=.
37709     for ac_exec_ext in '' $ac_executable_extensions; do
37710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713     break 2
37714   fi
37715 done
37716   done
37717 IFS=$as_save_IFS
37718 
37719 fi
37720 fi
37721 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37722 if test -n "$ac_ct_OBJCOPY"; then
37723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37724 $as_echo "$ac_ct_OBJCOPY" >&6; }
37725 else
37726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727 $as_echo "no" >&6; }
37728 fi
37729 
37730 
37731   test -n "$ac_ct_OBJCOPY" && break
37732 done
37733 
37734   if test "x$ac_ct_OBJCOPY" = x; then
37735     OBJCOPY=""
37736   else
37737     case $cross_compiling:$ac_tool_warned in
37738 yes:)
37739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37740 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37741 ac_tool_warned=yes ;;
37742 esac
37743     OBJCOPY=$ac_ct_OBJCOPY
37744   fi
37745 fi
37746 
37747     else
37748       # If it succeeded, then it was overridden by the user. We will use it
37749       # for the tool.
37750 
37751       # First remove it from the list of overridden variables, so we can test
37752       # for unknown variables in the end.
37753       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37754 
37755       # Check if the provided tool contains a complete path.
37756       tool_specified="$OBJCOPY"
37757       tool_basename="${tool_specified##*/}"
37758       if test "x$tool_basename" = "x$tool_specified"; then
37759         # A command without a complete path is provided, search $PATH.
37760         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37761 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37762         # Extract the first word of "$tool_basename", so it can be a program name with args.
37763 set dummy $tool_basename; ac_word=$2
37764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37765 $as_echo_n "checking for $ac_word... " >&6; }
37766 if ${ac_cv_path_OBJCOPY+:} false; then :
37767   $as_echo_n "(cached) " >&6
37768 else
37769   case $OBJCOPY in
37770   [\\/]* | ?:[\\/]*)
37771   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37772   ;;
37773   *)
37774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37775 for as_dir in $PATH
37776 do
37777   IFS=$as_save_IFS
37778   test -z "$as_dir" && as_dir=.
37779     for ac_exec_ext in '' $ac_executable_extensions; do
37780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37781     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37783     break 2
37784   fi
37785 done
37786   done
37787 IFS=$as_save_IFS
37788 
37789   ;;
37790 esac
37791 fi
37792 OBJCOPY=$ac_cv_path_OBJCOPY
37793 if test -n "$OBJCOPY"; then
37794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37795 $as_echo "$OBJCOPY" >&6; }
37796 else
37797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37798 $as_echo "no" >&6; }
37799 fi
37800 
37801 
37802         if test "x$OBJCOPY" = x; then
37803           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37804         fi
37805       else
37806         # Otherwise we believe it is a complete path. Use it as it is.
37807         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37808 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37810 $as_echo_n "checking for OBJCOPY... " >&6; }
37811         if test ! -x "$tool_specified"; then
37812           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37813 $as_echo "not found" >&6; }
37814           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37815         fi
37816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37817 $as_echo "$tool_specified" >&6; }
37818       fi
37819     fi
37820   fi
37821 
37822 
37823     # Only call fixup if objcopy was found.
37824     if test -n "$OBJCOPY"; then
37825 
37826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37827 
37828   # First separate the path from the arguments. This will split at the first
37829   # space.
37830   complete="$OBJCOPY"
37831   path="${complete%% *}"
37832   tmp="$complete EOL"
37833   arguments="${tmp#* }"
37834 
37835   # Input might be given as Windows format, start by converting to
37836   # unix format.
37837   new_path=`$CYGPATH -u "$path"`
37838 
37839   # Now try to locate executable using which
37840   new_path=`$WHICH "$new_path" 2> /dev/null`
37841   # bat and cmd files are not always considered executable in cygwin causing which
37842   # to not find them
37843   if test "x$new_path" = x \
37844       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37845       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37846     new_path=`$CYGPATH -u "$path"`
37847   fi
37848   if test "x$new_path" = x; then
37849     # Oops. Which didn't find the executable.
37850     # The splitting of arguments from the executable at a space might have been incorrect,
37851     # since paths with space are more likely in Windows. Give it another try with the whole
37852     # argument.
37853     path="$complete"
37854     arguments="EOL"
37855     new_path=`$CYGPATH -u "$path"`
37856     new_path=`$WHICH "$new_path" 2> /dev/null`
37857     # bat and cmd files are not always considered executable in cygwin causing which
37858     # to not find them
37859     if test "x$new_path" = x \
37860         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37861         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37862       new_path=`$CYGPATH -u "$path"`
37863     fi
37864     if test "x$new_path" = x; then
37865       # It's still not found. Now this is an unrecoverable error.
37866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37867 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37868       has_space=`$ECHO "$complete" | $GREP " "`
37869       if test "x$has_space" != x; then
37870         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37872       fi
37873       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37874     fi
37875   fi
37876 
37877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37880   # "foo.exe" is OK but "foo" is an error.
37881   #
37882   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37883   # It is also a way to make sure we got the proper file name for the real test later on.
37884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37885   if test "x$test_shortpath" = x; then
37886     # Short path failed, file does not exist as specified.
37887     # Try adding .exe or .cmd
37888     if test -f "${new_path}.exe"; then
37889       input_to_shortpath="${new_path}.exe"
37890     elif test -f "${new_path}.cmd"; then
37891       input_to_shortpath="${new_path}.cmd"
37892     else
37893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37894 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37895       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37896 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37897       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37898     fi
37899   else
37900     input_to_shortpath="$new_path"
37901   fi
37902 
37903   # Call helper function which possibly converts this using DOS-style short mode.
37904   # If so, the updated path is stored in $new_path.
37905   new_path="$input_to_shortpath"
37906 
37907   input_path="$input_to_shortpath"
37908   # Check if we need to convert this using DOS-style short mode. If the path
37909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37910   # take no chances and rewrite it.
37911   # Note: m4 eats our [], so we need to use [ and ] instead.
37912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37913   if test "x$has_forbidden_chars" != x; then
37914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37918       # Going to short mode and back again did indeed matter. Since short mode is
37919       # case insensitive, let's make it lowercase to improve readability.
37920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37921       # Now convert it back to Unix-style (cygpath)
37922       input_path=`$CYGPATH -u "$shortmode_path"`
37923       new_path="$input_path"
37924     fi
37925   fi
37926 
37927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37928   if test "x$test_cygdrive_prefix" = x; then
37929     # As a simple fix, exclude /usr/bin since it's not a real path.
37930     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37932       # a path prefixed by /cygdrive for fixpath to work.
37933       new_path="$CYGWIN_ROOT_PATH$input_path"
37934     fi
37935   fi
37936 
37937   # remove trailing .exe if any
37938   new_path="${new_path/%.exe/}"
37939 
37940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37941 
37942   # First separate the path from the arguments. This will split at the first
37943   # space.
37944   complete="$OBJCOPY"
37945   path="${complete%% *}"
37946   tmp="$complete EOL"
37947   arguments="${tmp#* }"
37948 
37949   # Input might be given as Windows format, start by converting to
37950   # unix format.
37951   new_path="$path"
37952 
37953   windows_path="$new_path"
37954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37955     unix_path=`$CYGPATH -u "$windows_path"`
37956     new_path="$unix_path"
37957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37959     new_path="$unix_path"
37960   fi
37961 
37962 
37963   # Now try to locate executable using which
37964   new_path=`$WHICH "$new_path" 2> /dev/null`
37965 
37966   if test "x$new_path" = x; then
37967     # Oops. Which didn't find the executable.
37968     # The splitting of arguments from the executable at a space might have been incorrect,
37969     # since paths with space are more likely in Windows. Give it another try with the whole
37970     # argument.
37971     path="$complete"
37972     arguments="EOL"
37973     new_path="$path"
37974 
37975   windows_path="$new_path"
37976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977     unix_path=`$CYGPATH -u "$windows_path"`
37978     new_path="$unix_path"
37979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37981     new_path="$unix_path"
37982   fi
37983 
37984 
37985     new_path=`$WHICH "$new_path" 2> /dev/null`
37986     # bat and cmd files are not always considered executable in MSYS causing which
37987     # to not find them
37988     if test "x$new_path" = x \
37989         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37990         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37991       new_path="$path"
37992 
37993   windows_path="$new_path"
37994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37995     unix_path=`$CYGPATH -u "$windows_path"`
37996     new_path="$unix_path"
37997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37999     new_path="$unix_path"
38000   fi
38001 
38002     fi
38003 
38004     if test "x$new_path" = x; then
38005       # It's still not found. Now this is an unrecoverable error.
38006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38007 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38008       has_space=`$ECHO "$complete" | $GREP " "`
38009       if test "x$has_space" != x; then
38010         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38011 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38012       fi
38013       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38014     fi
38015   fi
38016 
38017   # Now new_path has a complete unix path to the binary
38018   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38019     # Keep paths in /bin as-is, but remove trailing .exe if any
38020     new_path="${new_path/%.exe/}"
38021     # Do not save /bin paths to all_fixpath_prefixes!
38022   else
38023     # Not in mixed or Windows style, start by that.
38024     new_path=`cmd //c echo $new_path`
38025 
38026   input_path="$new_path"
38027   # Check if we need to convert this using DOS-style short mode. If the path
38028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38029   # take no chances and rewrite it.
38030   # Note: m4 eats our [], so we need to use [ and ] instead.
38031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38032   if test "x$has_forbidden_chars" != x; then
38033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38035   fi
38036 
38037     # Output is in $new_path
38038 
38039   windows_path="$new_path"
38040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38041     unix_path=`$CYGPATH -u "$windows_path"`
38042     new_path="$unix_path"
38043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38045     new_path="$unix_path"
38046   fi
38047 
38048     # remove trailing .exe if any
38049     new_path="${new_path/%.exe/}"
38050 
38051     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38052     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38053   fi
38054 
38055   else
38056     # We're on a posix platform. Hooray! :)
38057     # First separate the path from the arguments. This will split at the first
38058     # space.
38059     complete="$OBJCOPY"
38060     path="${complete%% *}"
38061     tmp="$complete EOL"
38062     arguments="${tmp#* }"
38063 
38064     # Cannot rely on the command "which" here since it doesn't always work.
38065     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38066     if test -z "$is_absolute_path"; then
38067       # Path to executable is not absolute. Find it.
38068       IFS_save="$IFS"
38069       IFS=:
38070       for p in $PATH; do
38071         if test -f "$p/$path" && test -x "$p/$path"; then
38072           new_path="$p/$path"
38073           break
38074         fi
38075       done
38076       IFS="$IFS_save"
38077     else
38078       # This is an absolute path, we can use it without further modifications.
38079       new_path="$path"
38080     fi
38081 
38082     if test "x$new_path" = x; then
38083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38084 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38085       has_space=`$ECHO "$complete" | $GREP " "`
38086       if test "x$has_space" != x; then
38087         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38088 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38089       fi
38090       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38091     fi
38092   fi
38093 
38094   # Now join together the path and the arguments once again
38095   if test "x$arguments" != xEOL; then
38096     new_complete="$new_path ${arguments% *}"
38097   else
38098     new_complete="$new_path"
38099   fi
38100 
38101   if test "x$complete" != "x$new_complete"; then
38102     OBJCOPY="$new_complete"
38103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38104 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38105   fi
38106 
38107     fi
38108   fi
38109 
38110 
38111 
38112   # Publish this variable in the help.
38113 
38114 
38115   if test "x$OBJDUMP" = x; then
38116     # The variable is not set by user, try to locate tool using the code snippet
38117     if test -n "$ac_tool_prefix"; then
38118   for ac_prog in gobjdump objdump
38119   do
38120     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38121 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38123 $as_echo_n "checking for $ac_word... " >&6; }
38124 if ${ac_cv_prog_OBJDUMP+:} false; then :
38125   $as_echo_n "(cached) " >&6
38126 else
38127   if test -n "$OBJDUMP"; then
38128   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38129 else
38130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38131 for as_dir in $PATH
38132 do
38133   IFS=$as_save_IFS
38134   test -z "$as_dir" && as_dir=.
38135     for ac_exec_ext in '' $ac_executable_extensions; do
38136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38137     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38139     break 2
38140   fi
38141 done
38142   done
38143 IFS=$as_save_IFS
38144 
38145 fi
38146 fi
38147 OBJDUMP=$ac_cv_prog_OBJDUMP
38148 if test -n "$OBJDUMP"; then
38149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38150 $as_echo "$OBJDUMP" >&6; }
38151 else
38152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38153 $as_echo "no" >&6; }
38154 fi
38155 
38156 
38157     test -n "$OBJDUMP" && break
38158   done
38159 fi
38160 if test -z "$OBJDUMP"; then
38161   ac_ct_OBJDUMP=$OBJDUMP
38162   for ac_prog in gobjdump objdump
38163 do
38164   # Extract the first word of "$ac_prog", so it can be a program name with args.
38165 set dummy $ac_prog; ac_word=$2
38166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38167 $as_echo_n "checking for $ac_word... " >&6; }
38168 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38169   $as_echo_n "(cached) " >&6
38170 else
38171   if test -n "$ac_ct_OBJDUMP"; then
38172   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38173 else
38174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38175 for as_dir in $PATH
38176 do
38177   IFS=$as_save_IFS
38178   test -z "$as_dir" && as_dir=.
38179     for ac_exec_ext in '' $ac_executable_extensions; do
38180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38181     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38183     break 2
38184   fi
38185 done
38186   done
38187 IFS=$as_save_IFS
38188 
38189 fi
38190 fi
38191 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38192 if test -n "$ac_ct_OBJDUMP"; then
38193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38194 $as_echo "$ac_ct_OBJDUMP" >&6; }
38195 else
38196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38197 $as_echo "no" >&6; }
38198 fi
38199 
38200 
38201   test -n "$ac_ct_OBJDUMP" && break
38202 done
38203 
38204   if test "x$ac_ct_OBJDUMP" = x; then
38205     OBJDUMP=""
38206   else
38207     case $cross_compiling:$ac_tool_warned in
38208 yes:)
38209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38210 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38211 ac_tool_warned=yes ;;
38212 esac
38213     OBJDUMP=$ac_ct_OBJDUMP
38214   fi
38215 fi
38216 
38217   else
38218     # The variable is set, but is it from the command line or the environment?
38219 
38220     # Try to remove the string !OBJDUMP! from our list.
38221     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38222     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38223       # If it failed, the variable was not from the command line. Ignore it,
38224       # but warn the user (except for BASH, which is always set by the calling BASH).
38225       if test "xOBJDUMP" != xBASH; then
38226         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38227 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38228       fi
38229       # Try to locate tool using the code snippet
38230       if test -n "$ac_tool_prefix"; then
38231   for ac_prog in gobjdump objdump
38232   do
38233     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38234 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38236 $as_echo_n "checking for $ac_word... " >&6; }
38237 if ${ac_cv_prog_OBJDUMP+:} false; then :
38238   $as_echo_n "(cached) " >&6
38239 else
38240   if test -n "$OBJDUMP"; then
38241   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38242 else
38243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38244 for as_dir in $PATH
38245 do
38246   IFS=$as_save_IFS
38247   test -z "$as_dir" && as_dir=.
38248     for ac_exec_ext in '' $ac_executable_extensions; do
38249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38250     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38252     break 2
38253   fi
38254 done
38255   done
38256 IFS=$as_save_IFS
38257 
38258 fi
38259 fi
38260 OBJDUMP=$ac_cv_prog_OBJDUMP
38261 if test -n "$OBJDUMP"; then
38262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38263 $as_echo "$OBJDUMP" >&6; }
38264 else
38265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38266 $as_echo "no" >&6; }
38267 fi
38268 
38269 
38270     test -n "$OBJDUMP" && break
38271   done
38272 fi
38273 if test -z "$OBJDUMP"; then
38274   ac_ct_OBJDUMP=$OBJDUMP
38275   for ac_prog in gobjdump objdump
38276 do
38277   # Extract the first word of "$ac_prog", so it can be a program name with args.
38278 set dummy $ac_prog; ac_word=$2
38279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38280 $as_echo_n "checking for $ac_word... " >&6; }
38281 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38282   $as_echo_n "(cached) " >&6
38283 else
38284   if test -n "$ac_ct_OBJDUMP"; then
38285   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38286 else
38287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38288 for as_dir in $PATH
38289 do
38290   IFS=$as_save_IFS
38291   test -z "$as_dir" && as_dir=.
38292     for ac_exec_ext in '' $ac_executable_extensions; do
38293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38294     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38296     break 2
38297   fi
38298 done
38299   done
38300 IFS=$as_save_IFS
38301 
38302 fi
38303 fi
38304 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38305 if test -n "$ac_ct_OBJDUMP"; then
38306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38307 $as_echo "$ac_ct_OBJDUMP" >&6; }
38308 else
38309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38310 $as_echo "no" >&6; }
38311 fi
38312 
38313 
38314   test -n "$ac_ct_OBJDUMP" && break
38315 done
38316 
38317   if test "x$ac_ct_OBJDUMP" = x; then
38318     OBJDUMP=""
38319   else
38320     case $cross_compiling:$ac_tool_warned in
38321 yes:)
38322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38323 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38324 ac_tool_warned=yes ;;
38325 esac
38326     OBJDUMP=$ac_ct_OBJDUMP
38327   fi
38328 fi
38329 
38330     else
38331       # If it succeeded, then it was overridden by the user. We will use it
38332       # for the tool.
38333 
38334       # First remove it from the list of overridden variables, so we can test
38335       # for unknown variables in the end.
38336       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38337 
38338       # Check if the provided tool contains a complete path.
38339       tool_specified="$OBJDUMP"
38340       tool_basename="${tool_specified##*/}"
38341       if test "x$tool_basename" = "x$tool_specified"; then
38342         # A command without a complete path is provided, search $PATH.
38343         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38344 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38345         # Extract the first word of "$tool_basename", so it can be a program name with args.
38346 set dummy $tool_basename; ac_word=$2
38347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38348 $as_echo_n "checking for $ac_word... " >&6; }
38349 if ${ac_cv_path_OBJDUMP+:} false; then :
38350   $as_echo_n "(cached) " >&6
38351 else
38352   case $OBJDUMP in
38353   [\\/]* | ?:[\\/]*)
38354   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38355   ;;
38356   *)
38357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38358 for as_dir in $PATH
38359 do
38360   IFS=$as_save_IFS
38361   test -z "$as_dir" && as_dir=.
38362     for ac_exec_ext in '' $ac_executable_extensions; do
38363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38364     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38366     break 2
38367   fi
38368 done
38369   done
38370 IFS=$as_save_IFS
38371 
38372   ;;
38373 esac
38374 fi
38375 OBJDUMP=$ac_cv_path_OBJDUMP
38376 if test -n "$OBJDUMP"; then
38377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38378 $as_echo "$OBJDUMP" >&6; }
38379 else
38380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38381 $as_echo "no" >&6; }
38382 fi
38383 
38384 
38385         if test "x$OBJDUMP" = x; then
38386           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38387         fi
38388       else
38389         # Otherwise we believe it is a complete path. Use it as it is.
38390         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38391 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38393 $as_echo_n "checking for OBJDUMP... " >&6; }
38394         if test ! -x "$tool_specified"; then
38395           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38396 $as_echo "not found" >&6; }
38397           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38398         fi
38399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38400 $as_echo "$tool_specified" >&6; }
38401       fi
38402     fi
38403   fi
38404 
38405 
38406   if test "x$OBJDUMP" != x; then
38407     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38408     # bails if argument is missing.
38409 
38410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411 
38412   # First separate the path from the arguments. This will split at the first
38413   # space.
38414   complete="$OBJDUMP"
38415   path="${complete%% *}"
38416   tmp="$complete EOL"
38417   arguments="${tmp#* }"
38418 
38419   # Input might be given as Windows format, start by converting to
38420   # unix format.
38421   new_path=`$CYGPATH -u "$path"`
38422 
38423   # Now try to locate executable using which
38424   new_path=`$WHICH "$new_path" 2> /dev/null`
38425   # bat and cmd files are not always considered executable in cygwin causing which
38426   # to not find them
38427   if test "x$new_path" = x \
38428       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38429       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38430     new_path=`$CYGPATH -u "$path"`
38431   fi
38432   if test "x$new_path" = x; then
38433     # Oops. Which didn't find the executable.
38434     # The splitting of arguments from the executable at a space might have been incorrect,
38435     # since paths with space are more likely in Windows. Give it another try with the whole
38436     # argument.
38437     path="$complete"
38438     arguments="EOL"
38439     new_path=`$CYGPATH -u "$path"`
38440     new_path=`$WHICH "$new_path" 2> /dev/null`
38441     # bat and cmd files are not always considered executable in cygwin causing which
38442     # to not find them
38443     if test "x$new_path" = x \
38444         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38445         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38446       new_path=`$CYGPATH -u "$path"`
38447     fi
38448     if test "x$new_path" = x; then
38449       # It's still not found. Now this is an unrecoverable error.
38450       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38451 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38452       has_space=`$ECHO "$complete" | $GREP " "`
38453       if test "x$has_space" != x; then
38454         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38455 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38456       fi
38457       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38458     fi
38459   fi
38460 
38461   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38462   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38463   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38464   # "foo.exe" is OK but "foo" is an error.
38465   #
38466   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38467   # It is also a way to make sure we got the proper file name for the real test later on.
38468   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38469   if test "x$test_shortpath" = x; then
38470     # Short path failed, file does not exist as specified.
38471     # Try adding .exe or .cmd
38472     if test -f "${new_path}.exe"; then
38473       input_to_shortpath="${new_path}.exe"
38474     elif test -f "${new_path}.cmd"; then
38475       input_to_shortpath="${new_path}.cmd"
38476     else
38477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38478 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38479       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38480 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38481       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38482     fi
38483   else
38484     input_to_shortpath="$new_path"
38485   fi
38486 
38487   # Call helper function which possibly converts this using DOS-style short mode.
38488   # If so, the updated path is stored in $new_path.
38489   new_path="$input_to_shortpath"
38490 
38491   input_path="$input_to_shortpath"
38492   # Check if we need to convert this using DOS-style short mode. If the path
38493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38494   # take no chances and rewrite it.
38495   # Note: m4 eats our [], so we need to use [ and ] instead.
38496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38497   if test "x$has_forbidden_chars" != x; then
38498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38502       # Going to short mode and back again did indeed matter. Since short mode is
38503       # case insensitive, let's make it lowercase to improve readability.
38504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38505       # Now convert it back to Unix-style (cygpath)
38506       input_path=`$CYGPATH -u "$shortmode_path"`
38507       new_path="$input_path"
38508     fi
38509   fi
38510 
38511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38512   if test "x$test_cygdrive_prefix" = x; then
38513     # As a simple fix, exclude /usr/bin since it's not a real path.
38514     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38516       # a path prefixed by /cygdrive for fixpath to work.
38517       new_path="$CYGWIN_ROOT_PATH$input_path"
38518     fi
38519   fi
38520 
38521   # remove trailing .exe if any
38522   new_path="${new_path/%.exe/}"
38523 
38524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38525 
38526   # First separate the path from the arguments. This will split at the first
38527   # space.
38528   complete="$OBJDUMP"
38529   path="${complete%% *}"
38530   tmp="$complete EOL"
38531   arguments="${tmp#* }"
38532 
38533   # Input might be given as Windows format, start by converting to
38534   # unix format.
38535   new_path="$path"
38536 
38537   windows_path="$new_path"
38538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539     unix_path=`$CYGPATH -u "$windows_path"`
38540     new_path="$unix_path"
38541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38543     new_path="$unix_path"
38544   fi
38545 
38546 
38547   # Now try to locate executable using which
38548   new_path=`$WHICH "$new_path" 2> /dev/null`
38549 
38550   if test "x$new_path" = x; then
38551     # Oops. Which didn't find the executable.
38552     # The splitting of arguments from the executable at a space might have been incorrect,
38553     # since paths with space are more likely in Windows. Give it another try with the whole
38554     # argument.
38555     path="$complete"
38556     arguments="EOL"
38557     new_path="$path"
38558 
38559   windows_path="$new_path"
38560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38561     unix_path=`$CYGPATH -u "$windows_path"`
38562     new_path="$unix_path"
38563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38565     new_path="$unix_path"
38566   fi
38567 
38568 
38569     new_path=`$WHICH "$new_path" 2> /dev/null`
38570     # bat and cmd files are not always considered executable in MSYS causing which
38571     # to not find them
38572     if test "x$new_path" = x \
38573         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38574         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38575       new_path="$path"
38576 
38577   windows_path="$new_path"
38578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38579     unix_path=`$CYGPATH -u "$windows_path"`
38580     new_path="$unix_path"
38581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38583     new_path="$unix_path"
38584   fi
38585 
38586     fi
38587 
38588     if test "x$new_path" = x; then
38589       # It's still not found. Now this is an unrecoverable error.
38590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38591 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38592       has_space=`$ECHO "$complete" | $GREP " "`
38593       if test "x$has_space" != x; then
38594         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38595 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38596       fi
38597       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38598     fi
38599   fi
38600 
38601   # Now new_path has a complete unix path to the binary
38602   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38603     # Keep paths in /bin as-is, but remove trailing .exe if any
38604     new_path="${new_path/%.exe/}"
38605     # Do not save /bin paths to all_fixpath_prefixes!
38606   else
38607     # Not in mixed or Windows style, start by that.
38608     new_path=`cmd //c echo $new_path`
38609 
38610   input_path="$new_path"
38611   # Check if we need to convert this using DOS-style short mode. If the path
38612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38613   # take no chances and rewrite it.
38614   # Note: m4 eats our [], so we need to use [ and ] instead.
38615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38616   if test "x$has_forbidden_chars" != x; then
38617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38619   fi
38620 
38621     # Output is in $new_path
38622 
38623   windows_path="$new_path"
38624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38625     unix_path=`$CYGPATH -u "$windows_path"`
38626     new_path="$unix_path"
38627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38629     new_path="$unix_path"
38630   fi
38631 
38632     # remove trailing .exe if any
38633     new_path="${new_path/%.exe/}"
38634 
38635     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38636     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38637   fi
38638 
38639   else
38640     # We're on a posix platform. Hooray! :)
38641     # First separate the path from the arguments. This will split at the first
38642     # space.
38643     complete="$OBJDUMP"
38644     path="${complete%% *}"
38645     tmp="$complete EOL"
38646     arguments="${tmp#* }"
38647 
38648     # Cannot rely on the command "which" here since it doesn't always work.
38649     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38650     if test -z "$is_absolute_path"; then
38651       # Path to executable is not absolute. Find it.
38652       IFS_save="$IFS"
38653       IFS=:
38654       for p in $PATH; do
38655         if test -f "$p/$path" && test -x "$p/$path"; then
38656           new_path="$p/$path"
38657           break
38658         fi
38659       done
38660       IFS="$IFS_save"
38661     else
38662       # This is an absolute path, we can use it without further modifications.
38663       new_path="$path"
38664     fi
38665 
38666     if test "x$new_path" = x; then
38667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38668 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38669       has_space=`$ECHO "$complete" | $GREP " "`
38670       if test "x$has_space" != x; then
38671         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38672 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38673       fi
38674       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38675     fi
38676   fi
38677 
38678   # Now join together the path and the arguments once again
38679   if test "x$arguments" != xEOL; then
38680     new_complete="$new_path ${arguments% *}"
38681   else
38682     new_complete="$new_path"
38683   fi
38684 
38685   if test "x$complete" != "x$new_complete"; then
38686     OBJDUMP="$new_complete"
38687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38688 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38689   fi
38690 
38691   fi
38692 
38693 
38694   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
38695   # to remain in place. Otherwise the compiler will not work in some situations
38696   # in later configure checks.
38697   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
38698     PATH="$OLD_PATH"
38699   fi
38700 
38701   # Restore the flags to the user specified values.
38702   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38703   CFLAGS="$ORG_CFLAGS"
38704   CXXFLAGS="$ORG_CXXFLAGS"
38705   OBJCFLAGS="$ORG_OBJCFLAGS"
38706 
38707 
38708 # Finally do some processing after the detection phase
38709 
38710   if test "x$COMPILE_TYPE" = "xcross"; then
38711     # Now we need to find a C/C++ compiler that can build executables for the
38712     # build platform. We can't use the AC_PROG_CC macro, since it can only be
38713     # used once. Also, we need to do this without adding a tools dir to the
38714     # path, otherwise we might pick up cross-compilers which don't use standard
38715     # naming.
38716 
38717     # FIXME: we should list the discovered compilers as an exclude pattern!
38718     # If we do that, we can do this detection before POST_DETECTION, and still
38719     # find the build compilers in the tools dir, if needed.
38720     if test "x$OPENJDK_BUILD_OS" = xmacosx; then
38721 
38722 
38723   # Publish this variable in the help.
38724 
38725 
38726   if test "x$BUILD_CC" = x; then
38727     # The variable is not set by user, try to locate tool using the code snippet
38728     for ac_prog in clang cl cc gcc
38729 do
38730   # Extract the first word of "$ac_prog", so it can be a program name with args.
38731 set dummy $ac_prog; ac_word=$2
38732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38733 $as_echo_n "checking for $ac_word... " >&6; }
38734 if ${ac_cv_path_BUILD_CC+:} false; then :
38735   $as_echo_n "(cached) " >&6
38736 else
38737   case $BUILD_CC in
38738   [\\/]* | ?:[\\/]*)
38739   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38740   ;;
38741   *)
38742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38743 for as_dir in $PATH
38744 do
38745   IFS=$as_save_IFS
38746   test -z "$as_dir" && as_dir=.
38747     for ac_exec_ext in '' $ac_executable_extensions; do
38748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38749     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38751     break 2
38752   fi
38753 done
38754   done
38755 IFS=$as_save_IFS
38756 
38757   ;;
38758 esac
38759 fi
38760 BUILD_CC=$ac_cv_path_BUILD_CC
38761 if test -n "$BUILD_CC"; then
38762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38763 $as_echo "$BUILD_CC" >&6; }
38764 else
38765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38766 $as_echo "no" >&6; }
38767 fi
38768 
38769 
38770   test -n "$BUILD_CC" && break
38771 done
38772 
38773   else
38774     # The variable is set, but is it from the command line or the environment?
38775 
38776     # Try to remove the string !BUILD_CC! from our list.
38777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38779       # If it failed, the variable was not from the command line. Ignore it,
38780       # but warn the user (except for BASH, which is always set by the calling BASH).
38781       if test "xBUILD_CC" != xBASH; then
38782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38783 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38784       fi
38785       # Try to locate tool using the code snippet
38786       for ac_prog in clang cl cc gcc
38787 do
38788   # Extract the first word of "$ac_prog", so it can be a program name with args.
38789 set dummy $ac_prog; ac_word=$2
38790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38791 $as_echo_n "checking for $ac_word... " >&6; }
38792 if ${ac_cv_path_BUILD_CC+:} false; then :
38793   $as_echo_n "(cached) " >&6
38794 else
38795   case $BUILD_CC in
38796   [\\/]* | ?:[\\/]*)
38797   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38798   ;;
38799   *)
38800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38801 for as_dir in $PATH
38802 do
38803   IFS=$as_save_IFS
38804   test -z "$as_dir" && as_dir=.
38805     for ac_exec_ext in '' $ac_executable_extensions; do
38806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38807     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38809     break 2
38810   fi
38811 done
38812   done
38813 IFS=$as_save_IFS
38814 
38815   ;;
38816 esac
38817 fi
38818 BUILD_CC=$ac_cv_path_BUILD_CC
38819 if test -n "$BUILD_CC"; then
38820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38821 $as_echo "$BUILD_CC" >&6; }
38822 else
38823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38824 $as_echo "no" >&6; }
38825 fi
38826 
38827 
38828   test -n "$BUILD_CC" && break
38829 done
38830 
38831     else
38832       # If it succeeded, then it was overridden by the user. We will use it
38833       # for the tool.
38834 
38835       # First remove it from the list of overridden variables, so we can test
38836       # for unknown variables in the end.
38837       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38838 
38839       # Check if the provided tool contains a complete path.
38840       tool_specified="$BUILD_CC"
38841       tool_basename="${tool_specified##*/}"
38842       if test "x$tool_basename" = "x$tool_specified"; then
38843         # A command without a complete path is provided, search $PATH.
38844         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38845 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38846         # Extract the first word of "$tool_basename", so it can be a program name with args.
38847 set dummy $tool_basename; ac_word=$2
38848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38849 $as_echo_n "checking for $ac_word... " >&6; }
38850 if ${ac_cv_path_BUILD_CC+:} false; then :
38851   $as_echo_n "(cached) " >&6
38852 else
38853   case $BUILD_CC in
38854   [\\/]* | ?:[\\/]*)
38855   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38856   ;;
38857   *)
38858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38859 for as_dir in $PATH
38860 do
38861   IFS=$as_save_IFS
38862   test -z "$as_dir" && as_dir=.
38863     for ac_exec_ext in '' $ac_executable_extensions; do
38864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38865     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38867     break 2
38868   fi
38869 done
38870   done
38871 IFS=$as_save_IFS
38872 
38873   ;;
38874 esac
38875 fi
38876 BUILD_CC=$ac_cv_path_BUILD_CC
38877 if test -n "$BUILD_CC"; then
38878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38879 $as_echo "$BUILD_CC" >&6; }
38880 else
38881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38882 $as_echo "no" >&6; }
38883 fi
38884 
38885 
38886         if test "x$BUILD_CC" = x; then
38887           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38888         fi
38889       else
38890         # Otherwise we believe it is a complete path. Use it as it is.
38891         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38892 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38893         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38894 $as_echo_n "checking for BUILD_CC... " >&6; }
38895         if test ! -x "$tool_specified"; then
38896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38897 $as_echo "not found" >&6; }
38898           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38899         fi
38900         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38901 $as_echo "$tool_specified" >&6; }
38902       fi
38903     fi
38904   fi
38905 
38906 
38907 
38908 
38909   # Publish this variable in the help.
38910 
38911 
38912   if test "x$BUILD_CXX" = x; then
38913     # The variable is not set by user, try to locate tool using the code snippet
38914     for ac_prog in clang++ cl CC g++
38915 do
38916   # Extract the first word of "$ac_prog", so it can be a program name with args.
38917 set dummy $ac_prog; ac_word=$2
38918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38919 $as_echo_n "checking for $ac_word... " >&6; }
38920 if ${ac_cv_path_BUILD_CXX+:} false; then :
38921   $as_echo_n "(cached) " >&6
38922 else
38923   case $BUILD_CXX in
38924   [\\/]* | ?:[\\/]*)
38925   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
38926   ;;
38927   *)
38928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38929 for as_dir in $PATH
38930 do
38931   IFS=$as_save_IFS
38932   test -z "$as_dir" && as_dir=.
38933     for ac_exec_ext in '' $ac_executable_extensions; do
38934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38935     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
38936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38937     break 2
38938   fi
38939 done
38940   done
38941 IFS=$as_save_IFS
38942 
38943   ;;
38944 esac
38945 fi
38946 BUILD_CXX=$ac_cv_path_BUILD_CXX
38947 if test -n "$BUILD_CXX"; then
38948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
38949 $as_echo "$BUILD_CXX" >&6; }
38950 else
38951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38952 $as_echo "no" >&6; }
38953 fi
38954 
38955 
38956   test -n "$BUILD_CXX" && break
38957 done
38958 
38959   else
38960     # The variable is set, but is it from the command line or the environment?
38961 
38962     # Try to remove the string !BUILD_CXX! from our list.
38963     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
38964     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38965       # If it failed, the variable was not from the command line. Ignore it,
38966       # but warn the user (except for BASH, which is always set by the calling BASH).
38967       if test "xBUILD_CXX" != xBASH; then
38968         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
38969 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
38970       fi
38971       # Try to locate tool using the code snippet
38972       for ac_prog in clang++ cl CC g++
38973 do
38974   # Extract the first word of "$ac_prog", so it can be a program name with args.
38975 set dummy $ac_prog; ac_word=$2
38976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38977 $as_echo_n "checking for $ac_word... " >&6; }
38978 if ${ac_cv_path_BUILD_CXX+:} false; then :
38979   $as_echo_n "(cached) " >&6
38980 else
38981   case $BUILD_CXX in
38982   [\\/]* | ?:[\\/]*)
38983   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
38984   ;;
38985   *)
38986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38987 for as_dir in $PATH
38988 do
38989   IFS=$as_save_IFS
38990   test -z "$as_dir" && as_dir=.
38991     for ac_exec_ext in '' $ac_executable_extensions; do
38992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38993     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
38994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38995     break 2
38996   fi
38997 done
38998   done
38999 IFS=$as_save_IFS
39000 
39001   ;;
39002 esac
39003 fi
39004 BUILD_CXX=$ac_cv_path_BUILD_CXX
39005 if test -n "$BUILD_CXX"; then
39006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39007 $as_echo "$BUILD_CXX" >&6; }
39008 else
39009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39010 $as_echo "no" >&6; }
39011 fi
39012 
39013 
39014   test -n "$BUILD_CXX" && break
39015 done
39016 
39017     else
39018       # If it succeeded, then it was overridden by the user. We will use it
39019       # for the tool.
39020 
39021       # First remove it from the list of overridden variables, so we can test
39022       # for unknown variables in the end.
39023       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39024 
39025       # Check if the provided tool contains a complete path.
39026       tool_specified="$BUILD_CXX"
39027       tool_basename="${tool_specified##*/}"
39028       if test "x$tool_basename" = "x$tool_specified"; then
39029         # A command without a complete path is provided, search $PATH.
39030         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39031 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39032         # Extract the first word of "$tool_basename", so it can be a program name with args.
39033 set dummy $tool_basename; ac_word=$2
39034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39035 $as_echo_n "checking for $ac_word... " >&6; }
39036 if ${ac_cv_path_BUILD_CXX+:} false; then :
39037   $as_echo_n "(cached) " >&6
39038 else
39039   case $BUILD_CXX in
39040   [\\/]* | ?:[\\/]*)
39041   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39042   ;;
39043   *)
39044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39045 for as_dir in $PATH
39046 do
39047   IFS=$as_save_IFS
39048   test -z "$as_dir" && as_dir=.
39049     for ac_exec_ext in '' $ac_executable_extensions; do
39050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39051     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39053     break 2
39054   fi
39055 done
39056   done
39057 IFS=$as_save_IFS
39058 
39059   ;;
39060 esac
39061 fi
39062 BUILD_CXX=$ac_cv_path_BUILD_CXX
39063 if test -n "$BUILD_CXX"; then
39064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39065 $as_echo "$BUILD_CXX" >&6; }
39066 else
39067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39068 $as_echo "no" >&6; }
39069 fi
39070 
39071 
39072         if test "x$BUILD_CXX" = x; then
39073           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39074         fi
39075       else
39076         # Otherwise we believe it is a complete path. Use it as it is.
39077         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39078 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39079         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39080 $as_echo_n "checking for BUILD_CXX... " >&6; }
39081         if test ! -x "$tool_specified"; then
39082           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39083 $as_echo "not found" >&6; }
39084           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39085         fi
39086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39087 $as_echo "$tool_specified" >&6; }
39088       fi
39089     fi
39090   fi
39091 
39092 
39093     else
39094 
39095 
39096 
39097   # Publish this variable in the help.
39098 
39099 
39100   if test "x$BUILD_CC" = x; then
39101     # The variable is not set by user, try to locate tool using the code snippet
39102     for ac_prog in cl cc gcc
39103 do
39104   # Extract the first word of "$ac_prog", so it can be a program name with args.
39105 set dummy $ac_prog; ac_word=$2
39106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39107 $as_echo_n "checking for $ac_word... " >&6; }
39108 if ${ac_cv_path_BUILD_CC+:} false; then :
39109   $as_echo_n "(cached) " >&6
39110 else
39111   case $BUILD_CC in
39112   [\\/]* | ?:[\\/]*)
39113   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39114   ;;
39115   *)
39116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39117 for as_dir in $PATH
39118 do
39119   IFS=$as_save_IFS
39120   test -z "$as_dir" && as_dir=.
39121     for ac_exec_ext in '' $ac_executable_extensions; do
39122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39123     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39125     break 2
39126   fi
39127 done
39128   done
39129 IFS=$as_save_IFS
39130 
39131   ;;
39132 esac
39133 fi
39134 BUILD_CC=$ac_cv_path_BUILD_CC
39135 if test -n "$BUILD_CC"; then
39136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39137 $as_echo "$BUILD_CC" >&6; }
39138 else
39139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39140 $as_echo "no" >&6; }
39141 fi
39142 
39143 
39144   test -n "$BUILD_CC" && break
39145 done
39146 
39147   else
39148     # The variable is set, but is it from the command line or the environment?
39149 
39150     # Try to remove the string !BUILD_CC! from our list.
39151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39153       # If it failed, the variable was not from the command line. Ignore it,
39154       # but warn the user (except for BASH, which is always set by the calling BASH).
39155       if test "xBUILD_CC" != xBASH; then
39156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39157 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39158       fi
39159       # Try to locate tool using the code snippet
39160       for ac_prog in cl cc gcc
39161 do
39162   # Extract the first word of "$ac_prog", so it can be a program name with args.
39163 set dummy $ac_prog; ac_word=$2
39164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39165 $as_echo_n "checking for $ac_word... " >&6; }
39166 if ${ac_cv_path_BUILD_CC+:} false; then :
39167   $as_echo_n "(cached) " >&6
39168 else
39169   case $BUILD_CC in
39170   [\\/]* | ?:[\\/]*)
39171   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39172   ;;
39173   *)
39174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39175 for as_dir in $PATH
39176 do
39177   IFS=$as_save_IFS
39178   test -z "$as_dir" && as_dir=.
39179     for ac_exec_ext in '' $ac_executable_extensions; do
39180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39181     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39183     break 2
39184   fi
39185 done
39186   done
39187 IFS=$as_save_IFS
39188 
39189   ;;
39190 esac
39191 fi
39192 BUILD_CC=$ac_cv_path_BUILD_CC
39193 if test -n "$BUILD_CC"; then
39194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39195 $as_echo "$BUILD_CC" >&6; }
39196 else
39197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39198 $as_echo "no" >&6; }
39199 fi
39200 
39201 
39202   test -n "$BUILD_CC" && break
39203 done
39204 
39205     else
39206       # If it succeeded, then it was overridden by the user. We will use it
39207       # for the tool.
39208 
39209       # First remove it from the list of overridden variables, so we can test
39210       # for unknown variables in the end.
39211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39212 
39213       # Check if the provided tool contains a complete path.
39214       tool_specified="$BUILD_CC"
39215       tool_basename="${tool_specified##*/}"
39216       if test "x$tool_basename" = "x$tool_specified"; then
39217         # A command without a complete path is provided, search $PATH.
39218         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39219 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39220         # Extract the first word of "$tool_basename", so it can be a program name with args.
39221 set dummy $tool_basename; ac_word=$2
39222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39223 $as_echo_n "checking for $ac_word... " >&6; }
39224 if ${ac_cv_path_BUILD_CC+:} false; then :
39225   $as_echo_n "(cached) " >&6
39226 else
39227   case $BUILD_CC in
39228   [\\/]* | ?:[\\/]*)
39229   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39230   ;;
39231   *)
39232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39233 for as_dir in $PATH
39234 do
39235   IFS=$as_save_IFS
39236   test -z "$as_dir" && as_dir=.
39237     for ac_exec_ext in '' $ac_executable_extensions; do
39238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39239     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39241     break 2
39242   fi
39243 done
39244   done
39245 IFS=$as_save_IFS
39246 
39247   ;;
39248 esac
39249 fi
39250 BUILD_CC=$ac_cv_path_BUILD_CC
39251 if test -n "$BUILD_CC"; then
39252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39253 $as_echo "$BUILD_CC" >&6; }
39254 else
39255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39256 $as_echo "no" >&6; }
39257 fi
39258 
39259 
39260         if test "x$BUILD_CC" = x; then
39261           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39262         fi
39263       else
39264         # Otherwise we believe it is a complete path. Use it as it is.
39265         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39266 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39268 $as_echo_n "checking for BUILD_CC... " >&6; }
39269         if test ! -x "$tool_specified"; then
39270           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39271 $as_echo "not found" >&6; }
39272           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39273         fi
39274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39275 $as_echo "$tool_specified" >&6; }
39276       fi
39277     fi
39278   fi
39279 
39280 
39281 
39282   if test "x$BUILD_CC" = x; then
39283     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
39284   fi
39285 
39286 
39287 
39288 
39289 
39290   # Publish this variable in the help.
39291 
39292 
39293   if test "x$BUILD_CXX" = x; then
39294     # The variable is not set by user, try to locate tool using the code snippet
39295     for ac_prog in cl CC g++
39296 do
39297   # Extract the first word of "$ac_prog", so it can be a program name with args.
39298 set dummy $ac_prog; ac_word=$2
39299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39300 $as_echo_n "checking for $ac_word... " >&6; }
39301 if ${ac_cv_path_BUILD_CXX+:} false; then :
39302   $as_echo_n "(cached) " >&6
39303 else
39304   case $BUILD_CXX in
39305   [\\/]* | ?:[\\/]*)
39306   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39307   ;;
39308   *)
39309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39310 for as_dir in $PATH
39311 do
39312   IFS=$as_save_IFS
39313   test -z "$as_dir" && as_dir=.
39314     for ac_exec_ext in '' $ac_executable_extensions; do
39315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39316     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39318     break 2
39319   fi
39320 done
39321   done
39322 IFS=$as_save_IFS
39323 
39324   ;;
39325 esac
39326 fi
39327 BUILD_CXX=$ac_cv_path_BUILD_CXX
39328 if test -n "$BUILD_CXX"; then
39329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39330 $as_echo "$BUILD_CXX" >&6; }
39331 else
39332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39333 $as_echo "no" >&6; }
39334 fi
39335 
39336 
39337   test -n "$BUILD_CXX" && break
39338 done
39339 
39340   else
39341     # The variable is set, but is it from the command line or the environment?
39342 
39343     # Try to remove the string !BUILD_CXX! from our list.
39344     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39345     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39346       # If it failed, the variable was not from the command line. Ignore it,
39347       # but warn the user (except for BASH, which is always set by the calling BASH).
39348       if test "xBUILD_CXX" != xBASH; then
39349         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39350 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39351       fi
39352       # Try to locate tool using the code snippet
39353       for ac_prog in cl CC g++
39354 do
39355   # Extract the first word of "$ac_prog", so it can be a program name with args.
39356 set dummy $ac_prog; ac_word=$2
39357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39358 $as_echo_n "checking for $ac_word... " >&6; }
39359 if ${ac_cv_path_BUILD_CXX+:} false; then :
39360   $as_echo_n "(cached) " >&6
39361 else
39362   case $BUILD_CXX in
39363   [\\/]* | ?:[\\/]*)
39364   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39365   ;;
39366   *)
39367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39368 for as_dir in $PATH
39369 do
39370   IFS=$as_save_IFS
39371   test -z "$as_dir" && as_dir=.
39372     for ac_exec_ext in '' $ac_executable_extensions; do
39373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39374     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39376     break 2
39377   fi
39378 done
39379   done
39380 IFS=$as_save_IFS
39381 
39382   ;;
39383 esac
39384 fi
39385 BUILD_CXX=$ac_cv_path_BUILD_CXX
39386 if test -n "$BUILD_CXX"; then
39387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39388 $as_echo "$BUILD_CXX" >&6; }
39389 else
39390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39391 $as_echo "no" >&6; }
39392 fi
39393 
39394 
39395   test -n "$BUILD_CXX" && break
39396 done
39397 
39398     else
39399       # If it succeeded, then it was overridden by the user. We will use it
39400       # for the tool.
39401 
39402       # First remove it from the list of overridden variables, so we can test
39403       # for unknown variables in the end.
39404       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39405 
39406       # Check if the provided tool contains a complete path.
39407       tool_specified="$BUILD_CXX"
39408       tool_basename="${tool_specified##*/}"
39409       if test "x$tool_basename" = "x$tool_specified"; then
39410         # A command without a complete path is provided, search $PATH.
39411         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39412 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39413         # Extract the first word of "$tool_basename", so it can be a program name with args.
39414 set dummy $tool_basename; ac_word=$2
39415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39416 $as_echo_n "checking for $ac_word... " >&6; }
39417 if ${ac_cv_path_BUILD_CXX+:} false; then :
39418   $as_echo_n "(cached) " >&6
39419 else
39420   case $BUILD_CXX in
39421   [\\/]* | ?:[\\/]*)
39422   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39423   ;;
39424   *)
39425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39426 for as_dir in $PATH
39427 do
39428   IFS=$as_save_IFS
39429   test -z "$as_dir" && as_dir=.
39430     for ac_exec_ext in '' $ac_executable_extensions; do
39431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39432     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39434     break 2
39435   fi
39436 done
39437   done
39438 IFS=$as_save_IFS
39439 
39440   ;;
39441 esac
39442 fi
39443 BUILD_CXX=$ac_cv_path_BUILD_CXX
39444 if test -n "$BUILD_CXX"; then
39445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39446 $as_echo "$BUILD_CXX" >&6; }
39447 else
39448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39449 $as_echo "no" >&6; }
39450 fi
39451 
39452 
39453         if test "x$BUILD_CXX" = x; then
39454           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39455         fi
39456       else
39457         # Otherwise we believe it is a complete path. Use it as it is.
39458         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39459 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39461 $as_echo_n "checking for BUILD_CXX... " >&6; }
39462         if test ! -x "$tool_specified"; then
39463           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39464 $as_echo "not found" >&6; }
39465           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39466         fi
39467         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39468 $as_echo "$tool_specified" >&6; }
39469       fi
39470     fi
39471   fi
39472 
39473 
39474 
39475   if test "x$BUILD_CXX" = x; then
39476     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
39477   fi
39478 
39479 
39480     fi
39481 
39482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39483 
39484   # First separate the path from the arguments. This will split at the first
39485   # space.
39486   complete="$BUILD_CC"
39487   path="${complete%% *}"
39488   tmp="$complete EOL"
39489   arguments="${tmp#* }"
39490 
39491   # Input might be given as Windows format, start by converting to
39492   # unix format.
39493   new_path=`$CYGPATH -u "$path"`
39494 
39495   # Now try to locate executable using which
39496   new_path=`$WHICH "$new_path" 2> /dev/null`
39497   # bat and cmd files are not always considered executable in cygwin causing which
39498   # to not find them
39499   if test "x$new_path" = x \
39500       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39501       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39502     new_path=`$CYGPATH -u "$path"`
39503   fi
39504   if test "x$new_path" = x; then
39505     # Oops. Which didn't find the executable.
39506     # The splitting of arguments from the executable at a space might have been incorrect,
39507     # since paths with space are more likely in Windows. Give it another try with the whole
39508     # argument.
39509     path="$complete"
39510     arguments="EOL"
39511     new_path=`$CYGPATH -u "$path"`
39512     new_path=`$WHICH "$new_path" 2> /dev/null`
39513     # bat and cmd files are not always considered executable in cygwin causing which
39514     # to not find them
39515     if test "x$new_path" = x \
39516         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39517         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39518       new_path=`$CYGPATH -u "$path"`
39519     fi
39520     if test "x$new_path" = x; then
39521       # It's still not found. Now this is an unrecoverable error.
39522       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39523 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39524       has_space=`$ECHO "$complete" | $GREP " "`
39525       if test "x$has_space" != x; then
39526         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39527 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39528       fi
39529       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39530     fi
39531   fi
39532 
39533   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39534   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39535   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39536   # "foo.exe" is OK but "foo" is an error.
39537   #
39538   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39539   # It is also a way to make sure we got the proper file name for the real test later on.
39540   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39541   if test "x$test_shortpath" = x; then
39542     # Short path failed, file does not exist as specified.
39543     # Try adding .exe or .cmd
39544     if test -f "${new_path}.exe"; then
39545       input_to_shortpath="${new_path}.exe"
39546     elif test -f "${new_path}.cmd"; then
39547       input_to_shortpath="${new_path}.cmd"
39548     else
39549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39550 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39551       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39552 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39553       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39554     fi
39555   else
39556     input_to_shortpath="$new_path"
39557   fi
39558 
39559   # Call helper function which possibly converts this using DOS-style short mode.
39560   # If so, the updated path is stored in $new_path.
39561   new_path="$input_to_shortpath"
39562 
39563   input_path="$input_to_shortpath"
39564   # Check if we need to convert this using DOS-style short mode. If the path
39565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39566   # take no chances and rewrite it.
39567   # Note: m4 eats our [], so we need to use [ and ] instead.
39568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39569   if test "x$has_forbidden_chars" != x; then
39570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39574       # Going to short mode and back again did indeed matter. Since short mode is
39575       # case insensitive, let's make it lowercase to improve readability.
39576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39577       # Now convert it back to Unix-style (cygpath)
39578       input_path=`$CYGPATH -u "$shortmode_path"`
39579       new_path="$input_path"
39580     fi
39581   fi
39582 
39583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39584   if test "x$test_cygdrive_prefix" = x; then
39585     # As a simple fix, exclude /usr/bin since it's not a real path.
39586     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39588       # a path prefixed by /cygdrive for fixpath to work.
39589       new_path="$CYGWIN_ROOT_PATH$input_path"
39590     fi
39591   fi
39592 
39593   # remove trailing .exe if any
39594   new_path="${new_path/%.exe/}"
39595 
39596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39597 
39598   # First separate the path from the arguments. This will split at the first
39599   # space.
39600   complete="$BUILD_CC"
39601   path="${complete%% *}"
39602   tmp="$complete EOL"
39603   arguments="${tmp#* }"
39604 
39605   # Input might be given as Windows format, start by converting to
39606   # unix format.
39607   new_path="$path"
39608 
39609   windows_path="$new_path"
39610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39611     unix_path=`$CYGPATH -u "$windows_path"`
39612     new_path="$unix_path"
39613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39615     new_path="$unix_path"
39616   fi
39617 
39618 
39619   # Now try to locate executable using which
39620   new_path=`$WHICH "$new_path" 2> /dev/null`
39621 
39622   if test "x$new_path" = x; then
39623     # Oops. Which didn't find the executable.
39624     # The splitting of arguments from the executable at a space might have been incorrect,
39625     # since paths with space are more likely in Windows. Give it another try with the whole
39626     # argument.
39627     path="$complete"
39628     arguments="EOL"
39629     new_path="$path"
39630 
39631   windows_path="$new_path"
39632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39633     unix_path=`$CYGPATH -u "$windows_path"`
39634     new_path="$unix_path"
39635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39637     new_path="$unix_path"
39638   fi
39639 
39640 
39641     new_path=`$WHICH "$new_path" 2> /dev/null`
39642     # bat and cmd files are not always considered executable in MSYS causing which
39643     # to not find them
39644     if test "x$new_path" = x \
39645         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39646         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39647       new_path="$path"
39648 
39649   windows_path="$new_path"
39650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39651     unix_path=`$CYGPATH -u "$windows_path"`
39652     new_path="$unix_path"
39653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39655     new_path="$unix_path"
39656   fi
39657 
39658     fi
39659 
39660     if test "x$new_path" = x; then
39661       # It's still not found. Now this is an unrecoverable error.
39662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39663 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39664       has_space=`$ECHO "$complete" | $GREP " "`
39665       if test "x$has_space" != x; then
39666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39668       fi
39669       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39670     fi
39671   fi
39672 
39673   # Now new_path has a complete unix path to the binary
39674   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39675     # Keep paths in /bin as-is, but remove trailing .exe if any
39676     new_path="${new_path/%.exe/}"
39677     # Do not save /bin paths to all_fixpath_prefixes!
39678   else
39679     # Not in mixed or Windows style, start by that.
39680     new_path=`cmd //c echo $new_path`
39681 
39682   input_path="$new_path"
39683   # Check if we need to convert this using DOS-style short mode. If the path
39684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39685   # take no chances and rewrite it.
39686   # Note: m4 eats our [], so we need to use [ and ] instead.
39687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39688   if test "x$has_forbidden_chars" != x; then
39689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39691   fi
39692 
39693     # Output is in $new_path
39694 
39695   windows_path="$new_path"
39696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39697     unix_path=`$CYGPATH -u "$windows_path"`
39698     new_path="$unix_path"
39699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39701     new_path="$unix_path"
39702   fi
39703 
39704     # remove trailing .exe if any
39705     new_path="${new_path/%.exe/}"
39706 
39707     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39708     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39709   fi
39710 
39711   else
39712     # We're on a posix platform. Hooray! :)
39713     # First separate the path from the arguments. This will split at the first
39714     # space.
39715     complete="$BUILD_CC"
39716     path="${complete%% *}"
39717     tmp="$complete EOL"
39718     arguments="${tmp#* }"
39719 
39720     # Cannot rely on the command "which" here since it doesn't always work.
39721     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39722     if test -z "$is_absolute_path"; then
39723       # Path to executable is not absolute. Find it.
39724       IFS_save="$IFS"
39725       IFS=:
39726       for p in $PATH; do
39727         if test -f "$p/$path" && test -x "$p/$path"; then
39728           new_path="$p/$path"
39729           break
39730         fi
39731       done
39732       IFS="$IFS_save"
39733     else
39734       # This is an absolute path, we can use it without further modifications.
39735       new_path="$path"
39736     fi
39737 
39738     if test "x$new_path" = x; then
39739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39740 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39741       has_space=`$ECHO "$complete" | $GREP " "`
39742       if test "x$has_space" != x; then
39743         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39744 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39745       fi
39746       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39747     fi
39748   fi
39749 
39750   # Now join together the path and the arguments once again
39751   if test "x$arguments" != xEOL; then
39752     new_complete="$new_path ${arguments% *}"
39753   else
39754     new_complete="$new_path"
39755   fi
39756 
39757   if test "x$complete" != "x$new_complete"; then
39758     BUILD_CC="$new_complete"
39759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39760 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39761   fi
39762 
39763 
39764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39765 
39766   # First separate the path from the arguments. This will split at the first
39767   # space.
39768   complete="$BUILD_CXX"
39769   path="${complete%% *}"
39770   tmp="$complete EOL"
39771   arguments="${tmp#* }"
39772 
39773   # Input might be given as Windows format, start by converting to
39774   # unix format.
39775   new_path=`$CYGPATH -u "$path"`
39776 
39777   # Now try to locate executable using which
39778   new_path=`$WHICH "$new_path" 2> /dev/null`
39779   # bat and cmd files are not always considered executable in cygwin causing which
39780   # to not find them
39781   if test "x$new_path" = x \
39782       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39783       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39784     new_path=`$CYGPATH -u "$path"`
39785   fi
39786   if test "x$new_path" = x; then
39787     # Oops. Which didn't find the executable.
39788     # The splitting of arguments from the executable at a space might have been incorrect,
39789     # since paths with space are more likely in Windows. Give it another try with the whole
39790     # argument.
39791     path="$complete"
39792     arguments="EOL"
39793     new_path=`$CYGPATH -u "$path"`
39794     new_path=`$WHICH "$new_path" 2> /dev/null`
39795     # bat and cmd files are not always considered executable in cygwin causing which
39796     # to not find them
39797     if test "x$new_path" = x \
39798         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39799         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39800       new_path=`$CYGPATH -u "$path"`
39801     fi
39802     if test "x$new_path" = x; then
39803       # It's still not found. Now this is an unrecoverable error.
39804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39805 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39806       has_space=`$ECHO "$complete" | $GREP " "`
39807       if test "x$has_space" != x; then
39808         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39809 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39810       fi
39811       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39812     fi
39813   fi
39814 
39815   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39816   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39817   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39818   # "foo.exe" is OK but "foo" is an error.
39819   #
39820   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39821   # It is also a way to make sure we got the proper file name for the real test later on.
39822   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39823   if test "x$test_shortpath" = x; then
39824     # Short path failed, file does not exist as specified.
39825     # Try adding .exe or .cmd
39826     if test -f "${new_path}.exe"; then
39827       input_to_shortpath="${new_path}.exe"
39828     elif test -f "${new_path}.cmd"; then
39829       input_to_shortpath="${new_path}.cmd"
39830     else
39831       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39832 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39833       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39834 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39835       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39836     fi
39837   else
39838     input_to_shortpath="$new_path"
39839   fi
39840 
39841   # Call helper function which possibly converts this using DOS-style short mode.
39842   # If so, the updated path is stored in $new_path.
39843   new_path="$input_to_shortpath"
39844 
39845   input_path="$input_to_shortpath"
39846   # Check if we need to convert this using DOS-style short mode. If the path
39847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39848   # take no chances and rewrite it.
39849   # Note: m4 eats our [], so we need to use [ and ] instead.
39850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39851   if test "x$has_forbidden_chars" != x; then
39852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39856       # Going to short mode and back again did indeed matter. Since short mode is
39857       # case insensitive, let's make it lowercase to improve readability.
39858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39859       # Now convert it back to Unix-style (cygpath)
39860       input_path=`$CYGPATH -u "$shortmode_path"`
39861       new_path="$input_path"
39862     fi
39863   fi
39864 
39865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39866   if test "x$test_cygdrive_prefix" = x; then
39867     # As a simple fix, exclude /usr/bin since it's not a real path.
39868     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39870       # a path prefixed by /cygdrive for fixpath to work.
39871       new_path="$CYGWIN_ROOT_PATH$input_path"
39872     fi
39873   fi
39874 
39875   # remove trailing .exe if any
39876   new_path="${new_path/%.exe/}"
39877 
39878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39879 
39880   # First separate the path from the arguments. This will split at the first
39881   # space.
39882   complete="$BUILD_CXX"
39883   path="${complete%% *}"
39884   tmp="$complete EOL"
39885   arguments="${tmp#* }"
39886 
39887   # Input might be given as Windows format, start by converting to
39888   # unix format.
39889   new_path="$path"
39890 
39891   windows_path="$new_path"
39892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39893     unix_path=`$CYGPATH -u "$windows_path"`
39894     new_path="$unix_path"
39895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39897     new_path="$unix_path"
39898   fi
39899 
39900 
39901   # Now try to locate executable using which
39902   new_path=`$WHICH "$new_path" 2> /dev/null`
39903 
39904   if test "x$new_path" = x; then
39905     # Oops. Which didn't find the executable.
39906     # The splitting of arguments from the executable at a space might have been incorrect,
39907     # since paths with space are more likely in Windows. Give it another try with the whole
39908     # argument.
39909     path="$complete"
39910     arguments="EOL"
39911     new_path="$path"
39912 
39913   windows_path="$new_path"
39914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39915     unix_path=`$CYGPATH -u "$windows_path"`
39916     new_path="$unix_path"
39917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39919     new_path="$unix_path"
39920   fi
39921 
39922 
39923     new_path=`$WHICH "$new_path" 2> /dev/null`
39924     # bat and cmd files are not always considered executable in MSYS causing which
39925     # to not find them
39926     if test "x$new_path" = x \
39927         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39928         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39929       new_path="$path"
39930 
39931   windows_path="$new_path"
39932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933     unix_path=`$CYGPATH -u "$windows_path"`
39934     new_path="$unix_path"
39935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39937     new_path="$unix_path"
39938   fi
39939 
39940     fi
39941 
39942     if test "x$new_path" = x; then
39943       # It's still not found. Now this is an unrecoverable error.
39944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39945 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39946       has_space=`$ECHO "$complete" | $GREP " "`
39947       if test "x$has_space" != x; then
39948         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39949 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39950       fi
39951       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39952     fi
39953   fi
39954 
39955   # Now new_path has a complete unix path to the binary
39956   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39957     # Keep paths in /bin as-is, but remove trailing .exe if any
39958     new_path="${new_path/%.exe/}"
39959     # Do not save /bin paths to all_fixpath_prefixes!
39960   else
39961     # Not in mixed or Windows style, start by that.
39962     new_path=`cmd //c echo $new_path`
39963 
39964   input_path="$new_path"
39965   # Check if we need to convert this using DOS-style short mode. If the path
39966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39967   # take no chances and rewrite it.
39968   # Note: m4 eats our [], so we need to use [ and ] instead.
39969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39970   if test "x$has_forbidden_chars" != x; then
39971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39972     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39973   fi
39974 
39975     # Output is in $new_path
39976 
39977   windows_path="$new_path"
39978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39979     unix_path=`$CYGPATH -u "$windows_path"`
39980     new_path="$unix_path"
39981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39983     new_path="$unix_path"
39984   fi
39985 
39986     # remove trailing .exe if any
39987     new_path="${new_path/%.exe/}"
39988 
39989     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39990     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39991   fi
39992 
39993   else
39994     # We're on a posix platform. Hooray! :)
39995     # First separate the path from the arguments. This will split at the first
39996     # space.
39997     complete="$BUILD_CXX"
39998     path="${complete%% *}"
39999     tmp="$complete EOL"
40000     arguments="${tmp#* }"
40001 
40002     # Cannot rely on the command "which" here since it doesn't always work.
40003     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40004     if test -z "$is_absolute_path"; then
40005       # Path to executable is not absolute. Find it.
40006       IFS_save="$IFS"
40007       IFS=:
40008       for p in $PATH; do
40009         if test -f "$p/$path" && test -x "$p/$path"; then
40010           new_path="$p/$path"
40011           break
40012         fi
40013       done
40014       IFS="$IFS_save"
40015     else
40016       # This is an absolute path, we can use it without further modifications.
40017       new_path="$path"
40018     fi
40019 
40020     if test "x$new_path" = x; then
40021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40022 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40023       has_space=`$ECHO "$complete" | $GREP " "`
40024       if test "x$has_space" != x; then
40025         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40026 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40027       fi
40028       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40029     fi
40030   fi
40031 
40032   # Now join together the path and the arguments once again
40033   if test "x$arguments" != xEOL; then
40034     new_complete="$new_path ${arguments% *}"
40035   else
40036     new_complete="$new_path"
40037   fi
40038 
40039   if test "x$complete" != "x$new_complete"; then
40040     BUILD_CXX="$new_complete"
40041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40042 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40043   fi
40044 
40045 
40046 
40047   # Publish this variable in the help.
40048 
40049 
40050   if test "x$BUILD_LD" = x; then
40051     # The variable is not set by user, try to locate tool using the code snippet
40052     for ac_prog in ld
40053 do
40054   # Extract the first word of "$ac_prog", so it can be a program name with args.
40055 set dummy $ac_prog; ac_word=$2
40056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40057 $as_echo_n "checking for $ac_word... " >&6; }
40058 if ${ac_cv_path_BUILD_LD+:} false; then :
40059   $as_echo_n "(cached) " >&6
40060 else
40061   case $BUILD_LD in
40062   [\\/]* | ?:[\\/]*)
40063   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40064   ;;
40065   *)
40066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40067 for as_dir in $PATH
40068 do
40069   IFS=$as_save_IFS
40070   test -z "$as_dir" && as_dir=.
40071     for ac_exec_ext in '' $ac_executable_extensions; do
40072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40073     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40075     break 2
40076   fi
40077 done
40078   done
40079 IFS=$as_save_IFS
40080 
40081   ;;
40082 esac
40083 fi
40084 BUILD_LD=$ac_cv_path_BUILD_LD
40085 if test -n "$BUILD_LD"; then
40086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40087 $as_echo "$BUILD_LD" >&6; }
40088 else
40089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40090 $as_echo "no" >&6; }
40091 fi
40092 
40093 
40094   test -n "$BUILD_LD" && break
40095 done
40096 
40097   else
40098     # The variable is set, but is it from the command line or the environment?
40099 
40100     # Try to remove the string !BUILD_LD! from our list.
40101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40103       # If it failed, the variable was not from the command line. Ignore it,
40104       # but warn the user (except for BASH, which is always set by the calling BASH).
40105       if test "xBUILD_LD" != xBASH; then
40106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40107 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40108       fi
40109       # Try to locate tool using the code snippet
40110       for ac_prog in ld
40111 do
40112   # Extract the first word of "$ac_prog", so it can be a program name with args.
40113 set dummy $ac_prog; ac_word=$2
40114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40115 $as_echo_n "checking for $ac_word... " >&6; }
40116 if ${ac_cv_path_BUILD_LD+:} false; then :
40117   $as_echo_n "(cached) " >&6
40118 else
40119   case $BUILD_LD in
40120   [\\/]* | ?:[\\/]*)
40121   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40122   ;;
40123   *)
40124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40125 for as_dir in $PATH
40126 do
40127   IFS=$as_save_IFS
40128   test -z "$as_dir" && as_dir=.
40129     for ac_exec_ext in '' $ac_executable_extensions; do
40130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40131     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40133     break 2
40134   fi
40135 done
40136   done
40137 IFS=$as_save_IFS
40138 
40139   ;;
40140 esac
40141 fi
40142 BUILD_LD=$ac_cv_path_BUILD_LD
40143 if test -n "$BUILD_LD"; then
40144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40145 $as_echo "$BUILD_LD" >&6; }
40146 else
40147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40148 $as_echo "no" >&6; }
40149 fi
40150 
40151 
40152   test -n "$BUILD_LD" && break
40153 done
40154 
40155     else
40156       # If it succeeded, then it was overridden by the user. We will use it
40157       # for the tool.
40158 
40159       # First remove it from the list of overridden variables, so we can test
40160       # for unknown variables in the end.
40161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40162 
40163       # Check if the provided tool contains a complete path.
40164       tool_specified="$BUILD_LD"
40165       tool_basename="${tool_specified##*/}"
40166       if test "x$tool_basename" = "x$tool_specified"; then
40167         # A command without a complete path is provided, search $PATH.
40168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40169 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40170         # Extract the first word of "$tool_basename", so it can be a program name with args.
40171 set dummy $tool_basename; ac_word=$2
40172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40173 $as_echo_n "checking for $ac_word... " >&6; }
40174 if ${ac_cv_path_BUILD_LD+:} false; then :
40175   $as_echo_n "(cached) " >&6
40176 else
40177   case $BUILD_LD in
40178   [\\/]* | ?:[\\/]*)
40179   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40180   ;;
40181   *)
40182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40183 for as_dir in $PATH
40184 do
40185   IFS=$as_save_IFS
40186   test -z "$as_dir" && as_dir=.
40187     for ac_exec_ext in '' $ac_executable_extensions; do
40188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40189     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40191     break 2
40192   fi
40193 done
40194   done
40195 IFS=$as_save_IFS
40196 
40197   ;;
40198 esac
40199 fi
40200 BUILD_LD=$ac_cv_path_BUILD_LD
40201 if test -n "$BUILD_LD"; then
40202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40203 $as_echo "$BUILD_LD" >&6; }
40204 else
40205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40206 $as_echo "no" >&6; }
40207 fi
40208 
40209 
40210         if test "x$BUILD_LD" = x; then
40211           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40212         fi
40213       else
40214         # Otherwise we believe it is a complete path. Use it as it is.
40215         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40216 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40218 $as_echo_n "checking for BUILD_LD... " >&6; }
40219         if test ! -x "$tool_specified"; then
40220           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40221 $as_echo "not found" >&6; }
40222           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40223         fi
40224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40225 $as_echo "$tool_specified" >&6; }
40226       fi
40227     fi
40228   fi
40229 
40230 
40231 
40232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40233 
40234   # First separate the path from the arguments. This will split at the first
40235   # space.
40236   complete="$BUILD_LD"
40237   path="${complete%% *}"
40238   tmp="$complete EOL"
40239   arguments="${tmp#* }"
40240 
40241   # Input might be given as Windows format, start by converting to
40242   # unix format.
40243   new_path=`$CYGPATH -u "$path"`
40244 
40245   # Now try to locate executable using which
40246   new_path=`$WHICH "$new_path" 2> /dev/null`
40247   # bat and cmd files are not always considered executable in cygwin causing which
40248   # to not find them
40249   if test "x$new_path" = x \
40250       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40251       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40252     new_path=`$CYGPATH -u "$path"`
40253   fi
40254   if test "x$new_path" = x; then
40255     # Oops. Which didn't find the executable.
40256     # The splitting of arguments from the executable at a space might have been incorrect,
40257     # since paths with space are more likely in Windows. Give it another try with the whole
40258     # argument.
40259     path="$complete"
40260     arguments="EOL"
40261     new_path=`$CYGPATH -u "$path"`
40262     new_path=`$WHICH "$new_path" 2> /dev/null`
40263     # bat and cmd files are not always considered executable in cygwin causing which
40264     # to not find them
40265     if test "x$new_path" = x \
40266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40268       new_path=`$CYGPATH -u "$path"`
40269     fi
40270     if test "x$new_path" = x; then
40271       # It's still not found. Now this is an unrecoverable error.
40272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40273 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40274       has_space=`$ECHO "$complete" | $GREP " "`
40275       if test "x$has_space" != x; then
40276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40278       fi
40279       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40280     fi
40281   fi
40282 
40283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40286   # "foo.exe" is OK but "foo" is an error.
40287   #
40288   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40289   # It is also a way to make sure we got the proper file name for the real test later on.
40290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40291   if test "x$test_shortpath" = x; then
40292     # Short path failed, file does not exist as specified.
40293     # Try adding .exe or .cmd
40294     if test -f "${new_path}.exe"; then
40295       input_to_shortpath="${new_path}.exe"
40296     elif test -f "${new_path}.cmd"; then
40297       input_to_shortpath="${new_path}.cmd"
40298     else
40299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40300 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40301       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40302 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40303       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40304     fi
40305   else
40306     input_to_shortpath="$new_path"
40307   fi
40308 
40309   # Call helper function which possibly converts this using DOS-style short mode.
40310   # If so, the updated path is stored in $new_path.
40311   new_path="$input_to_shortpath"
40312 
40313   input_path="$input_to_shortpath"
40314   # Check if we need to convert this using DOS-style short mode. If the path
40315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40316   # take no chances and rewrite it.
40317   # Note: m4 eats our [], so we need to use [ and ] instead.
40318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40319   if test "x$has_forbidden_chars" != x; then
40320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40324       # Going to short mode and back again did indeed matter. Since short mode is
40325       # case insensitive, let's make it lowercase to improve readability.
40326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40327       # Now convert it back to Unix-style (cygpath)
40328       input_path=`$CYGPATH -u "$shortmode_path"`
40329       new_path="$input_path"
40330     fi
40331   fi
40332 
40333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40334   if test "x$test_cygdrive_prefix" = x; then
40335     # As a simple fix, exclude /usr/bin since it's not a real path.
40336     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40338       # a path prefixed by /cygdrive for fixpath to work.
40339       new_path="$CYGWIN_ROOT_PATH$input_path"
40340     fi
40341   fi
40342 
40343   # remove trailing .exe if any
40344   new_path="${new_path/%.exe/}"
40345 
40346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40347 
40348   # First separate the path from the arguments. This will split at the first
40349   # space.
40350   complete="$BUILD_LD"
40351   path="${complete%% *}"
40352   tmp="$complete EOL"
40353   arguments="${tmp#* }"
40354 
40355   # Input might be given as Windows format, start by converting to
40356   # unix format.
40357   new_path="$path"
40358 
40359   windows_path="$new_path"
40360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40361     unix_path=`$CYGPATH -u "$windows_path"`
40362     new_path="$unix_path"
40363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40365     new_path="$unix_path"
40366   fi
40367 
40368 
40369   # Now try to locate executable using which
40370   new_path=`$WHICH "$new_path" 2> /dev/null`
40371 
40372   if test "x$new_path" = x; then
40373     # Oops. Which didn't find the executable.
40374     # The splitting of arguments from the executable at a space might have been incorrect,
40375     # since paths with space are more likely in Windows. Give it another try with the whole
40376     # argument.
40377     path="$complete"
40378     arguments="EOL"
40379     new_path="$path"
40380 
40381   windows_path="$new_path"
40382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383     unix_path=`$CYGPATH -u "$windows_path"`
40384     new_path="$unix_path"
40385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40387     new_path="$unix_path"
40388   fi
40389 
40390 
40391     new_path=`$WHICH "$new_path" 2> /dev/null`
40392     # bat and cmd files are not always considered executable in MSYS causing which
40393     # to not find them
40394     if test "x$new_path" = x \
40395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40397       new_path="$path"
40398 
40399   windows_path="$new_path"
40400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40401     unix_path=`$CYGPATH -u "$windows_path"`
40402     new_path="$unix_path"
40403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40405     new_path="$unix_path"
40406   fi
40407 
40408     fi
40409 
40410     if test "x$new_path" = x; then
40411       # It's still not found. Now this is an unrecoverable error.
40412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40413 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40414       has_space=`$ECHO "$complete" | $GREP " "`
40415       if test "x$has_space" != x; then
40416         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40417 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40418       fi
40419       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40420     fi
40421   fi
40422 
40423   # Now new_path has a complete unix path to the binary
40424   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40425     # Keep paths in /bin as-is, but remove trailing .exe if any
40426     new_path="${new_path/%.exe/}"
40427     # Do not save /bin paths to all_fixpath_prefixes!
40428   else
40429     # Not in mixed or Windows style, start by that.
40430     new_path=`cmd //c echo $new_path`
40431 
40432   input_path="$new_path"
40433   # Check if we need to convert this using DOS-style short mode. If the path
40434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40435   # take no chances and rewrite it.
40436   # Note: m4 eats our [], so we need to use [ and ] instead.
40437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40438   if test "x$has_forbidden_chars" != x; then
40439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40441   fi
40442 
40443     # Output is in $new_path
40444 
40445   windows_path="$new_path"
40446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40447     unix_path=`$CYGPATH -u "$windows_path"`
40448     new_path="$unix_path"
40449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40451     new_path="$unix_path"
40452   fi
40453 
40454     # remove trailing .exe if any
40455     new_path="${new_path/%.exe/}"
40456 
40457     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40458     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40459   fi
40460 
40461   else
40462     # We're on a posix platform. Hooray! :)
40463     # First separate the path from the arguments. This will split at the first
40464     # space.
40465     complete="$BUILD_LD"
40466     path="${complete%% *}"
40467     tmp="$complete EOL"
40468     arguments="${tmp#* }"
40469 
40470     # Cannot rely on the command "which" here since it doesn't always work.
40471     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40472     if test -z "$is_absolute_path"; then
40473       # Path to executable is not absolute. Find it.
40474       IFS_save="$IFS"
40475       IFS=:
40476       for p in $PATH; do
40477         if test -f "$p/$path" && test -x "$p/$path"; then
40478           new_path="$p/$path"
40479           break
40480         fi
40481       done
40482       IFS="$IFS_save"
40483     else
40484       # This is an absolute path, we can use it without further modifications.
40485       new_path="$path"
40486     fi
40487 
40488     if test "x$new_path" = x; then
40489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40490 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40491       has_space=`$ECHO "$complete" | $GREP " "`
40492       if test "x$has_space" != x; then
40493         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40495       fi
40496       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40497     fi
40498   fi
40499 
40500   # Now join together the path and the arguments once again
40501   if test "x$arguments" != xEOL; then
40502     new_complete="$new_path ${arguments% *}"
40503   else
40504     new_complete="$new_path"
40505   fi
40506 
40507   if test "x$complete" != "x$new_complete"; then
40508     BUILD_LD="$new_complete"
40509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40510 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40511   fi
40512 
40513   else
40514     # If we are not cross compiling, use the normal target compilers for
40515     # building the build platform executables.
40516     BUILD_CC="$CC"
40517     BUILD_CXX="$CXX"
40518     BUILD_LD="$LD"
40519   fi
40520 
40521 
40522   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40523     # For hotspot, we need these in Windows mixed path,
40524     # so rewrite them all. Need added .exe suffix.
40525     HOTSPOT_CXX="$CXX.exe"
40526     HOTSPOT_LD="$LD.exe"
40527     HOTSPOT_MT="$MT.exe"
40528     HOTSPOT_RC="$RC.exe"
40529 
40530   unix_path="$HOTSPOT_CXX"
40531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40532     windows_path=`$CYGPATH -m "$unix_path"`
40533     HOTSPOT_CXX="$windows_path"
40534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40535     windows_path=`cmd //c echo $unix_path`
40536     HOTSPOT_CXX="$windows_path"
40537   fi
40538 
40539 
40540   unix_path="$HOTSPOT_LD"
40541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40542     windows_path=`$CYGPATH -m "$unix_path"`
40543     HOTSPOT_LD="$windows_path"
40544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40545     windows_path=`cmd //c echo $unix_path`
40546     HOTSPOT_LD="$windows_path"
40547   fi
40548 
40549 
40550   unix_path="$HOTSPOT_MT"
40551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40552     windows_path=`$CYGPATH -m "$unix_path"`
40553     HOTSPOT_MT="$windows_path"
40554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40555     windows_path=`cmd //c echo $unix_path`
40556     HOTSPOT_MT="$windows_path"
40557   fi
40558 
40559 
40560   unix_path="$HOTSPOT_RC"
40561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40562     windows_path=`$CYGPATH -m "$unix_path"`
40563     HOTSPOT_RC="$windows_path"
40564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40565     windows_path=`cmd //c echo $unix_path`
40566     HOTSPOT_RC="$windows_path"
40567   fi
40568 
40569 
40570 
40571   else
40572     HOTSPOT_CXX="$CXX"
40573     HOTSPOT_LD="$LD"
40574   fi
40575 
40576 
40577 
40578   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40579     USE_CLANG=true
40580   fi
40581 
40582 
40583   # LDEXE is the linker to use, when creating executables. Not really used.
40584   # FIXME: These should just be removed!
40585   LDEXE="$LD"
40586   LDEXECXX="$LDCXX"
40587 
40588 
40589 
40590 
40591   # The package path is used only on macosx?
40592   # FIXME: clean this up, and/or move it elsewhere.
40593   PACKAGE_PATH=/opt/local
40594 
40595 
40596   # Check for extra potential brokenness.
40597   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40598     # On Windows, double-check that we got the right compiler.
40599     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40600     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40601     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40602       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40603         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40604       fi
40605     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40606       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40607         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40608       fi
40609     fi
40610   fi
40611 
40612   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40613     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40614     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40615     # This is later checked when setting flags.
40616   fi
40617 
40618   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40619   # in executable.'
40620   USING_BROKEN_SUSE_LD=no
40621   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40623 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40624     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40625     echo "int main() { }" > main.c
40626     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40627       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40628 $as_echo "no" >&6; }
40629       USING_BROKEN_SUSE_LD=no
40630     else
40631       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40632 $as_echo "yes" >&6; }
40633       USING_BROKEN_SUSE_LD=yes
40634     fi
40635     rm -rf version-script.map main.c
40636   fi
40637 
40638 
40639 
40640 # Setup the JTReg Regression Test Harness.
40641 
40642 
40643 # Check whether --with-jtreg was given.
40644 if test "${with_jtreg+set}" = set; then :
40645   withval=$with_jtreg;
40646 else
40647   with_jtreg=no
40648 fi
40649 
40650 
40651   if test "x$with_jtreg" = xno; then
40652     # jtreg disabled
40653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40654 $as_echo_n "checking for jtreg... " >&6; }
40655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40656 $as_echo "no" >&6; }
40657   else
40658     if test "x$with_jtreg" != xyes; then
40659       # with path specified.
40660       JT_HOME="$with_jtreg"
40661     fi
40662 
40663     if test "x$JT_HOME" != x; then
40664       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40665 $as_echo_n "checking for jtreg... " >&6; }
40666 
40667       # use JT_HOME enviroment var.
40668 
40669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40670 
40671   # Input might be given as Windows format, start by converting to
40672   # unix format.
40673   path="$JT_HOME"
40674   new_path=`$CYGPATH -u "$path"`
40675 
40676   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40677   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40678   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40679   # "foo.exe" is OK but "foo" is an error.
40680   #
40681   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40682   # It is also a way to make sure we got the proper file name for the real test later on.
40683   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40684   if test "x$test_shortpath" = x; then
40685     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40686 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40687     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40688   fi
40689 
40690   # Call helper function which possibly converts this using DOS-style short mode.
40691   # If so, the updated path is stored in $new_path.
40692 
40693   input_path="$new_path"
40694   # Check if we need to convert this using DOS-style short mode. If the path
40695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40696   # take no chances and rewrite it.
40697   # Note: m4 eats our [], so we need to use [ and ] instead.
40698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40699   if test "x$has_forbidden_chars" != x; then
40700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40701     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40702     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40703     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40704       # Going to short mode and back again did indeed matter. Since short mode is
40705       # case insensitive, let's make it lowercase to improve readability.
40706       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40707       # Now convert it back to Unix-style (cygpath)
40708       input_path=`$CYGPATH -u "$shortmode_path"`
40709       new_path="$input_path"
40710     fi
40711   fi
40712 
40713   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40714   if test "x$test_cygdrive_prefix" = x; then
40715     # As a simple fix, exclude /usr/bin since it's not a real path.
40716     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40717       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40718       # a path prefixed by /cygdrive for fixpath to work.
40719       new_path="$CYGWIN_ROOT_PATH$input_path"
40720     fi
40721   fi
40722 
40723 
40724   if test "x$path" != "x$new_path"; then
40725     JT_HOME="$new_path"
40726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40727 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40728   fi
40729 
40730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40731 
40732   path="$JT_HOME"
40733   has_colon=`$ECHO $path | $GREP ^.:`
40734   new_path="$path"
40735   if test "x$has_colon" = x; then
40736     # Not in mixed or Windows style, start by that.
40737     new_path=`cmd //c echo $path`
40738   fi
40739 
40740 
40741   input_path="$new_path"
40742   # Check if we need to convert this using DOS-style short mode. If the path
40743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40744   # take no chances and rewrite it.
40745   # Note: m4 eats our [], so we need to use [ and ] instead.
40746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40747   if test "x$has_forbidden_chars" != x; then
40748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40749     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40750   fi
40751 
40752 
40753   windows_path="$new_path"
40754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40755     unix_path=`$CYGPATH -u "$windows_path"`
40756     new_path="$unix_path"
40757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40759     new_path="$unix_path"
40760   fi
40761 
40762   if test "x$path" != "x$new_path"; then
40763     JT_HOME="$new_path"
40764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40765 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40766   fi
40767 
40768   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40769   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40770 
40771   else
40772     # We're on a posix platform. Hooray! :)
40773     path="$JT_HOME"
40774     has_space=`$ECHO "$path" | $GREP " "`
40775     if test "x$has_space" != x; then
40776       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40777 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40778       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40779     fi
40780 
40781     # Use eval to expand a potential ~
40782     eval path="$path"
40783     if test ! -f "$path" && test ! -d "$path"; then
40784       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40785     fi
40786 
40787     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40788   fi
40789 
40790 
40791       # jtreg win32 script works for everybody
40792       JTREGEXE="$JT_HOME/bin/jtreg"
40793 
40794       if test ! -f "$JTREGEXE"; then
40795         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40796       fi
40797 
40798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40799 $as_echo "$JTREGEXE" >&6; }
40800     else
40801       # try to find jtreg on path
40802 
40803 
40804 
40805   # Publish this variable in the help.
40806 
40807 
40808   if test "x$JTREGEXE" = x; then
40809     # The variable is not set by user, try to locate tool using the code snippet
40810     for ac_prog in jtreg
40811 do
40812   # Extract the first word of "$ac_prog", so it can be a program name with args.
40813 set dummy $ac_prog; ac_word=$2
40814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40815 $as_echo_n "checking for $ac_word... " >&6; }
40816 if ${ac_cv_path_JTREGEXE+:} false; then :
40817   $as_echo_n "(cached) " >&6
40818 else
40819   case $JTREGEXE in
40820   [\\/]* | ?:[\\/]*)
40821   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40822   ;;
40823   *)
40824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40825 for as_dir in $PATH
40826 do
40827   IFS=$as_save_IFS
40828   test -z "$as_dir" && as_dir=.
40829     for ac_exec_ext in '' $ac_executable_extensions; do
40830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40831     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40833     break 2
40834   fi
40835 done
40836   done
40837 IFS=$as_save_IFS
40838 
40839   ;;
40840 esac
40841 fi
40842 JTREGEXE=$ac_cv_path_JTREGEXE
40843 if test -n "$JTREGEXE"; then
40844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40845 $as_echo "$JTREGEXE" >&6; }
40846 else
40847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40848 $as_echo "no" >&6; }
40849 fi
40850 
40851 
40852   test -n "$JTREGEXE" && break
40853 done
40854 
40855   else
40856     # The variable is set, but is it from the command line or the environment?
40857 
40858     # Try to remove the string !JTREGEXE! from our list.
40859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40861       # If it failed, the variable was not from the command line. Ignore it,
40862       # but warn the user (except for BASH, which is always set by the calling BASH).
40863       if test "xJTREGEXE" != xBASH; then
40864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40865 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40866       fi
40867       # Try to locate tool using the code snippet
40868       for ac_prog in jtreg
40869 do
40870   # Extract the first word of "$ac_prog", so it can be a program name with args.
40871 set dummy $ac_prog; ac_word=$2
40872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40873 $as_echo_n "checking for $ac_word... " >&6; }
40874 if ${ac_cv_path_JTREGEXE+:} false; then :
40875   $as_echo_n "(cached) " >&6
40876 else
40877   case $JTREGEXE in
40878   [\\/]* | ?:[\\/]*)
40879   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40880   ;;
40881   *)
40882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40883 for as_dir in $PATH
40884 do
40885   IFS=$as_save_IFS
40886   test -z "$as_dir" && as_dir=.
40887     for ac_exec_ext in '' $ac_executable_extensions; do
40888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40889     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40891     break 2
40892   fi
40893 done
40894   done
40895 IFS=$as_save_IFS
40896 
40897   ;;
40898 esac
40899 fi
40900 JTREGEXE=$ac_cv_path_JTREGEXE
40901 if test -n "$JTREGEXE"; then
40902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40903 $as_echo "$JTREGEXE" >&6; }
40904 else
40905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40906 $as_echo "no" >&6; }
40907 fi
40908 
40909 
40910   test -n "$JTREGEXE" && break
40911 done
40912 
40913     else
40914       # If it succeeded, then it was overridden by the user. We will use it
40915       # for the tool.
40916 
40917       # First remove it from the list of overridden variables, so we can test
40918       # for unknown variables in the end.
40919       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40920 
40921       # Check if the provided tool contains a complete path.
40922       tool_specified="$JTREGEXE"
40923       tool_basename="${tool_specified##*/}"
40924       if test "x$tool_basename" = "x$tool_specified"; then
40925         # A command without a complete path is provided, search $PATH.
40926         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40927 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40928         # Extract the first word of "$tool_basename", so it can be a program name with args.
40929 set dummy $tool_basename; ac_word=$2
40930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40931 $as_echo_n "checking for $ac_word... " >&6; }
40932 if ${ac_cv_path_JTREGEXE+:} false; then :
40933   $as_echo_n "(cached) " >&6
40934 else
40935   case $JTREGEXE in
40936   [\\/]* | ?:[\\/]*)
40937   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40938   ;;
40939   *)
40940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40941 for as_dir in $PATH
40942 do
40943   IFS=$as_save_IFS
40944   test -z "$as_dir" && as_dir=.
40945     for ac_exec_ext in '' $ac_executable_extensions; do
40946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40947     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40949     break 2
40950   fi
40951 done
40952   done
40953 IFS=$as_save_IFS
40954 
40955   ;;
40956 esac
40957 fi
40958 JTREGEXE=$ac_cv_path_JTREGEXE
40959 if test -n "$JTREGEXE"; then
40960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40961 $as_echo "$JTREGEXE" >&6; }
40962 else
40963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40964 $as_echo "no" >&6; }
40965 fi
40966 
40967 
40968         if test "x$JTREGEXE" = x; then
40969           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40970         fi
40971       else
40972         # Otherwise we believe it is a complete path. Use it as it is.
40973         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40974 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40975         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40976 $as_echo_n "checking for JTREGEXE... " >&6; }
40977         if test ! -x "$tool_specified"; then
40978           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40979 $as_echo "not found" >&6; }
40980           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40981         fi
40982         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40983 $as_echo "$tool_specified" >&6; }
40984       fi
40985     fi
40986   fi
40987 
40988 
40989 
40990   if test "x$JTREGEXE" = x; then
40991     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40992   fi
40993 
40994 
40995       JT_HOME="`$DIRNAME $JTREGEXE`"
40996     fi
40997   fi
40998 
40999 
41000 
41001 
41002 
41003 
41004   # Option used to tell the compiler whether to create 32- or 64-bit executables
41005   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41006     COMPILER_TARGET_BITS_FLAG="-q"
41007   else
41008     COMPILER_TARGET_BITS_FLAG="-m"
41009   fi
41010 
41011 
41012   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41013   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41014     ARFLAGS="-r"
41015   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41016     ARFLAGS="-X64"
41017   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41018     # lib.exe is used as AR to create static libraries.
41019     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41020   else
41021     ARFLAGS=""
41022   fi
41023 
41024 
41025   ## Setup strip.
41026   # FIXME: should this really be per platform, or should it be per toolchain type?
41027   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41028   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41029   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41030     STRIPFLAGS="-g"
41031   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41032     STRIPFLAGS="-x"
41033   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41034     STRIPFLAGS="-S"
41035   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41036     STRIPFLAGS="-X32_64"
41037   fi
41038 
41039   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41040     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41041   fi
41042 
41043 
41044   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41045     # FIXME: break out into MCSFLAGS
41046     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41047   fi
41048 
41049 
41050   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41051     CC_OUT_OPTION=-Fo
41052     EXE_OUT_OPTION=-out:
41053     LD_OUT_OPTION=-out:
41054     AR_OUT_OPTION=-out:
41055   else
41056     # The option used to specify the target .o,.a or .so file.
41057     # When compiling, how to specify the to be created object file.
41058     CC_OUT_OPTION='-o$(SPACE)'
41059     # When linking, how to specify the to be created executable.
41060     EXE_OUT_OPTION='-o$(SPACE)'
41061     # When linking, how to specify the to be created dynamically linkable library.
41062     LD_OUT_OPTION='-o$(SPACE)'
41063     # When archiving, how to specify the to be create static archive for object files.
41064     AR_OUT_OPTION='rcs$(SPACE)'
41065   fi
41066 
41067 
41068 
41069 
41070 
41071   # On Windows, we need to set RC flags.
41072   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41073     RC_FLAGS="-nologo -l 0x409 -r"
41074     if test "x$VARIANT" = xOPT; then
41075       RC_FLAGS="$RC_FLAGS -d NDEBUG"
41076     fi
41077 
41078     # The version variables used to create RC_FLAGS may be overridden
41079     # in a custom configure script, or possibly the command line.
41080     # Let those variables be expanded at make time in spec.gmk.
41081     # The \$ are escaped to the shell, and the $(...) variables
41082     # are evaluated by make.
41083     RC_FLAGS="$RC_FLAGS \
41084         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41085         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41086         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41087         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(COOKED_JDK_UPDATE_VERSION).\$(COOKED_BUILD_NUMBER)\" \
41088         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41089         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41090         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(COOKED_JDK_UPDATE_VERSION),\$(COOKED_JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41091   fi
41092 
41093 
41094   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41095     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
41096     CCXXFLAGS="$CCXXFLAGS -nologo"
41097   fi
41098 
41099   if test "x$SYSROOT" != "x"; then
41100     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41101       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41102         # Solaris Studio does not have a concept of sysroot. Instead we must
41103         # make sure the default include and lib dirs are appended to each
41104         # compile and link command line.
41105         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41106         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41107             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41108             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41109       fi
41110     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41111       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41112       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41113     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41114       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41115       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41116     fi
41117     # Propagate the sysroot args to hotspot
41118     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41119     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41120     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41121   fi
41122 
41123 
41124 
41125 
41126 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41127 
41128 # Now we can test some aspects on the target using configure macros.
41129 
41130 
41131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41132 $as_echo_n "checking for ANSI C header files... " >&6; }
41133 if ${ac_cv_header_stdc+:} false; then :
41134   $as_echo_n "(cached) " >&6
41135 else
41136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41137 /* end confdefs.h.  */
41138 #include <stdlib.h>
41139 #include <stdarg.h>
41140 #include <string.h>
41141 #include <float.h>
41142 
41143 int
41144 main ()
41145 {
41146 
41147   ;
41148   return 0;
41149 }
41150 _ACEOF
41151 if ac_fn_cxx_try_compile "$LINENO"; then :
41152   ac_cv_header_stdc=yes
41153 else
41154   ac_cv_header_stdc=no
41155 fi
41156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41157 
41158 if test $ac_cv_header_stdc = yes; then
41159   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41161 /* end confdefs.h.  */
41162 #include <string.h>
41163 
41164 _ACEOF
41165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41166   $EGREP "memchr" >/dev/null 2>&1; then :
41167 
41168 else
41169   ac_cv_header_stdc=no
41170 fi
41171 rm -f conftest*
41172 
41173 fi
41174 
41175 if test $ac_cv_header_stdc = yes; then
41176   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41178 /* end confdefs.h.  */
41179 #include <stdlib.h>
41180 
41181 _ACEOF
41182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41183   $EGREP "free" >/dev/null 2>&1; then :
41184 
41185 else
41186   ac_cv_header_stdc=no
41187 fi
41188 rm -f conftest*
41189 
41190 fi
41191 
41192 if test $ac_cv_header_stdc = yes; then
41193   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41194   if test "$cross_compiling" = yes; then :
41195   :
41196 else
41197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41198 /* end confdefs.h.  */
41199 #include <ctype.h>
41200 #include <stdlib.h>
41201 #if ((' ' & 0x0FF) == 0x020)
41202 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41203 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41204 #else
41205 # define ISLOWER(c) \
41206                    (('a' <= (c) && (c) <= 'i') \
41207                      || ('j' <= (c) && (c) <= 'r') \
41208                      || ('s' <= (c) && (c) <= 'z'))
41209 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41210 #endif
41211 
41212 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41213 int
41214 main ()
41215 {
41216   int i;
41217   for (i = 0; i < 256; i++)
41218     if (XOR (islower (i), ISLOWER (i))
41219         || toupper (i) != TOUPPER (i))
41220       return 2;
41221   return 0;
41222 }
41223 _ACEOF
41224 if ac_fn_cxx_try_run "$LINENO"; then :
41225 
41226 else
41227   ac_cv_header_stdc=no
41228 fi
41229 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41230   conftest.$ac_objext conftest.beam conftest.$ac_ext
41231 fi
41232 
41233 fi
41234 fi
41235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41236 $as_echo "$ac_cv_header_stdc" >&6; }
41237 if test $ac_cv_header_stdc = yes; then
41238 
41239 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41240 
41241 fi
41242 
41243 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41244 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41245                   inttypes.h stdint.h unistd.h
41246 do :
41247   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41248 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41249 "
41250 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41251   cat >>confdefs.h <<_ACEOF
41252 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41253 _ACEOF
41254 
41255 fi
41256 
41257 done
41258 
41259 
41260 
41261   ###############################################################################
41262   #
41263   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41264   # (The JVM can use 32 or 64 bit Java pointers but that decision
41265   # is made at runtime.)
41266   #
41267 
41268   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41269     # Always specify -m flag on Solaris
41270     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41271 
41272   # When we add flags to the "official" CFLAGS etc, we need to
41273   # keep track of these additions in ADDED_CFLAGS etc. These
41274   # will later be checked to make sure only controlled additions
41275   # have been made to CFLAGS etc.
41276   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41277   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41278   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41279 
41280   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41281   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41282   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41283 
41284   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41285   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41286   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41287 
41288   elif test "x$COMPILE_TYPE" = xreduced; then
41289     if test "x$OPENJDK_TARGET_OS" != xwindows; then
41290       # Specify -m if running reduced on other Posix platforms
41291 
41292   # When we add flags to the "official" CFLAGS etc, we need to
41293   # keep track of these additions in ADDED_CFLAGS etc. These
41294   # will later be checked to make sure only controlled additions
41295   # have been made to CFLAGS etc.
41296   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41297   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41298   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41299 
41300   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41301   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41302   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41303 
41304   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41305   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41306   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41307 
41308     fi
41309   fi
41310 
41311   # Make compilation sanity check
41312   for ac_header in stdio.h
41313 do :
41314   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41315 if test "x$ac_cv_header_stdio_h" = xyes; then :
41316   cat >>confdefs.h <<_ACEOF
41317 #define HAVE_STDIO_H 1
41318 _ACEOF
41319 
41320 else
41321 
41322     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41323 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41324     if test "x$COMPILE_TYPE" = xreduced; then
41325       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41326 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41327     elif test "x$COMPILE_TYPE" = xcross; then
41328       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41329 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41330     fi
41331     as_fn_error $? "Cannot continue." "$LINENO" 5
41332 
41333 fi
41334 
41335 done
41336 
41337 
41338   # The cast to long int works around a bug in the HP C Compiler
41339 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41340 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41341 # This bug is HP SR number 8606223364.
41342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41343 $as_echo_n "checking size of int *... " >&6; }
41344 if ${ac_cv_sizeof_int_p+:} false; then :
41345   $as_echo_n "(cached) " >&6
41346 else
41347   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41348 
41349 else
41350   if test "$ac_cv_type_int_p" = yes; then
41351      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41352 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41353 as_fn_error 77 "cannot compute sizeof (int *)
41354 See \`config.log' for more details" "$LINENO" 5; }
41355    else
41356      ac_cv_sizeof_int_p=0
41357    fi
41358 fi
41359 
41360 fi
41361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41362 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41363 
41364 
41365 
41366 cat >>confdefs.h <<_ACEOF
41367 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41368 _ACEOF
41369 
41370 
41371 
41372   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41373   if test "x$ac_cv_sizeof_int_p" = x; then
41374     # The test failed, lets stick to the assumed value.
41375     { $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
41376 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41377   else
41378     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41379 
41380     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41381       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41382       # Let's try to implicitely set the compilers target architecture and retry the test
41383       { $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
41384 $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;}
41385       { $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
41386 $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;}
41387 
41388   # When we add flags to the "official" CFLAGS etc, we need to
41389   # keep track of these additions in ADDED_CFLAGS etc. These
41390   # will later be checked to make sure only controlled additions
41391   # have been made to CFLAGS etc.
41392   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41393   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41394   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41395 
41396   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41397   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41398   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41399 
41400   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41401   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41402   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41403 
41404 
41405       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41406       unset ac_cv_sizeof_int_p
41407       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41408       cat >>confdefs.h <<_ACEOF
41409 #undef SIZEOF_INT_P
41410 _ACEOF
41411 
41412       # The cast to long int works around a bug in the HP C Compiler
41413 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41414 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41415 # This bug is HP SR number 8606223364.
41416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41417 $as_echo_n "checking size of int *... " >&6; }
41418 if ${ac_cv_sizeof_int_p+:} false; then :
41419   $as_echo_n "(cached) " >&6
41420 else
41421   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41422 
41423 else
41424   if test "$ac_cv_type_int_p" = yes; then
41425      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41426 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41427 as_fn_error 77 "cannot compute sizeof (int *)
41428 See \`config.log' for more details" "$LINENO" 5; }
41429    else
41430      ac_cv_sizeof_int_p=0
41431    fi
41432 fi
41433 
41434 fi
41435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41436 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41437 
41438 
41439 
41440 cat >>confdefs.h <<_ACEOF
41441 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41442 _ACEOF
41443 
41444 
41445 
41446       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41447 
41448       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41449         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
41450       fi
41451     fi
41452   fi
41453 
41454   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41455 $as_echo_n "checking for target address size... " >&6; }
41456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41457 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41458 
41459 
41460   ###############################################################################
41461   #
41462   # Is the target little of big endian?
41463   #
41464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41465 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41466 if ${ac_cv_c_bigendian+:} false; then :
41467   $as_echo_n "(cached) " >&6
41468 else
41469   ac_cv_c_bigendian=unknown
41470     # See if we're dealing with a universal compiler.
41471     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41472 /* end confdefs.h.  */
41473 #ifndef __APPLE_CC__
41474                not a universal capable compiler
41475              #endif
41476              typedef int dummy;
41477 
41478 _ACEOF
41479 if ac_fn_cxx_try_compile "$LINENO"; then :
41480 
41481         # Check for potential -arch flags.  It is not universal unless
41482         # there are at least two -arch flags with different values.
41483         ac_arch=
41484         ac_prev=
41485         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41486          if test -n "$ac_prev"; then
41487            case $ac_word in
41488              i?86 | x86_64 | ppc | ppc64)
41489                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41490                  ac_arch=$ac_word
41491                else
41492                  ac_cv_c_bigendian=universal
41493                  break
41494                fi
41495                ;;
41496            esac
41497            ac_prev=
41498          elif test "x$ac_word" = "x-arch"; then
41499            ac_prev=arch
41500          fi
41501        done
41502 fi
41503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41504     if test $ac_cv_c_bigendian = unknown; then
41505       # See if sys/param.h defines the BYTE_ORDER macro.
41506       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41507 /* end confdefs.h.  */
41508 #include <sys/types.h>
41509              #include <sys/param.h>
41510 
41511 int
41512 main ()
41513 {
41514 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41515                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41516                      && LITTLE_ENDIAN)
41517               bogus endian macros
41518              #endif
41519 
41520   ;
41521   return 0;
41522 }
41523 _ACEOF
41524 if ac_fn_cxx_try_compile "$LINENO"; then :
41525   # It does; now see whether it defined to BIG_ENDIAN or not.
41526          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41527 /* end confdefs.h.  */
41528 #include <sys/types.h>
41529                 #include <sys/param.h>
41530 
41531 int
41532 main ()
41533 {
41534 #if BYTE_ORDER != BIG_ENDIAN
41535                  not big endian
41536                 #endif
41537 
41538   ;
41539   return 0;
41540 }
41541 _ACEOF
41542 if ac_fn_cxx_try_compile "$LINENO"; then :
41543   ac_cv_c_bigendian=yes
41544 else
41545   ac_cv_c_bigendian=no
41546 fi
41547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41548 fi
41549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41550     fi
41551     if test $ac_cv_c_bigendian = unknown; then
41552       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41553       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41554 /* end confdefs.h.  */
41555 #include <limits.h>
41556 
41557 int
41558 main ()
41559 {
41560 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41561               bogus endian macros
41562              #endif
41563 
41564   ;
41565   return 0;
41566 }
41567 _ACEOF
41568 if ac_fn_cxx_try_compile "$LINENO"; then :
41569   # It does; now see whether it defined to _BIG_ENDIAN or not.
41570          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41571 /* end confdefs.h.  */
41572 #include <limits.h>
41573 
41574 int
41575 main ()
41576 {
41577 #ifndef _BIG_ENDIAN
41578                  not big endian
41579                 #endif
41580 
41581   ;
41582   return 0;
41583 }
41584 _ACEOF
41585 if ac_fn_cxx_try_compile "$LINENO"; then :
41586   ac_cv_c_bigendian=yes
41587 else
41588   ac_cv_c_bigendian=no
41589 fi
41590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41591 fi
41592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41593     fi
41594     if test $ac_cv_c_bigendian = unknown; then
41595       # Compile a test program.
41596       if test "$cross_compiling" = yes; then :
41597   # Try to guess by grepping values from an object file.
41598          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41599 /* end confdefs.h.  */
41600 short int ascii_mm[] =
41601                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41602                 short int ascii_ii[] =
41603                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41604                 int use_ascii (int i) {
41605                   return ascii_mm[i] + ascii_ii[i];
41606                 }
41607                 short int ebcdic_ii[] =
41608                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41609                 short int ebcdic_mm[] =
41610                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41611                 int use_ebcdic (int i) {
41612                   return ebcdic_mm[i] + ebcdic_ii[i];
41613                 }
41614                 extern int foo;
41615 
41616 int
41617 main ()
41618 {
41619 return use_ascii (foo) == use_ebcdic (foo);
41620   ;
41621   return 0;
41622 }
41623 _ACEOF
41624 if ac_fn_cxx_try_compile "$LINENO"; then :
41625   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41626               ac_cv_c_bigendian=yes
41627             fi
41628             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41629               if test "$ac_cv_c_bigendian" = unknown; then
41630                 ac_cv_c_bigendian=no
41631               else
41632                 # finding both strings is unlikely to happen, but who knows?
41633                 ac_cv_c_bigendian=unknown
41634               fi
41635             fi
41636 fi
41637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41638 else
41639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41640 /* end confdefs.h.  */
41641 $ac_includes_default
41642 int
41643 main ()
41644 {
41645 
41646              /* Are we little or big endian?  From Harbison&Steele.  */
41647              union
41648              {
41649                long int l;
41650                char c[sizeof (long int)];
41651              } u;
41652              u.l = 1;
41653              return u.c[sizeof (long int) - 1] == 1;
41654 
41655   ;
41656   return 0;
41657 }
41658 _ACEOF
41659 if ac_fn_cxx_try_run "$LINENO"; then :
41660   ac_cv_c_bigendian=no
41661 else
41662   ac_cv_c_bigendian=yes
41663 fi
41664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41665   conftest.$ac_objext conftest.beam conftest.$ac_ext
41666 fi
41667 
41668     fi
41669 fi
41670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41671 $as_echo "$ac_cv_c_bigendian" >&6; }
41672  case $ac_cv_c_bigendian in #(
41673    yes)
41674      ENDIAN="big";; #(
41675    no)
41676      ENDIAN="little" ;; #(
41677    universal)
41678      ENDIAN="universal_endianness"
41679      ;; #(
41680    *)
41681      ENDIAN="unknown" ;;
41682  esac
41683 
41684 
41685   if test "x$ENDIAN" = xuniversal_endianness; then
41686     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41687   fi
41688   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41689     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
41690   fi
41691 
41692 
41693 # Configure flags for the tools
41694 
41695   ###############################################################################
41696   #
41697   # How to compile shared libraries.
41698   #
41699 
41700   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41701     PICFLAG="-fPIC"
41702     PIEFLAG="-fPIE"
41703     C_FLAG_REORDER=''
41704     CXX_FLAG_REORDER=''
41705 
41706     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41707       # Linking is different on MacOSX
41708       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41709       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41710       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41711       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41712       SET_SHARED_LIBRARY_MAPFILE=''
41713     else
41714       # Default works for linux, might work on other platforms as well.
41715       SHARED_LIBRARY_FLAGS='-shared'
41716       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41717       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41718       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41719       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41720     fi
41721   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41722     PICFLAG=''
41723     C_FLAG_REORDER=''
41724     CXX_FLAG_REORDER=''
41725 
41726     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41727       # Linking is different on MacOSX
41728       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41729       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41730       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41731       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41732       SET_SHARED_LIBRARY_MAPFILE=''
41733     else
41734       # Default works for linux, might work on other platforms as well.
41735       SHARED_LIBRARY_FLAGS='-shared'
41736       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41737       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41738       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41739       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41740     fi
41741   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41742     PICFLAG="-KPIC"
41743     PIEFLAG=""
41744     C_FLAG_REORDER='-xF'
41745     CXX_FLAG_REORDER='-xF'
41746     SHARED_LIBRARY_FLAGS="-G"
41747     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41748     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41749     SET_SHARED_LIBRARY_NAME=''
41750     SET_SHARED_LIBRARY_MAPFILE='-M$1'
41751   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41752     PICFLAG="-qpic=large"
41753     PIEFLAG=""
41754     C_FLAG_REORDER=''
41755     CXX_FLAG_REORDER=''
41756     SHARED_LIBRARY_FLAGS="-qmkshrobj"
41757     SET_EXECUTABLE_ORIGIN=""
41758     SET_SHARED_LIBRARY_ORIGIN=''
41759     SET_SHARED_LIBRARY_NAME=''
41760     SET_SHARED_LIBRARY_MAPFILE=''
41761   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41762     PICFLAG=""
41763     PIEFLAG=""
41764     C_FLAG_REORDER=''
41765     CXX_FLAG_REORDER=''
41766     SHARED_LIBRARY_FLAGS="-LD"
41767     SET_EXECUTABLE_ORIGIN=''
41768     SET_SHARED_LIBRARY_ORIGIN=''
41769     SET_SHARED_LIBRARY_NAME=''
41770     SET_SHARED_LIBRARY_MAPFILE=''
41771   fi
41772 
41773 
41774 
41775 
41776 
41777 
41778 
41779 
41780 
41781   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41782     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41783     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41784     CFLAGS_JDKLIB_EXTRA='-xstrconst'
41785   fi
41786   # The (cross) compiler is now configured, we can now test capabilities
41787   # of the target platform.
41788 
41789 
41790 
41791   ###############################################################################
41792   #
41793   # Setup the opt flags for different compilers
41794   # and different operating systems.
41795   #
41796 
41797   # FIXME: this was indirectly the old default, but just inherited.
41798   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41799   #   C_FLAG_DEPS="-MMD -MF"
41800   # fi
41801 
41802   # Generate make dependency files
41803   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41804     C_FLAG_DEPS="-MMD -MF"
41805   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41806     C_FLAG_DEPS="-MMD -MF"
41807   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41808     C_FLAG_DEPS="-xMMD -xMF"
41809   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41810     C_FLAG_DEPS="-qmakedep=gcc -MF"
41811   fi
41812   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41813 
41814 
41815 
41816   # Debug symbols
41817   #
41818   # By default don't set any specific assembler debug
41819   # info flags for toolchains unless we know they work.
41820   # See JDK-8207057.
41821   ASFLAGS_DEBUG_SYMBOLS=""
41822   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41823     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41824       CFLAGS_DEBUG_SYMBOLS="-g1"
41825       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41826     else
41827       CFLAGS_DEBUG_SYMBOLS="-g"
41828       CXXFLAGS_DEBUG_SYMBOLS="-g"
41829     fi
41830     ASFLAGS_DEBUG_SYMBOLS="-g"
41831   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41832     CFLAGS_DEBUG_SYMBOLS="-g"
41833     CXXFLAGS_DEBUG_SYMBOLS="-g"
41834   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41835     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41836     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41837   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41838     CFLAGS_DEBUG_SYMBOLS="-g"
41839     CXXFLAGS_DEBUG_SYMBOLS="-g"
41840   fi
41841 
41842 
41843 
41844 
41845   # Optimization levels
41846   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41847     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41848 
41849     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41850       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41851       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41852       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41853       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41854       C_O_FLAG_NONE="-xregs=no%frameptr"
41855       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41856       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41857       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41858       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41859       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41860         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41861         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41862       fi
41863     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41864       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41865       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41866       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41867       C_O_FLAG_NONE=""
41868       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41869       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41870       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41871       CXX_O_FLAG_NONE=""
41872     fi
41873   else
41874     # The remaining toolchains share opt flags between CC and CXX;
41875     # setup for C and duplicate afterwards.
41876     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41877       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41878         # On MacOSX we optimize for size, something
41879         # we should do for all platforms?
41880         C_O_FLAG_HIGHEST="-Os"
41881         C_O_FLAG_HI="-Os"
41882         C_O_FLAG_NORM="-Os"
41883         C_O_FLAG_NONE=""
41884       else
41885         C_O_FLAG_HIGHEST="-O3"
41886         C_O_FLAG_HI="-O3"
41887         C_O_FLAG_NORM="-O2"
41888         C_O_FLAG_NONE="-O0"
41889       fi
41890     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41891       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41892         # On MacOSX we optimize for size, something
41893         # we should do for all platforms?
41894         C_O_FLAG_HIGHEST="-Os"
41895         C_O_FLAG_HI="-Os"
41896         C_O_FLAG_NORM="-Os"
41897         C_O_FLAG_NONE=""
41898       else
41899         C_O_FLAG_HIGHEST="-O3"
41900         C_O_FLAG_HI="-O3"
41901         C_O_FLAG_NORM="-O2"
41902         C_O_FLAG_NONE="-O0"
41903       fi
41904     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41905       C_O_FLAG_HIGHEST="-O3"
41906       C_O_FLAG_HI="-O3 -qstrict"
41907       C_O_FLAG_NORM="-O2"
41908       C_O_FLAG_NONE=""
41909     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41910       C_O_FLAG_HIGHEST="-O2"
41911       C_O_FLAG_HI="-O1"
41912       C_O_FLAG_NORM="-O1"
41913       C_O_FLAG_NONE="-Od"
41914     fi
41915     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41916     CXX_O_FLAG_HI="$C_O_FLAG_HI"
41917     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41918     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41919   fi
41920 
41921 
41922 
41923 
41924 
41925 
41926 
41927 
41928 
41929 
41930 
41931   # Special extras...
41932   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41933     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41934       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41935       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41936     fi
41937   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41938     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41939     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41940     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41941   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41942     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS -fstack-protector"
41943     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS -fstack-protector"
41944     if test "x$OPENJDK_TARGET_OS" != xmacosx; then
41945       LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
41946       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro"
41947     fi
41948     CXXSTD_CXXFLAG="-std=gnu++98"
41949 
41950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
41951 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
41952   supports=yes
41953 
41954   saved_cxxflags="$CXXFLAGS"
41955   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
41956   ac_ext=cpp
41957 ac_cpp='$CXXCPP $CPPFLAGS'
41958 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41959 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41960 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41961 
41962   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41963 /* end confdefs.h.  */
41964 int i;
41965 _ACEOF
41966 if ac_fn_cxx_try_compile "$LINENO"; then :
41967 
41968 else
41969   supports=no
41970 fi
41971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41972   ac_ext=cpp
41973 ac_cpp='$CXXCPP $CPPFLAGS'
41974 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41975 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41976 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41977 
41978   CXXFLAGS="$saved_cxxflags"
41979 
41980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41981 $as_echo "$supports" >&6; }
41982   if test "x$supports" = "xyes" ; then
41983     :
41984   else
41985     CXXSTD_CXXFLAG=""
41986   fi
41987 
41988     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
41989     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
41990 
41991   fi
41992 
41993   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41994     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41995 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41996   fi
41997 
41998   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41999     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42000 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42001   fi
42002 
42003   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42004     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42005 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42006   fi
42007 
42008 
42009   if test "x$ASFLAGS" != "x"; then
42010     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring ASFLAGS($ASFLAGS) found in environment. Use --with-extra-asflags" >&5
42011 $as_echo "$as_me: WARNING: Ignoring ASFLAGS($ASFLAGS) found in environment. Use --with-extra-asflags" >&2;}
42012   fi
42013 
42014 
42015 # Check whether --with-extra-cflags was given.
42016 if test "${with_extra_cflags+set}" = set; then :
42017   withval=$with_extra_cflags;
42018 fi
42019 
42020 
42021 
42022 # Check whether --with-extra-cxxflags was given.
42023 if test "${with_extra_cxxflags+set}" = set; then :
42024   withval=$with_extra_cxxflags;
42025 fi
42026 
42027 
42028 
42029 # Check whether --with-extra-ldflags was given.
42030 if test "${with_extra_ldflags+set}" = set; then :
42031   withval=$with_extra_ldflags;
42032 fi
42033 
42034 
42035 
42036 # Check whether --with-extra-asflags was given.
42037 if test "${with_extra_asflags+set}" = set; then :
42038   withval=$with_extra_asflags;
42039 fi
42040 
42041 
42042   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42043   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42044   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42045 
42046   # Hotspot needs these set in their legacy form
42047   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42048   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42049   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42050   LEGACY_EXTRA_ASFLAGS="$with_extra_asflags"
42051 
42052 
42053 
42054 
42055 
42056 
42057   ###############################################################################
42058   #
42059   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42060   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42061   #
42062 
42063   FDLIBM_CFLAGS=""
42064   # Setup compiler/platform specific flags to CFLAGS_JDK,
42065   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
42066   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42067     # these options are used for both C and C++ compiles
42068     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42069         -pipe -fstack-protector -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42070     case $OPENJDK_TARGET_CPU_ARCH in
42071       arm )
42072         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42073         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42074         ;;
42075       ppc )
42076         # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
42077         ;;
42078       * )
42079         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
42080         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42081         ;;
42082     esac
42083 
42084   REFERENCE_VERSION=6
42085 
42086   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
42087     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
42088   fi
42089 
42090   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
42091     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
42092   fi
42093 
42094   # Version comparison method inspired by http://stackoverflow.com/a/24067243
42095   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
42096 
42097   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
42098 
42099   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
42100   # runs afoul of the more aggressive versions of these optimisations.
42101   # Notably, value range propagation now assumes that the this pointer of C++
42102   # member functions is non-null.
42103   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
42104 
42105 
42106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42107 $as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42108   supports=yes
42109 
42110   saved_cflags="$CFLAGS"
42111   CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
42112   ac_ext=c
42113 ac_cpp='$CPP $CPPFLAGS'
42114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42117 
42118 
42119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42120 /* end confdefs.h.  */
42121 int i;
42122 _ACEOF
42123 if ac_fn_c_try_compile "$LINENO"; then :
42124 
42125 else
42126   supports=no
42127 fi
42128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42129   ac_ext=cpp
42130 ac_cpp='$CXXCPP $CPPFLAGS'
42131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42134 
42135   CFLAGS="$saved_cflags"
42136 
42137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42138 $as_echo "$supports" >&6; }
42139   if test "x$supports" = "xyes" ; then
42140     C_COMP_SUPPORTS="yes"
42141   else
42142     C_COMP_SUPPORTS="no"
42143   fi
42144 
42145 
42146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42147 $as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42148   supports=yes
42149 
42150   saved_cxxflags="$CXXFLAGS"
42151   CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
42152   ac_ext=cpp
42153 ac_cpp='$CXXCPP $CPPFLAGS'
42154 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42155 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42156 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42157 
42158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42159 /* end confdefs.h.  */
42160 int i;
42161 _ACEOF
42162 if ac_fn_cxx_try_compile "$LINENO"; then :
42163 
42164 else
42165   supports=no
42166 fi
42167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42168   ac_ext=cpp
42169 ac_cpp='$CXXCPP $CPPFLAGS'
42170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42173 
42174   CXXFLAGS="$saved_cxxflags"
42175 
42176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42177 $as_echo "$supports" >&6; }
42178   if test "x$supports" = "xyes" ; then
42179     CXX_COMP_SUPPORTS="yes"
42180   else
42181     CXX_COMP_SUPPORTS="no"
42182   fi
42183 
42184 
42185   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
42186 $as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
42187   supports=no
42188   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42189 
42190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42191 $as_echo "$supports" >&6; }
42192   if test "x$supports" = "xyes" ; then
42193     :
42194   else
42195     NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
42196   fi
42197 
42198 
42199   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
42200 
42201 
42202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42203 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42204   supports=yes
42205 
42206   saved_cflags="$CFLAGS"
42207   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
42208   ac_ext=c
42209 ac_cpp='$CPP $CPPFLAGS'
42210 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42211 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42212 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42213 
42214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42215 /* end confdefs.h.  */
42216 int i;
42217 _ACEOF
42218 if ac_fn_c_try_compile "$LINENO"; then :
42219 
42220 else
42221   supports=no
42222 fi
42223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42224   ac_ext=cpp
42225 ac_cpp='$CXXCPP $CPPFLAGS'
42226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42229 
42230   CFLAGS="$saved_cflags"
42231 
42232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42233 $as_echo "$supports" >&6; }
42234   if test "x$supports" = "xyes" ; then
42235     C_COMP_SUPPORTS="yes"
42236   else
42237     C_COMP_SUPPORTS="no"
42238   fi
42239 
42240 
42241   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42242 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42243   supports=yes
42244 
42245   saved_cxxflags="$CXXFLAGS"
42246   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
42247   ac_ext=cpp
42248 ac_cpp='$CXXCPP $CPPFLAGS'
42249 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42250 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42251 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42252 
42253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42254 /* end confdefs.h.  */
42255 int i;
42256 _ACEOF
42257 if ac_fn_cxx_try_compile "$LINENO"; then :
42258 
42259 else
42260   supports=no
42261 fi
42262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42263   ac_ext=cpp
42264 ac_cpp='$CXXCPP $CPPFLAGS'
42265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42268 
42269   CXXFLAGS="$saved_cxxflags"
42270 
42271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42272 $as_echo "$supports" >&6; }
42273   if test "x$supports" = "xyes" ; then
42274     CXX_COMP_SUPPORTS="yes"
42275   else
42276     CXX_COMP_SUPPORTS="no"
42277   fi
42278 
42279 
42280   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
42281 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
42282   supports=no
42283   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42284 
42285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42286 $as_echo "$supports" >&6; }
42287   if test "x$supports" = "xyes" ; then
42288     :
42289   else
42290     NO_LIFETIME_DSE_CFLAG=""
42291   fi
42292 
42293   CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
42294 
42295 
42296 
42297   else
42298     :
42299   fi
42300 
42301 
42302     # Check that the compiler supports -ffp-contract=off flag
42303     # Set FDLIBM_CFLAGS to -ffp-contract=off if it does.
42304     # For GCC < 4.6, on x86, x86_64 and ppc check for
42305     # -mno-fused-madd and -fno-strict-aliasing. If they exist,
42306     # use them as a substitute for -ffp-contract=off.
42307     #
42308     # These flags are required for GCC-based builds of
42309     # fdlibm with optimization without losing precision.
42310     # Notably, -ffp-contract=off needs to be added for GCC >= 4.6,
42311     #          -mno-fused-madd -fno-strict-aliasing for GCC < 4.6
42312     COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"
42313 
42314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"" >&5
42315 $as_echo_n "checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"... " >&6; }
42316   supports=yes
42317 
42318   saved_cxxflags="$CXXFLAGS"
42319   CXXFLAGS="$CXXFLAG $COMPILER_FP_CONTRACT_OFF_FLAG -Werror"
42320   ac_ext=cpp
42321 ac_cpp='$CXXCPP $CPPFLAGS'
42322 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42323 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42324 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42325 
42326   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42327 /* end confdefs.h.  */
42328 int i;
42329 _ACEOF
42330 if ac_fn_cxx_try_compile "$LINENO"; then :
42331 
42332 else
42333   supports=no
42334 fi
42335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42336   ac_ext=cpp
42337 ac_cpp='$CXXCPP $CPPFLAGS'
42338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42341 
42342   CXXFLAGS="$saved_cxxflags"
42343 
42344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42345 $as_echo "$supports" >&6; }
42346   if test "x$supports" = "xyes" ; then
42347     :
42348   else
42349     COMPILER_FP_CONTRACT_OFF_FLAG=""
42350   fi
42351 
42352     if test "x$COMPILER_FP_CONTRACT_OFF_FLAG" = x; then
42353       if test "$OPENJDK_TARGET_CPU_ARCH" = "x86" ||
42354          test "$OPENJDK_TARGET_CPU_ARCH" = "x86_64" ||
42355          test "$OPENJDK_TARGET_CPU_ARCH" = "ppc"; then
42356         M_NO_FUSED_ADD_FLAG="-mno-fused-madd"
42357 
42358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"" >&5
42359 $as_echo_n "checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"... " >&6; }
42360   supports=yes
42361 
42362   saved_cxxflags="$CXXFLAGS"
42363   CXXFLAGS="$CXXFLAG $M_NO_FUSED_ADD_FLAG -Werror"
42364   ac_ext=cpp
42365 ac_cpp='$CXXCPP $CPPFLAGS'
42366 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42367 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42368 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42369 
42370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42371 /* end confdefs.h.  */
42372 int i;
42373 _ACEOF
42374 if ac_fn_cxx_try_compile "$LINENO"; then :
42375 
42376 else
42377   supports=no
42378 fi
42379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42380   ac_ext=cpp
42381 ac_cpp='$CXXCPP $CPPFLAGS'
42382 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42383 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42384 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42385 
42386   CXXFLAGS="$saved_cxxflags"
42387 
42388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42389 $as_echo "$supports" >&6; }
42390   if test "x$supports" = "xyes" ; then
42391     :
42392   else
42393     M_NO_FUSED_ADD_FLAG=""
42394   fi
42395 
42396         NO_STRICT_ALIASING_FLAG="-fno-strict-aliasing"
42397 
42398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"" >&5
42399 $as_echo_n "checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"... " >&6; }
42400   supports=yes
42401 
42402   saved_cxxflags="$CXXFLAGS"
42403   CXXFLAGS="$CXXFLAG $NO_STRICT_ALIASING_FLAG -Werror"
42404   ac_ext=cpp
42405 ac_cpp='$CXXCPP $CPPFLAGS'
42406 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42407 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42408 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42409 
42410   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42411 /* end confdefs.h.  */
42412 int i;
42413 _ACEOF
42414 if ac_fn_cxx_try_compile "$LINENO"; then :
42415 
42416 else
42417   supports=no
42418 fi
42419 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42420   ac_ext=cpp
42421 ac_cpp='$CXXCPP $CPPFLAGS'
42422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42425 
42426   CXXFLAGS="$saved_cxxflags"
42427 
42428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42429 $as_echo "$supports" >&6; }
42430   if test "x$supports" = "xyes" ; then
42431     :
42432   else
42433     NO_STRICT_ALIASING_FLAG=""
42434   fi
42435 
42436         if test "x$M_NO_FUSED_ADD_FLAG" != "x" && test "x$NO_STRICT_ALIASING_FLAG" != "x"; then
42437           FDLIBM_CFLAGS="$M_NO_FUSED_ADD_FLAG $NO_STRICT_ALIASING_FLAG"
42438         fi
42439       fi
42440     else
42441       FDLIBM_CFLAGS="$COMPILER_FP_CONTRACT_OFF_FLAG"
42442     fi
42443   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42444     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42445     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42446       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42447       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42448     fi
42449 
42450     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42451     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42452   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42453     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42454     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42455   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42456     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK \
42457         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42458         -DWIN32_LEAN_AND_MEAN \
42459         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42460         -DWIN32 -DIAL"
42461     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42462       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42463     else
42464       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
42465     fi
42466     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42467     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42468     # studio.
42469     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42470       CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42471           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42472     fi
42473   fi
42474 
42475 
42476   ###############################################################################
42477 
42478   # Adjust flags according to debug level.
42479   case $DEBUG_LEVEL in
42480     fastdebug )
42481       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
42482       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
42483       C_O_FLAG_HI="$C_O_FLAG_NORM"
42484       C_O_FLAG_NORM="$C_O_FLAG_NORM"
42485       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42486       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
42487       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42488       ;;
42489     slowdebug )
42490       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
42491       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
42492       C_O_FLAG_HI="$C_O_FLAG_NONE"
42493       C_O_FLAG_NORM="$C_O_FLAG_NONE"
42494       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
42495       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
42496       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42497       ;;
42498   esac
42499 
42500   # Setup LP64
42501   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
42502 
42503   # Set some common defines. These works for all compilers, but assume
42504   # -D is universally accepted.
42505 
42506   # Setup endianness
42507   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42508     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42509     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42510     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42511     #   Note: -Dmacro         is the same as    #define macro 1
42512     #         -Dmacro=        is the same as    #define macro
42513     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42514       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42515     else
42516       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42517     fi
42518   else
42519     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42520     # are defined in the system?
42521     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42522       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
42523     else
42524       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
42525     fi
42526   fi
42527   if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
42528     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
42529   fi
42530 
42531   # Setup target OS define. Use OS target name but in upper case.
42532   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42533   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42534 
42535   # Setup target CPU
42536   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42537 
42538   # Setup debug/release defines
42539   if test "x$DEBUG_LEVEL" = xrelease; then
42540     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42541     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42542       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42543     fi
42544   else
42545     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42546   fi
42547 
42548   # Setup release name
42549   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42550 
42551 
42552   # Set some additional per-OS defines.
42553   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42554     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42555   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42556     # FIXME: PPC64 should not be here.
42557     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
42558   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42559     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42560   fi
42561 
42562   # Additional macosx handling
42563   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42564     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42565       # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
42566       # FIXME: clean this up, and/or move it elsewhere.
42567 
42568       # Setting these parameters makes it an error to link to macosx APIs that are
42569       # newer than the given OS version and makes the linked binaries compatible
42570       # even if built on a newer version of the OS.
42571       # The expected format is X.Y.Z
42572       MACOSX_VERSION_MIN=10.7.0
42573 
42574 
42575       # The macro takes the version with no dots, ex: 1070
42576       # Let the flags variables get resolved in make for easier override on make
42577       # command line.
42578       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42579       LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42580     fi
42581   fi
42582 
42583   # Setup some hard coded includes
42584   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42585       -I${JDK_OUTPUTDIR}/include \
42586       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42587       -I${JDK_TOPDIR}/src/share/javavm/export \
42588       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42589       -I${JDK_TOPDIR}/src/share/native/common \
42590       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42591 
42592   # The shared libraries are compiled using the picflag.
42593   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42594   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42595 
42596   # Executable flags
42597   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK $PIEFLAG"
42598   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PIEFLAG"
42599 
42600 
42601 
42602 
42603 
42604 
42605   # Setup LDFLAGS et al.
42606   #
42607   # Now this is odd. The JDK native libraries have to link against libjvm.so
42608   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42609   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42610   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42611   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42612   # libraries will link to whatever is in memory. Yuck.
42613   #
42614   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42615   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42616     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42617     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42618       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42619     fi
42620     # TODO: make -debug optional "--disable-full-debug-symbols"
42621     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42622     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42623     LDFLAGS_JDKLIB_SUFFIX=""
42624     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42625       LDFLAGS_STACK_SIZE=1048576
42626     else
42627       LDFLAGS_STACK_SIZE=327680
42628     fi
42629     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42630   else
42631     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42632       # If this is a --hash-style=gnu system, use --hash-style=both, why?
42633       # We have previously set HAS_GNU_HASH if this is the case
42634       if test -n "$HAS_GNU_HASH"; then
42635         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42636       fi
42637       if test "x$OPENJDK_TARGET_OS" = xlinux; then
42638         # And since we now know that the linker is gnu, then add:
42639         #   -z defs, to forbid undefined symbols in object files
42640         #   -z noexecstack, to mark stack regions as non-executable
42641         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
42642         if test "x$DEBUG_LEVEL" = "xrelease"; then
42643           # When building release libraries, tell the linker optimize them.
42644           # Should this be supplied to the OSS linker as well?
42645           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42646         fi
42647       fi
42648     fi
42649 
42650     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42651       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42652       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42653     fi
42654 
42655     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42656         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42657 
42658     # On some platforms (mac) the linker warns about non existing -L dirs.
42659     # Add server first if available. Linking aginst client does not always produce the same results.
42660     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42661     # Default to server for other variants.
42662     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42663       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42664     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42665       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42666     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42667       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42668     else
42669       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42670     fi
42671 
42672     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42673     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42674       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42675     fi
42676 
42677     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42678     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42679       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42680     fi
42681     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42682       # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
42683       # java heap.
42684       if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
42685         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
42686       fi
42687     fi
42688   fi
42689 
42690 
42691 
42692 
42693 
42694 
42695 
42696   # Some Zero and Shark settings.
42697   # ZERO_ARCHFLAG tells the compiler which mode to build for
42698   case "${OPENJDK_TARGET_CPU}" in
42699     s390)
42700       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42701       ;;
42702     *)
42703       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42704   esac
42705 
42706 
42707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
42708 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42709   supports=yes
42710 
42711   saved_cflags="$CFLAGS"
42712   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42713   ac_ext=c
42714 ac_cpp='$CPP $CPPFLAGS'
42715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42718 
42719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42720 /* end confdefs.h.  */
42721 int i;
42722 _ACEOF
42723 if ac_fn_c_try_compile "$LINENO"; then :
42724 
42725 else
42726   supports=no
42727 fi
42728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42729   ac_ext=cpp
42730 ac_cpp='$CXXCPP $CPPFLAGS'
42731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42734 
42735   CFLAGS="$saved_cflags"
42736 
42737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42738 $as_echo "$supports" >&6; }
42739   if test "x$supports" = "xyes" ; then
42740     C_COMP_SUPPORTS="yes"
42741   else
42742     C_COMP_SUPPORTS="no"
42743   fi
42744 
42745 
42746   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
42747 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42748   supports=yes
42749 
42750   saved_cxxflags="$CXXFLAGS"
42751   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42752   ac_ext=cpp
42753 ac_cpp='$CXXCPP $CPPFLAGS'
42754 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42755 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42756 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42757 
42758   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42759 /* end confdefs.h.  */
42760 int i;
42761 _ACEOF
42762 if ac_fn_cxx_try_compile "$LINENO"; then :
42763 
42764 else
42765   supports=no
42766 fi
42767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42768   ac_ext=cpp
42769 ac_cpp='$CXXCPP $CPPFLAGS'
42770 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42771 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42772 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42773 
42774   CXXFLAGS="$saved_cxxflags"
42775 
42776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42777 $as_echo "$supports" >&6; }
42778   if test "x$supports" = "xyes" ; then
42779     CXX_COMP_SUPPORTS="yes"
42780   else
42781     CXX_COMP_SUPPORTS="no"
42782   fi
42783 
42784 
42785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
42786 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
42787   supports=no
42788   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42789 
42790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42791 $as_echo "$supports" >&6; }
42792   if test "x$supports" = "xyes" ; then
42793     :
42794   else
42795     ZERO_ARCHFLAG=""
42796   fi
42797 
42798 
42799 
42800   # Check that the compiler supports -mX (or -qX on AIX) flags
42801   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42802 
42803 
42804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42805 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42806   supports=yes
42807 
42808   saved_cflags="$CFLAGS"
42809   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42810   ac_ext=c
42811 ac_cpp='$CPP $CPPFLAGS'
42812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42815 
42816   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42817 /* end confdefs.h.  */
42818 int i;
42819 _ACEOF
42820 if ac_fn_c_try_compile "$LINENO"; then :
42821 
42822 else
42823   supports=no
42824 fi
42825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42826   ac_ext=cpp
42827 ac_cpp='$CXXCPP $CPPFLAGS'
42828 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42829 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42830 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42831 
42832   CFLAGS="$saved_cflags"
42833 
42834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42835 $as_echo "$supports" >&6; }
42836   if test "x$supports" = "xyes" ; then
42837     C_COMP_SUPPORTS="yes"
42838   else
42839     C_COMP_SUPPORTS="no"
42840   fi
42841 
42842 
42843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42844 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42845   supports=yes
42846 
42847   saved_cxxflags="$CXXFLAGS"
42848   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42849   ac_ext=cpp
42850 ac_cpp='$CXXCPP $CPPFLAGS'
42851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42854 
42855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42856 /* end confdefs.h.  */
42857 int i;
42858 _ACEOF
42859 if ac_fn_cxx_try_compile "$LINENO"; then :
42860 
42861 else
42862   supports=no
42863 fi
42864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42865   ac_ext=cpp
42866 ac_cpp='$CXXCPP $CPPFLAGS'
42867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42870 
42871   CXXFLAGS="$saved_cxxflags"
42872 
42873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42874 $as_echo "$supports" >&6; }
42875   if test "x$supports" = "xyes" ; then
42876     CXX_COMP_SUPPORTS="yes"
42877   else
42878     CXX_COMP_SUPPORTS="no"
42879   fi
42880 
42881 
42882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42883 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42884   supports=no
42885   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
42886 
42887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42888 $as_echo "$supports" >&6; }
42889   if test "x$supports" = "xyes" ; then
42890     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42891   else
42892     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42893   fi
42894 
42895 
42896 
42897 
42898 # Setup debug symbols (need objcopy from the toolchain for that)
42899 
42900   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42901   # but if somebody does not specify it via configure, we still want to preserve old
42902   # behaviour of --disable-debug-symbols
42903   #
42904   # ENABLE_DEBUG_SYMBOLS
42905   # This must be done after the toolchain is setup, since we're looking at objcopy.
42906   #
42907   # Check whether --enable-debug-symbols was given.
42908 if test "${enable_debug_symbols+set}" = set; then :
42909   enableval=$enable_debug_symbols;
42910 fi
42911 
42912 
42913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42914 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42915 
42916   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42917     # explicit enabling of enable-debug-symbols and can't find objcopy
42918     #   this is an error
42919     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42920   fi
42921 
42922   if test "x$enable_debug_symbols" = "xyes"; then
42923     ENABLE_DEBUG_SYMBOLS=true
42924   elif test "x$enable_debug_symbols" = "xno"; then
42925     ENABLE_DEBUG_SYMBOLS=false
42926   else
42927     # Default is on if objcopy is found
42928     if test "x$OBJCOPY" != x; then
42929       ENABLE_DEBUG_SYMBOLS=true
42930     # AIX, MacOS X and Windows don't use objcopy but default is on for those OSes
42931     elif test "x$OPENJDK_TARGET_OS" = xaix || test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42932       ENABLE_DEBUG_SYMBOLS=true
42933     else
42934       ENABLE_DEBUG_SYMBOLS=false
42935     fi
42936   fi
42937 
42938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42939 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42940 
42941   # Backwards compatibility. --with-native-debug-symbols is preferred post JDK-8207234,
42942   # but if somebody does not specify it via configure, we still want to preserve old
42943   # behaviour of --disable-zip-debug-info.
42944   #
42945   # ZIP_DEBUGINFO_FILES
42946   #
42947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42948 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42949   # Check whether --enable-zip-debug-info was given.
42950 if test "${enable_zip_debug_info+set}" = set; then :
42951   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42952 else
42953   enable_zip_debug_info="yes"
42954 fi
42955 
42956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42957 $as_echo "${enable_zip_debug_info}" >&6; }
42958 
42959   if test "x${enable_zip_debug_info}" = "xno"; then
42960     ZIP_DEBUGINFO_FILES=false
42961   elif test "x${enable_zip_debug_info}" = "xyes"; then
42962     ZIP_DEBUGINFO_FILES=true
42963   fi
42964 
42965   #
42966   # NATIVE_DEBUG_SYMBOLS
42967   # This must be done after the toolchain is setup, since we're looking at objcopy.
42968   # In addition, this must be done after ENABLE_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES
42969   # checking in order to preserve backwards compatibility post JDK-8207234.
42970   #
42971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use (this will override previous settings)" >&5
42972 $as_echo_n "checking what type of native debug symbols to use (this will override previous settings)... " >&6; }
42973 
42974 # Check whether --with-native-debug-symbols was given.
42975 if test "${with_native_debug_symbols+set}" = set; then :
42976   withval=$with_native_debug_symbols;
42977 
42978 else
42979 
42980         # Default to unset for backwards compatibility
42981         with_native_debug_symbols=""
42982 
42983 fi
42984 
42985   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
42986   if test "x$NATIVE_DEBUG_SYMBOLS" = x; then
42987     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specified" >&5
42988 $as_echo "not specified" >&6; }
42989   else
42990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
42991 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
42992   fi
42993   # Default is empty
42994   DEBUG_BINARIES=
42995   # Default is min_strip. Possible values are min_strip, all_strip, no_strip
42996   STRIP_POLICY=min_strip
42997 
42998   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
42999 
43000     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43001       if test "x$OBJCOPY" = x; then
43002         # enabling of enable-debug-symbols and can't find objcopy
43003         # this is an error
43004         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
43005       fi
43006     fi
43007 
43008     ENABLE_DEBUG_SYMBOLS=true
43009     STRIP_POLICY=min_strip
43010     ZIP_DEBUGINFO_FILES=true
43011   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
43012     ENABLE_DEBUG_SYMBOLS=false
43013     STRIP_POLICY=min_strip
43014     ZIP_DEBUGINFO_FILES=false
43015   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
43016     ENABLE_DEBUG_SYMBOLS=true
43017     STRIP_POLICY=no_strip
43018     ZIP_DEBUGINFO_FILES=false
43019     POST_STRIP_CMD=
43020     DEBUG_BINARIES=true
43021   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
43022 
43023     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43024       if test "x$OBJCOPY" = x; then
43025         # enabling of enable-debug-symbols and can't find objcopy
43026         # this is an error
43027         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
43028       fi
43029     fi
43030 
43031     ENABLE_DEBUG_SYMBOLS=true
43032     STRIP_POLICY=min_strip
43033     ZIP_DEBUGINFO_FILES=false
43034   elif test "x$NATIVE_DEBUG_SYMBOLS" != x; then
43035     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
43036   else
43037     { $as_echo "$as_me:${as_lineno-$LINENO}: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&5
43038 $as_echo "$as_me: --with-native-debug-symbols not specified. Using values from --disable-debug-symbols and --disable-zip-debug-info" >&6;}
43039   fi
43040 
43041 
43042 
43043 
43044 
43045 
43046 
43047 
43048 ###############################################################################
43049 #
43050 # Check dependencies for external and internal libraries.
43051 #
43052 ###############################################################################
43053 
43054 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43055 
43056   # When using cygwin or msys, we need a wrapper binary that renames
43057   # /cygdrive/c/ arguments into c:/ arguments and peeks into
43058   # @files and rewrites these too! This wrapper binary is
43059   # called fixpath.
43060   FIXPATH=
43061   if test "x$OPENJDK_BUILD_OS" = xwindows; then
43062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43063 $as_echo_n "checking if fixpath can be created... " >&6; }
43064     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43065     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43066     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43067       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43068       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43069       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43070       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43071     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43072       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43073       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43074 
43075       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43076       # @ was chosen as separator to minimize risk of other tools messing around with it
43077       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43078       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43079 
43080       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43081     fi
43082     rm -f $OUTPUT_ROOT/fixpath*
43083     cd $OUTPUT_ROOT
43084     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43085     cd $CURDIR
43086 
43087     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43088       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43089 $as_echo "no" >&6; }
43090       cat $OUTPUT_ROOT/fixpath1.log
43091       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43092     fi
43093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43094 $as_echo "yes" >&6; }
43095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43096 $as_echo_n "checking if fixpath.exe works... " >&6; }
43097     cd $OUTPUT_ROOT
43098     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43099     cd $CURDIR
43100     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43102 $as_echo "no" >&6; }
43103       cat $OUTPUT_ROOT/fixpath2.log
43104       as_fn_error $? "fixpath did not work!" "$LINENO" 5
43105     fi
43106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43107 $as_echo "yes" >&6; }
43108     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43109   fi
43110 
43111 
43112 
43113 
43114 
43115 
43116   ###############################################################################
43117   #
43118   # OS specific settings that we never will need to probe.
43119   #
43120   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43121     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43122 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43123     PULSE_NOT_NEEDED=yes
43124     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43125 $as_echo "pulse" >&6; }
43126   fi
43127 
43128   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43129     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43130 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43131     ALSA_NOT_NEEDED=yes
43132     PULSE_NOT_NEEDED=yes
43133     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43134 $as_echo "alsa pulse" >&6; }
43135   fi
43136 
43137   if test "x$OPENJDK_TARGET_OS" = xaix; then
43138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43139 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43140     ALSA_NOT_NEEDED=yes
43141     PULSE_NOT_NEEDED=yes
43142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43143 $as_echo "alsa pulse" >&6; }
43144   fi
43145 
43146 
43147   if test "x$OPENJDK_TARGET_OS" = xwindows; then
43148     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43149 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43150     CUPS_NOT_NEEDED=yes
43151     ALSA_NOT_NEEDED=yes
43152     PULSE_NOT_NEEDED=yes
43153     X11_NOT_NEEDED=yes
43154     FONTCONFIG_NOT_NEEDED=yes
43155     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43156 $as_echo "alsa cups pulse x11" >&6; }
43157   fi
43158 
43159   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43161 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43162     ALSA_NOT_NEEDED=yes
43163     PULSE_NOT_NEEDED=yes
43164     X11_NOT_NEEDED=yes
43165     FONTCONFIG_NOT_NEEDED=yes
43166     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43167 $as_echo "alsa pulse x11" >&6; }
43168   fi
43169 
43170   if test "x$OPENJDK_TARGET_OS" = xbsd; then
43171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43172 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43173     ALSA_NOT_NEEDED=yes
43174     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43175 $as_echo "alsa" >&6; }
43176   fi
43177 
43178   if test "x$OPENJDK" = "xfalse"; then
43179     FREETYPE_NOT_NEEDED=yes
43180   fi
43181 
43182   if test "x$SUPPORT_HEADFUL" = xno; then
43183     X11_NOT_NEEDED=yes
43184   fi
43185 
43186   # Deprecated and now ignored
43187 
43188   # Check whether --enable-macosx-runtime-support was given.
43189 if test "${enable_macosx_runtime_support+set}" = set; then :
43190   enableval=$enable_macosx_runtime_support;
43191 fi
43192 
43193   if test "x$enable_macosx_runtime_support" != x; then
43194     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
43195 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
43196   fi
43197 
43198 
43199 
43200 
43201   ###############################################################################
43202   #
43203   # Check for X Windows
43204   #
43205 
43206   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43207   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43208   # --x-libraries for the sysroot, if that seems to be correct.
43209   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43210     if test "x$SYSROOT" != "x"; then
43211       if test "x$x_includes" = xNONE; then
43212         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43213           x_includes="$SYSROOT/usr/X11R6/include"
43214         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43215           x_includes="$SYSROOT/usr/include"
43216         fi
43217       fi
43218       if test "x$x_libraries" = xNONE; then
43219         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43220           x_libraries="$SYSROOT/usr/X11R6/lib"
43221         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43222           x_libraries="$SYSROOT/usr/lib64"
43223         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43224           x_libraries="$SYSROOT/usr/lib"
43225         fi
43226       fi
43227     fi
43228   fi
43229 
43230   # Now let autoconf do it's magic
43231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43232 $as_echo_n "checking for X... " >&6; }
43233 
43234 
43235 # Check whether --with-x was given.
43236 if test "${with_x+set}" = set; then :
43237   withval=$with_x;
43238 fi
43239 
43240 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43241 if test "x$with_x" = xno; then
43242   # The user explicitly disabled X.
43243   have_x=disabled
43244 else
43245   case $x_includes,$x_libraries in #(
43246     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43247     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43248   $as_echo_n "(cached) " >&6
43249 else
43250   # One or both of the vars are not set, and there is no cached value.
43251 ac_x_includes=no ac_x_libraries=no
43252 rm -f -r conftest.dir
43253 if mkdir conftest.dir; then
43254   cd conftest.dir
43255   cat >Imakefile <<'_ACEOF'
43256 incroot:
43257         @echo incroot='${INCROOT}'
43258 usrlibdir:
43259         @echo usrlibdir='${USRLIBDIR}'
43260 libdir:
43261         @echo libdir='${LIBDIR}'
43262 _ACEOF
43263   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43264     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43265     for ac_var in incroot usrlibdir libdir; do
43266       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43267     done
43268     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43269     for ac_extension in a so sl dylib la dll; do
43270       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43271          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43272         ac_im_usrlibdir=$ac_im_libdir; break
43273       fi
43274     done
43275     # Screen out bogus values from the imake configuration.  They are
43276     # bogus both because they are the default anyway, and because
43277     # using them would break gcc on systems where it needs fixed includes.
43278     case $ac_im_incroot in
43279         /usr/include) ac_x_includes= ;;
43280         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43281     esac
43282     case $ac_im_usrlibdir in
43283         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43284         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43285     esac
43286   fi
43287   cd ..
43288   rm -f -r conftest.dir
43289 fi
43290 
43291 # Standard set of common directories for X headers.
43292 # Check X11 before X11Rn because it is often a symlink to the current release.
43293 ac_x_header_dirs='
43294 /usr/X11/include
43295 /usr/X11R7/include
43296 /usr/X11R6/include
43297 /usr/X11R5/include
43298 /usr/X11R4/include
43299 
43300 /usr/include/X11
43301 /usr/include/X11R7
43302 /usr/include/X11R6
43303 /usr/include/X11R5
43304 /usr/include/X11R4
43305 
43306 /usr/local/X11/include
43307 /usr/local/X11R7/include
43308 /usr/local/X11R6/include
43309 /usr/local/X11R5/include
43310 /usr/local/X11R4/include
43311 
43312 /usr/local/include/X11
43313 /usr/local/include/X11R7
43314 /usr/local/include/X11R6
43315 /usr/local/include/X11R5
43316 /usr/local/include/X11R4
43317 
43318 /usr/X386/include
43319 /usr/x386/include
43320 /usr/XFree86/include/X11
43321 
43322 /usr/include
43323 /usr/local/include
43324 /usr/unsupported/include
43325 /usr/athena/include
43326 /usr/local/x11r5/include
43327 /usr/lpp/Xamples/include
43328 
43329 /usr/openwin/include
43330 /usr/openwin/share/include'
43331 
43332 if test "$ac_x_includes" = no; then
43333   # Guess where to find include files, by looking for Xlib.h.
43334   # First, try using that file with no special directory specified.
43335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43336 /* end confdefs.h.  */
43337 #include <X11/Xlib.h>
43338 _ACEOF
43339 if ac_fn_cxx_try_cpp "$LINENO"; then :
43340   # We can compile using X headers with no special include directory.
43341 ac_x_includes=
43342 else
43343   for ac_dir in $ac_x_header_dirs; do
43344   if test -r "$ac_dir/X11/Xlib.h"; then
43345     ac_x_includes=$ac_dir
43346     break
43347   fi
43348 done
43349 fi
43350 rm -f conftest.err conftest.i conftest.$ac_ext
43351 fi # $ac_x_includes = no
43352 
43353 if test "$ac_x_libraries" = no; then
43354   # Check for the libraries.
43355   # See if we find them without any special options.
43356   # Don't add to $LIBS permanently.
43357   ac_save_LIBS=$LIBS
43358   LIBS="-lX11 $LIBS"
43359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43360 /* end confdefs.h.  */
43361 #include <X11/Xlib.h>
43362 int
43363 main ()
43364 {
43365 XrmInitialize ()
43366   ;
43367   return 0;
43368 }
43369 _ACEOF
43370 if ac_fn_cxx_try_link "$LINENO"; then :
43371   LIBS=$ac_save_LIBS
43372 # We can link X programs with no special library path.
43373 ac_x_libraries=
43374 else
43375   LIBS=$ac_save_LIBS
43376 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43377 do
43378   # Don't even attempt the hair of trying to link an X program!
43379   for ac_extension in a so sl dylib la dll; do
43380     if test -r "$ac_dir/libX11.$ac_extension"; then
43381       ac_x_libraries=$ac_dir
43382       break 2
43383     fi
43384   done
43385 done
43386 fi
43387 rm -f core conftest.err conftest.$ac_objext \
43388     conftest$ac_exeext conftest.$ac_ext
43389 fi # $ac_x_libraries = no
43390 
43391 case $ac_x_includes,$ac_x_libraries in #(
43392   no,* | *,no | *\'*)
43393     # Didn't find X, or a directory has "'" in its name.
43394     ac_cv_have_x="have_x=no";; #(
43395   *)
43396     # Record where we found X for the cache.
43397     ac_cv_have_x="have_x=yes\
43398         ac_x_includes='$ac_x_includes'\
43399         ac_x_libraries='$ac_x_libraries'"
43400 esac
43401 fi
43402 ;; #(
43403     *) have_x=yes;;
43404   esac
43405   eval "$ac_cv_have_x"
43406 fi # $with_x != no
43407 
43408 if test "$have_x" != yes; then
43409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43410 $as_echo "$have_x" >&6; }
43411   no_x=yes
43412 else
43413   # If each of the values was on the command line, it overrides each guess.
43414   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43415   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43416   # Update the cache value to reflect the command line values.
43417   ac_cv_have_x="have_x=yes\
43418         ac_x_includes='$x_includes'\
43419         ac_x_libraries='$x_libraries'"
43420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43421 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43422 fi
43423 
43424   if test "$no_x" = yes; then
43425   # Not all programs may use this symbol, but it does not hurt to define it.
43426 
43427 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43428 
43429   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43430 else
43431   if test -n "$x_includes"; then
43432     X_CFLAGS="$X_CFLAGS -I$x_includes"
43433   fi
43434 
43435   # It would also be nice to do this for all -L options, not just this one.
43436   if test -n "$x_libraries"; then
43437     X_LIBS="$X_LIBS -L$x_libraries"
43438     # For Solaris; some versions of Sun CC require a space after -R and
43439     # others require no space.  Words are not sufficient . . . .
43440     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43441 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43442     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43443     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43444     ac_cxx_werror_flag=yes
43445     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43446 /* end confdefs.h.  */
43447 
43448 int
43449 main ()
43450 {
43451 
43452   ;
43453   return 0;
43454 }
43455 _ACEOF
43456 if ac_fn_cxx_try_link "$LINENO"; then :
43457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43458 $as_echo "no" >&6; }
43459        X_LIBS="$X_LIBS -R$x_libraries"
43460 else
43461   LIBS="$ac_xsave_LIBS -R $x_libraries"
43462        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43463 /* end confdefs.h.  */
43464 
43465 int
43466 main ()
43467 {
43468 
43469   ;
43470   return 0;
43471 }
43472 _ACEOF
43473 if ac_fn_cxx_try_link "$LINENO"; then :
43474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43475 $as_echo "yes" >&6; }
43476           X_LIBS="$X_LIBS -R $x_libraries"
43477 else
43478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43479 $as_echo "neither works" >&6; }
43480 fi
43481 rm -f core conftest.err conftest.$ac_objext \
43482     conftest$ac_exeext conftest.$ac_ext
43483 fi
43484 rm -f core conftest.err conftest.$ac_objext \
43485     conftest$ac_exeext conftest.$ac_ext
43486     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43487     LIBS=$ac_xsave_LIBS
43488   fi
43489 
43490   # Check for system-dependent libraries X programs must link with.
43491   # Do this before checking for the system-independent R6 libraries
43492   # (-lICE), since we may need -lsocket or whatever for X linking.
43493 
43494   if test "$ISC" = yes; then
43495     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43496   else
43497     # Martyn Johnson says this is needed for Ultrix, if the X
43498     # libraries were built with DECnet support.  And Karl Berry says
43499     # the Alpha needs dnet_stub (dnet does not exist).
43500     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43501     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43502 /* end confdefs.h.  */
43503 
43504 /* Override any GCC internal prototype to avoid an error.
43505    Use char because int might match the return type of a GCC
43506    builtin and then its argument prototype would still apply.  */
43507 #ifdef __cplusplus
43508 extern "C"
43509 #endif
43510 char XOpenDisplay ();
43511 int
43512 main ()
43513 {
43514 return XOpenDisplay ();
43515   ;
43516   return 0;
43517 }
43518 _ACEOF
43519 if ac_fn_cxx_try_link "$LINENO"; then :
43520 
43521 else
43522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43523 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43524 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43525   $as_echo_n "(cached) " >&6
43526 else
43527   ac_check_lib_save_LIBS=$LIBS
43528 LIBS="-ldnet  $LIBS"
43529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43530 /* end confdefs.h.  */
43531 
43532 /* Override any GCC internal prototype to avoid an error.
43533    Use char because int might match the return type of a GCC
43534    builtin and then its argument prototype would still apply.  */
43535 #ifdef __cplusplus
43536 extern "C"
43537 #endif
43538 char dnet_ntoa ();
43539 int
43540 main ()
43541 {
43542 return dnet_ntoa ();
43543   ;
43544   return 0;
43545 }
43546 _ACEOF
43547 if ac_fn_cxx_try_link "$LINENO"; then :
43548   ac_cv_lib_dnet_dnet_ntoa=yes
43549 else
43550   ac_cv_lib_dnet_dnet_ntoa=no
43551 fi
43552 rm -f core conftest.err conftest.$ac_objext \
43553     conftest$ac_exeext conftest.$ac_ext
43554 LIBS=$ac_check_lib_save_LIBS
43555 fi
43556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43557 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43558 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43559   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43560 fi
43561 
43562     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43563       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43564 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43565 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43566   $as_echo_n "(cached) " >&6
43567 else
43568   ac_check_lib_save_LIBS=$LIBS
43569 LIBS="-ldnet_stub  $LIBS"
43570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43571 /* end confdefs.h.  */
43572 
43573 /* Override any GCC internal prototype to avoid an error.
43574    Use char because int might match the return type of a GCC
43575    builtin and then its argument prototype would still apply.  */
43576 #ifdef __cplusplus
43577 extern "C"
43578 #endif
43579 char dnet_ntoa ();
43580 int
43581 main ()
43582 {
43583 return dnet_ntoa ();
43584   ;
43585   return 0;
43586 }
43587 _ACEOF
43588 if ac_fn_cxx_try_link "$LINENO"; then :
43589   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43590 else
43591   ac_cv_lib_dnet_stub_dnet_ntoa=no
43592 fi
43593 rm -f core conftest.err conftest.$ac_objext \
43594     conftest$ac_exeext conftest.$ac_ext
43595 LIBS=$ac_check_lib_save_LIBS
43596 fi
43597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43598 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43599 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43600   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43601 fi
43602 
43603     fi
43604 fi
43605 rm -f core conftest.err conftest.$ac_objext \
43606     conftest$ac_exeext conftest.$ac_ext
43607     LIBS="$ac_xsave_LIBS"
43608 
43609     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43610     # to get the SysV transport functions.
43611     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43612     # needs -lnsl.
43613     # The nsl library prevents programs from opening the X display
43614     # on Irix 5.2, according to T.E. Dickey.
43615     # The functions gethostbyname, getservbyname, and inet_addr are
43616     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43617     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43618 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43619 
43620 fi
43621 
43622     if test $ac_cv_func_gethostbyname = no; then
43623       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43624 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43625 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43626   $as_echo_n "(cached) " >&6
43627 else
43628   ac_check_lib_save_LIBS=$LIBS
43629 LIBS="-lnsl  $LIBS"
43630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43631 /* end confdefs.h.  */
43632 
43633 /* Override any GCC internal prototype to avoid an error.
43634    Use char because int might match the return type of a GCC
43635    builtin and then its argument prototype would still apply.  */
43636 #ifdef __cplusplus
43637 extern "C"
43638 #endif
43639 char gethostbyname ();
43640 int
43641 main ()
43642 {
43643 return gethostbyname ();
43644   ;
43645   return 0;
43646 }
43647 _ACEOF
43648 if ac_fn_cxx_try_link "$LINENO"; then :
43649   ac_cv_lib_nsl_gethostbyname=yes
43650 else
43651   ac_cv_lib_nsl_gethostbyname=no
43652 fi
43653 rm -f core conftest.err conftest.$ac_objext \
43654     conftest$ac_exeext conftest.$ac_ext
43655 LIBS=$ac_check_lib_save_LIBS
43656 fi
43657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43658 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43659 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43660   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43661 fi
43662 
43663       if test $ac_cv_lib_nsl_gethostbyname = no; then
43664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43665 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43666 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43667   $as_echo_n "(cached) " >&6
43668 else
43669   ac_check_lib_save_LIBS=$LIBS
43670 LIBS="-lbsd  $LIBS"
43671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43672 /* end confdefs.h.  */
43673 
43674 /* Override any GCC internal prototype to avoid an error.
43675    Use char because int might match the return type of a GCC
43676    builtin and then its argument prototype would still apply.  */
43677 #ifdef __cplusplus
43678 extern "C"
43679 #endif
43680 char gethostbyname ();
43681 int
43682 main ()
43683 {
43684 return gethostbyname ();
43685   ;
43686   return 0;
43687 }
43688 _ACEOF
43689 if ac_fn_cxx_try_link "$LINENO"; then :
43690   ac_cv_lib_bsd_gethostbyname=yes
43691 else
43692   ac_cv_lib_bsd_gethostbyname=no
43693 fi
43694 rm -f core conftest.err conftest.$ac_objext \
43695     conftest$ac_exeext conftest.$ac_ext
43696 LIBS=$ac_check_lib_save_LIBS
43697 fi
43698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43699 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43700 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43701   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43702 fi
43703 
43704       fi
43705     fi
43706 
43707     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43708     # socket/setsockopt and other routines are undefined under SCO ODT
43709     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43710     # on later versions), says Simon Leinen: it contains gethostby*
43711     # variants that don't use the name server (or something).  -lsocket
43712     # must be given before -lnsl if both are needed.  We assume that
43713     # if connect needs -lnsl, so does gethostbyname.
43714     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43715 if test "x$ac_cv_func_connect" = xyes; then :
43716 
43717 fi
43718 
43719     if test $ac_cv_func_connect = no; then
43720       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43721 $as_echo_n "checking for connect in -lsocket... " >&6; }
43722 if ${ac_cv_lib_socket_connect+:} false; then :
43723   $as_echo_n "(cached) " >&6
43724 else
43725   ac_check_lib_save_LIBS=$LIBS
43726 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43728 /* end confdefs.h.  */
43729 
43730 /* Override any GCC internal prototype to avoid an error.
43731    Use char because int might match the return type of a GCC
43732    builtin and then its argument prototype would still apply.  */
43733 #ifdef __cplusplus
43734 extern "C"
43735 #endif
43736 char connect ();
43737 int
43738 main ()
43739 {
43740 return connect ();
43741   ;
43742   return 0;
43743 }
43744 _ACEOF
43745 if ac_fn_cxx_try_link "$LINENO"; then :
43746   ac_cv_lib_socket_connect=yes
43747 else
43748   ac_cv_lib_socket_connect=no
43749 fi
43750 rm -f core conftest.err conftest.$ac_objext \
43751     conftest$ac_exeext conftest.$ac_ext
43752 LIBS=$ac_check_lib_save_LIBS
43753 fi
43754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43755 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43756 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43757   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43758 fi
43759 
43760     fi
43761 
43762     # Guillermo Gomez says -lposix is necessary on A/UX.
43763     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43764 if test "x$ac_cv_func_remove" = xyes; then :
43765 
43766 fi
43767 
43768     if test $ac_cv_func_remove = no; then
43769       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43770 $as_echo_n "checking for remove in -lposix... " >&6; }
43771 if ${ac_cv_lib_posix_remove+:} false; then :
43772   $as_echo_n "(cached) " >&6
43773 else
43774   ac_check_lib_save_LIBS=$LIBS
43775 LIBS="-lposix  $LIBS"
43776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43777 /* end confdefs.h.  */
43778 
43779 /* Override any GCC internal prototype to avoid an error.
43780    Use char because int might match the return type of a GCC
43781    builtin and then its argument prototype would still apply.  */
43782 #ifdef __cplusplus
43783 extern "C"
43784 #endif
43785 char remove ();
43786 int
43787 main ()
43788 {
43789 return remove ();
43790   ;
43791   return 0;
43792 }
43793 _ACEOF
43794 if ac_fn_cxx_try_link "$LINENO"; then :
43795   ac_cv_lib_posix_remove=yes
43796 else
43797   ac_cv_lib_posix_remove=no
43798 fi
43799 rm -f core conftest.err conftest.$ac_objext \
43800     conftest$ac_exeext conftest.$ac_ext
43801 LIBS=$ac_check_lib_save_LIBS
43802 fi
43803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43804 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43805 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43806   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43807 fi
43808 
43809     fi
43810 
43811     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43812     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43813 if test "x$ac_cv_func_shmat" = xyes; then :
43814 
43815 fi
43816 
43817     if test $ac_cv_func_shmat = no; then
43818       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43819 $as_echo_n "checking for shmat in -lipc... " >&6; }
43820 if ${ac_cv_lib_ipc_shmat+:} false; then :
43821   $as_echo_n "(cached) " >&6
43822 else
43823   ac_check_lib_save_LIBS=$LIBS
43824 LIBS="-lipc  $LIBS"
43825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43826 /* end confdefs.h.  */
43827 
43828 /* Override any GCC internal prototype to avoid an error.
43829    Use char because int might match the return type of a GCC
43830    builtin and then its argument prototype would still apply.  */
43831 #ifdef __cplusplus
43832 extern "C"
43833 #endif
43834 char shmat ();
43835 int
43836 main ()
43837 {
43838 return shmat ();
43839   ;
43840   return 0;
43841 }
43842 _ACEOF
43843 if ac_fn_cxx_try_link "$LINENO"; then :
43844   ac_cv_lib_ipc_shmat=yes
43845 else
43846   ac_cv_lib_ipc_shmat=no
43847 fi
43848 rm -f core conftest.err conftest.$ac_objext \
43849     conftest$ac_exeext conftest.$ac_ext
43850 LIBS=$ac_check_lib_save_LIBS
43851 fi
43852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43853 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43854 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43855   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43856 fi
43857 
43858     fi
43859   fi
43860 
43861   # Check for libraries that X11R6 Xt/Xaw programs need.
43862   ac_save_LDFLAGS=$LDFLAGS
43863   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43864   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43865   # check for ICE first), but we must link in the order -lSM -lICE or
43866   # we get undefined symbols.  So assume we have SM if we have ICE.
43867   # These have to be linked with before -lX11, unlike the other
43868   # libraries we check for below, so use a different variable.
43869   # John Interrante, Karl Berry
43870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43871 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43872 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43873   $as_echo_n "(cached) " >&6
43874 else
43875   ac_check_lib_save_LIBS=$LIBS
43876 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43878 /* end confdefs.h.  */
43879 
43880 /* Override any GCC internal prototype to avoid an error.
43881    Use char because int might match the return type of a GCC
43882    builtin and then its argument prototype would still apply.  */
43883 #ifdef __cplusplus
43884 extern "C"
43885 #endif
43886 char IceConnectionNumber ();
43887 int
43888 main ()
43889 {
43890 return IceConnectionNumber ();
43891   ;
43892   return 0;
43893 }
43894 _ACEOF
43895 if ac_fn_cxx_try_link "$LINENO"; then :
43896   ac_cv_lib_ICE_IceConnectionNumber=yes
43897 else
43898   ac_cv_lib_ICE_IceConnectionNumber=no
43899 fi
43900 rm -f core conftest.err conftest.$ac_objext \
43901     conftest$ac_exeext conftest.$ac_ext
43902 LIBS=$ac_check_lib_save_LIBS
43903 fi
43904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43905 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43906 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43907   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43908 fi
43909 
43910   LDFLAGS=$ac_save_LDFLAGS
43911 
43912 fi
43913 
43914 
43915   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43916   # this doesn't make sense so we remove it.
43917   if test "x$COMPILE_TYPE" = xcross; then
43918     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43919   fi
43920 
43921   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43922 
43923   # Print a helpful message on how to acquire the necessary build dependency.
43924   # x11 is the help tag: freetype, cups, pulse, alsa etc
43925   MISSING_DEPENDENCY=x11
43926 
43927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43928     cygwin_help $MISSING_DEPENDENCY
43929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930     msys_help $MISSING_DEPENDENCY
43931   else
43932     PKGHANDLER_COMMAND=
43933 
43934     case $PKGHANDLER in
43935       apt-get)
43936         apt_help     $MISSING_DEPENDENCY ;;
43937       yum)
43938         yum_help     $MISSING_DEPENDENCY ;;
43939       port)
43940         port_help    $MISSING_DEPENDENCY ;;
43941       pkgutil)
43942         pkgutil_help $MISSING_DEPENDENCY ;;
43943       pkgadd)
43944         pkgadd_help  $MISSING_DEPENDENCY ;;
43945     esac
43946 
43947     if test "x$PKGHANDLER_COMMAND" != x; then
43948       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43949     fi
43950   fi
43951 
43952     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43953   fi
43954 
43955 
43956   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43957     OPENWIN_HOME="/usr/openwin"
43958     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43959     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43960         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43961         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43962         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43963   fi
43964 
43965   #
43966   # Weird Sol10 something check...TODO change to try compile
43967   #
43968   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43969     if test "`uname -r`" = "5.10"; then
43970       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43971         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43972       fi
43973     fi
43974   fi
43975 
43976   ac_ext=c
43977 ac_cpp='$CPP $CPPFLAGS'
43978 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43979 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43980 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43981 
43982   OLD_CFLAGS="$CFLAGS"
43983   CFLAGS="$CFLAGS $X_CFLAGS"
43984 
43985   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43986   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43987 do :
43988   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43989 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43990         # include <X11/Xlib.h>
43991         # include <X11/Xutil.h>
43992 
43993 
43994 "
43995 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43996   cat >>confdefs.h <<_ACEOF
43997 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43998 _ACEOF
43999  X11_A_OK=yes
44000 else
44001   X11_A_OK=no; break
44002 fi
44003 
44004 done
44005 
44006 
44007   CFLAGS="$OLD_CFLAGS"
44008   ac_ext=cpp
44009 ac_cpp='$CXXCPP $CPPFLAGS'
44010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44013 
44014 
44015   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44016 
44017   # Print a helpful message on how to acquire the necessary build dependency.
44018   # x11 is the help tag: freetype, cups, pulse, alsa etc
44019   MISSING_DEPENDENCY=x11
44020 
44021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44022     cygwin_help $MISSING_DEPENDENCY
44023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44024     msys_help $MISSING_DEPENDENCY
44025   else
44026     PKGHANDLER_COMMAND=
44027 
44028     case $PKGHANDLER in
44029       apt-get)
44030         apt_help     $MISSING_DEPENDENCY ;;
44031       yum)
44032         yum_help     $MISSING_DEPENDENCY ;;
44033       port)
44034         port_help    $MISSING_DEPENDENCY ;;
44035       pkgutil)
44036         pkgutil_help $MISSING_DEPENDENCY ;;
44037       pkgadd)
44038         pkgadd_help  $MISSING_DEPENDENCY ;;
44039     esac
44040 
44041     if test "x$PKGHANDLER_COMMAND" != x; then
44042       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44043     fi
44044   fi
44045 
44046     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44047   fi
44048 
44049 
44050 
44051 
44052 
44053 
44054   ###############################################################################
44055   #
44056   # The common unix printing system cups is used to print from java.
44057   #
44058 
44059 # Check whether --with-cups was given.
44060 if test "${with_cups+set}" = set; then :
44061   withval=$with_cups;
44062 fi
44063 
44064 
44065 # Check whether --with-cups-include was given.
44066 if test "${with_cups_include+set}" = set; then :
44067   withval=$with_cups_include;
44068 fi
44069 
44070 
44071   if test "x$CUPS_NOT_NEEDED" = xyes; then
44072     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44073       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44074 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44075     fi
44076     CUPS_CFLAGS=
44077   else
44078     CUPS_FOUND=no
44079 
44080     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44081       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44082     fi
44083 
44084     if test "x${with_cups}" != x; then
44085       CUPS_CFLAGS="-I${with_cups}/include"
44086       CUPS_FOUND=yes
44087     fi
44088     if test "x${with_cups_include}" != x; then
44089       CUPS_CFLAGS="-I${with_cups_include}"
44090       CUPS_FOUND=yes
44091     fi
44092     if test "x$CUPS_FOUND" = xno; then
44093 
44094 
44095   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44096     # Source the builddeps file again, to make sure it uses the latest variables!
44097     . $builddepsfile
44098     # Look for a target and build machine specific resource!
44099     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44100     if test "x$resource" = x; then
44101       # Ok, lets instead look for a target specific resource
44102       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44103     fi
44104     if test "x$resource" = x; then
44105       # Ok, lets instead look for a build specific resource
44106       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44107     fi
44108     if test "x$resource" = x; then
44109       # Ok, lets instead look for a generic resource
44110       # (The cups comes from M4 and not the shell, thus no need for eval here.)
44111       resource=${builddep_cups}
44112     fi
44113     if test "x$resource" != x; then
44114       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44115 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44116       # If the resource in the builddeps.conf file is an existing directory,
44117       # for example /java/linux/cups
44118       if test -d ${resource}; then
44119         depdir=${resource}
44120       else
44121 
44122   # cups is for example mymodule
44123   # $resource is for example libs/general/libmymod_1_2_3.zip
44124   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44125   # $with_builddeps_dir is for example /localhome/builddeps
44126   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44127   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44128   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44129   filename=`basename $resource`
44130   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44131   filebase=${filename%%.*}
44132   extension=${filename#*.}
44133   installdir=$with_builddeps_dir/$filebase
44134   if test ! -f $installdir/$filename.unpacked; then
44135     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44136 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44137     if test ! -d $installdir; then
44138       mkdir -p $installdir
44139     fi
44140     if test ! -d $installdir; then
44141       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44142     fi
44143     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44144     touch $tmpfile
44145     if test ! -f $tmpfile; then
44146       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44147     fi
44148 
44149   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44150   # $tmpfile is the local file name for the downloaded file.
44151   VALID_TOOL=no
44152   if test "x$BDEPS_FTP" = xwget; then
44153     VALID_TOOL=yes
44154     wget -O $tmpfile $with_builddeps_server/$resource
44155   fi
44156   if test "x$BDEPS_FTP" = xlftp; then
44157     VALID_TOOL=yes
44158     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44159   fi
44160   if test "x$BDEPS_FTP" = xftp; then
44161     VALID_TOOL=yes
44162     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44163     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44164     FTPUSERPWD=${FTPSERVER%%@*}
44165     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44166       FTPUSER=${userpwd%%:*}
44167       FTPPWD=${userpwd#*@}
44168       FTPSERVER=${FTPSERVER#*@}
44169     else
44170       FTPUSER=ftp
44171       FTPPWD=ftp
44172     fi
44173     # the "pass" command does not work on some
44174     # ftp clients (read ftp.exe) but if it works,
44175     # passive mode is better!
44176     ( \
44177         echo "user $FTPUSER $FTPPWD"        ; \
44178         echo "pass"                         ; \
44179         echo "bin"                          ; \
44180         echo "get $FTPPATH $tmpfile"              ; \
44181     ) | ftp -in $FTPSERVER
44182   fi
44183   if test "x$VALID_TOOL" != xyes; then
44184     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44185   fi
44186 
44187     mv $tmpfile $installdir/$filename
44188     if test ! -s $installdir/$filename; then
44189       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44190     fi
44191     case "$extension" in
44192       zip)  echo "Unzipping $installdir/$filename..."
44193         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44194         ;;
44195       tar.gz) echo "Untaring $installdir/$filename..."
44196         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44197         ;;
44198       tgz) echo "Untaring $installdir/$filename..."
44199         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44200         ;;
44201       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44202         ;;
44203     esac
44204   fi
44205   if test -f $installdir/$filename.unpacked; then
44206     depdir=$installdir
44207   fi
44208 
44209       fi
44210       # Source the builddeps file again, because in the previous command, the depdir
44211       # was updated to point at the current build dependency install directory.
44212       . $builddepsfile
44213       # Now extract variables from the builddeps.conf files.
44214       theroot=${builddep_cups_ROOT}
44215       thecflags=${builddep_cups_CFLAGS}
44216       thelibs=${builddep_cups_LIBS}
44217       if test "x$depdir" = x; then
44218         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44219       fi
44220       CUPS=$depdir
44221       if test "x$theroot" != x; then
44222         CUPS="$theroot"
44223       fi
44224       if test "x$thecflags" != x; then
44225         CUPS_CFLAGS="$thecflags"
44226       fi
44227       if test "x$thelibs" != x; then
44228         CUPS_LIBS="$thelibs"
44229       fi
44230       CUPS_FOUND=yes
44231 
44232     fi
44233 
44234   fi
44235 
44236     fi
44237     if test "x$CUPS_FOUND" = xno; then
44238       # Are the cups headers installed in the default /usr/include location?
44239       for ac_header in cups/cups.h cups/ppd.h
44240 do :
44241   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44242 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44243 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44244   cat >>confdefs.h <<_ACEOF
44245 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44246 _ACEOF
44247 
44248             CUPS_FOUND=yes
44249             CUPS_CFLAGS=
44250             DEFAULT_CUPS=yes
44251 
44252 
44253 fi
44254 
44255 done
44256 
44257     fi
44258     if test "x$CUPS_FOUND" = xno; then
44259       # Getting nervous now? Lets poke around for standard Solaris third-party
44260       # package installation locations.
44261       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44262 $as_echo_n "checking for cups headers... " >&6; }
44263       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44264         # An SFW package seems to be installed!
44265         CUPS_FOUND=yes
44266         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44267       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44268         # A CSW package seems to be installed!
44269         CUPS_FOUND=yes
44270         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44271       fi
44272       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44273 $as_echo "$CUPS_FOUND" >&6; }
44274     fi
44275     if test "x$CUPS_FOUND" = xno; then
44276 
44277   # Print a helpful message on how to acquire the necessary build dependency.
44278   # cups is the help tag: freetype, cups, pulse, alsa etc
44279   MISSING_DEPENDENCY=cups
44280 
44281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44282     cygwin_help $MISSING_DEPENDENCY
44283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44284     msys_help $MISSING_DEPENDENCY
44285   else
44286     PKGHANDLER_COMMAND=
44287 
44288     case $PKGHANDLER in
44289       apt-get)
44290         apt_help     $MISSING_DEPENDENCY ;;
44291       yum)
44292         yum_help     $MISSING_DEPENDENCY ;;
44293       port)
44294         port_help    $MISSING_DEPENDENCY ;;
44295       pkgutil)
44296         pkgutil_help $MISSING_DEPENDENCY ;;
44297       pkgadd)
44298         pkgadd_help  $MISSING_DEPENDENCY ;;
44299     esac
44300 
44301     if test "x$PKGHANDLER_COMMAND" != x; then
44302       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44303     fi
44304   fi
44305 
44306       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44307     fi
44308   fi
44309 
44310 
44311 
44312 
44313 
44314 
44315   ###############################################################################
44316   #
44317   # The ubiquitous freetype library is used to render fonts.
44318   #
44319 
44320 # Check whether --with-freetype was given.
44321 if test "${with_freetype+set}" = set; then :
44322   withval=$with_freetype;
44323 fi
44324 
44325 
44326 # Check whether --with-freetype-include was given.
44327 if test "${with_freetype_include+set}" = set; then :
44328   withval=$with_freetype_include;
44329 fi
44330 
44331 
44332 # Check whether --with-freetype-lib was given.
44333 if test "${with_freetype_lib+set}" = set; then :
44334   withval=$with_freetype_lib;
44335 fi
44336 
44337 
44338 # Check whether --with-freetype-src was given.
44339 if test "${with_freetype_src+set}" = set; then :
44340   withval=$with_freetype_src;
44341 fi
44342 
44343   # Check whether --enable-freetype-bundling was given.
44344 if test "${enable_freetype_bundling+set}" = set; then :
44345   enableval=$enable_freetype_bundling;
44346 fi
44347 
44348 
44349   FREETYPE_CFLAGS=
44350   FREETYPE_LIBS=
44351   FREETYPE_BUNDLE_LIB_PATH=
44352 
44353   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44354     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44355       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44356 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44357     fi
44358     if test "x$enable_freetype_bundling" != x; then
44359       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44360 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44361     fi
44362   else
44363     # freetype is needed to build; go get it!
44364 
44365     BUNDLE_FREETYPE="$enable_freetype_bundling"
44366 
44367     if  test "x$with_freetype_src" != x; then
44368       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44369         # Try to build freetype if --with-freetype-src was given on Windows
44370 
44371   FREETYPE_SRC_PATH="$with_freetype_src"
44372   BUILD_FREETYPE=yes
44373 
44374   # Check if the freetype sources are acessible..
44375   if ! test -d $FREETYPE_SRC_PATH; then
44376     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44377 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44378     BUILD_FREETYPE=no
44379   fi
44380   # ..and contain a vc2010 project file
44381   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44382   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44383     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44384 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44385     BUILD_FREETYPE=no
44386   fi
44387   # Now check if configure found a version of 'msbuild.exe'
44388   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44389     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44390 $as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44391     BUILD_FREETYPE=no
44392   fi
44393 
44394   # Ready to go..
44395   if test "x$BUILD_FREETYPE" = xyes; then
44396 
44397     # msbuild requires trailing slashes for output directories
44398     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44399     freetype_lib_path_unix="$freetype_lib_path"
44400     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44401 
44402   unix_path="$vcxproj_path"
44403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44404     windows_path=`$CYGPATH -m "$unix_path"`
44405     vcxproj_path="$windows_path"
44406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44407     windows_path=`cmd //c echo $unix_path`
44408     vcxproj_path="$windows_path"
44409   fi
44410 
44411 
44412   unix_path="$freetype_lib_path"
44413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44414     windows_path=`$CYGPATH -m "$unix_path"`
44415     freetype_lib_path="$windows_path"
44416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44417     windows_path=`cmd //c echo $unix_path`
44418     freetype_lib_path="$windows_path"
44419   fi
44420 
44421 
44422   unix_path="$freetype_obj_path"
44423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44424     windows_path=`$CYGPATH -m "$unix_path"`
44425     freetype_obj_path="$windows_path"
44426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44427     windows_path=`cmd //c echo $unix_path`
44428     freetype_obj_path="$windows_path"
44429   fi
44430 
44431     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44432       freetype_platform=x64
44433     else
44434       freetype_platform=win32
44435     fi
44436 
44437     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44438     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44439     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44440     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44441     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44442 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44443 
44444     # First we try to build the freetype.dll
44445     $ECHO -e "@echo off\n"\
44446              "$MSBUILD $vcxproj_path "\
44447                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44448                        "/p:Configuration=\"Release Multithreaded\" "\
44449                        "/p:Platform=$freetype_platform "\
44450                        "/p:ConfigurationType=DynamicLibrary "\
44451                        "/p:TargetName=freetype "\
44452                        "/p:OutDir=\"$freetype_lib_path\" "\
44453                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44454     cmd /c freetype.bat
44455 
44456     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44457       # If that succeeds we also build freetype.lib
44458       $ECHO -e "@echo off\n"\
44459                "$MSBUILD $vcxproj_path "\
44460                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44461                          "/p:Configuration=\"Release Multithreaded\" "\
44462                          "/p:Platform=$freetype_platform "\
44463                          "/p:ConfigurationType=StaticLibrary "\
44464                          "/p:TargetName=freetype "\
44465                          "/p:OutDir=\"$freetype_lib_path\" "\
44466                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44467       cmd /c freetype.bat
44468 
44469       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44470         # Once we build both, lib and dll, set freetype lib and include path appropriately
44471         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44472         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44473         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44474 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44475       else
44476         BUILD_FREETYPE=no
44477       fi
44478     else
44479       BUILD_FREETYPE=no
44480     fi
44481   fi
44482 
44483         if test "x$BUILD_FREETYPE" = xyes; then
44484           # Okay, we built it. Check that it works.
44485 
44486   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44487   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44488   METHOD="--with-freetype-src"
44489 
44490   # First check if the files exists.
44491   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44492     # We found an arbitrary include file. That's a good sign.
44493     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44494 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44495     FOUND_FREETYPE=yes
44496 
44497     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44498     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44499       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44500 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44501       FOUND_FREETYPE=no
44502     else
44503       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44504         # On Windows, we will need both .lib and .dll file.
44505         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44506           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44507 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44508           FOUND_FREETYPE=no
44509         fi
44510       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44511         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44512         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44513       fi
44514     fi
44515   fi
44516 
44517   if test "x$FOUND_FREETYPE" = xyes; then
44518 
44519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44520 
44521   # Input might be given as Windows format, start by converting to
44522   # unix format.
44523   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44524   new_path=`$CYGPATH -u "$path"`
44525 
44526   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44527   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44528   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44529   # "foo.exe" is OK but "foo" is an error.
44530   #
44531   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44532   # It is also a way to make sure we got the proper file name for the real test later on.
44533   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44534   if test "x$test_shortpath" = x; then
44535     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44536 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44537     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44538   fi
44539 
44540   # Call helper function which possibly converts this using DOS-style short mode.
44541   # If so, the updated path is stored in $new_path.
44542 
44543   input_path="$new_path"
44544   # Check if we need to convert this using DOS-style short mode. If the path
44545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44546   # take no chances and rewrite it.
44547   # Note: m4 eats our [], so we need to use [ and ] instead.
44548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44549   if test "x$has_forbidden_chars" != x; then
44550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44551     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44554       # Going to short mode and back again did indeed matter. Since short mode is
44555       # case insensitive, let's make it lowercase to improve readability.
44556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44557       # Now convert it back to Unix-style (cygpath)
44558       input_path=`$CYGPATH -u "$shortmode_path"`
44559       new_path="$input_path"
44560     fi
44561   fi
44562 
44563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44564   if test "x$test_cygdrive_prefix" = x; then
44565     # As a simple fix, exclude /usr/bin since it's not a real path.
44566     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44568       # a path prefixed by /cygdrive for fixpath to work.
44569       new_path="$CYGWIN_ROOT_PATH$input_path"
44570     fi
44571   fi
44572 
44573 
44574   if test "x$path" != "x$new_path"; then
44575     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44577 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44578   fi
44579 
44580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44581 
44582   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44583   has_colon=`$ECHO $path | $GREP ^.:`
44584   new_path="$path"
44585   if test "x$has_colon" = x; then
44586     # Not in mixed or Windows style, start by that.
44587     new_path=`cmd //c echo $path`
44588   fi
44589 
44590 
44591   input_path="$new_path"
44592   # Check if we need to convert this using DOS-style short mode. If the path
44593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44594   # take no chances and rewrite it.
44595   # Note: m4 eats our [], so we need to use [ and ] instead.
44596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44597   if test "x$has_forbidden_chars" != x; then
44598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44599     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44600   fi
44601 
44602 
44603   windows_path="$new_path"
44604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44605     unix_path=`$CYGPATH -u "$windows_path"`
44606     new_path="$unix_path"
44607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44609     new_path="$unix_path"
44610   fi
44611 
44612   if test "x$path" != "x$new_path"; then
44613     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44615 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44616   fi
44617 
44618   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44619   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44620 
44621   else
44622     # We're on a posix platform. Hooray! :)
44623     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44624     has_space=`$ECHO "$path" | $GREP " "`
44625     if test "x$has_space" != x; then
44626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44627 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44628       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44629     fi
44630 
44631     # Use eval to expand a potential ~
44632     eval path="$path"
44633     if test ! -f "$path" && test ! -d "$path"; then
44634       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44635     fi
44636 
44637     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44638   fi
44639 
44640 
44641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44642 
44643   # Input might be given as Windows format, start by converting to
44644   # unix format.
44645   path="$POTENTIAL_FREETYPE_LIB_PATH"
44646   new_path=`$CYGPATH -u "$path"`
44647 
44648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44651   # "foo.exe" is OK but "foo" is an error.
44652   #
44653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44654   # It is also a way to make sure we got the proper file name for the real test later on.
44655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44656   if test "x$test_shortpath" = x; then
44657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44658 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44659     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44660   fi
44661 
44662   # Call helper function which possibly converts this using DOS-style short mode.
44663   # If so, the updated path is stored in $new_path.
44664 
44665   input_path="$new_path"
44666   # Check if we need to convert this using DOS-style short mode. If the path
44667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44668   # take no chances and rewrite it.
44669   # Note: m4 eats our [], so we need to use [ and ] instead.
44670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44671   if test "x$has_forbidden_chars" != x; then
44672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44676       # Going to short mode and back again did indeed matter. Since short mode is
44677       # case insensitive, let's make it lowercase to improve readability.
44678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44679       # Now convert it back to Unix-style (cygpath)
44680       input_path=`$CYGPATH -u "$shortmode_path"`
44681       new_path="$input_path"
44682     fi
44683   fi
44684 
44685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44686   if test "x$test_cygdrive_prefix" = x; then
44687     # As a simple fix, exclude /usr/bin since it's not a real path.
44688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44690       # a path prefixed by /cygdrive for fixpath to work.
44691       new_path="$CYGWIN_ROOT_PATH$input_path"
44692     fi
44693   fi
44694 
44695 
44696   if test "x$path" != "x$new_path"; then
44697     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44699 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44700   fi
44701 
44702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44703 
44704   path="$POTENTIAL_FREETYPE_LIB_PATH"
44705   has_colon=`$ECHO $path | $GREP ^.:`
44706   new_path="$path"
44707   if test "x$has_colon" = x; then
44708     # Not in mixed or Windows style, start by that.
44709     new_path=`cmd //c echo $path`
44710   fi
44711 
44712 
44713   input_path="$new_path"
44714   # Check if we need to convert this using DOS-style short mode. If the path
44715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44716   # take no chances and rewrite it.
44717   # Note: m4 eats our [], so we need to use [ and ] instead.
44718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44719   if test "x$has_forbidden_chars" != x; then
44720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44722   fi
44723 
44724 
44725   windows_path="$new_path"
44726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44727     unix_path=`$CYGPATH -u "$windows_path"`
44728     new_path="$unix_path"
44729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44731     new_path="$unix_path"
44732   fi
44733 
44734   if test "x$path" != "x$new_path"; then
44735     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44737 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44738   fi
44739 
44740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44742 
44743   else
44744     # We're on a posix platform. Hooray! :)
44745     path="$POTENTIAL_FREETYPE_LIB_PATH"
44746     has_space=`$ECHO "$path" | $GREP " "`
44747     if test "x$has_space" != x; then
44748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44749 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44750       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44751     fi
44752 
44753     # Use eval to expand a potential ~
44754     eval path="$path"
44755     if test ! -f "$path" && test ! -d "$path"; then
44756       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44757     fi
44758 
44759     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44760   fi
44761 
44762 
44763     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44765 $as_echo_n "checking for freetype includes... " >&6; }
44766     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44767 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44768     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44769     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44770 $as_echo_n "checking for freetype libraries... " >&6; }
44771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44772 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44773   fi
44774 
44775           if test "x$FOUND_FREETYPE" != xyes; then
44776             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44777           fi
44778         else
44779           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44780 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44781           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44782         fi
44783       else
44784         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44785 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44786       fi
44787     fi
44788 
44789     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44790       # User has specified settings
44791 
44792       if test "x$BUNDLE_FREETYPE" = x; then
44793         # If not specified, default is to bundle freetype
44794         BUNDLE_FREETYPE=yes
44795       fi
44796 
44797       if test "x$with_freetype" != x; then
44798         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44799         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44800       fi
44801 
44802       # Allow --with-freetype-lib and --with-freetype-include to override
44803       if test "x$with_freetype_include" != x; then
44804         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44805       fi
44806       if test "x$with_freetype_lib" != x; then
44807         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44808       fi
44809 
44810       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44811         # Okay, we got it. Check that it works.
44812 
44813   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44814   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44815   METHOD="--with-freetype"
44816 
44817   # First check if the files exists.
44818   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44819     # We found an arbitrary include file. That's a good sign.
44820     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44821 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44822     FOUND_FREETYPE=yes
44823 
44824     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44825     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44826       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44827 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44828       FOUND_FREETYPE=no
44829     else
44830       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44831         # On Windows, we will need both .lib and .dll file.
44832         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44833           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44834 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44835           FOUND_FREETYPE=no
44836         fi
44837       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44838         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44839         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44840       fi
44841     fi
44842   fi
44843 
44844   if test "x$FOUND_FREETYPE" = xyes; then
44845 
44846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44847 
44848   # Input might be given as Windows format, start by converting to
44849   # unix format.
44850   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44851   new_path=`$CYGPATH -u "$path"`
44852 
44853   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44854   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44855   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44856   # "foo.exe" is OK but "foo" is an error.
44857   #
44858   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44859   # It is also a way to make sure we got the proper file name for the real test later on.
44860   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44861   if test "x$test_shortpath" = x; then
44862     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44863 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44864     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44865   fi
44866 
44867   # Call helper function which possibly converts this using DOS-style short mode.
44868   # If so, the updated path is stored in $new_path.
44869 
44870   input_path="$new_path"
44871   # Check if we need to convert this using DOS-style short mode. If the path
44872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44873   # take no chances and rewrite it.
44874   # Note: m4 eats our [], so we need to use [ and ] instead.
44875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44876   if test "x$has_forbidden_chars" != x; then
44877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44881       # Going to short mode and back again did indeed matter. Since short mode is
44882       # case insensitive, let's make it lowercase to improve readability.
44883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44884       # Now convert it back to Unix-style (cygpath)
44885       input_path=`$CYGPATH -u "$shortmode_path"`
44886       new_path="$input_path"
44887     fi
44888   fi
44889 
44890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44891   if test "x$test_cygdrive_prefix" = x; then
44892     # As a simple fix, exclude /usr/bin since it's not a real path.
44893     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44895       # a path prefixed by /cygdrive for fixpath to work.
44896       new_path="$CYGWIN_ROOT_PATH$input_path"
44897     fi
44898   fi
44899 
44900 
44901   if test "x$path" != "x$new_path"; then
44902     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44903     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44904 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44905   fi
44906 
44907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44908 
44909   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44910   has_colon=`$ECHO $path | $GREP ^.:`
44911   new_path="$path"
44912   if test "x$has_colon" = x; then
44913     # Not in mixed or Windows style, start by that.
44914     new_path=`cmd //c echo $path`
44915   fi
44916 
44917 
44918   input_path="$new_path"
44919   # Check if we need to convert this using DOS-style short mode. If the path
44920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44921   # take no chances and rewrite it.
44922   # Note: m4 eats our [], so we need to use [ and ] instead.
44923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44924   if test "x$has_forbidden_chars" != x; then
44925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44927   fi
44928 
44929 
44930   windows_path="$new_path"
44931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44932     unix_path=`$CYGPATH -u "$windows_path"`
44933     new_path="$unix_path"
44934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44936     new_path="$unix_path"
44937   fi
44938 
44939   if test "x$path" != "x$new_path"; then
44940     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44942 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44943   fi
44944 
44945   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44946   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44947 
44948   else
44949     # We're on a posix platform. Hooray! :)
44950     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44951     has_space=`$ECHO "$path" | $GREP " "`
44952     if test "x$has_space" != x; then
44953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44954 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44955       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44956     fi
44957 
44958     # Use eval to expand a potential ~
44959     eval path="$path"
44960     if test ! -f "$path" && test ! -d "$path"; then
44961       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44962     fi
44963 
44964     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44965   fi
44966 
44967 
44968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44969 
44970   # Input might be given as Windows format, start by converting to
44971   # unix format.
44972   path="$POTENTIAL_FREETYPE_LIB_PATH"
44973   new_path=`$CYGPATH -u "$path"`
44974 
44975   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44976   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44977   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44978   # "foo.exe" is OK but "foo" is an error.
44979   #
44980   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44981   # It is also a way to make sure we got the proper file name for the real test later on.
44982   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44983   if test "x$test_shortpath" = x; then
44984     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44985 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44986     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44987   fi
44988 
44989   # Call helper function which possibly converts this using DOS-style short mode.
44990   # If so, the updated path is stored in $new_path.
44991 
44992   input_path="$new_path"
44993   # Check if we need to convert this using DOS-style short mode. If the path
44994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44995   # take no chances and rewrite it.
44996   # Note: m4 eats our [], so we need to use [ and ] instead.
44997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44998   if test "x$has_forbidden_chars" != x; then
44999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45000     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45001     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45002     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45003       # Going to short mode and back again did indeed matter. Since short mode is
45004       # case insensitive, let's make it lowercase to improve readability.
45005       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45006       # Now convert it back to Unix-style (cygpath)
45007       input_path=`$CYGPATH -u "$shortmode_path"`
45008       new_path="$input_path"
45009     fi
45010   fi
45011 
45012   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45013   if test "x$test_cygdrive_prefix" = x; then
45014     # As a simple fix, exclude /usr/bin since it's not a real path.
45015     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45016       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45017       # a path prefixed by /cygdrive for fixpath to work.
45018       new_path="$CYGWIN_ROOT_PATH$input_path"
45019     fi
45020   fi
45021 
45022 
45023   if test "x$path" != "x$new_path"; then
45024     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45026 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45027   fi
45028 
45029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45030 
45031   path="$POTENTIAL_FREETYPE_LIB_PATH"
45032   has_colon=`$ECHO $path | $GREP ^.:`
45033   new_path="$path"
45034   if test "x$has_colon" = x; then
45035     # Not in mixed or Windows style, start by that.
45036     new_path=`cmd //c echo $path`
45037   fi
45038 
45039 
45040   input_path="$new_path"
45041   # Check if we need to convert this using DOS-style short mode. If the path
45042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45043   # take no chances and rewrite it.
45044   # Note: m4 eats our [], so we need to use [ and ] instead.
45045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45046   if test "x$has_forbidden_chars" != x; then
45047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45048     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45049   fi
45050 
45051 
45052   windows_path="$new_path"
45053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45054     unix_path=`$CYGPATH -u "$windows_path"`
45055     new_path="$unix_path"
45056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45058     new_path="$unix_path"
45059   fi
45060 
45061   if test "x$path" != "x$new_path"; then
45062     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45064 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45065   fi
45066 
45067   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45068   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45069 
45070   else
45071     # We're on a posix platform. Hooray! :)
45072     path="$POTENTIAL_FREETYPE_LIB_PATH"
45073     has_space=`$ECHO "$path" | $GREP " "`
45074     if test "x$has_space" != x; then
45075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45076 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45077       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45078     fi
45079 
45080     # Use eval to expand a potential ~
45081     eval path="$path"
45082     if test ! -f "$path" && test ! -d "$path"; then
45083       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45084     fi
45085 
45086     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45087   fi
45088 
45089 
45090     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45092 $as_echo_n "checking for freetype includes... " >&6; }
45093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45094 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45095     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45096     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45097 $as_echo_n "checking for freetype libraries... " >&6; }
45098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45099 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45100   fi
45101 
45102         if test "x$FOUND_FREETYPE" != xyes; then
45103           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45104         fi
45105       else
45106         # User specified only one of lib or include. This is an error.
45107         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45108           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45109 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45110           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45111         else
45112           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45113 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45114           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45115         fi
45116       fi
45117     else
45118       # User did not specify settings, but we need freetype. Try to locate it.
45119 
45120       if test "x$BUNDLE_FREETYPE" = x; then
45121         # If not specified, default is to bundle freetype only on windows
45122         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45123           BUNDLE_FREETYPE=yes
45124         else
45125           BUNDLE_FREETYPE=no
45126         fi
45127       fi
45128 
45129       if test "x$FOUND_FREETYPE" != xyes; then
45130         # Check builddeps
45131 
45132 
45133   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45134     # Source the builddeps file again, to make sure it uses the latest variables!
45135     . $builddepsfile
45136     # Look for a target and build machine specific resource!
45137     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45138     if test "x$resource" = x; then
45139       # Ok, lets instead look for a target specific resource
45140       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45141     fi
45142     if test "x$resource" = x; then
45143       # Ok, lets instead look for a build specific resource
45144       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45145     fi
45146     if test "x$resource" = x; then
45147       # Ok, lets instead look for a generic resource
45148       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45149       resource=${builddep_freetype2}
45150     fi
45151     if test "x$resource" != x; then
45152       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45153 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45154       # If the resource in the builddeps.conf file is an existing directory,
45155       # for example /java/linux/cups
45156       if test -d ${resource}; then
45157         depdir=${resource}
45158       else
45159 
45160   # freetype2 is for example mymodule
45161   # $resource is for example libs/general/libmymod_1_2_3.zip
45162   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45163   # $with_builddeps_dir is for example /localhome/builddeps
45164   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45165   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45166   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45167   filename=`basename $resource`
45168   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45169   filebase=${filename%%.*}
45170   extension=${filename#*.}
45171   installdir=$with_builddeps_dir/$filebase
45172   if test ! -f $installdir/$filename.unpacked; then
45173     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45174 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45175     if test ! -d $installdir; then
45176       mkdir -p $installdir
45177     fi
45178     if test ! -d $installdir; then
45179       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45180     fi
45181     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45182     touch $tmpfile
45183     if test ! -f $tmpfile; then
45184       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45185     fi
45186 
45187   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45188   # $tmpfile is the local file name for the downloaded file.
45189   VALID_TOOL=no
45190   if test "x$BDEPS_FTP" = xwget; then
45191     VALID_TOOL=yes
45192     wget -O $tmpfile $with_builddeps_server/$resource
45193   fi
45194   if test "x$BDEPS_FTP" = xlftp; then
45195     VALID_TOOL=yes
45196     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45197   fi
45198   if test "x$BDEPS_FTP" = xftp; then
45199     VALID_TOOL=yes
45200     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45201     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45202     FTPUSERPWD=${FTPSERVER%%@*}
45203     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45204       FTPUSER=${userpwd%%:*}
45205       FTPPWD=${userpwd#*@}
45206       FTPSERVER=${FTPSERVER#*@}
45207     else
45208       FTPUSER=ftp
45209       FTPPWD=ftp
45210     fi
45211     # the "pass" command does not work on some
45212     # ftp clients (read ftp.exe) but if it works,
45213     # passive mode is better!
45214     ( \
45215         echo "user $FTPUSER $FTPPWD"        ; \
45216         echo "pass"                         ; \
45217         echo "bin"                          ; \
45218         echo "get $FTPPATH $tmpfile"              ; \
45219     ) | ftp -in $FTPSERVER
45220   fi
45221   if test "x$VALID_TOOL" != xyes; then
45222     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45223   fi
45224 
45225     mv $tmpfile $installdir/$filename
45226     if test ! -s $installdir/$filename; then
45227       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45228     fi
45229     case "$extension" in
45230       zip)  echo "Unzipping $installdir/$filename..."
45231         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45232         ;;
45233       tar.gz) echo "Untaring $installdir/$filename..."
45234         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45235         ;;
45236       tgz) echo "Untaring $installdir/$filename..."
45237         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45238         ;;
45239       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45240         ;;
45241     esac
45242   fi
45243   if test -f $installdir/$filename.unpacked; then
45244     depdir=$installdir
45245   fi
45246 
45247       fi
45248       # Source the builddeps file again, because in the previous command, the depdir
45249       # was updated to point at the current build dependency install directory.
45250       . $builddepsfile
45251       # Now extract variables from the builddeps.conf files.
45252       theroot=${builddep_freetype2_ROOT}
45253       thecflags=${builddep_freetype2_CFLAGS}
45254       thelibs=${builddep_freetype2_LIBS}
45255       if test "x$depdir" = x; then
45256         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45257       fi
45258       FREETYPE=$depdir
45259       if test "x$theroot" != x; then
45260         FREETYPE="$theroot"
45261       fi
45262       if test "x$thecflags" != x; then
45263         FREETYPE_CFLAGS="$thecflags"
45264       fi
45265       if test "x$thelibs" != x; then
45266         FREETYPE_LIBS="$thelibs"
45267       fi
45268       FOUND_FREETYPE=yes
45269       else FOUND_FREETYPE=no
45270 
45271     fi
45272     else FOUND_FREETYPE=no
45273 
45274   fi
45275 
45276         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45277         if test "x$FOUND_FREETYPE" = xyes; then
45278           if test "x$BUNDLE_FREETYPE" = xyes; then
45279             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45280 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45281             FOUND_FREETYPE=no
45282           else
45283             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45284 $as_echo_n "checking for freetype... " >&6; }
45285             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45286 $as_echo "yes (using builddeps)" >&6; }
45287           fi
45288         fi
45289       fi
45290 
45291       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45292       if test "x$SYSROOT" = x; then
45293         if test "x$FOUND_FREETYPE" != xyes; then
45294           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45295           if test "x$PKG_CONFIG" != x; then
45296 
45297 pkg_failed=no
45298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45299 $as_echo_n "checking for FREETYPE... " >&6; }
45300 
45301 if test -n "$FREETYPE_CFLAGS"; then
45302     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45303  elif test -n "$PKG_CONFIG"; then
45304     if test -n "$PKG_CONFIG" && \
45305     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45306   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45307   ac_status=$?
45308   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45309   test $ac_status = 0; }; then
45310   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45311 else
45312   pkg_failed=yes
45313 fi
45314  else
45315     pkg_failed=untried
45316 fi
45317 if test -n "$FREETYPE_LIBS"; then
45318     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45319  elif test -n "$PKG_CONFIG"; then
45320     if test -n "$PKG_CONFIG" && \
45321     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45322   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45323   ac_status=$?
45324   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45325   test $ac_status = 0; }; then
45326   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45327 else
45328   pkg_failed=yes
45329 fi
45330  else
45331     pkg_failed=untried
45332 fi
45333 
45334 
45335 
45336 if test $pkg_failed = yes; then
45337 
45338 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45339         _pkg_short_errors_supported=yes
45340 else
45341         _pkg_short_errors_supported=no
45342 fi
45343         if test $_pkg_short_errors_supported = yes; then
45344                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45345         else
45346                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45347         fi
45348         # Put the nasty error message in config.log where it belongs
45349         echo "$FREETYPE_PKG_ERRORS" >&5
45350 
45351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45352 $as_echo "no" >&6; }
45353                 FOUND_FREETYPE=no
45354 elif test $pkg_failed = untried; then
45355         FOUND_FREETYPE=no
45356 else
45357         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45358         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45360 $as_echo "yes" >&6; }
45361         FOUND_FREETYPE=yes
45362 fi
45363             if test "x$FOUND_FREETYPE" = xyes; then
45364               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45365               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45366               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45367               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45368                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45369               fi
45370               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45371               if test "x$BUNDLE_FREETYPE" = xyes; then
45372                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45373 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45374                 FOUND_FREETYPE=no
45375               else
45376                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45377 $as_echo_n "checking for freetype... " >&6; }
45378                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45379 $as_echo "yes (using pkg-config)" >&6; }
45380               fi
45381             fi
45382           fi
45383         fi
45384       fi
45385 
45386       if test "x$FOUND_FREETYPE" != xyes; then
45387         # Check in well-known locations
45388         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45389           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45390 
45391   windows_path="$FREETYPE_BASE_DIR"
45392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45393     unix_path=`$CYGPATH -u "$windows_path"`
45394     FREETYPE_BASE_DIR="$unix_path"
45395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45397     FREETYPE_BASE_DIR="$unix_path"
45398   fi
45399 
45400 
45401   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45402   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45403   METHOD="well-known location"
45404 
45405   # First check if the files exists.
45406   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45407     # We found an arbitrary include file. That's a good sign.
45408     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45409 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45410     FOUND_FREETYPE=yes
45411 
45412     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45413     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45414       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45415 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45416       FOUND_FREETYPE=no
45417     else
45418       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45419         # On Windows, we will need both .lib and .dll file.
45420         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45421           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45422 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45423           FOUND_FREETYPE=no
45424         fi
45425       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45426         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45427         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45428       fi
45429     fi
45430   fi
45431 
45432   if test "x$FOUND_FREETYPE" = xyes; then
45433 
45434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45435 
45436   # Input might be given as Windows format, start by converting to
45437   # unix format.
45438   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45439   new_path=`$CYGPATH -u "$path"`
45440 
45441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45444   # "foo.exe" is OK but "foo" is an error.
45445   #
45446   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45447   # It is also a way to make sure we got the proper file name for the real test later on.
45448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45449   if test "x$test_shortpath" = x; then
45450     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45451 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45452     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45453   fi
45454 
45455   # Call helper function which possibly converts this using DOS-style short mode.
45456   # If so, the updated path is stored in $new_path.
45457 
45458   input_path="$new_path"
45459   # Check if we need to convert this using DOS-style short mode. If the path
45460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45461   # take no chances and rewrite it.
45462   # Note: m4 eats our [], so we need to use [ and ] instead.
45463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45464   if test "x$has_forbidden_chars" != x; then
45465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45466     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45467     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45468     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45469       # Going to short mode and back again did indeed matter. Since short mode is
45470       # case insensitive, let's make it lowercase to improve readability.
45471       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45472       # Now convert it back to Unix-style (cygpath)
45473       input_path=`$CYGPATH -u "$shortmode_path"`
45474       new_path="$input_path"
45475     fi
45476   fi
45477 
45478   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45479   if test "x$test_cygdrive_prefix" = x; then
45480     # As a simple fix, exclude /usr/bin since it's not a real path.
45481     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45482       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45483       # a path prefixed by /cygdrive for fixpath to work.
45484       new_path="$CYGWIN_ROOT_PATH$input_path"
45485     fi
45486   fi
45487 
45488 
45489   if test "x$path" != "x$new_path"; then
45490     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45491     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45492 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45493   fi
45494 
45495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45496 
45497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45498   has_colon=`$ECHO $path | $GREP ^.:`
45499   new_path="$path"
45500   if test "x$has_colon" = x; then
45501     # Not in mixed or Windows style, start by that.
45502     new_path=`cmd //c echo $path`
45503   fi
45504 
45505 
45506   input_path="$new_path"
45507   # Check if we need to convert this using DOS-style short mode. If the path
45508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45509   # take no chances and rewrite it.
45510   # Note: m4 eats our [], so we need to use [ and ] instead.
45511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45512   if test "x$has_forbidden_chars" != x; then
45513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45515   fi
45516 
45517 
45518   windows_path="$new_path"
45519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45520     unix_path=`$CYGPATH -u "$windows_path"`
45521     new_path="$unix_path"
45522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45524     new_path="$unix_path"
45525   fi
45526 
45527   if test "x$path" != "x$new_path"; then
45528     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45531   fi
45532 
45533   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45534   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45535 
45536   else
45537     # We're on a posix platform. Hooray! :)
45538     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45539     has_space=`$ECHO "$path" | $GREP " "`
45540     if test "x$has_space" != x; then
45541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45542 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45543       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45544     fi
45545 
45546     # Use eval to expand a potential ~
45547     eval path="$path"
45548     if test ! -f "$path" && test ! -d "$path"; then
45549       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45550     fi
45551 
45552     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45553   fi
45554 
45555 
45556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45557 
45558   # Input might be given as Windows format, start by converting to
45559   # unix format.
45560   path="$POTENTIAL_FREETYPE_LIB_PATH"
45561   new_path=`$CYGPATH -u "$path"`
45562 
45563   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45564   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45565   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45566   # "foo.exe" is OK but "foo" is an error.
45567   #
45568   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45569   # It is also a way to make sure we got the proper file name for the real test later on.
45570   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45571   if test "x$test_shortpath" = x; then
45572     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45573 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45574     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45575   fi
45576 
45577   # Call helper function which possibly converts this using DOS-style short mode.
45578   # If so, the updated path is stored in $new_path.
45579 
45580   input_path="$new_path"
45581   # Check if we need to convert this using DOS-style short mode. If the path
45582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45583   # take no chances and rewrite it.
45584   # Note: m4 eats our [], so we need to use [ and ] instead.
45585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45586   if test "x$has_forbidden_chars" != x; then
45587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45588     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45589     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45590     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45591       # Going to short mode and back again did indeed matter. Since short mode is
45592       # case insensitive, let's make it lowercase to improve readability.
45593       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45594       # Now convert it back to Unix-style (cygpath)
45595       input_path=`$CYGPATH -u "$shortmode_path"`
45596       new_path="$input_path"
45597     fi
45598   fi
45599 
45600   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45601   if test "x$test_cygdrive_prefix" = x; then
45602     # As a simple fix, exclude /usr/bin since it's not a real path.
45603     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45604       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45605       # a path prefixed by /cygdrive for fixpath to work.
45606       new_path="$CYGWIN_ROOT_PATH$input_path"
45607     fi
45608   fi
45609 
45610 
45611   if test "x$path" != "x$new_path"; then
45612     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45613     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45614 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45615   fi
45616 
45617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45618 
45619   path="$POTENTIAL_FREETYPE_LIB_PATH"
45620   has_colon=`$ECHO $path | $GREP ^.:`
45621   new_path="$path"
45622   if test "x$has_colon" = x; then
45623     # Not in mixed or Windows style, start by that.
45624     new_path=`cmd //c echo $path`
45625   fi
45626 
45627 
45628   input_path="$new_path"
45629   # Check if we need to convert this using DOS-style short mode. If the path
45630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45631   # take no chances and rewrite it.
45632   # Note: m4 eats our [], so we need to use [ and ] instead.
45633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45634   if test "x$has_forbidden_chars" != x; then
45635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45636     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45637   fi
45638 
45639 
45640   windows_path="$new_path"
45641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45642     unix_path=`$CYGPATH -u "$windows_path"`
45643     new_path="$unix_path"
45644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45646     new_path="$unix_path"
45647   fi
45648 
45649   if test "x$path" != "x$new_path"; then
45650     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45651     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45652 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45653   fi
45654 
45655   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45656   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45657 
45658   else
45659     # We're on a posix platform. Hooray! :)
45660     path="$POTENTIAL_FREETYPE_LIB_PATH"
45661     has_space=`$ECHO "$path" | $GREP " "`
45662     if test "x$has_space" != x; then
45663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45664 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45665       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45666     fi
45667 
45668     # Use eval to expand a potential ~
45669     eval path="$path"
45670     if test ! -f "$path" && test ! -d "$path"; then
45671       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45672     fi
45673 
45674     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45675   fi
45676 
45677 
45678     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45680 $as_echo_n "checking for freetype includes... " >&6; }
45681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45682 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45683     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45684     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45685 $as_echo_n "checking for freetype libraries... " >&6; }
45686     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45687 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45688   fi
45689 
45690           if test "x$FOUND_FREETYPE" != xyes; then
45691             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45692 
45693   windows_path="$FREETYPE_BASE_DIR"
45694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45695     unix_path=`$CYGPATH -u "$windows_path"`
45696     FREETYPE_BASE_DIR="$unix_path"
45697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45699     FREETYPE_BASE_DIR="$unix_path"
45700   fi
45701 
45702 
45703   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45704   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45705   METHOD="well-known location"
45706 
45707   # First check if the files exists.
45708   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45709     # We found an arbitrary include file. That's a good sign.
45710     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45711 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45712     FOUND_FREETYPE=yes
45713 
45714     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45715     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45716       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45717 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45718       FOUND_FREETYPE=no
45719     else
45720       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45721         # On Windows, we will need both .lib and .dll file.
45722         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45723           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45724 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45725           FOUND_FREETYPE=no
45726         fi
45727       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45728         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45729         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45730       fi
45731     fi
45732   fi
45733 
45734   if test "x$FOUND_FREETYPE" = xyes; then
45735 
45736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45737 
45738   # Input might be given as Windows format, start by converting to
45739   # unix format.
45740   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45741   new_path=`$CYGPATH -u "$path"`
45742 
45743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45746   # "foo.exe" is OK but "foo" is an error.
45747   #
45748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45749   # It is also a way to make sure we got the proper file name for the real test later on.
45750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45751   if test "x$test_shortpath" = x; then
45752     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45753 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45754     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45755   fi
45756 
45757   # Call helper function which possibly converts this using DOS-style short mode.
45758   # If so, the updated path is stored in $new_path.
45759 
45760   input_path="$new_path"
45761   # Check if we need to convert this using DOS-style short mode. If the path
45762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45763   # take no chances and rewrite it.
45764   # Note: m4 eats our [], so we need to use [ and ] instead.
45765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45766   if test "x$has_forbidden_chars" != x; then
45767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45771       # Going to short mode and back again did indeed matter. Since short mode is
45772       # case insensitive, let's make it lowercase to improve readability.
45773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45774       # Now convert it back to Unix-style (cygpath)
45775       input_path=`$CYGPATH -u "$shortmode_path"`
45776       new_path="$input_path"
45777     fi
45778   fi
45779 
45780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45781   if test "x$test_cygdrive_prefix" = x; then
45782     # As a simple fix, exclude /usr/bin since it's not a real path.
45783     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45785       # a path prefixed by /cygdrive for fixpath to work.
45786       new_path="$CYGWIN_ROOT_PATH$input_path"
45787     fi
45788   fi
45789 
45790 
45791   if test "x$path" != "x$new_path"; then
45792     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45794 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45795   fi
45796 
45797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45798 
45799   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45800   has_colon=`$ECHO $path | $GREP ^.:`
45801   new_path="$path"
45802   if test "x$has_colon" = x; then
45803     # Not in mixed or Windows style, start by that.
45804     new_path=`cmd //c echo $path`
45805   fi
45806 
45807 
45808   input_path="$new_path"
45809   # Check if we need to convert this using DOS-style short mode. If the path
45810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45811   # take no chances and rewrite it.
45812   # Note: m4 eats our [], so we need to use [ and ] instead.
45813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45814   if test "x$has_forbidden_chars" != x; then
45815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45817   fi
45818 
45819 
45820   windows_path="$new_path"
45821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45822     unix_path=`$CYGPATH -u "$windows_path"`
45823     new_path="$unix_path"
45824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45826     new_path="$unix_path"
45827   fi
45828 
45829   if test "x$path" != "x$new_path"; then
45830     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45832 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45833   fi
45834 
45835   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45836   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45837 
45838   else
45839     # We're on a posix platform. Hooray! :)
45840     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45841     has_space=`$ECHO "$path" | $GREP " "`
45842     if test "x$has_space" != x; then
45843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45844 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45845       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45846     fi
45847 
45848     # Use eval to expand a potential ~
45849     eval path="$path"
45850     if test ! -f "$path" && test ! -d "$path"; then
45851       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45852     fi
45853 
45854     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45855   fi
45856 
45857 
45858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45859 
45860   # Input might be given as Windows format, start by converting to
45861   # unix format.
45862   path="$POTENTIAL_FREETYPE_LIB_PATH"
45863   new_path=`$CYGPATH -u "$path"`
45864 
45865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45868   # "foo.exe" is OK but "foo" is an error.
45869   #
45870   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45871   # It is also a way to make sure we got the proper file name for the real test later on.
45872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45873   if test "x$test_shortpath" = x; then
45874     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45875 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45876     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45877   fi
45878 
45879   # Call helper function which possibly converts this using DOS-style short mode.
45880   # If so, the updated path is stored in $new_path.
45881 
45882   input_path="$new_path"
45883   # Check if we need to convert this using DOS-style short mode. If the path
45884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45885   # take no chances and rewrite it.
45886   # Note: m4 eats our [], so we need to use [ and ] instead.
45887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45888   if test "x$has_forbidden_chars" != x; then
45889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45893       # Going to short mode and back again did indeed matter. Since short mode is
45894       # case insensitive, let's make it lowercase to improve readability.
45895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45896       # Now convert it back to Unix-style (cygpath)
45897       input_path=`$CYGPATH -u "$shortmode_path"`
45898       new_path="$input_path"
45899     fi
45900   fi
45901 
45902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45903   if test "x$test_cygdrive_prefix" = x; then
45904     # As a simple fix, exclude /usr/bin since it's not a real path.
45905     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45907       # a path prefixed by /cygdrive for fixpath to work.
45908       new_path="$CYGWIN_ROOT_PATH$input_path"
45909     fi
45910   fi
45911 
45912 
45913   if test "x$path" != "x$new_path"; then
45914     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45916 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45917   fi
45918 
45919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45920 
45921   path="$POTENTIAL_FREETYPE_LIB_PATH"
45922   has_colon=`$ECHO $path | $GREP ^.:`
45923   new_path="$path"
45924   if test "x$has_colon" = x; then
45925     # Not in mixed or Windows style, start by that.
45926     new_path=`cmd //c echo $path`
45927   fi
45928 
45929 
45930   input_path="$new_path"
45931   # Check if we need to convert this using DOS-style short mode. If the path
45932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45933   # take no chances and rewrite it.
45934   # Note: m4 eats our [], so we need to use [ and ] instead.
45935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45936   if test "x$has_forbidden_chars" != x; then
45937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45938     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45939   fi
45940 
45941 
45942   windows_path="$new_path"
45943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45944     unix_path=`$CYGPATH -u "$windows_path"`
45945     new_path="$unix_path"
45946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45948     new_path="$unix_path"
45949   fi
45950 
45951   if test "x$path" != "x$new_path"; then
45952     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45954 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45955   fi
45956 
45957   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45958   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45959 
45960   else
45961     # We're on a posix platform. Hooray! :)
45962     path="$POTENTIAL_FREETYPE_LIB_PATH"
45963     has_space=`$ECHO "$path" | $GREP " "`
45964     if test "x$has_space" != x; then
45965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45966 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45967       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45968     fi
45969 
45970     # Use eval to expand a potential ~
45971     eval path="$path"
45972     if test ! -f "$path" && test ! -d "$path"; then
45973       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45974     fi
45975 
45976     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45977   fi
45978 
45979 
45980     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45982 $as_echo_n "checking for freetype includes... " >&6; }
45983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45984 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45985     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45986     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45987 $as_echo_n "checking for freetype libraries... " >&6; }
45988     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45989 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45990   fi
45991 
45992           fi
45993         else
45994           FREETYPE_BASE_DIR="$SYSROOT/usr"
45995 
45996   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45997   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45998   METHOD="well-known location"
45999 
46000   # First check if the files exists.
46001   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46002     # We found an arbitrary include file. That's a good sign.
46003     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46004 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46005     FOUND_FREETYPE=yes
46006 
46007     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46008     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46009       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46010 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46011       FOUND_FREETYPE=no
46012     else
46013       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46014         # On Windows, we will need both .lib and .dll file.
46015         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46016           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46017 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46018           FOUND_FREETYPE=no
46019         fi
46020       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46021         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46022         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
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-style (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-style (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 
46286           if test "x$FOUND_FREETYPE" != xyes; then
46287             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46288 
46289   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46290   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46291   METHOD="well-known location"
46292 
46293   # First check if the files exists.
46294   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46295     # We found an arbitrary include file. That's a good sign.
46296     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46297 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46298     FOUND_FREETYPE=yes
46299 
46300     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46301     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46302       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46303 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46304       FOUND_FREETYPE=no
46305     else
46306       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46307         # On Windows, we will need both .lib and .dll file.
46308         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46309           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46310 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46311           FOUND_FREETYPE=no
46312         fi
46313       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46314         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46315         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46316       fi
46317     fi
46318   fi
46319 
46320   if test "x$FOUND_FREETYPE" = xyes; then
46321 
46322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46323 
46324   # Input might be given as Windows format, start by converting to
46325   # unix format.
46326   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46327   new_path=`$CYGPATH -u "$path"`
46328 
46329   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46330   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46331   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46332   # "foo.exe" is OK but "foo" is an error.
46333   #
46334   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46335   # It is also a way to make sure we got the proper file name for the real test later on.
46336   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46337   if test "x$test_shortpath" = x; then
46338     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46339 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46340     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46341   fi
46342 
46343   # Call helper function which possibly converts this using DOS-style short mode.
46344   # If so, the updated path is stored in $new_path.
46345 
46346   input_path="$new_path"
46347   # Check if we need to convert this using DOS-style short mode. If the path
46348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46349   # take no chances and rewrite it.
46350   # Note: m4 eats our [], so we need to use [ and ] instead.
46351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46352   if test "x$has_forbidden_chars" != x; then
46353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46354     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46355     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46356     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46357       # Going to short mode and back again did indeed matter. Since short mode is
46358       # case insensitive, let's make it lowercase to improve readability.
46359       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46360       # Now convert it back to Unix-style (cygpath)
46361       input_path=`$CYGPATH -u "$shortmode_path"`
46362       new_path="$input_path"
46363     fi
46364   fi
46365 
46366   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46367   if test "x$test_cygdrive_prefix" = x; then
46368     # As a simple fix, exclude /usr/bin since it's not a real path.
46369     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46370       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46371       # a path prefixed by /cygdrive for fixpath to work.
46372       new_path="$CYGWIN_ROOT_PATH$input_path"
46373     fi
46374   fi
46375 
46376 
46377   if test "x$path" != "x$new_path"; then
46378     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46380 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46381   fi
46382 
46383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46384 
46385   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46386   has_colon=`$ECHO $path | $GREP ^.:`
46387   new_path="$path"
46388   if test "x$has_colon" = x; then
46389     # Not in mixed or Windows style, start by that.
46390     new_path=`cmd //c echo $path`
46391   fi
46392 
46393 
46394   input_path="$new_path"
46395   # Check if we need to convert this using DOS-style short mode. If the path
46396   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46397   # take no chances and rewrite it.
46398   # Note: m4 eats our [], so we need to use [ and ] instead.
46399   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46400   if test "x$has_forbidden_chars" != x; then
46401     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46402     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46403   fi
46404 
46405 
46406   windows_path="$new_path"
46407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46408     unix_path=`$CYGPATH -u "$windows_path"`
46409     new_path="$unix_path"
46410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46412     new_path="$unix_path"
46413   fi
46414 
46415   if test "x$path" != "x$new_path"; then
46416     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46418 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46419   fi
46420 
46421   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46422   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46423 
46424   else
46425     # We're on a posix platform. Hooray! :)
46426     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46427     has_space=`$ECHO "$path" | $GREP " "`
46428     if test "x$has_space" != x; then
46429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46430 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46431       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46432     fi
46433 
46434     # Use eval to expand a potential ~
46435     eval path="$path"
46436     if test ! -f "$path" && test ! -d "$path"; then
46437       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46438     fi
46439 
46440     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46441   fi
46442 
46443 
46444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46445 
46446   # Input might be given as Windows format, start by converting to
46447   # unix format.
46448   path="$POTENTIAL_FREETYPE_LIB_PATH"
46449   new_path=`$CYGPATH -u "$path"`
46450 
46451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46454   # "foo.exe" is OK but "foo" is an error.
46455   #
46456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46457   # It is also a way to make sure we got the proper file name for the real test later on.
46458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46459   if test "x$test_shortpath" = x; then
46460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46461 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46462     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46463   fi
46464 
46465   # Call helper function which possibly converts this using DOS-style short mode.
46466   # If so, the updated path is stored in $new_path.
46467 
46468   input_path="$new_path"
46469   # Check if we need to convert this using DOS-style short mode. If the path
46470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46471   # take no chances and rewrite it.
46472   # Note: m4 eats our [], so we need to use [ and ] instead.
46473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46474   if test "x$has_forbidden_chars" != x; then
46475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46479       # Going to short mode and back again did indeed matter. Since short mode is
46480       # case insensitive, let's make it lowercase to improve readability.
46481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46482       # Now convert it back to Unix-style (cygpath)
46483       input_path=`$CYGPATH -u "$shortmode_path"`
46484       new_path="$input_path"
46485     fi
46486   fi
46487 
46488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46489   if test "x$test_cygdrive_prefix" = x; then
46490     # As a simple fix, exclude /usr/bin since it's not a real path.
46491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46493       # a path prefixed by /cygdrive for fixpath to work.
46494       new_path="$CYGWIN_ROOT_PATH$input_path"
46495     fi
46496   fi
46497 
46498 
46499   if test "x$path" != "x$new_path"; then
46500     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46502 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46503   fi
46504 
46505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46506 
46507   path="$POTENTIAL_FREETYPE_LIB_PATH"
46508   has_colon=`$ECHO $path | $GREP ^.:`
46509   new_path="$path"
46510   if test "x$has_colon" = x; then
46511     # Not in mixed or Windows style, start by that.
46512     new_path=`cmd //c echo $path`
46513   fi
46514 
46515 
46516   input_path="$new_path"
46517   # Check if we need to convert this using DOS-style short mode. If the path
46518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46519   # take no chances and rewrite it.
46520   # Note: m4 eats our [], so we need to use [ and ] instead.
46521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46522   if test "x$has_forbidden_chars" != x; then
46523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46525   fi
46526 
46527 
46528   windows_path="$new_path"
46529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46530     unix_path=`$CYGPATH -u "$windows_path"`
46531     new_path="$unix_path"
46532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46534     new_path="$unix_path"
46535   fi
46536 
46537   if test "x$path" != "x$new_path"; then
46538     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46540 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46541   fi
46542 
46543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46545 
46546   else
46547     # We're on a posix platform. Hooray! :)
46548     path="$POTENTIAL_FREETYPE_LIB_PATH"
46549     has_space=`$ECHO "$path" | $GREP " "`
46550     if test "x$has_space" != x; then
46551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46552 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46553       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46554     fi
46555 
46556     # Use eval to expand a potential ~
46557     eval path="$path"
46558     if test ! -f "$path" && test ! -d "$path"; then
46559       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46560     fi
46561 
46562     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46563   fi
46564 
46565 
46566     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46568 $as_echo_n "checking for freetype includes... " >&6; }
46569     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46570 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46571     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46572     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46573 $as_echo_n "checking for freetype libraries... " >&6; }
46574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46575 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46576   fi
46577 
46578           fi
46579 
46580           if test "x$FOUND_FREETYPE" != xyes; then
46581             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46582 
46583   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46584   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46585   METHOD="well-known location"
46586 
46587   # First check if the files exists.
46588   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46589     # We found an arbitrary include file. That's a good sign.
46590     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46591 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46592     FOUND_FREETYPE=yes
46593 
46594     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46595     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46596       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46597 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46598       FOUND_FREETYPE=no
46599     else
46600       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46601         # On Windows, we will need both .lib and .dll file.
46602         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46603           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46604 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46605           FOUND_FREETYPE=no
46606         fi
46607       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46608         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46609         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46610       fi
46611     fi
46612   fi
46613 
46614   if test "x$FOUND_FREETYPE" = xyes; then
46615 
46616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46617 
46618   # Input might be given as Windows format, start by converting to
46619   # unix format.
46620   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46621   new_path=`$CYGPATH -u "$path"`
46622 
46623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46626   # "foo.exe" is OK but "foo" is an error.
46627   #
46628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46629   # It is also a way to make sure we got the proper file name for the real test later on.
46630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46631   if test "x$test_shortpath" = x; then
46632     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46633 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46634     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46635   fi
46636 
46637   # Call helper function which possibly converts this using DOS-style short mode.
46638   # If so, the updated path is stored in $new_path.
46639 
46640   input_path="$new_path"
46641   # Check if we need to convert this using DOS-style short mode. If the path
46642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46643   # take no chances and rewrite it.
46644   # Note: m4 eats our [], so we need to use [ and ] instead.
46645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46646   if test "x$has_forbidden_chars" != x; then
46647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46651       # Going to short mode and back again did indeed matter. Since short mode is
46652       # case insensitive, let's make it lowercase to improve readability.
46653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46654       # Now convert it back to Unix-style (cygpath)
46655       input_path=`$CYGPATH -u "$shortmode_path"`
46656       new_path="$input_path"
46657     fi
46658   fi
46659 
46660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46661   if test "x$test_cygdrive_prefix" = x; then
46662     # As a simple fix, exclude /usr/bin since it's not a real path.
46663     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46665       # a path prefixed by /cygdrive for fixpath to work.
46666       new_path="$CYGWIN_ROOT_PATH$input_path"
46667     fi
46668   fi
46669 
46670 
46671   if test "x$path" != "x$new_path"; then
46672     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46674 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46675   fi
46676 
46677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46678 
46679   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46680   has_colon=`$ECHO $path | $GREP ^.:`
46681   new_path="$path"
46682   if test "x$has_colon" = x; then
46683     # Not in mixed or Windows style, start by that.
46684     new_path=`cmd //c echo $path`
46685   fi
46686 
46687 
46688   input_path="$new_path"
46689   # Check if we need to convert this using DOS-style short mode. If the path
46690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46691   # take no chances and rewrite it.
46692   # Note: m4 eats our [], so we need to use [ and ] instead.
46693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46694   if test "x$has_forbidden_chars" != x; then
46695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46697   fi
46698 
46699 
46700   windows_path="$new_path"
46701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46702     unix_path=`$CYGPATH -u "$windows_path"`
46703     new_path="$unix_path"
46704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46706     new_path="$unix_path"
46707   fi
46708 
46709   if test "x$path" != "x$new_path"; then
46710     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46712 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46713   fi
46714 
46715   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46716   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46717 
46718   else
46719     # We're on a posix platform. Hooray! :)
46720     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46721     has_space=`$ECHO "$path" | $GREP " "`
46722     if test "x$has_space" != x; then
46723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46724 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46725       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46726     fi
46727 
46728     # Use eval to expand a potential ~
46729     eval path="$path"
46730     if test ! -f "$path" && test ! -d "$path"; then
46731       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46732     fi
46733 
46734     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46735   fi
46736 
46737 
46738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46739 
46740   # Input might be given as Windows format, start by converting to
46741   # unix format.
46742   path="$POTENTIAL_FREETYPE_LIB_PATH"
46743   new_path=`$CYGPATH -u "$path"`
46744 
46745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46748   # "foo.exe" is OK but "foo" is an error.
46749   #
46750   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46751   # It is also a way to make sure we got the proper file name for the real test later on.
46752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46753   if test "x$test_shortpath" = x; then
46754     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46755 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46756     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46757   fi
46758 
46759   # Call helper function which possibly converts this using DOS-style short mode.
46760   # If so, the updated path is stored in $new_path.
46761 
46762   input_path="$new_path"
46763   # Check if we need to convert this using DOS-style short mode. If the path
46764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46765   # take no chances and rewrite it.
46766   # Note: m4 eats our [], so we need to use [ and ] instead.
46767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46768   if test "x$has_forbidden_chars" != x; then
46769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46773       # Going to short mode and back again did indeed matter. Since short mode is
46774       # case insensitive, let's make it lowercase to improve readability.
46775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46776       # Now convert it back to Unix-style (cygpath)
46777       input_path=`$CYGPATH -u "$shortmode_path"`
46778       new_path="$input_path"
46779     fi
46780   fi
46781 
46782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46783   if test "x$test_cygdrive_prefix" = x; then
46784     # As a simple fix, exclude /usr/bin since it's not a real path.
46785     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46787       # a path prefixed by /cygdrive for fixpath to work.
46788       new_path="$CYGWIN_ROOT_PATH$input_path"
46789     fi
46790   fi
46791 
46792 
46793   if test "x$path" != "x$new_path"; then
46794     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46796 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46797   fi
46798 
46799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46800 
46801   path="$POTENTIAL_FREETYPE_LIB_PATH"
46802   has_colon=`$ECHO $path | $GREP ^.:`
46803   new_path="$path"
46804   if test "x$has_colon" = x; then
46805     # Not in mixed or Windows style, start by that.
46806     new_path=`cmd //c echo $path`
46807   fi
46808 
46809 
46810   input_path="$new_path"
46811   # Check if we need to convert this using DOS-style short mode. If the path
46812   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46813   # take no chances and rewrite it.
46814   # Note: m4 eats our [], so we need to use [ and ] instead.
46815   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46816   if test "x$has_forbidden_chars" != x; then
46817     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46818     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46819   fi
46820 
46821 
46822   windows_path="$new_path"
46823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46824     unix_path=`$CYGPATH -u "$windows_path"`
46825     new_path="$unix_path"
46826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46828     new_path="$unix_path"
46829   fi
46830 
46831   if test "x$path" != "x$new_path"; then
46832     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46834 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46835   fi
46836 
46837   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46838   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46839 
46840   else
46841     # We're on a posix platform. Hooray! :)
46842     path="$POTENTIAL_FREETYPE_LIB_PATH"
46843     has_space=`$ECHO "$path" | $GREP " "`
46844     if test "x$has_space" != x; then
46845       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46846 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46847       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46848     fi
46849 
46850     # Use eval to expand a potential ~
46851     eval path="$path"
46852     if test ! -f "$path" && test ! -d "$path"; then
46853       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46854     fi
46855 
46856     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46857   fi
46858 
46859 
46860     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46861     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46862 $as_echo_n "checking for freetype includes... " >&6; }
46863     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46864 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46865     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46867 $as_echo_n "checking for freetype libraries... " >&6; }
46868     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46869 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46870   fi
46871 
46872           fi
46873 
46874           if test "x$FOUND_FREETYPE" != xyes; then
46875             FREETYPE_BASE_DIR="$SYSROOT/usr"
46876             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46877 
46878   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46879   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-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 && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46903         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46904         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46905       fi
46906     fi
46907   fi
46908 
46909   if test "x$FOUND_FREETYPE" = xyes; then
46910 
46911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46912 
46913   # Input might be given as Windows format, start by converting to
46914   # unix format.
46915   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46916   new_path=`$CYGPATH -u "$path"`
46917 
46918   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46919   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46920   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46921   # "foo.exe" is OK but "foo" is an error.
46922   #
46923   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46924   # It is also a way to make sure we got the proper file name for the real test later on.
46925   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46926   if test "x$test_shortpath" = x; then
46927     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46928 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46929     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46930   fi
46931 
46932   # Call helper function which possibly converts this using DOS-style short mode.
46933   # If so, the updated path is stored in $new_path.
46934 
46935   input_path="$new_path"
46936   # Check if we need to convert this using DOS-style short mode. If the path
46937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46938   # take no chances and rewrite it.
46939   # Note: m4 eats our [], so we need to use [ and ] instead.
46940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46941   if test "x$has_forbidden_chars" != x; then
46942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46946       # Going to short mode and back again did indeed matter. Since short mode is
46947       # case insensitive, let's make it lowercase to improve readability.
46948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46949       # Now convert it back to Unix-style (cygpath)
46950       input_path=`$CYGPATH -u "$shortmode_path"`
46951       new_path="$input_path"
46952     fi
46953   fi
46954 
46955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46956   if test "x$test_cygdrive_prefix" = x; then
46957     # As a simple fix, exclude /usr/bin since it's not a real path.
46958     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46960       # a path prefixed by /cygdrive for fixpath to work.
46961       new_path="$CYGWIN_ROOT_PATH$input_path"
46962     fi
46963   fi
46964 
46965 
46966   if test "x$path" != "x$new_path"; then
46967     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46969 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46970   fi
46971 
46972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46973 
46974   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46975   has_colon=`$ECHO $path | $GREP ^.:`
46976   new_path="$path"
46977   if test "x$has_colon" = x; then
46978     # Not in mixed or Windows style, start by that.
46979     new_path=`cmd //c echo $path`
46980   fi
46981 
46982 
46983   input_path="$new_path"
46984   # Check if we need to convert this using DOS-style short mode. If the path
46985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46986   # take no chances and rewrite it.
46987   # Note: m4 eats our [], so we need to use [ and ] instead.
46988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46989   if test "x$has_forbidden_chars" != x; then
46990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46991     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46992   fi
46993 
46994 
46995   windows_path="$new_path"
46996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46997     unix_path=`$CYGPATH -u "$windows_path"`
46998     new_path="$unix_path"
46999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47001     new_path="$unix_path"
47002   fi
47003 
47004   if test "x$path" != "x$new_path"; then
47005     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47007 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47008   fi
47009 
47010   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47011   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47012 
47013   else
47014     # We're on a posix platform. Hooray! :)
47015     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47016     has_space=`$ECHO "$path" | $GREP " "`
47017     if test "x$has_space" != x; then
47018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47019 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47020       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47021     fi
47022 
47023     # Use eval to expand a potential ~
47024     eval path="$path"
47025     if test ! -f "$path" && test ! -d "$path"; then
47026       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47027     fi
47028 
47029     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47030   fi
47031 
47032 
47033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47034 
47035   # Input might be given as Windows format, start by converting to
47036   # unix format.
47037   path="$POTENTIAL_FREETYPE_LIB_PATH"
47038   new_path=`$CYGPATH -u "$path"`
47039 
47040   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47041   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47042   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47043   # "foo.exe" is OK but "foo" is an error.
47044   #
47045   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47046   # It is also a way to make sure we got the proper file name for the real test later on.
47047   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47048   if test "x$test_shortpath" = x; then
47049     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47050 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47051     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47052   fi
47053 
47054   # Call helper function which possibly converts this using DOS-style short mode.
47055   # If so, the updated path is stored in $new_path.
47056 
47057   input_path="$new_path"
47058   # Check if we need to convert this using DOS-style short mode. If the path
47059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47060   # take no chances and rewrite it.
47061   # Note: m4 eats our [], so we need to use [ and ] instead.
47062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47063   if test "x$has_forbidden_chars" != x; then
47064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47068       # Going to short mode and back again did indeed matter. Since short mode is
47069       # case insensitive, let's make it lowercase to improve readability.
47070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47071       # Now convert it back to Unix-style (cygpath)
47072       input_path=`$CYGPATH -u "$shortmode_path"`
47073       new_path="$input_path"
47074     fi
47075   fi
47076 
47077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47078   if test "x$test_cygdrive_prefix" = x; then
47079     # As a simple fix, exclude /usr/bin since it's not a real path.
47080     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47082       # a path prefixed by /cygdrive for fixpath to work.
47083       new_path="$CYGWIN_ROOT_PATH$input_path"
47084     fi
47085   fi
47086 
47087 
47088   if test "x$path" != "x$new_path"; then
47089     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47091 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47092   fi
47093 
47094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47095 
47096   path="$POTENTIAL_FREETYPE_LIB_PATH"
47097   has_colon=`$ECHO $path | $GREP ^.:`
47098   new_path="$path"
47099   if test "x$has_colon" = x; then
47100     # Not in mixed or Windows style, start by that.
47101     new_path=`cmd //c echo $path`
47102   fi
47103 
47104 
47105   input_path="$new_path"
47106   # Check if we need to convert this using DOS-style short mode. If the path
47107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47108   # take no chances and rewrite it.
47109   # Note: m4 eats our [], so we need to use [ and ] instead.
47110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47111   if test "x$has_forbidden_chars" != x; then
47112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47113     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47114   fi
47115 
47116 
47117   windows_path="$new_path"
47118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47119     unix_path=`$CYGPATH -u "$windows_path"`
47120     new_path="$unix_path"
47121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47123     new_path="$unix_path"
47124   fi
47125 
47126   if test "x$path" != "x$new_path"; then
47127     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47129 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47130   fi
47131 
47132   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47133   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47134 
47135   else
47136     # We're on a posix platform. Hooray! :)
47137     path="$POTENTIAL_FREETYPE_LIB_PATH"
47138     has_space=`$ECHO "$path" | $GREP " "`
47139     if test "x$has_space" != x; then
47140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47141 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47142       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47143     fi
47144 
47145     # Use eval to expand a potential ~
47146     eval path="$path"
47147     if test ! -f "$path" && test ! -d "$path"; then
47148       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47149     fi
47150 
47151     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47152   fi
47153 
47154 
47155     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47157 $as_echo_n "checking for freetype includes... " >&6; }
47158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47159 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47160     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47161     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47162 $as_echo_n "checking for freetype libraries... " >&6; }
47163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47164 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47165   fi
47166 
47167             else
47168 
47169   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47170   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47171   METHOD="well-known location"
47172 
47173   # First check if the files exists.
47174   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47175     # We found an arbitrary include file. That's a good sign.
47176     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47177 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47178     FOUND_FREETYPE=yes
47179 
47180     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47181     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47182       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47183 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47184       FOUND_FREETYPE=no
47185     else
47186       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47187         # On Windows, we will need both .lib and .dll file.
47188         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47189           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47190 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47191           FOUND_FREETYPE=no
47192         fi
47193       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
47194         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
47195         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
47196       fi
47197     fi
47198   fi
47199 
47200   if test "x$FOUND_FREETYPE" = xyes; then
47201 
47202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47203 
47204   # Input might be given as Windows format, start by converting to
47205   # unix format.
47206   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47207   new_path=`$CYGPATH -u "$path"`
47208 
47209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47212   # "foo.exe" is OK but "foo" is an error.
47213   #
47214   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47215   # It is also a way to make sure we got the proper file name for the real test later on.
47216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47217   if test "x$test_shortpath" = x; then
47218     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47219 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47220     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47221   fi
47222 
47223   # Call helper function which possibly converts this using DOS-style short mode.
47224   # If so, the updated path is stored in $new_path.
47225 
47226   input_path="$new_path"
47227   # Check if we need to convert this using DOS-style short mode. If the path
47228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47229   # take no chances and rewrite it.
47230   # Note: m4 eats our [], so we need to use [ and ] instead.
47231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47232   if test "x$has_forbidden_chars" != x; then
47233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47234     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47235     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47236     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47237       # Going to short mode and back again did indeed matter. Since short mode is
47238       # case insensitive, let's make it lowercase to improve readability.
47239       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47240       # Now convert it back to Unix-style (cygpath)
47241       input_path=`$CYGPATH -u "$shortmode_path"`
47242       new_path="$input_path"
47243     fi
47244   fi
47245 
47246   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47247   if test "x$test_cygdrive_prefix" = x; then
47248     # As a simple fix, exclude /usr/bin since it's not a real path.
47249     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47250       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47251       # a path prefixed by /cygdrive for fixpath to work.
47252       new_path="$CYGWIN_ROOT_PATH$input_path"
47253     fi
47254   fi
47255 
47256 
47257   if test "x$path" != "x$new_path"; then
47258     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47260 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47261   fi
47262 
47263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47264 
47265   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47266   has_colon=`$ECHO $path | $GREP ^.:`
47267   new_path="$path"
47268   if test "x$has_colon" = x; then
47269     # Not in mixed or Windows style, start by that.
47270     new_path=`cmd //c echo $path`
47271   fi
47272 
47273 
47274   input_path="$new_path"
47275   # Check if we need to convert this using DOS-style short mode. If the path
47276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47277   # take no chances and rewrite it.
47278   # Note: m4 eats our [], so we need to use [ and ] instead.
47279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47280   if test "x$has_forbidden_chars" != x; then
47281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47282     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47283   fi
47284 
47285 
47286   windows_path="$new_path"
47287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47288     unix_path=`$CYGPATH -u "$windows_path"`
47289     new_path="$unix_path"
47290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47292     new_path="$unix_path"
47293   fi
47294 
47295   if test "x$path" != "x$new_path"; then
47296     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47298 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47299   fi
47300 
47301   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47302   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47303 
47304   else
47305     # We're on a posix platform. Hooray! :)
47306     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47307     has_space=`$ECHO "$path" | $GREP " "`
47308     if test "x$has_space" != x; then
47309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47310 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47311       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47312     fi
47313 
47314     # Use eval to expand a potential ~
47315     eval path="$path"
47316     if test ! -f "$path" && test ! -d "$path"; then
47317       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47318     fi
47319 
47320     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47321   fi
47322 
47323 
47324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47325 
47326   # Input might be given as Windows format, start by converting to
47327   # unix format.
47328   path="$POTENTIAL_FREETYPE_LIB_PATH"
47329   new_path=`$CYGPATH -u "$path"`
47330 
47331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47334   # "foo.exe" is OK but "foo" is an error.
47335   #
47336   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47337   # It is also a way to make sure we got the proper file name for the real test later on.
47338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47339   if test "x$test_shortpath" = x; then
47340     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47341 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47342     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47343   fi
47344 
47345   # Call helper function which possibly converts this using DOS-style short mode.
47346   # If so, the updated path is stored in $new_path.
47347 
47348   input_path="$new_path"
47349   # Check if we need to convert this using DOS-style short mode. If the path
47350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47351   # take no chances and rewrite it.
47352   # Note: m4 eats our [], so we need to use [ and ] instead.
47353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47354   if test "x$has_forbidden_chars" != x; then
47355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47356     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47357     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47358     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47359       # Going to short mode and back again did indeed matter. Since short mode is
47360       # case insensitive, let's make it lowercase to improve readability.
47361       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47362       # Now convert it back to Unix-style (cygpath)
47363       input_path=`$CYGPATH -u "$shortmode_path"`
47364       new_path="$input_path"
47365     fi
47366   fi
47367 
47368   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47369   if test "x$test_cygdrive_prefix" = x; then
47370     # As a simple fix, exclude /usr/bin since it's not a real path.
47371     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47372       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47373       # a path prefixed by /cygdrive for fixpath to work.
47374       new_path="$CYGWIN_ROOT_PATH$input_path"
47375     fi
47376   fi
47377 
47378 
47379   if test "x$path" != "x$new_path"; then
47380     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47382 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47383   fi
47384 
47385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47386 
47387   path="$POTENTIAL_FREETYPE_LIB_PATH"
47388   has_colon=`$ECHO $path | $GREP ^.:`
47389   new_path="$path"
47390   if test "x$has_colon" = x; then
47391     # Not in mixed or Windows style, start by that.
47392     new_path=`cmd //c echo $path`
47393   fi
47394 
47395 
47396   input_path="$new_path"
47397   # Check if we need to convert this using DOS-style short mode. If the path
47398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47399   # take no chances and rewrite it.
47400   # Note: m4 eats our [], so we need to use [ and ] instead.
47401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47402   if test "x$has_forbidden_chars" != x; then
47403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47405   fi
47406 
47407 
47408   windows_path="$new_path"
47409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47410     unix_path=`$CYGPATH -u "$windows_path"`
47411     new_path="$unix_path"
47412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47413     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47414     new_path="$unix_path"
47415   fi
47416 
47417   if test "x$path" != "x$new_path"; then
47418     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47419     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47420 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47421   fi
47422 
47423   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47424   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47425 
47426   else
47427     # We're on a posix platform. Hooray! :)
47428     path="$POTENTIAL_FREETYPE_LIB_PATH"
47429     has_space=`$ECHO "$path" | $GREP " "`
47430     if test "x$has_space" != x; then
47431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47432 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47433       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47434     fi
47435 
47436     # Use eval to expand a potential ~
47437     eval path="$path"
47438     if test ! -f "$path" && test ! -d "$path"; then
47439       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47440     fi
47441 
47442     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47443   fi
47444 
47445 
47446     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47447     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47448 $as_echo_n "checking for freetype includes... " >&6; }
47449     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47450 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47451     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47453 $as_echo_n "checking for freetype libraries... " >&6; }
47454     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47455 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47456   fi
47457 
47458               if test "x$FOUND_FREETYPE" != xyes; then
47459 
47460   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47461   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47462   METHOD="well-known location"
47463 
47464   # First check if the files exists.
47465   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47466     # We found an arbitrary include file. That's a good sign.
47467     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47468 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47469     FOUND_FREETYPE=yes
47470 
47471     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47472     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47473       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47474 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47475       FOUND_FREETYPE=no
47476     else
47477       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47478         # On Windows, we will need both .lib and .dll file.
47479         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47480           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47481 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47482           FOUND_FREETYPE=no
47483         fi
47484       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
47485         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
47486         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
47487       fi
47488     fi
47489   fi
47490 
47491   if test "x$FOUND_FREETYPE" = xyes; then
47492 
47493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47494 
47495   # Input might be given as Windows format, start by converting to
47496   # unix format.
47497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47498   new_path=`$CYGPATH -u "$path"`
47499 
47500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47503   # "foo.exe" is OK but "foo" is an error.
47504   #
47505   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47506   # It is also a way to make sure we got the proper file name for the real test later on.
47507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47508   if test "x$test_shortpath" = x; then
47509     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47510 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47511     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47512   fi
47513 
47514   # Call helper function which possibly converts this using DOS-style short mode.
47515   # If so, the updated path is stored in $new_path.
47516 
47517   input_path="$new_path"
47518   # Check if we need to convert this using DOS-style short mode. If the path
47519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47520   # take no chances and rewrite it.
47521   # Note: m4 eats our [], so we need to use [ and ] instead.
47522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47523   if test "x$has_forbidden_chars" != x; then
47524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47528       # Going to short mode and back again did indeed matter. Since short mode is
47529       # case insensitive, let's make it lowercase to improve readability.
47530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47531       # Now convert it back to Unix-style (cygpath)
47532       input_path=`$CYGPATH -u "$shortmode_path"`
47533       new_path="$input_path"
47534     fi
47535   fi
47536 
47537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47538   if test "x$test_cygdrive_prefix" = x; then
47539     # As a simple fix, exclude /usr/bin since it's not a real path.
47540     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47542       # a path prefixed by /cygdrive for fixpath to work.
47543       new_path="$CYGWIN_ROOT_PATH$input_path"
47544     fi
47545   fi
47546 
47547 
47548   if test "x$path" != "x$new_path"; then
47549     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47552   fi
47553 
47554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47555 
47556   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47557   has_colon=`$ECHO $path | $GREP ^.:`
47558   new_path="$path"
47559   if test "x$has_colon" = x; then
47560     # Not in mixed or Windows style, start by that.
47561     new_path=`cmd //c echo $path`
47562   fi
47563 
47564 
47565   input_path="$new_path"
47566   # Check if we need to convert this using DOS-style short mode. If the path
47567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47568   # take no chances and rewrite it.
47569   # Note: m4 eats our [], so we need to use [ and ] instead.
47570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47571   if test "x$has_forbidden_chars" != x; then
47572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47574   fi
47575 
47576 
47577   windows_path="$new_path"
47578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47579     unix_path=`$CYGPATH -u "$windows_path"`
47580     new_path="$unix_path"
47581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47583     new_path="$unix_path"
47584   fi
47585 
47586   if test "x$path" != "x$new_path"; then
47587     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47589 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47590   fi
47591 
47592   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47593   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47594 
47595   else
47596     # We're on a posix platform. Hooray! :)
47597     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47598     has_space=`$ECHO "$path" | $GREP " "`
47599     if test "x$has_space" != x; then
47600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47601 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47602       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47603     fi
47604 
47605     # Use eval to expand a potential ~
47606     eval path="$path"
47607     if test ! -f "$path" && test ! -d "$path"; then
47608       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47609     fi
47610 
47611     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47612   fi
47613 
47614 
47615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47616 
47617   # Input might be given as Windows format, start by converting to
47618   # unix format.
47619   path="$POTENTIAL_FREETYPE_LIB_PATH"
47620   new_path=`$CYGPATH -u "$path"`
47621 
47622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47625   # "foo.exe" is OK but "foo" is an error.
47626   #
47627   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47628   # It is also a way to make sure we got the proper file name for the real test later on.
47629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47630   if test "x$test_shortpath" = x; then
47631     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47632 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47633     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47634   fi
47635 
47636   # Call helper function which possibly converts this using DOS-style short mode.
47637   # If so, the updated path is stored in $new_path.
47638 
47639   input_path="$new_path"
47640   # Check if we need to convert this using DOS-style short mode. If the path
47641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47642   # take no chances and rewrite it.
47643   # Note: m4 eats our [], so we need to use [ and ] instead.
47644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47645   if test "x$has_forbidden_chars" != x; then
47646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47650       # Going to short mode and back again did indeed matter. Since short mode is
47651       # case insensitive, let's make it lowercase to improve readability.
47652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47653       # Now convert it back to Unix-style (cygpath)
47654       input_path=`$CYGPATH -u "$shortmode_path"`
47655       new_path="$input_path"
47656     fi
47657   fi
47658 
47659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47660   if test "x$test_cygdrive_prefix" = x; then
47661     # As a simple fix, exclude /usr/bin since it's not a real path.
47662     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47664       # a path prefixed by /cygdrive for fixpath to work.
47665       new_path="$CYGWIN_ROOT_PATH$input_path"
47666     fi
47667   fi
47668 
47669 
47670   if test "x$path" != "x$new_path"; then
47671     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47673 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47674   fi
47675 
47676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47677 
47678   path="$POTENTIAL_FREETYPE_LIB_PATH"
47679   has_colon=`$ECHO $path | $GREP ^.:`
47680   new_path="$path"
47681   if test "x$has_colon" = x; then
47682     # Not in mixed or Windows style, start by that.
47683     new_path=`cmd //c echo $path`
47684   fi
47685 
47686 
47687   input_path="$new_path"
47688   # Check if we need to convert this using DOS-style short mode. If the path
47689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47690   # take no chances and rewrite it.
47691   # Note: m4 eats our [], so we need to use [ and ] instead.
47692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47693   if test "x$has_forbidden_chars" != x; then
47694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47696   fi
47697 
47698 
47699   windows_path="$new_path"
47700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47701     unix_path=`$CYGPATH -u "$windows_path"`
47702     new_path="$unix_path"
47703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47705     new_path="$unix_path"
47706   fi
47707 
47708   if test "x$path" != "x$new_path"; then
47709     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47712   fi
47713 
47714   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47715   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47716 
47717   else
47718     # We're on a posix platform. Hooray! :)
47719     path="$POTENTIAL_FREETYPE_LIB_PATH"
47720     has_space=`$ECHO "$path" | $GREP " "`
47721     if test "x$has_space" != x; then
47722       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47723 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47724       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47725     fi
47726 
47727     # Use eval to expand a potential ~
47728     eval path="$path"
47729     if test ! -f "$path" && test ! -d "$path"; then
47730       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47731     fi
47732 
47733     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47734   fi
47735 
47736 
47737     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47739 $as_echo_n "checking for freetype includes... " >&6; }
47740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47741 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47742     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47744 $as_echo_n "checking for freetype libraries... " >&6; }
47745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47746 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47747   fi
47748 
47749               fi
47750             fi
47751           fi
47752         fi
47753       fi # end check in well-known locations
47754 
47755       if test "x$FOUND_FREETYPE" != xyes; then
47756 
47757   # Print a helpful message on how to acquire the necessary build dependency.
47758   # freetype is the help tag: freetype, cups, pulse, alsa etc
47759   MISSING_DEPENDENCY=freetype
47760 
47761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47762     cygwin_help $MISSING_DEPENDENCY
47763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47764     msys_help $MISSING_DEPENDENCY
47765   else
47766     PKGHANDLER_COMMAND=
47767 
47768     case $PKGHANDLER in
47769       apt-get)
47770         apt_help     $MISSING_DEPENDENCY ;;
47771       yum)
47772         yum_help     $MISSING_DEPENDENCY ;;
47773       port)
47774         port_help    $MISSING_DEPENDENCY ;;
47775       pkgutil)
47776         pkgutil_help $MISSING_DEPENDENCY ;;
47777       pkgadd)
47778         pkgadd_help  $MISSING_DEPENDENCY ;;
47779     esac
47780 
47781     if test "x$PKGHANDLER_COMMAND" != x; then
47782       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47783     fi
47784   fi
47785 
47786         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47787       fi
47788     fi # end user specified settings
47789 
47790     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47791     if test "x$FREETYPE_CFLAGS" = x; then
47792 
47793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47794 
47795   # Input might be given as Windows format, start by converting to
47796   # unix format.
47797   path="$FREETYPE_INCLUDE_PATH"
47798   new_path=`$CYGPATH -u "$path"`
47799 
47800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47803   # "foo.exe" is OK but "foo" is an error.
47804   #
47805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47806   # It is also a way to make sure we got the proper file name for the real test later on.
47807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47808   if test "x$test_shortpath" = x; then
47809     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47810 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47811     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47812   fi
47813 
47814   # Call helper function which possibly converts this using DOS-style short mode.
47815   # If so, the updated path is stored in $new_path.
47816 
47817   input_path="$new_path"
47818   # Check if we need to convert this using DOS-style short mode. If the path
47819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47820   # take no chances and rewrite it.
47821   # Note: m4 eats our [], so we need to use [ and ] instead.
47822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47823   if test "x$has_forbidden_chars" != x; then
47824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47828       # Going to short mode and back again did indeed matter. Since short mode is
47829       # case insensitive, let's make it lowercase to improve readability.
47830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47831       # Now convert it back to Unix-style (cygpath)
47832       input_path=`$CYGPATH -u "$shortmode_path"`
47833       new_path="$input_path"
47834     fi
47835   fi
47836 
47837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47838   if test "x$test_cygdrive_prefix" = x; then
47839     # As a simple fix, exclude /usr/bin since it's not a real path.
47840     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47842       # a path prefixed by /cygdrive for fixpath to work.
47843       new_path="$CYGWIN_ROOT_PATH$input_path"
47844     fi
47845   fi
47846 
47847 
47848   if test "x$path" != "x$new_path"; then
47849     FREETYPE_INCLUDE_PATH="$new_path"
47850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47851 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47852   fi
47853 
47854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47855 
47856   path="$FREETYPE_INCLUDE_PATH"
47857   has_colon=`$ECHO $path | $GREP ^.:`
47858   new_path="$path"
47859   if test "x$has_colon" = x; then
47860     # Not in mixed or Windows style, start by that.
47861     new_path=`cmd //c echo $path`
47862   fi
47863 
47864 
47865   input_path="$new_path"
47866   # Check if we need to convert this using DOS-style short mode. If the path
47867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47868   # take no chances and rewrite it.
47869   # Note: m4 eats our [], so we need to use [ and ] instead.
47870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47871   if test "x$has_forbidden_chars" != x; then
47872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47873     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47874   fi
47875 
47876 
47877   windows_path="$new_path"
47878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47879     unix_path=`$CYGPATH -u "$windows_path"`
47880     new_path="$unix_path"
47881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47883     new_path="$unix_path"
47884   fi
47885 
47886   if test "x$path" != "x$new_path"; then
47887     FREETYPE_INCLUDE_PATH="$new_path"
47888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47889 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47890   fi
47891 
47892   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47893   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47894 
47895   else
47896     # We're on a posix platform. Hooray! :)
47897     path="$FREETYPE_INCLUDE_PATH"
47898     has_space=`$ECHO "$path" | $GREP " "`
47899     if test "x$has_space" != x; then
47900       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47901 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47902       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47903     fi
47904 
47905     # Use eval to expand a potential ~
47906     eval path="$path"
47907     if test ! -f "$path" && test ! -d "$path"; then
47908       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47909     fi
47910 
47911     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47912   fi
47913 
47914       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47915         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47916       else
47917         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47918       fi
47919     fi
47920 
47921     if test "x$FREETYPE_LIBS" = x; then
47922 
47923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47924 
47925   # Input might be given as Windows format, start by converting to
47926   # unix format.
47927   path="$FREETYPE_LIB_PATH"
47928   new_path=`$CYGPATH -u "$path"`
47929 
47930   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47931   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47932   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47933   # "foo.exe" is OK but "foo" is an error.
47934   #
47935   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47936   # It is also a way to make sure we got the proper file name for the real test later on.
47937   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47938   if test "x$test_shortpath" = x; then
47939     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47940 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47941     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47942   fi
47943 
47944   # Call helper function which possibly converts this using DOS-style short mode.
47945   # If so, the updated path is stored in $new_path.
47946 
47947   input_path="$new_path"
47948   # Check if we need to convert this using DOS-style short mode. If the path
47949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47950   # take no chances and rewrite it.
47951   # Note: m4 eats our [], so we need to use [ and ] instead.
47952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47953   if test "x$has_forbidden_chars" != x; then
47954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47955     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47956     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47957     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47958       # Going to short mode and back again did indeed matter. Since short mode is
47959       # case insensitive, let's make it lowercase to improve readability.
47960       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47961       # Now convert it back to Unix-style (cygpath)
47962       input_path=`$CYGPATH -u "$shortmode_path"`
47963       new_path="$input_path"
47964     fi
47965   fi
47966 
47967   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47968   if test "x$test_cygdrive_prefix" = x; then
47969     # As a simple fix, exclude /usr/bin since it's not a real path.
47970     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47971       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47972       # a path prefixed by /cygdrive for fixpath to work.
47973       new_path="$CYGWIN_ROOT_PATH$input_path"
47974     fi
47975   fi
47976 
47977 
47978   if test "x$path" != "x$new_path"; then
47979     FREETYPE_LIB_PATH="$new_path"
47980     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47981 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47982   fi
47983 
47984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47985 
47986   path="$FREETYPE_LIB_PATH"
47987   has_colon=`$ECHO $path | $GREP ^.:`
47988   new_path="$path"
47989   if test "x$has_colon" = x; then
47990     # Not in mixed or Windows style, start by that.
47991     new_path=`cmd //c echo $path`
47992   fi
47993 
47994 
47995   input_path="$new_path"
47996   # Check if we need to convert this using DOS-style short mode. If the path
47997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47998   # take no chances and rewrite it.
47999   # Note: m4 eats our [], so we need to use [ and ] instead.
48000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48001   if test "x$has_forbidden_chars" != x; then
48002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48003     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48004   fi
48005 
48006 
48007   windows_path="$new_path"
48008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48009     unix_path=`$CYGPATH -u "$windows_path"`
48010     new_path="$unix_path"
48011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48013     new_path="$unix_path"
48014   fi
48015 
48016   if test "x$path" != "x$new_path"; then
48017     FREETYPE_LIB_PATH="$new_path"
48018     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48019 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48020   fi
48021 
48022   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48023   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48024 
48025   else
48026     # We're on a posix platform. Hooray! :)
48027     path="$FREETYPE_LIB_PATH"
48028     has_space=`$ECHO "$path" | $GREP " "`
48029     if test "x$has_space" != x; then
48030       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48031 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48032       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48033     fi
48034 
48035     # Use eval to expand a potential ~
48036     eval path="$path"
48037     if test ! -f "$path" && test ! -d "$path"; then
48038       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48039     fi
48040 
48041     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48042   fi
48043 
48044       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48045         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
48046       else
48047         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
48048       fi
48049     fi
48050 
48051     # Try to compile it
48052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48053 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48054     ac_ext=cpp
48055 ac_cpp='$CXXCPP $CPPFLAGS'
48056 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48057 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48058 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48059 
48060     PREV_CXXCFLAGS="$CXXFLAGS"
48061     PREV_LIBS="$LIBS"
48062     PREV_CXX="$CXX"
48063     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48064     LIBS="$LIBS $FREETYPE_LIBS"
48065     CXX="$FIXPATH $CXX"
48066     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48067 /* end confdefs.h.  */
48068 
48069           #include<ft2build.h>
48070           #include FT_FREETYPE_H
48071           int main () {
48072             FT_Init_FreeType(NULL);
48073             return 0;
48074           }
48075 
48076 _ACEOF
48077 if ac_fn_cxx_try_link "$LINENO"; then :
48078 
48079           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48080 $as_echo "yes" >&6; }
48081 
48082 else
48083 
48084           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48085 $as_echo "no" >&6; }
48086           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48087 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48088           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48089 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48090 
48091 
48092   # Print a helpful message on how to acquire the necessary build dependency.
48093   # freetype is the help tag: freetype, cups, pulse, alsa etc
48094   MISSING_DEPENDENCY=freetype
48095 
48096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48097     cygwin_help $MISSING_DEPENDENCY
48098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48099     msys_help $MISSING_DEPENDENCY
48100   else
48101     PKGHANDLER_COMMAND=
48102 
48103     case $PKGHANDLER in
48104       apt-get)
48105         apt_help     $MISSING_DEPENDENCY ;;
48106       yum)
48107         yum_help     $MISSING_DEPENDENCY ;;
48108       port)
48109         port_help    $MISSING_DEPENDENCY ;;
48110       pkgutil)
48111         pkgutil_help $MISSING_DEPENDENCY ;;
48112       pkgadd)
48113         pkgadd_help  $MISSING_DEPENDENCY ;;
48114     esac
48115 
48116     if test "x$PKGHANDLER_COMMAND" != x; then
48117       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48118     fi
48119   fi
48120 
48121 
48122           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48123 
48124 
48125 fi
48126 rm -f core conftest.err conftest.$ac_objext \
48127     conftest$ac_exeext conftest.$ac_ext
48128     CXXCFLAGS="$PREV_CXXFLAGS"
48129     LIBS="$PREV_LIBS"
48130     CXX="$PREV_CXX"
48131     ac_ext=cpp
48132 ac_cpp='$CXXCPP $CPPFLAGS'
48133 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48134 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48135 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48136 
48137 
48138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48139 $as_echo_n "checking if we should bundle freetype... " >&6; }
48140     if test "x$BUNDLE_FREETYPE" = xyes; then
48141       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48142     fi
48143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48144 $as_echo "$BUNDLE_FREETYPE" >&6; }
48145 
48146   fi # end freetype needed
48147 
48148 
48149 
48150 
48151 
48152 
48153 
48154   ###############################################################################
48155   #
48156   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48157   #
48158 
48159 # Check whether --with-alsa was given.
48160 if test "${with_alsa+set}" = set; then :
48161   withval=$with_alsa;
48162 fi
48163 
48164 
48165 # Check whether --with-alsa-include was given.
48166 if test "${with_alsa_include+set}" = set; then :
48167   withval=$with_alsa_include;
48168 fi
48169 
48170 
48171 # Check whether --with-alsa-lib was given.
48172 if test "${with_alsa_lib+set}" = set; then :
48173   withval=$with_alsa_lib;
48174 fi
48175 
48176 
48177   if test "x$ALSA_NOT_NEEDED" = xyes; then
48178     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48179       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48180 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48181     fi
48182     ALSA_CFLAGS=
48183     ALSA_LIBS=
48184   else
48185     ALSA_FOUND=no
48186 
48187     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48188       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48189     fi
48190 
48191     if test "x${with_alsa}" != x; then
48192       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48193       ALSA_CFLAGS="-I${with_alsa}/include"
48194       ALSA_FOUND=yes
48195     fi
48196     if test "x${with_alsa_include}" != x; then
48197       ALSA_CFLAGS="-I${with_alsa_include}"
48198       ALSA_FOUND=yes
48199     fi
48200     if test "x${with_alsa_lib}" != x; then
48201       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48202       ALSA_FOUND=yes
48203     fi
48204     if test "x$ALSA_FOUND" = xno; then
48205 
48206 
48207   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48208     # Source the builddeps file again, to make sure it uses the latest variables!
48209     . $builddepsfile
48210     # Look for a target and build machine specific resource!
48211     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48212     if test "x$resource" = x; then
48213       # Ok, lets instead look for a target specific resource
48214       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48215     fi
48216     if test "x$resource" = x; then
48217       # Ok, lets instead look for a build specific resource
48218       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48219     fi
48220     if test "x$resource" = x; then
48221       # Ok, lets instead look for a generic resource
48222       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48223       resource=${builddep_alsa}
48224     fi
48225     if test "x$resource" != x; then
48226       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48227 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48228       # If the resource in the builddeps.conf file is an existing directory,
48229       # for example /java/linux/cups
48230       if test -d ${resource}; then
48231         depdir=${resource}
48232       else
48233 
48234   # alsa is for example mymodule
48235   # $resource is for example libs/general/libmymod_1_2_3.zip
48236   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48237   # $with_builddeps_dir is for example /localhome/builddeps
48238   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48239   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48240   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48241   filename=`basename $resource`
48242   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48243   filebase=${filename%%.*}
48244   extension=${filename#*.}
48245   installdir=$with_builddeps_dir/$filebase
48246   if test ! -f $installdir/$filename.unpacked; then
48247     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48248 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48249     if test ! -d $installdir; then
48250       mkdir -p $installdir
48251     fi
48252     if test ! -d $installdir; then
48253       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48254     fi
48255     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48256     touch $tmpfile
48257     if test ! -f $tmpfile; then
48258       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48259     fi
48260 
48261   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48262   # $tmpfile is the local file name for the downloaded file.
48263   VALID_TOOL=no
48264   if test "x$BDEPS_FTP" = xwget; then
48265     VALID_TOOL=yes
48266     wget -O $tmpfile $with_builddeps_server/$resource
48267   fi
48268   if test "x$BDEPS_FTP" = xlftp; then
48269     VALID_TOOL=yes
48270     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48271   fi
48272   if test "x$BDEPS_FTP" = xftp; then
48273     VALID_TOOL=yes
48274     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48275     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48276     FTPUSERPWD=${FTPSERVER%%@*}
48277     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48278       FTPUSER=${userpwd%%:*}
48279       FTPPWD=${userpwd#*@}
48280       FTPSERVER=${FTPSERVER#*@}
48281     else
48282       FTPUSER=ftp
48283       FTPPWD=ftp
48284     fi
48285     # the "pass" command does not work on some
48286     # ftp clients (read ftp.exe) but if it works,
48287     # passive mode is better!
48288     ( \
48289         echo "user $FTPUSER $FTPPWD"        ; \
48290         echo "pass"                         ; \
48291         echo "bin"                          ; \
48292         echo "get $FTPPATH $tmpfile"              ; \
48293     ) | ftp -in $FTPSERVER
48294   fi
48295   if test "x$VALID_TOOL" != xyes; then
48296     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48297   fi
48298 
48299     mv $tmpfile $installdir/$filename
48300     if test ! -s $installdir/$filename; then
48301       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48302     fi
48303     case "$extension" in
48304       zip)  echo "Unzipping $installdir/$filename..."
48305         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48306         ;;
48307       tar.gz) echo "Untaring $installdir/$filename..."
48308         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48309         ;;
48310       tgz) echo "Untaring $installdir/$filename..."
48311         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48312         ;;
48313       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48314         ;;
48315     esac
48316   fi
48317   if test -f $installdir/$filename.unpacked; then
48318     depdir=$installdir
48319   fi
48320 
48321       fi
48322       # Source the builddeps file again, because in the previous command, the depdir
48323       # was updated to point at the current build dependency install directory.
48324       . $builddepsfile
48325       # Now extract variables from the builddeps.conf files.
48326       theroot=${builddep_alsa_ROOT}
48327       thecflags=${builddep_alsa_CFLAGS}
48328       thelibs=${builddep_alsa_LIBS}
48329       if test "x$depdir" = x; then
48330         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48331       fi
48332       ALSA=$depdir
48333       if test "x$theroot" != x; then
48334         ALSA="$theroot"
48335       fi
48336       if test "x$thecflags" != x; then
48337         ALSA_CFLAGS="$thecflags"
48338       fi
48339       if test "x$thelibs" != x; then
48340         ALSA_LIBS="$thelibs"
48341       fi
48342       ALSA_FOUND=yes
48343       else ALSA_FOUND=no
48344 
48345     fi
48346     else ALSA_FOUND=no
48347 
48348   fi
48349 
48350     fi
48351     # Do not try pkg-config if we have a sysroot set.
48352     if test "x$SYSROOT" = x; then
48353       if test "x$ALSA_FOUND" = xno; then
48354 
48355 pkg_failed=no
48356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48357 $as_echo_n "checking for ALSA... " >&6; }
48358 
48359 if test -n "$ALSA_CFLAGS"; then
48360     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48361  elif test -n "$PKG_CONFIG"; then
48362     if test -n "$PKG_CONFIG" && \
48363     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48364   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48365   ac_status=$?
48366   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48367   test $ac_status = 0; }; then
48368   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48369 else
48370   pkg_failed=yes
48371 fi
48372  else
48373     pkg_failed=untried
48374 fi
48375 if test -n "$ALSA_LIBS"; then
48376     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48377  elif test -n "$PKG_CONFIG"; then
48378     if test -n "$PKG_CONFIG" && \
48379     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48380   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48381   ac_status=$?
48382   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48383   test $ac_status = 0; }; then
48384   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48385 else
48386   pkg_failed=yes
48387 fi
48388  else
48389     pkg_failed=untried
48390 fi
48391 
48392 
48393 
48394 if test $pkg_failed = yes; then
48395 
48396 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48397         _pkg_short_errors_supported=yes
48398 else
48399         _pkg_short_errors_supported=no
48400 fi
48401         if test $_pkg_short_errors_supported = yes; then
48402                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48403         else
48404                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48405         fi
48406         # Put the nasty error message in config.log where it belongs
48407         echo "$ALSA_PKG_ERRORS" >&5
48408 
48409         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48410 $as_echo "no" >&6; }
48411                 ALSA_FOUND=no
48412 elif test $pkg_failed = untried; then
48413         ALSA_FOUND=no
48414 else
48415         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48416         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48418 $as_echo "yes" >&6; }
48419         ALSA_FOUND=yes
48420 fi
48421       fi
48422     fi
48423     if test "x$ALSA_FOUND" = xno; then
48424       for ac_header in alsa/asoundlib.h
48425 do :
48426   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48427 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48428   cat >>confdefs.h <<_ACEOF
48429 #define HAVE_ALSA_ASOUNDLIB_H 1
48430 _ACEOF
48431 
48432             ALSA_FOUND=yes
48433             ALSA_CFLAGS=-Iignoreme
48434             ALSA_LIBS=-lasound
48435             DEFAULT_ALSA=yes
48436 
48437 else
48438   ALSA_FOUND=no
48439 fi
48440 
48441 done
48442 
48443     fi
48444     if test "x$ALSA_FOUND" = xno; then
48445 
48446   # Print a helpful message on how to acquire the necessary build dependency.
48447   # alsa is the help tag: freetype, cups, pulse, alsa etc
48448   MISSING_DEPENDENCY=alsa
48449 
48450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48451     cygwin_help $MISSING_DEPENDENCY
48452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48453     msys_help $MISSING_DEPENDENCY
48454   else
48455     PKGHANDLER_COMMAND=
48456 
48457     case $PKGHANDLER in
48458       apt-get)
48459         apt_help     $MISSING_DEPENDENCY ;;
48460       yum)
48461         yum_help     $MISSING_DEPENDENCY ;;
48462       port)
48463         port_help    $MISSING_DEPENDENCY ;;
48464       pkgutil)
48465         pkgutil_help $MISSING_DEPENDENCY ;;
48466       pkgadd)
48467         pkgadd_help  $MISSING_DEPENDENCY ;;
48468     esac
48469 
48470     if test "x$PKGHANDLER_COMMAND" != x; then
48471       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48472     fi
48473   fi
48474 
48475       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48476     fi
48477   fi
48478 
48479 
48480 
48481 
48482 
48483 
48484 # Check whether --with-fontconfig was given.
48485 if test "${with_fontconfig+set}" = set; then :
48486   withval=$with_fontconfig;
48487 fi
48488 
48489 
48490 # Check whether --with-fontconfig-include was given.
48491 if test "${with_fontconfig_include+set}" = set; then :
48492   withval=$with_fontconfig_include;
48493 fi
48494 
48495 
48496   if test "x$FONTCONFIG_NOT_NEEDED" = xyes; then
48497     if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
48498         (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
48499       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
48500 $as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
48501     fi
48502     FONTCONFIG_CFLAGS=
48503   else
48504     FONTCONFIG_FOUND=no
48505 
48506     if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
48507       as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
48508     fi
48509 
48510     if test "x${with_fontconfig}" != x; then
48511       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
48512 $as_echo_n "checking for fontconfig headers... " >&6; }
48513       if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
48514         FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
48515         FONTCONFIG_FOUND=yes
48516         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
48517 $as_echo "$FONTCONFIG_FOUND" >&6; }
48518       else
48519         as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
48520       fi
48521     fi
48522     if test "x${with_fontconfig_include}" != x; then
48523       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
48524 $as_echo_n "checking for fontconfig headers... " >&6; }
48525       if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
48526         FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
48527         FONTCONFIG_FOUND=yes
48528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
48529 $as_echo "$FONTCONFIG_FOUND" >&6; }
48530       else
48531         as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
48532       fi
48533     fi
48534     if test "x$FONTCONFIG_FOUND" = xno; then
48535       # Are the fontconfig headers installed in the default /usr/include location?
48536       for ac_header in fontconfig/fontconfig.h
48537 do :
48538   ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
48539 if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
48540   cat >>confdefs.h <<_ACEOF
48541 #define HAVE_FONTCONFIG_FONTCONFIG_H 1
48542 _ACEOF
48543 
48544           FONTCONFIG_FOUND=yes
48545           FONTCONFIG_CFLAGS=
48546           DEFAULT_FONTCONFIG=yes
48547 
48548 fi
48549 
48550 done
48551 
48552     fi
48553     if test "x$FONTCONFIG_FOUND" = xno; then
48554 
48555   # Print a helpful message on how to acquire the necessary build dependency.
48556   # fontconfig is the help tag: freetype, cups, pulse, alsa etc
48557   MISSING_DEPENDENCY=fontconfig
48558 
48559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48560     cygwin_help $MISSING_DEPENDENCY
48561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48562     msys_help $MISSING_DEPENDENCY
48563   else
48564     PKGHANDLER_COMMAND=
48565 
48566     case $PKGHANDLER in
48567       apt-get)
48568         apt_help     $MISSING_DEPENDENCY ;;
48569       yum)
48570         yum_help     $MISSING_DEPENDENCY ;;
48571       port)
48572         port_help    $MISSING_DEPENDENCY ;;
48573       pkgutil)
48574         pkgutil_help $MISSING_DEPENDENCY ;;
48575       pkgadd)
48576         pkgadd_help  $MISSING_DEPENDENCY ;;
48577     esac
48578 
48579     if test "x$PKGHANDLER_COMMAND" != x; then
48580       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48581     fi
48582   fi
48583 
48584       as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
48585     fi
48586   fi
48587 
48588 
48589 
48590 
48591 
48592   ###############################################################################
48593   #
48594   # Check for the jpeg library
48595   #
48596 
48597   USE_EXTERNAL_LIBJPEG=true
48598   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
48599 $as_echo_n "checking for main in -ljpeg... " >&6; }
48600 if ${ac_cv_lib_jpeg_main+:} false; then :
48601   $as_echo_n "(cached) " >&6
48602 else
48603   ac_check_lib_save_LIBS=$LIBS
48604 LIBS="-ljpeg  $LIBS"
48605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48606 /* end confdefs.h.  */
48607 
48608 
48609 int
48610 main ()
48611 {
48612 return main ();
48613   ;
48614   return 0;
48615 }
48616 _ACEOF
48617 if ac_fn_cxx_try_link "$LINENO"; then :
48618   ac_cv_lib_jpeg_main=yes
48619 else
48620   ac_cv_lib_jpeg_main=no
48621 fi
48622 rm -f core conftest.err conftest.$ac_objext \
48623     conftest$ac_exeext conftest.$ac_ext
48624 LIBS=$ac_check_lib_save_LIBS
48625 fi
48626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
48627 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
48628 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
48629   cat >>confdefs.h <<_ACEOF
48630 #define HAVE_LIBJPEG 1
48631 _ACEOF
48632 
48633   LIBS="-ljpeg $LIBS"
48634 
48635 else
48636    USE_EXTERNAL_LIBJPEG=false
48637       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
48638 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
48639 
48640 fi
48641 
48642 
48643 
48644   ###############################################################################
48645   #
48646   # Check for the gif library
48647   #
48648 
48649 
48650 # Check whether --with-giflib was given.
48651 if test "${with_giflib+set}" = set; then :
48652   withval=$with_giflib;
48653 fi
48654 
48655 
48656 
48657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48658 $as_echo_n "checking for which giflib to use... " >&6; }
48659 
48660   # default is bundled
48661   DEFAULT_GIFLIB=bundled
48662 
48663   #
48664   # if user didn't specify, use DEFAULT_GIFLIB
48665   #
48666   if test "x${with_giflib}" = "x"; then
48667     with_giflib=${DEFAULT_GIFLIB}
48668   fi
48669 
48670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48671 $as_echo "${with_giflib}" >&6; }
48672 
48673   if test "x${with_giflib}" = "xbundled"; then
48674     USE_EXTERNAL_LIBGIF=false
48675   elif test "x${with_giflib}" = "xsystem"; then
48676     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48677 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48678 
48679 else
48680    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48681 fi
48682 
48683 
48684     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48685 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48686 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48687   $as_echo_n "(cached) " >&6
48688 else
48689   ac_check_lib_save_LIBS=$LIBS
48690 LIBS="-lgif  $LIBS"
48691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48692 /* end confdefs.h.  */
48693 
48694 /* Override any GCC internal prototype to avoid an error.
48695    Use char because int might match the return type of a GCC
48696    builtin and then its argument prototype would still apply.  */
48697 #ifdef __cplusplus
48698 extern "C"
48699 #endif
48700 char DGifGetCode ();
48701 int
48702 main ()
48703 {
48704 return DGifGetCode ();
48705   ;
48706   return 0;
48707 }
48708 _ACEOF
48709 if ac_fn_cxx_try_link "$LINENO"; then :
48710   ac_cv_lib_gif_DGifGetCode=yes
48711 else
48712   ac_cv_lib_gif_DGifGetCode=no
48713 fi
48714 rm -f core conftest.err conftest.$ac_objext \
48715     conftest$ac_exeext conftest.$ac_ext
48716 LIBS=$ac_check_lib_save_LIBS
48717 fi
48718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48719 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48720 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48721   cat >>confdefs.h <<_ACEOF
48722 #define HAVE_LIBGIF 1
48723 _ACEOF
48724 
48725   LIBS="-lgif $LIBS"
48726 
48727 else
48728    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48729 fi
48730 
48731 
48732     USE_EXTERNAL_LIBGIF=true
48733   else
48734     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48735   fi
48736 
48737 
48738   ###############################################################################
48739   #
48740   # Check for the zlib library
48741   #
48742 
48743 
48744 # Check whether --with-zlib was given.
48745 if test "${with_zlib+set}" = set; then :
48746   withval=$with_zlib;
48747 fi
48748 
48749 
48750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48751 $as_echo_n "checking for compress in -lz... " >&6; }
48752 if ${ac_cv_lib_z_compress+:} false; then :
48753   $as_echo_n "(cached) " >&6
48754 else
48755   ac_check_lib_save_LIBS=$LIBS
48756 LIBS="-lz  $LIBS"
48757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48758 /* end confdefs.h.  */
48759 
48760 /* Override any GCC internal prototype to avoid an error.
48761    Use char because int might match the return type of a GCC
48762    builtin and then its argument prototype would still apply.  */
48763 #ifdef __cplusplus
48764 extern "C"
48765 #endif
48766 char compress ();
48767 int
48768 main ()
48769 {
48770 return compress ();
48771   ;
48772   return 0;
48773 }
48774 _ACEOF
48775 if ac_fn_cxx_try_link "$LINENO"; then :
48776   ac_cv_lib_z_compress=yes
48777 else
48778   ac_cv_lib_z_compress=no
48779 fi
48780 rm -f core conftest.err conftest.$ac_objext \
48781     conftest$ac_exeext conftest.$ac_ext
48782 LIBS=$ac_check_lib_save_LIBS
48783 fi
48784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48785 $as_echo "$ac_cv_lib_z_compress" >&6; }
48786 if test "x$ac_cv_lib_z_compress" = xyes; then :
48787    ZLIB_FOUND=yes
48788 else
48789    ZLIB_FOUND=no
48790 fi
48791 
48792 
48793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48794 $as_echo_n "checking for which zlib to use... " >&6; }
48795 
48796   DEFAULT_ZLIB=bundled
48797   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48798     #
48799     # On macosx default is system...on others default is
48800     #
48801     DEFAULT_ZLIB=system
48802   fi
48803 
48804   if test "x${ZLIB_FOUND}" != "xyes"; then
48805     #
48806     # If we don't find any system...set default to bundled
48807     #
48808     DEFAULT_ZLIB=bundled
48809   fi
48810 
48811   #
48812   # If user didn't specify, use DEFAULT_ZLIB
48813   #
48814   if test "x${with_zlib}" = "x"; then
48815     with_zlib=${DEFAULT_ZLIB}
48816   fi
48817 
48818   if test "x${with_zlib}" = "xbundled"; then
48819     USE_EXTERNAL_LIBZ=false
48820     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48821 $as_echo "bundled" >&6; }
48822   elif test "x${with_zlib}" = "xsystem"; then
48823     if test "x${ZLIB_FOUND}" = "xyes"; then
48824       USE_EXTERNAL_LIBZ=true
48825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48826 $as_echo "system" >&6; }
48827     else
48828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48829 $as_echo "system not found" >&6; }
48830       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48831     fi
48832   else
48833     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48834   fi
48835 
48836 
48837 
48838   ###############################################################################
48839   LIBZIP_CAN_USE_MMAP=true
48840 
48841 
48842 
48843   ###############################################################################
48844   #
48845   # Check if altzone exists in time.h
48846   #
48847 
48848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48849 /* end confdefs.h.  */
48850 #include <time.h>
48851 int
48852 main ()
48853 {
48854 return (int)altzone;
48855   ;
48856   return 0;
48857 }
48858 _ACEOF
48859 if ac_fn_cxx_try_link "$LINENO"; then :
48860   has_altzone=yes
48861 else
48862   has_altzone=no
48863 fi
48864 rm -f core conftest.err conftest.$ac_objext \
48865     conftest$ac_exeext conftest.$ac_ext
48866   if test "x$has_altzone" = xyes; then
48867 
48868 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48869 
48870   fi
48871 
48872   ###############################################################################
48873   #
48874   # Check the maths library
48875   #
48876 
48877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48878 $as_echo_n "checking for cos in -lm... " >&6; }
48879 if ${ac_cv_lib_m_cos+:} false; then :
48880   $as_echo_n "(cached) " >&6
48881 else
48882   ac_check_lib_save_LIBS=$LIBS
48883 LIBS="-lm  $LIBS"
48884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48885 /* end confdefs.h.  */
48886 
48887 /* Override any GCC internal prototype to avoid an error.
48888    Use char because int might match the return type of a GCC
48889    builtin and then its argument prototype would still apply.  */
48890 #ifdef __cplusplus
48891 extern "C"
48892 #endif
48893 char cos ();
48894 int
48895 main ()
48896 {
48897 return cos ();
48898   ;
48899   return 0;
48900 }
48901 _ACEOF
48902 if ac_fn_cxx_try_link "$LINENO"; then :
48903   ac_cv_lib_m_cos=yes
48904 else
48905   ac_cv_lib_m_cos=no
48906 fi
48907 rm -f core conftest.err conftest.$ac_objext \
48908     conftest$ac_exeext conftest.$ac_ext
48909 LIBS=$ac_check_lib_save_LIBS
48910 fi
48911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48912 $as_echo "$ac_cv_lib_m_cos" >&6; }
48913 if test "x$ac_cv_lib_m_cos" = xyes; then :
48914   cat >>confdefs.h <<_ACEOF
48915 #define HAVE_LIBM 1
48916 _ACEOF
48917 
48918   LIBS="-lm $LIBS"
48919 
48920 else
48921 
48922         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48923 $as_echo "$as_me: Maths library was not found" >&6;}
48924 
48925 
48926 fi
48927 
48928 
48929 
48930   ###############################################################################
48931   #
48932   # Check for libdl.so
48933 
48934   save_LIBS="$LIBS"
48935   LIBS=""
48936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48937 $as_echo_n "checking for dlopen in -ldl... " >&6; }
48938 if ${ac_cv_lib_dl_dlopen+:} false; then :
48939   $as_echo_n "(cached) " >&6
48940 else
48941   ac_check_lib_save_LIBS=$LIBS
48942 LIBS="-ldl  $LIBS"
48943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48944 /* end confdefs.h.  */
48945 
48946 /* Override any GCC internal prototype to avoid an error.
48947    Use char because int might match the return type of a GCC
48948    builtin and then its argument prototype would still apply.  */
48949 #ifdef __cplusplus
48950 extern "C"
48951 #endif
48952 char dlopen ();
48953 int
48954 main ()
48955 {
48956 return dlopen ();
48957   ;
48958   return 0;
48959 }
48960 _ACEOF
48961 if ac_fn_cxx_try_link "$LINENO"; then :
48962   ac_cv_lib_dl_dlopen=yes
48963 else
48964   ac_cv_lib_dl_dlopen=no
48965 fi
48966 rm -f core conftest.err conftest.$ac_objext \
48967     conftest$ac_exeext conftest.$ac_ext
48968 LIBS=$ac_check_lib_save_LIBS
48969 fi
48970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48971 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48972 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48973   cat >>confdefs.h <<_ACEOF
48974 #define HAVE_LIBDL 1
48975 _ACEOF
48976 
48977   LIBS="-ldl $LIBS"
48978 
48979 fi
48980 
48981   LIBDL="$LIBS"
48982 
48983   LIBS="$save_LIBS"
48984 
48985 
48986   ###############################################################################
48987   #
48988   # statically link libstdc++ before C++ ABI is stablized on Linux unless
48989   # dynamic build is configured on command line.
48990   #
48991 
48992 # Check whether --with-stdc++lib was given.
48993 if test "${with_stdc__lib+set}" = set; then :
48994   withval=$with_stdc__lib;
48995         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48996                 && test "x$with_stdc__lib" != xdefault; then
48997           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48998         fi
48999 
49000 else
49001   with_stdc__lib=default
49002 
49003 fi
49004 
49005 
49006   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49007     # Test if -lstdc++ works.
49008     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49009 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49010     ac_ext=cpp
49011 ac_cpp='$CXXCPP $CPPFLAGS'
49012 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49013 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49014 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49015 
49016     OLD_CXXFLAGS="$CXXFLAGS"
49017     CXXFLAGS="$CXXFLAGS -lstdc++"
49018     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49019 /* end confdefs.h.  */
49020 
49021 int
49022 main ()
49023 {
49024 return 0;
49025   ;
49026   return 0;
49027 }
49028 _ACEOF
49029 if ac_fn_cxx_try_link "$LINENO"; then :
49030   has_dynamic_libstdcxx=yes
49031 else
49032   has_dynamic_libstdcxx=no
49033 fi
49034 rm -f core conftest.err conftest.$ac_objext \
49035     conftest$ac_exeext conftest.$ac_ext
49036     CXXFLAGS="$OLD_CXXFLAGS"
49037     ac_ext=cpp
49038 ac_cpp='$CXXCPP $CPPFLAGS'
49039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49040 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49042 
49043     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49044 $as_echo "$has_dynamic_libstdcxx" >&6; }
49045 
49046     # Test if stdc++ can be linked statically.
49047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49048 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49049     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49050     ac_ext=cpp
49051 ac_cpp='$CXXCPP $CPPFLAGS'
49052 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49053 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49054 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49055 
49056     OLD_LIBS="$LIBS"
49057     OLD_CXX="$CXX"
49058     LIBS="$STATIC_STDCXX_FLAGS"
49059     CXX="$CC"
49060     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49061 /* end confdefs.h.  */
49062 
49063 int
49064 main ()
49065 {
49066 return 0;
49067   ;
49068   return 0;
49069 }
49070 _ACEOF
49071 if ac_fn_cxx_try_link "$LINENO"; then :
49072   has_static_libstdcxx=yes
49073 else
49074   has_static_libstdcxx=no
49075 fi
49076 rm -f core conftest.err conftest.$ac_objext \
49077     conftest$ac_exeext conftest.$ac_ext
49078     LIBS="$OLD_LIBS"
49079     CXX="$OLD_CXX"
49080     ac_ext=cpp
49081 ac_cpp='$CXXCPP $CPPFLAGS'
49082 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49083 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49084 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49085 
49086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49087 $as_echo "$has_static_libstdcxx" >&6; }
49088 
49089     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49090       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49091     fi
49092 
49093     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49094       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49095     fi
49096 
49097     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49098       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49099     fi
49100 
49101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49102 $as_echo_n "checking how to link with libstdc++... " >&6; }
49103     # If dynamic was requested, it's available since it would fail above otherwise.
49104     # If dynamic wasn't requested, go with static unless it isn't available.
49105     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49106       LIBCXX="$LIBCXX -lstdc++"
49107       LDCXX="$CXX"
49108       STATIC_CXX_SETTING="STATIC_CXX=false"
49109       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49110 $as_echo "dynamic" >&6; }
49111     else
49112       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49113       LDCXX="$CC"
49114       STATIC_CXX_SETTING="STATIC_CXX=true"
49115       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49116 $as_echo "static" >&6; }
49117     fi
49118   fi
49119 
49120 
49121   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49122     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49123 
49124 pkg_failed=no
49125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49126 $as_echo_n "checking for LIBFFI... " >&6; }
49127 
49128 if test -n "$LIBFFI_CFLAGS"; then
49129     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49130  elif test -n "$PKG_CONFIG"; then
49131     if test -n "$PKG_CONFIG" && \
49132     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49133   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49134   ac_status=$?
49135   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49136   test $ac_status = 0; }; then
49137   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49138 else
49139   pkg_failed=yes
49140 fi
49141  else
49142     pkg_failed=untried
49143 fi
49144 if test -n "$LIBFFI_LIBS"; then
49145     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49146  elif test -n "$PKG_CONFIG"; then
49147     if test -n "$PKG_CONFIG" && \
49148     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49149   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49150   ac_status=$?
49151   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49152   test $ac_status = 0; }; then
49153   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49154 else
49155   pkg_failed=yes
49156 fi
49157  else
49158     pkg_failed=untried
49159 fi
49160 
49161 
49162 
49163 if test $pkg_failed = yes; then
49164 
49165 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49166         _pkg_short_errors_supported=yes
49167 else
49168         _pkg_short_errors_supported=no
49169 fi
49170         if test $_pkg_short_errors_supported = yes; then
49171                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49172         else
49173                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49174         fi
49175         # Put the nasty error message in config.log where it belongs
49176         echo "$LIBFFI_PKG_ERRORS" >&5
49177 
49178         as_fn_error $? "Package requirements (libffi) were not met:
49179 
49180 $LIBFFI_PKG_ERRORS
49181 
49182 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49183 installed software in a non-standard prefix.
49184 
49185 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49186 and LIBFFI_LIBS to avoid the need to call pkg-config.
49187 See the pkg-config man page for more details.
49188 " "$LINENO" 5
49189 elif test $pkg_failed = untried; then
49190         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49191 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49192 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49193 is in your PATH or set the PKG_CONFIG environment variable to the full
49194 path to pkg-config.
49195 
49196 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49197 and LIBFFI_LIBS to avoid the need to call pkg-config.
49198 See the pkg-config man page for more details.
49199 
49200 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49201 See \`config.log' for more details" "$LINENO" 5; }
49202 else
49203         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49204         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49206 $as_echo "yes" >&6; }
49207         :
49208 fi
49209 
49210   fi
49211 
49212   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49213     # Extract the first word of "llvm-config", so it can be a program name with args.
49214 set dummy llvm-config; ac_word=$2
49215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49216 $as_echo_n "checking for $ac_word... " >&6; }
49217 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49218   $as_echo_n "(cached) " >&6
49219 else
49220   if test -n "$LLVM_CONFIG"; then
49221   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49222 else
49223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49224 for as_dir in $PATH
49225 do
49226   IFS=$as_save_IFS
49227   test -z "$as_dir" && as_dir=.
49228     for ac_exec_ext in '' $ac_executable_extensions; do
49229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49230     ac_cv_prog_LLVM_CONFIG="llvm-config"
49231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49232     break 2
49233   fi
49234 done
49235   done
49236 IFS=$as_save_IFS
49237 
49238 fi
49239 fi
49240 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49241 if test -n "$LLVM_CONFIG"; then
49242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49243 $as_echo "$LLVM_CONFIG" >&6; }
49244 else
49245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49246 $as_echo "no" >&6; }
49247 fi
49248 
49249 
49250 
49251     if test "x$LLVM_CONFIG" != xllvm-config; then
49252       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49253     fi
49254 
49255     llvm_components="jit mcjit engine nativecodegen native"
49256     unset LLVM_CFLAGS
49257     for flag in $("$LLVM_CONFIG" --cxxflags); do
49258       if echo "${flag}" | grep -q '^-[ID]'; then
49259         if test "${flag}" != "-D_DEBUG" ; then
49260           if test "${LLVM_CFLAGS}" != "" ; then
49261             LLVM_CFLAGS="${LLVM_CFLAGS} "
49262           fi
49263           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49264         fi
49265       fi
49266     done
49267     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49268     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49269 
49270     unset LLVM_LDFLAGS
49271     for flag in $("${LLVM_CONFIG}" --ldflags); do
49272       if echo "${flag}" | grep -q '^-L'; then
49273         if test "${LLVM_LDFLAGS}" != ""; then
49274           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49275         fi
49276         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49277       fi
49278     done
49279 
49280     unset LLVM_LIBS
49281     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49282       if echo "${flag}" | grep -q '^-l'; then
49283         if test "${LLVM_LIBS}" != ""; then
49284           LLVM_LIBS="${LLVM_LIBS} "
49285         fi
49286         LLVM_LIBS="${LLVM_LIBS}${flag}"
49287       fi
49288     done
49289 
49290 
49291 
49292 
49293   fi
49294 
49295   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49296   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49297     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49298   fi
49299 
49300   # TODO better (platform agnostic) test
49301   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49302     LIBCXX="-lstdc++"
49303   fi
49304 
49305 
49306 
49307 
49308   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49309 
49310 
49311 # Check whether --with-msvcr-dll was given.
49312 if test "${with_msvcr_dll+set}" = set; then :
49313   withval=$with_msvcr_dll;
49314 fi
49315 
49316 
49317   if test "x$with_msvcr_dll" != x; then
49318     # If given explicitely by user, do not probe. If not present, fail directly.
49319 
49320   DLL_NAME="$MSVCR_NAME"
49321   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49322   METHOD="--with-msvcr-dll"
49323   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49324     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49325 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49326 
49327     # Need to check if the found msvcr is correct architecture
49328     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49329 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49330     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49331     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49332       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49333       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49334       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49335         CORRECT_MSVCR_ARCH="PE32 executable"
49336       else
49337         CORRECT_MSVCR_ARCH="PE32+ executable"
49338       fi
49339     else
49340       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49341         CORRECT_MSVCR_ARCH=386
49342       else
49343         CORRECT_MSVCR_ARCH=x86-64
49344       fi
49345     fi
49346     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49347       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49348 $as_echo "ok" >&6; }
49349       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49350 
49351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49352 
49353   # Input might be given as Windows format, start by converting to
49354   # unix format.
49355   path="$MSVC_DLL"
49356   new_path=`$CYGPATH -u "$path"`
49357 
49358   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49359   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49360   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49361   # "foo.exe" is OK but "foo" is an error.
49362   #
49363   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49364   # It is also a way to make sure we got the proper file name for the real test later on.
49365   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49366   if test "x$test_shortpath" = x; then
49367     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49368 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49369     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49370   fi
49371 
49372   # Call helper function which possibly converts this using DOS-style short mode.
49373   # If so, the updated path is stored in $new_path.
49374 
49375   input_path="$new_path"
49376   # Check if we need to convert this using DOS-style short mode. If the path
49377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49378   # take no chances and rewrite it.
49379   # Note: m4 eats our [], so we need to use [ and ] instead.
49380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49381   if test "x$has_forbidden_chars" != x; then
49382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49383     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49384     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49385     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49386       # Going to short mode and back again did indeed matter. Since short mode is
49387       # case insensitive, let's make it lowercase to improve readability.
49388       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49389       # Now convert it back to Unix-style (cygpath)
49390       input_path=`$CYGPATH -u "$shortmode_path"`
49391       new_path="$input_path"
49392     fi
49393   fi
49394 
49395   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49396   if test "x$test_cygdrive_prefix" = x; then
49397     # As a simple fix, exclude /usr/bin since it's not a real path.
49398     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49399       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49400       # a path prefixed by /cygdrive for fixpath to work.
49401       new_path="$CYGWIN_ROOT_PATH$input_path"
49402     fi
49403   fi
49404 
49405 
49406   if test "x$path" != "x$new_path"; then
49407     MSVC_DLL="$new_path"
49408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49409 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49410   fi
49411 
49412   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49413 
49414   path="$MSVC_DLL"
49415   has_colon=`$ECHO $path | $GREP ^.:`
49416   new_path="$path"
49417   if test "x$has_colon" = x; then
49418     # Not in mixed or Windows style, start by that.
49419     new_path=`cmd //c echo $path`
49420   fi
49421 
49422 
49423   input_path="$new_path"
49424   # Check if we need to convert this using DOS-style short mode. If the path
49425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49426   # take no chances and rewrite it.
49427   # Note: m4 eats our [], so we need to use [ and ] instead.
49428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49429   if test "x$has_forbidden_chars" != x; then
49430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49432   fi
49433 
49434 
49435   windows_path="$new_path"
49436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49437     unix_path=`$CYGPATH -u "$windows_path"`
49438     new_path="$unix_path"
49439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49441     new_path="$unix_path"
49442   fi
49443 
49444   if test "x$path" != "x$new_path"; then
49445     MSVC_DLL="$new_path"
49446     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49447 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49448   fi
49449 
49450   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49451   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49452 
49453   else
49454     # We're on a posix platform. Hooray! :)
49455     path="$MSVC_DLL"
49456     has_space=`$ECHO "$path" | $GREP " "`
49457     if test "x$has_space" != x; then
49458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49459 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49460       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49461     fi
49462 
49463     # Use eval to expand a potential ~
49464     eval path="$path"
49465     if test ! -f "$path" && test ! -d "$path"; then
49466       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49467     fi
49468 
49469     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49470   fi
49471 
49472       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49473 $as_echo_n "checking for $DLL_NAME... " >&6; }
49474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49475 $as_echo "$MSVC_DLL" >&6; }
49476     else
49477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49478 $as_echo "incorrect, ignoring" >&6; }
49479       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49480 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49481     fi
49482   fi
49483 
49484     if test "x$MSVC_DLL" = x; then
49485       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49486     fi
49487     MSVCR_DLL="$MSVC_DLL"
49488   elif test "x$DEVKIT_MSVCR_DLL" != x; then
49489 
49490   DLL_NAME="$MSVCR_NAME"
49491   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49492   METHOD="devkit"
49493   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49494     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49495 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49496 
49497     # Need to check if the found msvcr is correct architecture
49498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49499 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49500     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49501     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49502       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49503       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49504       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49505         CORRECT_MSVCR_ARCH="PE32 executable"
49506       else
49507         CORRECT_MSVCR_ARCH="PE32+ executable"
49508       fi
49509     else
49510       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49511         CORRECT_MSVCR_ARCH=386
49512       else
49513         CORRECT_MSVCR_ARCH=x86-64
49514       fi
49515     fi
49516     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49518 $as_echo "ok" >&6; }
49519       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49520 
49521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49522 
49523   # Input might be given as Windows format, start by converting to
49524   # unix format.
49525   path="$MSVC_DLL"
49526   new_path=`$CYGPATH -u "$path"`
49527 
49528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49531   # "foo.exe" is OK but "foo" is an error.
49532   #
49533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49534   # It is also a way to make sure we got the proper file name for the real test later on.
49535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49536   if test "x$test_shortpath" = x; then
49537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49538 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49539     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49540   fi
49541 
49542   # Call helper function which possibly converts this using DOS-style short mode.
49543   # If so, the updated path is stored in $new_path.
49544 
49545   input_path="$new_path"
49546   # Check if we need to convert this using DOS-style short mode. If the path
49547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49548   # take no chances and rewrite it.
49549   # Note: m4 eats our [], so we need to use [ and ] instead.
49550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49551   if test "x$has_forbidden_chars" != x; then
49552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49556       # Going to short mode and back again did indeed matter. Since short mode is
49557       # case insensitive, let's make it lowercase to improve readability.
49558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49559       # Now convert it back to Unix-style (cygpath)
49560       input_path=`$CYGPATH -u "$shortmode_path"`
49561       new_path="$input_path"
49562     fi
49563   fi
49564 
49565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49566   if test "x$test_cygdrive_prefix" = x; then
49567     # As a simple fix, exclude /usr/bin since it's not a real path.
49568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49570       # a path prefixed by /cygdrive for fixpath to work.
49571       new_path="$CYGWIN_ROOT_PATH$input_path"
49572     fi
49573   fi
49574 
49575 
49576   if test "x$path" != "x$new_path"; then
49577     MSVC_DLL="$new_path"
49578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49579 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49580   fi
49581 
49582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49583 
49584   path="$MSVC_DLL"
49585   has_colon=`$ECHO $path | $GREP ^.:`
49586   new_path="$path"
49587   if test "x$has_colon" = x; then
49588     # Not in mixed or Windows style, start by that.
49589     new_path=`cmd //c echo $path`
49590   fi
49591 
49592 
49593   input_path="$new_path"
49594   # Check if we need to convert this using DOS-style short mode. If the path
49595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49596   # take no chances and rewrite it.
49597   # Note: m4 eats our [], so we need to use [ and ] instead.
49598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49599   if test "x$has_forbidden_chars" != x; then
49600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49602   fi
49603 
49604 
49605   windows_path="$new_path"
49606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49607     unix_path=`$CYGPATH -u "$windows_path"`
49608     new_path="$unix_path"
49609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49611     new_path="$unix_path"
49612   fi
49613 
49614   if test "x$path" != "x$new_path"; then
49615     MSVC_DLL="$new_path"
49616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49617 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49618   fi
49619 
49620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49622 
49623   else
49624     # We're on a posix platform. Hooray! :)
49625     path="$MSVC_DLL"
49626     has_space=`$ECHO "$path" | $GREP " "`
49627     if test "x$has_space" != x; then
49628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49629 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49630       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49631     fi
49632 
49633     # Use eval to expand a potential ~
49634     eval path="$path"
49635     if test ! -f "$path" && test ! -d "$path"; then
49636       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49637     fi
49638 
49639     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49640   fi
49641 
49642       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49643 $as_echo_n "checking for $DLL_NAME... " >&6; }
49644       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49645 $as_echo "$MSVC_DLL" >&6; }
49646     else
49647       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49648 $as_echo "incorrect, ignoring" >&6; }
49649       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49650 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49651     fi
49652   fi
49653 
49654     if test "x$MSVC_DLL" = x; then
49655       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49656     fi
49657     MSVCR_DLL="$MSVC_DLL"
49658   else
49659 
49660   DLL_NAME="${MSVCR_NAME}"
49661   MSVC_DLL=
49662 
49663   if test "x$MSVC_DLL" = x; then
49664     if test "x$VCINSTALLDIR" != x; then
49665       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49666 
49667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49668 
49669   # Input might be given as Windows format, start by converting to
49670   # unix format.
49671   path="$CYGWIN_VC_INSTALL_DIR"
49672   new_path=`$CYGPATH -u "$path"`
49673 
49674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49677   # "foo.exe" is OK but "foo" is an error.
49678   #
49679   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49680   # It is also a way to make sure we got the proper file name for the real test later on.
49681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49682   if test "x$test_shortpath" = x; then
49683     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
49684 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
49685     as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
49686   fi
49687 
49688   # Call helper function which possibly converts this using DOS-style short mode.
49689   # If so, the updated path is stored in $new_path.
49690 
49691   input_path="$new_path"
49692   # Check if we need to convert this using DOS-style short mode. If the path
49693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49694   # take no chances and rewrite it.
49695   # Note: m4 eats our [], so we need to use [ and ] instead.
49696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49697   if test "x$has_forbidden_chars" != x; then
49698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49699     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49700     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49701     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49702       # Going to short mode and back again did indeed matter. Since short mode is
49703       # case insensitive, let's make it lowercase to improve readability.
49704       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49705       # Now convert it back to Unix-style (cygpath)
49706       input_path=`$CYGPATH -u "$shortmode_path"`
49707       new_path="$input_path"
49708     fi
49709   fi
49710 
49711   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49712   if test "x$test_cygdrive_prefix" = x; then
49713     # As a simple fix, exclude /usr/bin since it's not a real path.
49714     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49715       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49716       # a path prefixed by /cygdrive for fixpath to work.
49717       new_path="$CYGWIN_ROOT_PATH$input_path"
49718     fi
49719   fi
49720 
49721 
49722   if test "x$path" != "x$new_path"; then
49723     CYGWIN_VC_INSTALL_DIR="$new_path"
49724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
49725 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
49726   fi
49727 
49728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49729 
49730   path="$CYGWIN_VC_INSTALL_DIR"
49731   has_colon=`$ECHO $path | $GREP ^.:`
49732   new_path="$path"
49733   if test "x$has_colon" = x; then
49734     # Not in mixed or Windows style, start by that.
49735     new_path=`cmd //c echo $path`
49736   fi
49737 
49738 
49739   input_path="$new_path"
49740   # Check if we need to convert this using DOS-style short mode. If the path
49741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49742   # take no chances and rewrite it.
49743   # Note: m4 eats our [], so we need to use [ and ] instead.
49744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49745   if test "x$has_forbidden_chars" != x; then
49746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49748   fi
49749 
49750 
49751   windows_path="$new_path"
49752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49753     unix_path=`$CYGPATH -u "$windows_path"`
49754     new_path="$unix_path"
49755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49757     new_path="$unix_path"
49758   fi
49759 
49760   if test "x$path" != "x$new_path"; then
49761     CYGWIN_VC_INSTALL_DIR="$new_path"
49762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
49763 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
49764   fi
49765 
49766   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49767   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49768 
49769   else
49770     # We're on a posix platform. Hooray! :)
49771     path="$CYGWIN_VC_INSTALL_DIR"
49772     has_space=`$ECHO "$path" | $GREP " "`
49773     if test "x$has_space" != x; then
49774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
49775 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
49776       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49777     fi
49778 
49779     # Use eval to expand a potential ~
49780     eval path="$path"
49781     if test ! -f "$path" && test ! -d "$path"; then
49782       as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
49783     fi
49784 
49785     CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
49786   fi
49787 
49788       if test "$VS_VERSION" -lt 2017; then
49789         # Probe: Using well-known location from Visual Studio 12.0 and older
49790         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49791           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49792         else
49793           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49794         fi
49795       else
49796         # Probe: Using well-known location from VS 2017
49797         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49798           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
49799         else
49800           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
49801         fi
49802       fi
49803       # In case any of the above finds more than one file, loop over them.
49804       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
49805         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
49806 
49807   DLL_NAME="$DLL_NAME"
49808   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
49809   METHOD="well-known location in VCINSTALLDIR"
49810   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49811     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49812 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49813 
49814     # Need to check if the found msvcr is correct architecture
49815     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49816 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49817     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49818     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49819       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49820       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49821       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49822         CORRECT_MSVCR_ARCH="PE32 executable"
49823       else
49824         CORRECT_MSVCR_ARCH="PE32+ executable"
49825       fi
49826     else
49827       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49828         CORRECT_MSVCR_ARCH=386
49829       else
49830         CORRECT_MSVCR_ARCH=x86-64
49831       fi
49832     fi
49833     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49835 $as_echo "ok" >&6; }
49836       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49837 
49838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49839 
49840   # Input might be given as Windows format, start by converting to
49841   # unix format.
49842   path="$MSVC_DLL"
49843   new_path=`$CYGPATH -u "$path"`
49844 
49845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49848   # "foo.exe" is OK but "foo" is an error.
49849   #
49850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49851   # It is also a way to make sure we got the proper file name for the real test later on.
49852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49853   if test "x$test_shortpath" = x; then
49854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49855 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49856     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49857   fi
49858 
49859   # Call helper function which possibly converts this using DOS-style short mode.
49860   # If so, the updated path is stored in $new_path.
49861 
49862   input_path="$new_path"
49863   # Check if we need to convert this using DOS-style short mode. If the path
49864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49865   # take no chances and rewrite it.
49866   # Note: m4 eats our [], so we need to use [ and ] instead.
49867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49868   if test "x$has_forbidden_chars" != x; then
49869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49873       # Going to short mode and back again did indeed matter. Since short mode is
49874       # case insensitive, let's make it lowercase to improve readability.
49875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49876       # Now convert it back to Unix-style (cygpath)
49877       input_path=`$CYGPATH -u "$shortmode_path"`
49878       new_path="$input_path"
49879     fi
49880   fi
49881 
49882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49883   if test "x$test_cygdrive_prefix" = x; then
49884     # As a simple fix, exclude /usr/bin since it's not a real path.
49885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49887       # a path prefixed by /cygdrive for fixpath to work.
49888       new_path="$CYGWIN_ROOT_PATH$input_path"
49889     fi
49890   fi
49891 
49892 
49893   if test "x$path" != "x$new_path"; then
49894     MSVC_DLL="$new_path"
49895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49896 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49897   fi
49898 
49899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49900 
49901   path="$MSVC_DLL"
49902   has_colon=`$ECHO $path | $GREP ^.:`
49903   new_path="$path"
49904   if test "x$has_colon" = x; then
49905     # Not in mixed or Windows style, start by that.
49906     new_path=`cmd //c echo $path`
49907   fi
49908 
49909 
49910   input_path="$new_path"
49911   # Check if we need to convert this using DOS-style short mode. If the path
49912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49913   # take no chances and rewrite it.
49914   # Note: m4 eats our [], so we need to use [ and ] instead.
49915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49916   if test "x$has_forbidden_chars" != x; then
49917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49919   fi
49920 
49921 
49922   windows_path="$new_path"
49923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49924     unix_path=`$CYGPATH -u "$windows_path"`
49925     new_path="$unix_path"
49926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49928     new_path="$unix_path"
49929   fi
49930 
49931   if test "x$path" != "x$new_path"; then
49932     MSVC_DLL="$new_path"
49933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49934 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49935   fi
49936 
49937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49939 
49940   else
49941     # We're on a posix platform. Hooray! :)
49942     path="$MSVC_DLL"
49943     has_space=`$ECHO "$path" | $GREP " "`
49944     if test "x$has_space" != x; then
49945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49946 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49947       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49948     fi
49949 
49950     # Use eval to expand a potential ~
49951     eval path="$path"
49952     if test ! -f "$path" && test ! -d "$path"; then
49953       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49954     fi
49955 
49956     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49957   fi
49958 
49959       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49960 $as_echo_n "checking for $DLL_NAME... " >&6; }
49961       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49962 $as_echo "$MSVC_DLL" >&6; }
49963     else
49964       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49965 $as_echo "incorrect, ignoring" >&6; }
49966       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49967 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49968     fi
49969   fi
49970 
49971       done
49972     fi
49973   fi
49974 
49975   if test "x$MSVC_DLL" = x; then
49976     # Probe: Check in the Boot JDK directory.
49977     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49978 
49979   DLL_NAME="$DLL_NAME"
49980   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49981   METHOD="well-known location in Boot JDK"
49982   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49983     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49984 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49985 
49986     # Need to check if the found msvcr is correct architecture
49987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49988 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49989     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49990     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49991       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49992       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49993       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49994         CORRECT_MSVCR_ARCH="PE32 executable"
49995       else
49996         CORRECT_MSVCR_ARCH="PE32+ executable"
49997       fi
49998     else
49999       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50000         CORRECT_MSVCR_ARCH=386
50001       else
50002         CORRECT_MSVCR_ARCH=x86-64
50003       fi
50004     fi
50005     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50006       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50007 $as_echo "ok" >&6; }
50008       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50009 
50010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50011 
50012   # Input might be given as Windows format, start by converting to
50013   # unix format.
50014   path="$MSVC_DLL"
50015   new_path=`$CYGPATH -u "$path"`
50016 
50017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50020   # "foo.exe" is OK but "foo" is an error.
50021   #
50022   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50023   # It is also a way to make sure we got the proper file name for the real test later on.
50024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50025   if test "x$test_shortpath" = x; then
50026     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50027 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50028     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50029   fi
50030 
50031   # Call helper function which possibly converts this using DOS-style short mode.
50032   # If so, the updated path is stored in $new_path.
50033 
50034   input_path="$new_path"
50035   # Check if we need to convert this using DOS-style short mode. If the path
50036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50037   # take no chances and rewrite it.
50038   # Note: m4 eats our [], so we need to use [ and ] instead.
50039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50040   if test "x$has_forbidden_chars" != x; then
50041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50042     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50043     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50044     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50045       # Going to short mode and back again did indeed matter. Since short mode is
50046       # case insensitive, let's make it lowercase to improve readability.
50047       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50048       # Now convert it back to Unix-style (cygpath)
50049       input_path=`$CYGPATH -u "$shortmode_path"`
50050       new_path="$input_path"
50051     fi
50052   fi
50053 
50054   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50055   if test "x$test_cygdrive_prefix" = x; then
50056     # As a simple fix, exclude /usr/bin since it's not a real path.
50057     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50058       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50059       # a path prefixed by /cygdrive for fixpath to work.
50060       new_path="$CYGWIN_ROOT_PATH$input_path"
50061     fi
50062   fi
50063 
50064 
50065   if test "x$path" != "x$new_path"; then
50066     MSVC_DLL="$new_path"
50067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50068 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50069   fi
50070 
50071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50072 
50073   path="$MSVC_DLL"
50074   has_colon=`$ECHO $path | $GREP ^.:`
50075   new_path="$path"
50076   if test "x$has_colon" = x; then
50077     # Not in mixed or Windows style, start by that.
50078     new_path=`cmd //c echo $path`
50079   fi
50080 
50081 
50082   input_path="$new_path"
50083   # Check if we need to convert this using DOS-style short mode. If the path
50084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50085   # take no chances and rewrite it.
50086   # Note: m4 eats our [], so we need to use [ and ] instead.
50087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50088   if test "x$has_forbidden_chars" != x; then
50089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50090     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50091   fi
50092 
50093 
50094   windows_path="$new_path"
50095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50096     unix_path=`$CYGPATH -u "$windows_path"`
50097     new_path="$unix_path"
50098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50100     new_path="$unix_path"
50101   fi
50102 
50103   if test "x$path" != "x$new_path"; then
50104     MSVC_DLL="$new_path"
50105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50106 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50107   fi
50108 
50109   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50110   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50111 
50112   else
50113     # We're on a posix platform. Hooray! :)
50114     path="$MSVC_DLL"
50115     has_space=`$ECHO "$path" | $GREP " "`
50116     if test "x$has_space" != x; then
50117       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50118 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50119       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50120     fi
50121 
50122     # Use eval to expand a potential ~
50123     eval path="$path"
50124     if test ! -f "$path" && test ! -d "$path"; then
50125       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50126     fi
50127 
50128     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50129   fi
50130 
50131       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50132 $as_echo_n "checking for $DLL_NAME... " >&6; }
50133       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50134 $as_echo "$MSVC_DLL" >&6; }
50135     else
50136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50137 $as_echo "incorrect, ignoring" >&6; }
50138       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50139 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50140     fi
50141   fi
50142 
50143   fi
50144 
50145   if test "x$MSVC_DLL" = x; then
50146     # Probe: Look in the Windows system32 directory
50147     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50148 
50149   windows_path="$CYGWIN_SYSTEMROOT"
50150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50151     unix_path=`$CYGPATH -u "$windows_path"`
50152     CYGWIN_SYSTEMROOT="$unix_path"
50153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50155     CYGWIN_SYSTEMROOT="$unix_path"
50156   fi
50157 
50158     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50159 
50160   DLL_NAME="$DLL_NAME"
50161   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50162   METHOD="well-known location in SYSTEMROOT"
50163   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50164     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50165 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50166 
50167     # Need to check if the found msvcr is correct architecture
50168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50169 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50170     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50171     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50172       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50173       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50174       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50175         CORRECT_MSVCR_ARCH="PE32 executable"
50176       else
50177         CORRECT_MSVCR_ARCH="PE32+ executable"
50178       fi
50179     else
50180       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50181         CORRECT_MSVCR_ARCH=386
50182       else
50183         CORRECT_MSVCR_ARCH=x86-64
50184       fi
50185     fi
50186     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50188 $as_echo "ok" >&6; }
50189       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50190 
50191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50192 
50193   # Input might be given as Windows format, start by converting to
50194   # unix format.
50195   path="$MSVC_DLL"
50196   new_path=`$CYGPATH -u "$path"`
50197 
50198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50201   # "foo.exe" is OK but "foo" is an error.
50202   #
50203   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50204   # It is also a way to make sure we got the proper file name for the real test later on.
50205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50206   if test "x$test_shortpath" = x; then
50207     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50208 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50209     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50210   fi
50211 
50212   # Call helper function which possibly converts this using DOS-style short mode.
50213   # If so, the updated path is stored in $new_path.
50214 
50215   input_path="$new_path"
50216   # Check if we need to convert this using DOS-style short mode. If the path
50217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50218   # take no chances and rewrite it.
50219   # Note: m4 eats our [], so we need to use [ and ] instead.
50220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50221   if test "x$has_forbidden_chars" != x; then
50222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50223     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50224     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50225     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50226       # Going to short mode and back again did indeed matter. Since short mode is
50227       # case insensitive, let's make it lowercase to improve readability.
50228       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50229       # Now convert it back to Unix-style (cygpath)
50230       input_path=`$CYGPATH -u "$shortmode_path"`
50231       new_path="$input_path"
50232     fi
50233   fi
50234 
50235   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50236   if test "x$test_cygdrive_prefix" = x; then
50237     # As a simple fix, exclude /usr/bin since it's not a real path.
50238     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50239       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50240       # a path prefixed by /cygdrive for fixpath to work.
50241       new_path="$CYGWIN_ROOT_PATH$input_path"
50242     fi
50243   fi
50244 
50245 
50246   if test "x$path" != "x$new_path"; then
50247     MSVC_DLL="$new_path"
50248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50249 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50250   fi
50251 
50252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50253 
50254   path="$MSVC_DLL"
50255   has_colon=`$ECHO $path | $GREP ^.:`
50256   new_path="$path"
50257   if test "x$has_colon" = x; then
50258     # Not in mixed or Windows style, start by that.
50259     new_path=`cmd //c echo $path`
50260   fi
50261 
50262 
50263   input_path="$new_path"
50264   # Check if we need to convert this using DOS-style short mode. If the path
50265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50266   # take no chances and rewrite it.
50267   # Note: m4 eats our [], so we need to use [ and ] instead.
50268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50269   if test "x$has_forbidden_chars" != x; then
50270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50271     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50272   fi
50273 
50274 
50275   windows_path="$new_path"
50276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50277     unix_path=`$CYGPATH -u "$windows_path"`
50278     new_path="$unix_path"
50279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50281     new_path="$unix_path"
50282   fi
50283 
50284   if test "x$path" != "x$new_path"; then
50285     MSVC_DLL="$new_path"
50286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50287 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50288   fi
50289 
50290   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50291   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50292 
50293   else
50294     # We're on a posix platform. Hooray! :)
50295     path="$MSVC_DLL"
50296     has_space=`$ECHO "$path" | $GREP " "`
50297     if test "x$has_space" != x; then
50298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50299 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50300       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50301     fi
50302 
50303     # Use eval to expand a potential ~
50304     eval path="$path"
50305     if test ! -f "$path" && test ! -d "$path"; then
50306       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50307     fi
50308 
50309     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50310   fi
50311 
50312       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50313 $as_echo_n "checking for $DLL_NAME... " >&6; }
50314       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50315 $as_echo "$MSVC_DLL" >&6; }
50316     else
50317       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50318 $as_echo "incorrect, ignoring" >&6; }
50319       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50320 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50321     fi
50322   fi
50323 
50324   fi
50325 
50326   if test "x$MSVC_DLL" = x; then
50327     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50328     if test "x$VS100COMNTOOLS" != x; then
50329       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50330 
50331   windows_path="$CYGWIN_VS_TOOLS_DIR"
50332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50333     unix_path=`$CYGPATH -u "$windows_path"`
50334     CYGWIN_VS_TOOLS_DIR="$unix_path"
50335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50337     CYGWIN_VS_TOOLS_DIR="$unix_path"
50338   fi
50339 
50340       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50341         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50342             | $GREP -i /x64/ | $HEAD --lines 1`
50343       else
50344         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50345             | $GREP -i /x86/ | $HEAD --lines 1`
50346       fi
50347 
50348   DLL_NAME="$DLL_NAME"
50349   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50350   METHOD="search of VS100COMNTOOLS"
50351   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50352     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50353 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50354 
50355     # Need to check if the found msvcr is correct architecture
50356     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50357 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50358     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50359     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50360       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50361       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50362       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50363         CORRECT_MSVCR_ARCH="PE32 executable"
50364       else
50365         CORRECT_MSVCR_ARCH="PE32+ executable"
50366       fi
50367     else
50368       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50369         CORRECT_MSVCR_ARCH=386
50370       else
50371         CORRECT_MSVCR_ARCH=x86-64
50372       fi
50373     fi
50374     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50375       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50376 $as_echo "ok" >&6; }
50377       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50378 
50379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50380 
50381   # Input might be given as Windows format, start by converting to
50382   # unix format.
50383   path="$MSVC_DLL"
50384   new_path=`$CYGPATH -u "$path"`
50385 
50386   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50387   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50388   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50389   # "foo.exe" is OK but "foo" is an error.
50390   #
50391   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50392   # It is also a way to make sure we got the proper file name for the real test later on.
50393   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50394   if test "x$test_shortpath" = x; then
50395     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50396 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50397     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50398   fi
50399 
50400   # Call helper function which possibly converts this using DOS-style short mode.
50401   # If so, the updated path is stored in $new_path.
50402 
50403   input_path="$new_path"
50404   # Check if we need to convert this using DOS-style short mode. If the path
50405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50406   # take no chances and rewrite it.
50407   # Note: m4 eats our [], so we need to use [ and ] instead.
50408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50409   if test "x$has_forbidden_chars" != x; then
50410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50411     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50412     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50413     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50414       # Going to short mode and back again did indeed matter. Since short mode is
50415       # case insensitive, let's make it lowercase to improve readability.
50416       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50417       # Now convert it back to Unix-style (cygpath)
50418       input_path=`$CYGPATH -u "$shortmode_path"`
50419       new_path="$input_path"
50420     fi
50421   fi
50422 
50423   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50424   if test "x$test_cygdrive_prefix" = x; then
50425     # As a simple fix, exclude /usr/bin since it's not a real path.
50426     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50427       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50428       # a path prefixed by /cygdrive for fixpath to work.
50429       new_path="$CYGWIN_ROOT_PATH$input_path"
50430     fi
50431   fi
50432 
50433 
50434   if test "x$path" != "x$new_path"; then
50435     MSVC_DLL="$new_path"
50436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50437 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50438   fi
50439 
50440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50441 
50442   path="$MSVC_DLL"
50443   has_colon=`$ECHO $path | $GREP ^.:`
50444   new_path="$path"
50445   if test "x$has_colon" = x; then
50446     # Not in mixed or Windows style, start by that.
50447     new_path=`cmd //c echo $path`
50448   fi
50449 
50450 
50451   input_path="$new_path"
50452   # Check if we need to convert this using DOS-style short mode. If the path
50453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50454   # take no chances and rewrite it.
50455   # Note: m4 eats our [], so we need to use [ and ] instead.
50456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50457   if test "x$has_forbidden_chars" != x; then
50458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50459     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50460   fi
50461 
50462 
50463   windows_path="$new_path"
50464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50465     unix_path=`$CYGPATH -u "$windows_path"`
50466     new_path="$unix_path"
50467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50469     new_path="$unix_path"
50470   fi
50471 
50472   if test "x$path" != "x$new_path"; then
50473     MSVC_DLL="$new_path"
50474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50475 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50476   fi
50477 
50478   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50479   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50480 
50481   else
50482     # We're on a posix platform. Hooray! :)
50483     path="$MSVC_DLL"
50484     has_space=`$ECHO "$path" | $GREP " "`
50485     if test "x$has_space" != x; then
50486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50487 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50488       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50489     fi
50490 
50491     # Use eval to expand a potential ~
50492     eval path="$path"
50493     if test ! -f "$path" && test ! -d "$path"; then
50494       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50495     fi
50496 
50497     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50498   fi
50499 
50500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50501 $as_echo_n "checking for $DLL_NAME... " >&6; }
50502       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50503 $as_echo "$MSVC_DLL" >&6; }
50504     else
50505       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50506 $as_echo "incorrect, ignoring" >&6; }
50507       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50508 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50509     fi
50510   fi
50511 
50512     fi
50513   fi
50514 
50515   if test "x$MSVC_DLL" = x; then
50516     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50517     # (This was the original behaviour; kept since it might turn something up)
50518     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50519       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50520         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50521           | $GREP x64 | $HEAD --lines 1`
50522       else
50523         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50524           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50525         if test "x$POSSIBLE_MSVC_DLL" = x; then
50526           # We're grasping at straws now...
50527           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50528               | $HEAD --lines 1`
50529         fi
50530       fi
50531 
50532 
50533   DLL_NAME="$DLL_NAME"
50534   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50535   METHOD="search of VCINSTALLDIR"
50536   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50537     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50538 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50539 
50540     # Need to check if the found msvcr is correct architecture
50541     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50542 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50543     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50544     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50545       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50546       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50547       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50548         CORRECT_MSVCR_ARCH="PE32 executable"
50549       else
50550         CORRECT_MSVCR_ARCH="PE32+ executable"
50551       fi
50552     else
50553       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50554         CORRECT_MSVCR_ARCH=386
50555       else
50556         CORRECT_MSVCR_ARCH=x86-64
50557       fi
50558     fi
50559     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50560       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50561 $as_echo "ok" >&6; }
50562       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50563 
50564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50565 
50566   # Input might be given as Windows format, start by converting to
50567   # unix format.
50568   path="$MSVC_DLL"
50569   new_path=`$CYGPATH -u "$path"`
50570 
50571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50574   # "foo.exe" is OK but "foo" is an error.
50575   #
50576   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50577   # It is also a way to make sure we got the proper file name for the real test later on.
50578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50579   if test "x$test_shortpath" = x; then
50580     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50581 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50582     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50583   fi
50584 
50585   # Call helper function which possibly converts this using DOS-style short mode.
50586   # If so, the updated path is stored in $new_path.
50587 
50588   input_path="$new_path"
50589   # Check if we need to convert this using DOS-style short mode. If the path
50590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50591   # take no chances and rewrite it.
50592   # Note: m4 eats our [], so we need to use [ and ] instead.
50593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50594   if test "x$has_forbidden_chars" != x; then
50595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50599       # Going to short mode and back again did indeed matter. Since short mode is
50600       # case insensitive, let's make it lowercase to improve readability.
50601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50602       # Now convert it back to Unix-style (cygpath)
50603       input_path=`$CYGPATH -u "$shortmode_path"`
50604       new_path="$input_path"
50605     fi
50606   fi
50607 
50608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50609   if test "x$test_cygdrive_prefix" = x; then
50610     # As a simple fix, exclude /usr/bin since it's not a real path.
50611     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50613       # a path prefixed by /cygdrive for fixpath to work.
50614       new_path="$CYGWIN_ROOT_PATH$input_path"
50615     fi
50616   fi
50617 
50618 
50619   if test "x$path" != "x$new_path"; then
50620     MSVC_DLL="$new_path"
50621     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50622 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50623   fi
50624 
50625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50626 
50627   path="$MSVC_DLL"
50628   has_colon=`$ECHO $path | $GREP ^.:`
50629   new_path="$path"
50630   if test "x$has_colon" = x; then
50631     # Not in mixed or Windows style, start by that.
50632     new_path=`cmd //c echo $path`
50633   fi
50634 
50635 
50636   input_path="$new_path"
50637   # Check if we need to convert this using DOS-style short mode. If the path
50638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50639   # take no chances and rewrite it.
50640   # Note: m4 eats our [], so we need to use [ and ] instead.
50641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50642   if test "x$has_forbidden_chars" != x; then
50643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50645   fi
50646 
50647 
50648   windows_path="$new_path"
50649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50650     unix_path=`$CYGPATH -u "$windows_path"`
50651     new_path="$unix_path"
50652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50654     new_path="$unix_path"
50655   fi
50656 
50657   if test "x$path" != "x$new_path"; then
50658     MSVC_DLL="$new_path"
50659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50660 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50661   fi
50662 
50663   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50664   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50665 
50666   else
50667     # We're on a posix platform. Hooray! :)
50668     path="$MSVC_DLL"
50669     has_space=`$ECHO "$path" | $GREP " "`
50670     if test "x$has_space" != x; then
50671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50672 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50673       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50674     fi
50675 
50676     # Use eval to expand a potential ~
50677     eval path="$path"
50678     if test ! -f "$path" && test ! -d "$path"; then
50679       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50680     fi
50681 
50682     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50683   fi
50684 
50685       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50686 $as_echo_n "checking for $DLL_NAME... " >&6; }
50687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50688 $as_echo "$MSVC_DLL" >&6; }
50689     else
50690       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50691 $as_echo "incorrect, ignoring" >&6; }
50692       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50693 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50694     fi
50695   fi
50696 
50697     fi
50698   fi
50699 
50700   if test "x$MSVC_DLL" = x; then
50701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50702 $as_echo_n "checking for $DLL_NAME... " >&6; }
50703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50704 $as_echo "no" >&6; }
50705     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50706   fi
50707 
50708     MSVCR_DLL="$MSVC_DLL"
50709   fi
50710 
50711 
50712 
50713 # Check whether --with-msvcp-dll was given.
50714 if test "${with_msvcp_dll+set}" = set; then :
50715   withval=$with_msvcp_dll;
50716 fi
50717 
50718 
50719   if test "x$MSVCP_NAME" != "x"; then
50720     if test "x$with_msvcp_dll" != x; then
50721       # If given explicitely by user, do not probe. If not present, fail directly.
50722 
50723   DLL_NAME="$MSVCP_NAME"
50724   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50725   METHOD="--with-msvcp-dll"
50726   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50727     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50728 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50729 
50730     # Need to check if the found msvcr is correct architecture
50731     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50732 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50733     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50734     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50735       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50736       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50737       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50738         CORRECT_MSVCR_ARCH="PE32 executable"
50739       else
50740         CORRECT_MSVCR_ARCH="PE32+ executable"
50741       fi
50742     else
50743       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50744         CORRECT_MSVCR_ARCH=386
50745       else
50746         CORRECT_MSVCR_ARCH=x86-64
50747       fi
50748     fi
50749     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50750       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50751 $as_echo "ok" >&6; }
50752       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50753 
50754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50755 
50756   # Input might be given as Windows format, start by converting to
50757   # unix format.
50758   path="$MSVC_DLL"
50759   new_path=`$CYGPATH -u "$path"`
50760 
50761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50764   # "foo.exe" is OK but "foo" is an error.
50765   #
50766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50767   # It is also a way to make sure we got the proper file name for the real test later on.
50768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50769   if test "x$test_shortpath" = x; then
50770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50771 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50772     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50773   fi
50774 
50775   # Call helper function which possibly converts this using DOS-style short mode.
50776   # If so, the updated path is stored in $new_path.
50777 
50778   input_path="$new_path"
50779   # Check if we need to convert this using DOS-style short mode. If the path
50780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50781   # take no chances and rewrite it.
50782   # Note: m4 eats our [], so we need to use [ and ] instead.
50783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50784   if test "x$has_forbidden_chars" != x; then
50785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50789       # Going to short mode and back again did indeed matter. Since short mode is
50790       # case insensitive, let's make it lowercase to improve readability.
50791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50792       # Now convert it back to Unix-style (cygpath)
50793       input_path=`$CYGPATH -u "$shortmode_path"`
50794       new_path="$input_path"
50795     fi
50796   fi
50797 
50798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50799   if test "x$test_cygdrive_prefix" = x; then
50800     # As a simple fix, exclude /usr/bin since it's not a real path.
50801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50803       # a path prefixed by /cygdrive for fixpath to work.
50804       new_path="$CYGWIN_ROOT_PATH$input_path"
50805     fi
50806   fi
50807 
50808 
50809   if test "x$path" != "x$new_path"; then
50810     MSVC_DLL="$new_path"
50811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50812 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50813   fi
50814 
50815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50816 
50817   path="$MSVC_DLL"
50818   has_colon=`$ECHO $path | $GREP ^.:`
50819   new_path="$path"
50820   if test "x$has_colon" = x; then
50821     # Not in mixed or Windows style, start by that.
50822     new_path=`cmd //c echo $path`
50823   fi
50824 
50825 
50826   input_path="$new_path"
50827   # Check if we need to convert this using DOS-style short mode. If the path
50828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50829   # take no chances and rewrite it.
50830   # Note: m4 eats our [], so we need to use [ and ] instead.
50831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50832   if test "x$has_forbidden_chars" != x; then
50833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50835   fi
50836 
50837 
50838   windows_path="$new_path"
50839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50840     unix_path=`$CYGPATH -u "$windows_path"`
50841     new_path="$unix_path"
50842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50844     new_path="$unix_path"
50845   fi
50846 
50847   if test "x$path" != "x$new_path"; then
50848     MSVC_DLL="$new_path"
50849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50850 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50851   fi
50852 
50853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50855 
50856   else
50857     # We're on a posix platform. Hooray! :)
50858     path="$MSVC_DLL"
50859     has_space=`$ECHO "$path" | $GREP " "`
50860     if test "x$has_space" != x; then
50861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50862 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50863       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50864     fi
50865 
50866     # Use eval to expand a potential ~
50867     eval path="$path"
50868     if test ! -f "$path" && test ! -d "$path"; then
50869       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50870     fi
50871 
50872     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50873   fi
50874 
50875       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50876 $as_echo_n "checking for $DLL_NAME... " >&6; }
50877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50878 $as_echo "$MSVC_DLL" >&6; }
50879     else
50880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50881 $as_echo "incorrect, ignoring" >&6; }
50882       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50883 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50884     fi
50885   fi
50886 
50887       if test "x$MSVC_DLL" = x; then
50888         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50889       fi
50890       MSVCP_DLL="$MSVC_DLL"
50891     elif test "x$DEVKIT_MSVCP_DLL" != x; then
50892 
50893   DLL_NAME="$MSVCP_NAME"
50894   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50895   METHOD="devkit"
50896   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50897     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50898 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50899 
50900     # Need to check if the found msvcr is correct architecture
50901     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50902 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50903     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50904     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50905       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50906       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50907       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50908         CORRECT_MSVCR_ARCH="PE32 executable"
50909       else
50910         CORRECT_MSVCR_ARCH="PE32+ executable"
50911       fi
50912     else
50913       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50914         CORRECT_MSVCR_ARCH=386
50915       else
50916         CORRECT_MSVCR_ARCH=x86-64
50917       fi
50918     fi
50919     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50921 $as_echo "ok" >&6; }
50922       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50923 
50924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50925 
50926   # Input might be given as Windows format, start by converting to
50927   # unix format.
50928   path="$MSVC_DLL"
50929   new_path=`$CYGPATH -u "$path"`
50930 
50931   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50932   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50933   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50934   # "foo.exe" is OK but "foo" is an error.
50935   #
50936   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50937   # It is also a way to make sure we got the proper file name for the real test later on.
50938   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50939   if test "x$test_shortpath" = x; then
50940     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50941 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50942     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50943   fi
50944 
50945   # Call helper function which possibly converts this using DOS-style short mode.
50946   # If so, the updated path is stored in $new_path.
50947 
50948   input_path="$new_path"
50949   # Check if we need to convert this using DOS-style short mode. If the path
50950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50951   # take no chances and rewrite it.
50952   # Note: m4 eats our [], so we need to use [ and ] instead.
50953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50954   if test "x$has_forbidden_chars" != x; then
50955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50956     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50957     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50958     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50959       # Going to short mode and back again did indeed matter. Since short mode is
50960       # case insensitive, let's make it lowercase to improve readability.
50961       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50962       # Now convert it back to Unix-style (cygpath)
50963       input_path=`$CYGPATH -u "$shortmode_path"`
50964       new_path="$input_path"
50965     fi
50966   fi
50967 
50968   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50969   if test "x$test_cygdrive_prefix" = x; then
50970     # As a simple fix, exclude /usr/bin since it's not a real path.
50971     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50972       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50973       # a path prefixed by /cygdrive for fixpath to work.
50974       new_path="$CYGWIN_ROOT_PATH$input_path"
50975     fi
50976   fi
50977 
50978 
50979   if test "x$path" != "x$new_path"; then
50980     MSVC_DLL="$new_path"
50981     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50982 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50983   fi
50984 
50985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50986 
50987   path="$MSVC_DLL"
50988   has_colon=`$ECHO $path | $GREP ^.:`
50989   new_path="$path"
50990   if test "x$has_colon" = x; then
50991     # Not in mixed or Windows style, start by that.
50992     new_path=`cmd //c echo $path`
50993   fi
50994 
50995 
50996   input_path="$new_path"
50997   # Check if we need to convert this using DOS-style short mode. If the path
50998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50999   # take no chances and rewrite it.
51000   # Note: m4 eats our [], so we need to use [ and ] instead.
51001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51002   if test "x$has_forbidden_chars" != x; then
51003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51004     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51005   fi
51006 
51007 
51008   windows_path="$new_path"
51009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51010     unix_path=`$CYGPATH -u "$windows_path"`
51011     new_path="$unix_path"
51012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51014     new_path="$unix_path"
51015   fi
51016 
51017   if test "x$path" != "x$new_path"; then
51018     MSVC_DLL="$new_path"
51019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51020 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51021   fi
51022 
51023   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51024   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51025 
51026   else
51027     # We're on a posix platform. Hooray! :)
51028     path="$MSVC_DLL"
51029     has_space=`$ECHO "$path" | $GREP " "`
51030     if test "x$has_space" != x; then
51031       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51032 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51033       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51034     fi
51035 
51036     # Use eval to expand a potential ~
51037     eval path="$path"
51038     if test ! -f "$path" && test ! -d "$path"; then
51039       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51040     fi
51041 
51042     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51043   fi
51044 
51045       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51046 $as_echo_n "checking for $DLL_NAME... " >&6; }
51047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51048 $as_echo "$MSVC_DLL" >&6; }
51049     else
51050       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51051 $as_echo "incorrect, ignoring" >&6; }
51052       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51053 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51054     fi
51055   fi
51056 
51057       if test "x$MSVC_DLL" = x; then
51058         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51059       fi
51060       MSVCP_DLL="$MSVC_DLL"
51061     else
51062 
51063   DLL_NAME="${MSVCP_NAME}"
51064   MSVC_DLL=
51065 
51066   if test "x$MSVC_DLL" = x; then
51067     if test "x$VCINSTALLDIR" != x; then
51068       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51069 
51070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51071 
51072   # Input might be given as Windows format, start by converting to
51073   # unix format.
51074   path="$CYGWIN_VC_INSTALL_DIR"
51075   new_path=`$CYGPATH -u "$path"`
51076 
51077   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51078   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51079   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51080   # "foo.exe" is OK but "foo" is an error.
51081   #
51082   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51083   # It is also a way to make sure we got the proper file name for the real test later on.
51084   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51085   if test "x$test_shortpath" = x; then
51086     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
51087 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
51088     as_fn_error $? "Cannot locate the the path of CYGWIN_VC_INSTALL_DIR" "$LINENO" 5
51089   fi
51090 
51091   # Call helper function which possibly converts this using DOS-style short mode.
51092   # If so, the updated path is stored in $new_path.
51093 
51094   input_path="$new_path"
51095   # Check if we need to convert this using DOS-style short mode. If the path
51096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51097   # take no chances and rewrite it.
51098   # Note: m4 eats our [], so we need to use [ and ] instead.
51099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51100   if test "x$has_forbidden_chars" != x; then
51101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51102     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51103     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51104     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51105       # Going to short mode and back again did indeed matter. Since short mode is
51106       # case insensitive, let's make it lowercase to improve readability.
51107       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51108       # Now convert it back to Unix-style (cygpath)
51109       input_path=`$CYGPATH -u "$shortmode_path"`
51110       new_path="$input_path"
51111     fi
51112   fi
51113 
51114   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51115   if test "x$test_cygdrive_prefix" = x; then
51116     # As a simple fix, exclude /usr/bin since it's not a real path.
51117     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51118       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51119       # a path prefixed by /cygdrive for fixpath to work.
51120       new_path="$CYGWIN_ROOT_PATH$input_path"
51121     fi
51122   fi
51123 
51124 
51125   if test "x$path" != "x$new_path"; then
51126     CYGWIN_VC_INSTALL_DIR="$new_path"
51127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
51128 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
51129   fi
51130 
51131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51132 
51133   path="$CYGWIN_VC_INSTALL_DIR"
51134   has_colon=`$ECHO $path | $GREP ^.:`
51135   new_path="$path"
51136   if test "x$has_colon" = x; then
51137     # Not in mixed or Windows style, start by that.
51138     new_path=`cmd //c echo $path`
51139   fi
51140 
51141 
51142   input_path="$new_path"
51143   # Check if we need to convert this using DOS-style short mode. If the path
51144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51145   # take no chances and rewrite it.
51146   # Note: m4 eats our [], so we need to use [ and ] instead.
51147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51148   if test "x$has_forbidden_chars" != x; then
51149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51151   fi
51152 
51153 
51154   windows_path="$new_path"
51155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51156     unix_path=`$CYGPATH -u "$windows_path"`
51157     new_path="$unix_path"
51158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51160     new_path="$unix_path"
51161   fi
51162 
51163   if test "x$path" != "x$new_path"; then
51164     CYGWIN_VC_INSTALL_DIR="$new_path"
51165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&5
51166 $as_echo "$as_me: Rewriting CYGWIN_VC_INSTALL_DIR to \"$new_path\"" >&6;}
51167   fi
51168 
51169   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51170   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51171 
51172   else
51173     # We're on a posix platform. Hooray! :)
51174     path="$CYGWIN_VC_INSTALL_DIR"
51175     has_space=`$ECHO "$path" | $GREP " "`
51176     if test "x$has_space" != x; then
51177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&5
51178 $as_echo "$as_me: The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is invalid." >&6;}
51179       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51180     fi
51181 
51182     # Use eval to expand a potential ~
51183     eval path="$path"
51184     if test ! -f "$path" && test ! -d "$path"; then
51185       as_fn_error $? "The path of CYGWIN_VC_INSTALL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
51186     fi
51187 
51188     CYGWIN_VC_INSTALL_DIR="`cd "$path"; $THEPWDCMD -L`"
51189   fi
51190 
51191       if test "$VS_VERSION" -lt 2017; then
51192         # Probe: Using well-known location from Visual Studio 12.0 and older
51193         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51194           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51195         else
51196           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51197         fi
51198       else
51199         # Probe: Using well-known location from VS 2017
51200         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51201           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
51202         else
51203           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
51204         fi
51205       fi
51206       # In case any of the above finds more than one file, loop over them.
51207       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
51208         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
51209 
51210   DLL_NAME="$DLL_NAME"
51211   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
51212   METHOD="well-known location in VCINSTALLDIR"
51213   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51214     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51215 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51216 
51217     # Need to check if the found msvcr is correct architecture
51218     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51219 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51220     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51221     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51222       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51223       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51224       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51225         CORRECT_MSVCR_ARCH="PE32 executable"
51226       else
51227         CORRECT_MSVCR_ARCH="PE32+ executable"
51228       fi
51229     else
51230       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51231         CORRECT_MSVCR_ARCH=386
51232       else
51233         CORRECT_MSVCR_ARCH=x86-64
51234       fi
51235     fi
51236     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51237       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51238 $as_echo "ok" >&6; }
51239       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51240 
51241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51242 
51243   # Input might be given as Windows format, start by converting to
51244   # unix format.
51245   path="$MSVC_DLL"
51246   new_path=`$CYGPATH -u "$path"`
51247 
51248   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51249   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51250   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51251   # "foo.exe" is OK but "foo" is an error.
51252   #
51253   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51254   # It is also a way to make sure we got the proper file name for the real test later on.
51255   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51256   if test "x$test_shortpath" = x; then
51257     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51258 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51259     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51260   fi
51261 
51262   # Call helper function which possibly converts this using DOS-style short mode.
51263   # If so, the updated path is stored in $new_path.
51264 
51265   input_path="$new_path"
51266   # Check if we need to convert this using DOS-style short mode. If the path
51267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51268   # take no chances and rewrite it.
51269   # Note: m4 eats our [], so we need to use [ and ] instead.
51270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51271   if test "x$has_forbidden_chars" != x; then
51272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51276       # Going to short mode and back again did indeed matter. Since short mode is
51277       # case insensitive, let's make it lowercase to improve readability.
51278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51279       # Now convert it back to Unix-style (cygpath)
51280       input_path=`$CYGPATH -u "$shortmode_path"`
51281       new_path="$input_path"
51282     fi
51283   fi
51284 
51285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51286   if test "x$test_cygdrive_prefix" = x; then
51287     # As a simple fix, exclude /usr/bin since it's not a real path.
51288     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51290       # a path prefixed by /cygdrive for fixpath to work.
51291       new_path="$CYGWIN_ROOT_PATH$input_path"
51292     fi
51293   fi
51294 
51295 
51296   if test "x$path" != "x$new_path"; then
51297     MSVC_DLL="$new_path"
51298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51299 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51300   fi
51301 
51302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51303 
51304   path="$MSVC_DLL"
51305   has_colon=`$ECHO $path | $GREP ^.:`
51306   new_path="$path"
51307   if test "x$has_colon" = x; then
51308     # Not in mixed or Windows style, start by that.
51309     new_path=`cmd //c echo $path`
51310   fi
51311 
51312 
51313   input_path="$new_path"
51314   # Check if we need to convert this using DOS-style short mode. If the path
51315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51316   # take no chances and rewrite it.
51317   # Note: m4 eats our [], so we need to use [ and ] instead.
51318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51319   if test "x$has_forbidden_chars" != x; then
51320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51321     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51322   fi
51323 
51324 
51325   windows_path="$new_path"
51326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51327     unix_path=`$CYGPATH -u "$windows_path"`
51328     new_path="$unix_path"
51329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51331     new_path="$unix_path"
51332   fi
51333 
51334   if test "x$path" != "x$new_path"; then
51335     MSVC_DLL="$new_path"
51336     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51337 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51338   fi
51339 
51340   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51341   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51342 
51343   else
51344     # We're on a posix platform. Hooray! :)
51345     path="$MSVC_DLL"
51346     has_space=`$ECHO "$path" | $GREP " "`
51347     if test "x$has_space" != x; then
51348       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51349 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51350       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51351     fi
51352 
51353     # Use eval to expand a potential ~
51354     eval path="$path"
51355     if test ! -f "$path" && test ! -d "$path"; then
51356       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51357     fi
51358 
51359     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51360   fi
51361 
51362       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51363 $as_echo_n "checking for $DLL_NAME... " >&6; }
51364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51365 $as_echo "$MSVC_DLL" >&6; }
51366     else
51367       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51368 $as_echo "incorrect, ignoring" >&6; }
51369       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51370 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51371     fi
51372   fi
51373 
51374       done
51375     fi
51376   fi
51377 
51378   if test "x$MSVC_DLL" = x; then
51379     # Probe: Check in the Boot JDK directory.
51380     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51381 
51382   DLL_NAME="$DLL_NAME"
51383   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51384   METHOD="well-known location in Boot JDK"
51385   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51386     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51387 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51388 
51389     # Need to check if the found msvcr is correct architecture
51390     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51391 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51392     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51393     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51394       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51395       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51396       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51397         CORRECT_MSVCR_ARCH="PE32 executable"
51398       else
51399         CORRECT_MSVCR_ARCH="PE32+ executable"
51400       fi
51401     else
51402       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51403         CORRECT_MSVCR_ARCH=386
51404       else
51405         CORRECT_MSVCR_ARCH=x86-64
51406       fi
51407     fi
51408     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51409       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51410 $as_echo "ok" >&6; }
51411       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51412 
51413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51414 
51415   # Input might be given as Windows format, start by converting to
51416   # unix format.
51417   path="$MSVC_DLL"
51418   new_path=`$CYGPATH -u "$path"`
51419 
51420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51423   # "foo.exe" is OK but "foo" is an error.
51424   #
51425   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51426   # It is also a way to make sure we got the proper file name for the real test later on.
51427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51428   if test "x$test_shortpath" = x; then
51429     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51430 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51431     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51432   fi
51433 
51434   # Call helper function which possibly converts this using DOS-style short mode.
51435   # If so, the updated path is stored in $new_path.
51436 
51437   input_path="$new_path"
51438   # Check if we need to convert this using DOS-style short mode. If the path
51439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51440   # take no chances and rewrite it.
51441   # Note: m4 eats our [], so we need to use [ and ] instead.
51442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51443   if test "x$has_forbidden_chars" != x; then
51444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51445     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51446     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51447     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51448       # Going to short mode and back again did indeed matter. Since short mode is
51449       # case insensitive, let's make it lowercase to improve readability.
51450       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51451       # Now convert it back to Unix-style (cygpath)
51452       input_path=`$CYGPATH -u "$shortmode_path"`
51453       new_path="$input_path"
51454     fi
51455   fi
51456 
51457   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51458   if test "x$test_cygdrive_prefix" = x; then
51459     # As a simple fix, exclude /usr/bin since it's not a real path.
51460     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51461       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51462       # a path prefixed by /cygdrive for fixpath to work.
51463       new_path="$CYGWIN_ROOT_PATH$input_path"
51464     fi
51465   fi
51466 
51467 
51468   if test "x$path" != "x$new_path"; then
51469     MSVC_DLL="$new_path"
51470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51471 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51472   fi
51473 
51474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51475 
51476   path="$MSVC_DLL"
51477   has_colon=`$ECHO $path | $GREP ^.:`
51478   new_path="$path"
51479   if test "x$has_colon" = x; then
51480     # Not in mixed or Windows style, start by that.
51481     new_path=`cmd //c echo $path`
51482   fi
51483 
51484 
51485   input_path="$new_path"
51486   # Check if we need to convert this using DOS-style short mode. If the path
51487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51488   # take no chances and rewrite it.
51489   # Note: m4 eats our [], so we need to use [ and ] instead.
51490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51491   if test "x$has_forbidden_chars" != x; then
51492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51494   fi
51495 
51496 
51497   windows_path="$new_path"
51498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51499     unix_path=`$CYGPATH -u "$windows_path"`
51500     new_path="$unix_path"
51501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51503     new_path="$unix_path"
51504   fi
51505 
51506   if test "x$path" != "x$new_path"; then
51507     MSVC_DLL="$new_path"
51508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51509 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51510   fi
51511 
51512   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51513   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51514 
51515   else
51516     # We're on a posix platform. Hooray! :)
51517     path="$MSVC_DLL"
51518     has_space=`$ECHO "$path" | $GREP " "`
51519     if test "x$has_space" != x; then
51520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51521 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51522       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51523     fi
51524 
51525     # Use eval to expand a potential ~
51526     eval path="$path"
51527     if test ! -f "$path" && test ! -d "$path"; then
51528       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51529     fi
51530 
51531     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51532   fi
51533 
51534       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51535 $as_echo_n "checking for $DLL_NAME... " >&6; }
51536       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51537 $as_echo "$MSVC_DLL" >&6; }
51538     else
51539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51540 $as_echo "incorrect, ignoring" >&6; }
51541       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51542 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51543     fi
51544   fi
51545 
51546   fi
51547 
51548   if test "x$MSVC_DLL" = x; then
51549     # Probe: Look in the Windows system32 directory
51550     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51551 
51552   windows_path="$CYGWIN_SYSTEMROOT"
51553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51554     unix_path=`$CYGPATH -u "$windows_path"`
51555     CYGWIN_SYSTEMROOT="$unix_path"
51556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51558     CYGWIN_SYSTEMROOT="$unix_path"
51559   fi
51560 
51561     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51562 
51563   DLL_NAME="$DLL_NAME"
51564   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51565   METHOD="well-known location in SYSTEMROOT"
51566   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51567     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51568 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51569 
51570     # Need to check if the found msvcr is correct architecture
51571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51572 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51573     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51574     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51575       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51576       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51577       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51578         CORRECT_MSVCR_ARCH="PE32 executable"
51579       else
51580         CORRECT_MSVCR_ARCH="PE32+ executable"
51581       fi
51582     else
51583       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51584         CORRECT_MSVCR_ARCH=386
51585       else
51586         CORRECT_MSVCR_ARCH=x86-64
51587       fi
51588     fi
51589     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51590       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51591 $as_echo "ok" >&6; }
51592       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51593 
51594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51595 
51596   # Input might be given as Windows format, start by converting to
51597   # unix format.
51598   path="$MSVC_DLL"
51599   new_path=`$CYGPATH -u "$path"`
51600 
51601   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51602   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51603   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51604   # "foo.exe" is OK but "foo" is an error.
51605   #
51606   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51607   # It is also a way to make sure we got the proper file name for the real test later on.
51608   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51609   if test "x$test_shortpath" = x; then
51610     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51611 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51612     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51613   fi
51614 
51615   # Call helper function which possibly converts this using DOS-style short mode.
51616   # If so, the updated path is stored in $new_path.
51617 
51618   input_path="$new_path"
51619   # Check if we need to convert this using DOS-style short mode. If the path
51620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51621   # take no chances and rewrite it.
51622   # Note: m4 eats our [], so we need to use [ and ] instead.
51623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51624   if test "x$has_forbidden_chars" != x; then
51625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51626     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51627     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51628     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51629       # Going to short mode and back again did indeed matter. Since short mode is
51630       # case insensitive, let's make it lowercase to improve readability.
51631       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51632       # Now convert it back to Unix-style (cygpath)
51633       input_path=`$CYGPATH -u "$shortmode_path"`
51634       new_path="$input_path"
51635     fi
51636   fi
51637 
51638   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51639   if test "x$test_cygdrive_prefix" = x; then
51640     # As a simple fix, exclude /usr/bin since it's not a real path.
51641     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51642       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51643       # a path prefixed by /cygdrive for fixpath to work.
51644       new_path="$CYGWIN_ROOT_PATH$input_path"
51645     fi
51646   fi
51647 
51648 
51649   if test "x$path" != "x$new_path"; then
51650     MSVC_DLL="$new_path"
51651     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51652 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51653   fi
51654 
51655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51656 
51657   path="$MSVC_DLL"
51658   has_colon=`$ECHO $path | $GREP ^.:`
51659   new_path="$path"
51660   if test "x$has_colon" = x; then
51661     # Not in mixed or Windows style, start by that.
51662     new_path=`cmd //c echo $path`
51663   fi
51664 
51665 
51666   input_path="$new_path"
51667   # Check if we need to convert this using DOS-style short mode. If the path
51668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51669   # take no chances and rewrite it.
51670   # Note: m4 eats our [], so we need to use [ and ] instead.
51671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51672   if test "x$has_forbidden_chars" != x; then
51673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51675   fi
51676 
51677 
51678   windows_path="$new_path"
51679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51680     unix_path=`$CYGPATH -u "$windows_path"`
51681     new_path="$unix_path"
51682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51684     new_path="$unix_path"
51685   fi
51686 
51687   if test "x$path" != "x$new_path"; then
51688     MSVC_DLL="$new_path"
51689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51690 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51691   fi
51692 
51693   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51694   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51695 
51696   else
51697     # We're on a posix platform. Hooray! :)
51698     path="$MSVC_DLL"
51699     has_space=`$ECHO "$path" | $GREP " "`
51700     if test "x$has_space" != x; then
51701       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51702 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51703       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51704     fi
51705 
51706     # Use eval to expand a potential ~
51707     eval path="$path"
51708     if test ! -f "$path" && test ! -d "$path"; then
51709       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51710     fi
51711 
51712     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51713   fi
51714 
51715       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51716 $as_echo_n "checking for $DLL_NAME... " >&6; }
51717       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51718 $as_echo "$MSVC_DLL" >&6; }
51719     else
51720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51721 $as_echo "incorrect, ignoring" >&6; }
51722       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51723 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51724     fi
51725   fi
51726 
51727   fi
51728 
51729   if test "x$MSVC_DLL" = x; then
51730     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51731     if test "x$VS100COMNTOOLS" != x; then
51732       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51733 
51734   windows_path="$CYGWIN_VS_TOOLS_DIR"
51735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51736     unix_path=`$CYGPATH -u "$windows_path"`
51737     CYGWIN_VS_TOOLS_DIR="$unix_path"
51738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51740     CYGWIN_VS_TOOLS_DIR="$unix_path"
51741   fi
51742 
51743       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51744         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51745             | $GREP -i /x64/ | $HEAD --lines 1`
51746       else
51747         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51748             | $GREP -i /x86/ | $HEAD --lines 1`
51749       fi
51750 
51751   DLL_NAME="$DLL_NAME"
51752   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51753   METHOD="search of VS100COMNTOOLS"
51754   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51755     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51756 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51757 
51758     # Need to check if the found msvcr is correct architecture
51759     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51760 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51761     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51762     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51763       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51764       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51765       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51766         CORRECT_MSVCR_ARCH="PE32 executable"
51767       else
51768         CORRECT_MSVCR_ARCH="PE32+ executable"
51769       fi
51770     else
51771       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51772         CORRECT_MSVCR_ARCH=386
51773       else
51774         CORRECT_MSVCR_ARCH=x86-64
51775       fi
51776     fi
51777     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51778       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51779 $as_echo "ok" >&6; }
51780       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51781 
51782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51783 
51784   # Input might be given as Windows format, start by converting to
51785   # unix format.
51786   path="$MSVC_DLL"
51787   new_path=`$CYGPATH -u "$path"`
51788 
51789   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51790   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51791   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51792   # "foo.exe" is OK but "foo" is an error.
51793   #
51794   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51795   # It is also a way to make sure we got the proper file name for the real test later on.
51796   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51797   if test "x$test_shortpath" = x; then
51798     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51799 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51800     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51801   fi
51802 
51803   # Call helper function which possibly converts this using DOS-style short mode.
51804   # If so, the updated path is stored in $new_path.
51805 
51806   input_path="$new_path"
51807   # Check if we need to convert this using DOS-style short mode. If the path
51808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51809   # take no chances and rewrite it.
51810   # Note: m4 eats our [], so we need to use [ and ] instead.
51811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51812   if test "x$has_forbidden_chars" != x; then
51813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51817       # Going to short mode and back again did indeed matter. Since short mode is
51818       # case insensitive, let's make it lowercase to improve readability.
51819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51820       # Now convert it back to Unix-style (cygpath)
51821       input_path=`$CYGPATH -u "$shortmode_path"`
51822       new_path="$input_path"
51823     fi
51824   fi
51825 
51826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51827   if test "x$test_cygdrive_prefix" = x; then
51828     # As a simple fix, exclude /usr/bin since it's not a real path.
51829     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51831       # a path prefixed by /cygdrive for fixpath to work.
51832       new_path="$CYGWIN_ROOT_PATH$input_path"
51833     fi
51834   fi
51835 
51836 
51837   if test "x$path" != "x$new_path"; then
51838     MSVC_DLL="$new_path"
51839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51840 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51841   fi
51842 
51843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51844 
51845   path="$MSVC_DLL"
51846   has_colon=`$ECHO $path | $GREP ^.:`
51847   new_path="$path"
51848   if test "x$has_colon" = x; then
51849     # Not in mixed or Windows style, start by that.
51850     new_path=`cmd //c echo $path`
51851   fi
51852 
51853 
51854   input_path="$new_path"
51855   # Check if we need to convert this using DOS-style short mode. If the path
51856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51857   # take no chances and rewrite it.
51858   # Note: m4 eats our [], so we need to use [ and ] instead.
51859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51860   if test "x$has_forbidden_chars" != x; then
51861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51863   fi
51864 
51865 
51866   windows_path="$new_path"
51867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51868     unix_path=`$CYGPATH -u "$windows_path"`
51869     new_path="$unix_path"
51870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51872     new_path="$unix_path"
51873   fi
51874 
51875   if test "x$path" != "x$new_path"; then
51876     MSVC_DLL="$new_path"
51877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51878 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51879   fi
51880 
51881   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51882   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51883 
51884   else
51885     # We're on a posix platform. Hooray! :)
51886     path="$MSVC_DLL"
51887     has_space=`$ECHO "$path" | $GREP " "`
51888     if test "x$has_space" != x; then
51889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51890 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51891       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51892     fi
51893 
51894     # Use eval to expand a potential ~
51895     eval path="$path"
51896     if test ! -f "$path" && test ! -d "$path"; then
51897       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51898     fi
51899 
51900     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51901   fi
51902 
51903       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51904 $as_echo_n "checking for $DLL_NAME... " >&6; }
51905       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51906 $as_echo "$MSVC_DLL" >&6; }
51907     else
51908       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51909 $as_echo "incorrect, ignoring" >&6; }
51910       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51911 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51912     fi
51913   fi
51914 
51915     fi
51916   fi
51917 
51918   if test "x$MSVC_DLL" = x; then
51919     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51920     # (This was the original behaviour; kept since it might turn something up)
51921     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51922       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51923         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51924           | $GREP x64 | $HEAD --lines 1`
51925       else
51926         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51927           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51928         if test "x$POSSIBLE_MSVC_DLL" = x; then
51929           # We're grasping at straws now...
51930           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51931               | $HEAD --lines 1`
51932         fi
51933       fi
51934 
51935 
51936   DLL_NAME="$DLL_NAME"
51937   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51938   METHOD="search of VCINSTALLDIR"
51939   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51940     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51941 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51942 
51943     # Need to check if the found msvcr is correct architecture
51944     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51945 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51946     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51947     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51948       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51949       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51950       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51951         CORRECT_MSVCR_ARCH="PE32 executable"
51952       else
51953         CORRECT_MSVCR_ARCH="PE32+ executable"
51954       fi
51955     else
51956       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51957         CORRECT_MSVCR_ARCH=386
51958       else
51959         CORRECT_MSVCR_ARCH=x86-64
51960       fi
51961     fi
51962     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51964 $as_echo "ok" >&6; }
51965       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51966 
51967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51968 
51969   # Input might be given as Windows format, start by converting to
51970   # unix format.
51971   path="$MSVC_DLL"
51972   new_path=`$CYGPATH -u "$path"`
51973 
51974   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51975   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51976   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51977   # "foo.exe" is OK but "foo" is an error.
51978   #
51979   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51980   # It is also a way to make sure we got the proper file name for the real test later on.
51981   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51982   if test "x$test_shortpath" = x; then
51983     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51984 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51985     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51986   fi
51987 
51988   # Call helper function which possibly converts this using DOS-style short mode.
51989   # If so, the updated path is stored in $new_path.
51990 
51991   input_path="$new_path"
51992   # Check if we need to convert this using DOS-style short mode. If the path
51993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51994   # take no chances and rewrite it.
51995   # Note: m4 eats our [], so we need to use [ and ] instead.
51996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51997   if test "x$has_forbidden_chars" != x; then
51998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51999     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52000     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52001     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52002       # Going to short mode and back again did indeed matter. Since short mode is
52003       # case insensitive, let's make it lowercase to improve readability.
52004       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52005       # Now convert it back to Unix-style (cygpath)
52006       input_path=`$CYGPATH -u "$shortmode_path"`
52007       new_path="$input_path"
52008     fi
52009   fi
52010 
52011   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52012   if test "x$test_cygdrive_prefix" = x; then
52013     # As a simple fix, exclude /usr/bin since it's not a real path.
52014     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52015       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52016       # a path prefixed by /cygdrive for fixpath to work.
52017       new_path="$CYGWIN_ROOT_PATH$input_path"
52018     fi
52019   fi
52020 
52021 
52022   if test "x$path" != "x$new_path"; then
52023     MSVC_DLL="$new_path"
52024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52025 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52026   fi
52027 
52028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52029 
52030   path="$MSVC_DLL"
52031   has_colon=`$ECHO $path | $GREP ^.:`
52032   new_path="$path"
52033   if test "x$has_colon" = x; then
52034     # Not in mixed or Windows style, start by that.
52035     new_path=`cmd //c echo $path`
52036   fi
52037 
52038 
52039   input_path="$new_path"
52040   # Check if we need to convert this using DOS-style short mode. If the path
52041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52042   # take no chances and rewrite it.
52043   # Note: m4 eats our [], so we need to use [ and ] instead.
52044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52045   if test "x$has_forbidden_chars" != x; then
52046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52048   fi
52049 
52050 
52051   windows_path="$new_path"
52052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52053     unix_path=`$CYGPATH -u "$windows_path"`
52054     new_path="$unix_path"
52055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52056     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52057     new_path="$unix_path"
52058   fi
52059 
52060   if test "x$path" != "x$new_path"; then
52061     MSVC_DLL="$new_path"
52062     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52063 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52064   fi
52065 
52066   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52067   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52068 
52069   else
52070     # We're on a posix platform. Hooray! :)
52071     path="$MSVC_DLL"
52072     has_space=`$ECHO "$path" | $GREP " "`
52073     if test "x$has_space" != x; then
52074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52075 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52076       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52077     fi
52078 
52079     # Use eval to expand a potential ~
52080     eval path="$path"
52081     if test ! -f "$path" && test ! -d "$path"; then
52082       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52083     fi
52084 
52085     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52086   fi
52087 
52088       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52089 $as_echo_n "checking for $DLL_NAME... " >&6; }
52090       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52091 $as_echo "$MSVC_DLL" >&6; }
52092     else
52093       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52094 $as_echo "incorrect, ignoring" >&6; }
52095       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52096 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52097     fi
52098   fi
52099 
52100     fi
52101   fi
52102 
52103   if test "x$MSVC_DLL" = x; then
52104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52105 $as_echo_n "checking for $DLL_NAME... " >&6; }
52106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52107 $as_echo "no" >&6; }
52108     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52109   fi
52110 
52111       MSVCP_DLL="$MSVC_DLL"
52112     fi
52113 
52114   fi
52115 
52116 
52117 # Check whether --with-ucrt-dll-dir was given.
52118 if test "${with_ucrt_dll_dir+set}" = set; then :
52119   withval=$with_ucrt_dll_dir;
52120 fi
52121 
52122 
52123   if test "x$USE_UCRT" = "xtrue"; then
52124     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCRT DLL dir" >&5
52125 $as_echo_n "checking for UCRT DLL dir... " >&6; }
52126     if test "x$with_ucrt_dll_dir" != x; then
52127       if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
52128         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52129 $as_echo "no" >&6; }
52130         as_fn_error $? "Could not find any dlls in $with_ucrt_dll_dir" "$LINENO" 5
52131       else
52132         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ucrt_dll_dir" >&5
52133 $as_echo "$with_ucrt_dll_dir" >&6; }
52134         UCRT_DLL_DIR="$with_ucrt_dll_dir"
52135 
52136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52137 
52138   # Input might be given as Windows format, start by converting to
52139   # unix format.
52140   path="$UCRT_DLL_DIR"
52141   new_path=`$CYGPATH -u "$path"`
52142 
52143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52146   # "foo.exe" is OK but "foo" is an error.
52147   #
52148   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52149   # It is also a way to make sure we got the proper file name for the real test later on.
52150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52151   if test "x$test_shortpath" = x; then
52152     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
52153 $as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
52154     as_fn_error $? "Cannot locate the the path of UCRT_DLL_DIR" "$LINENO" 5
52155   fi
52156 
52157   # Call helper function which possibly converts this using DOS-style short mode.
52158   # If so, the updated path is stored in $new_path.
52159 
52160   input_path="$new_path"
52161   # Check if we need to convert this using DOS-style short mode. If the path
52162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52163   # take no chances and rewrite it.
52164   # Note: m4 eats our [], so we need to use [ and ] instead.
52165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52166   if test "x$has_forbidden_chars" != x; then
52167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52171       # Going to short mode and back again did indeed matter. Since short mode is
52172       # case insensitive, let's make it lowercase to improve readability.
52173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52174       # Now convert it back to Unix-style (cygpath)
52175       input_path=`$CYGPATH -u "$shortmode_path"`
52176       new_path="$input_path"
52177     fi
52178   fi
52179 
52180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52181   if test "x$test_cygdrive_prefix" = x; then
52182     # As a simple fix, exclude /usr/bin since it's not a real path.
52183     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52185       # a path prefixed by /cygdrive for fixpath to work.
52186       new_path="$CYGWIN_ROOT_PATH$input_path"
52187     fi
52188   fi
52189 
52190 
52191   if test "x$path" != "x$new_path"; then
52192     UCRT_DLL_DIR="$new_path"
52193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
52194 $as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
52195   fi
52196 
52197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52198 
52199   path="$UCRT_DLL_DIR"
52200   has_colon=`$ECHO $path | $GREP ^.:`
52201   new_path="$path"
52202   if test "x$has_colon" = x; then
52203     # Not in mixed or Windows style, start by that.
52204     new_path=`cmd //c echo $path`
52205   fi
52206 
52207 
52208   input_path="$new_path"
52209   # Check if we need to convert this using DOS-style short mode. If the path
52210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52211   # take no chances and rewrite it.
52212   # Note: m4 eats our [], so we need to use [ and ] instead.
52213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52214   if test "x$has_forbidden_chars" != x; then
52215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52216     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52217   fi
52218 
52219 
52220   windows_path="$new_path"
52221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52222     unix_path=`$CYGPATH -u "$windows_path"`
52223     new_path="$unix_path"
52224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52226     new_path="$unix_path"
52227   fi
52228 
52229   if test "x$path" != "x$new_path"; then
52230     UCRT_DLL_DIR="$new_path"
52231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&5
52232 $as_echo "$as_me: Rewriting UCRT_DLL_DIR to \"$new_path\"" >&6;}
52233   fi
52234 
52235   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52236   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52237 
52238   else
52239     # We're on a posix platform. Hooray! :)
52240     path="$UCRT_DLL_DIR"
52241     has_space=`$ECHO "$path" | $GREP " "`
52242     if test "x$has_space" != x; then
52243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&5
52244 $as_echo "$as_me: The path of UCRT_DLL_DIR, which resolves as \"$path\", is invalid." >&6;}
52245       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52246     fi
52247 
52248     # Use eval to expand a potential ~
52249     eval path="$path"
52250     if test ! -f "$path" && test ! -d "$path"; then
52251       as_fn_error $? "The path of UCRT_DLL_DIR, which resolves as \"$path\", is not found." "$LINENO" 5
52252     fi
52253 
52254     UCRT_DLL_DIR="`cd "$path"; $THEPWDCMD -L`"
52255   fi
52256 
52257       fi
52258     elif test "x$DEVKIT_UCRT_DLL_DIR" != "x"; then
52259       UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
52260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52261 $as_echo "$UCRT_DLL_DIR" >&6; }
52262     else
52263       CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
52264 
52265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52266 
52267   # Input might be given as Windows format, start by converting to
52268   # unix format.
52269   path="$CYGWIN_WINDOWSSDKDIR"
52270   new_path=`$CYGPATH -u "$path"`
52271 
52272   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52273   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52274   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52275   # "foo.exe" is OK but "foo" is an error.
52276   #
52277   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52278   # It is also a way to make sure we got the proper file name for the real test later on.
52279   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52280   if test "x$test_shortpath" = x; then
52281     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
52282 $as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
52283     as_fn_error $? "Cannot locate the the path of CYGWIN_WINDOWSSDKDIR" "$LINENO" 5
52284   fi
52285 
52286   # Call helper function which possibly converts this using DOS-style short mode.
52287   # If so, the updated path is stored in $new_path.
52288 
52289   input_path="$new_path"
52290   # Check if we need to convert this using DOS-style short mode. If the path
52291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52292   # take no chances and rewrite it.
52293   # Note: m4 eats our [], so we need to use [ and ] instead.
52294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52295   if test "x$has_forbidden_chars" != x; then
52296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52300       # Going to short mode and back again did indeed matter. Since short mode is
52301       # case insensitive, let's make it lowercase to improve readability.
52302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52303       # Now convert it back to Unix-style (cygpath)
52304       input_path=`$CYGPATH -u "$shortmode_path"`
52305       new_path="$input_path"
52306     fi
52307   fi
52308 
52309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52310   if test "x$test_cygdrive_prefix" = x; then
52311     # As a simple fix, exclude /usr/bin since it's not a real path.
52312     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52314       # a path prefixed by /cygdrive for fixpath to work.
52315       new_path="$CYGWIN_ROOT_PATH$input_path"
52316     fi
52317   fi
52318 
52319 
52320   if test "x$path" != "x$new_path"; then
52321     CYGWIN_WINDOWSSDKDIR="$new_path"
52322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
52323 $as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
52324   fi
52325 
52326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52327 
52328   path="$CYGWIN_WINDOWSSDKDIR"
52329   has_colon=`$ECHO $path | $GREP ^.:`
52330   new_path="$path"
52331   if test "x$has_colon" = x; then
52332     # Not in mixed or Windows style, start by that.
52333     new_path=`cmd //c echo $path`
52334   fi
52335 
52336 
52337   input_path="$new_path"
52338   # Check if we need to convert this using DOS-style short mode. If the path
52339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52340   # take no chances and rewrite it.
52341   # Note: m4 eats our [], so we need to use [ and ] instead.
52342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52343   if test "x$has_forbidden_chars" != x; then
52344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52346   fi
52347 
52348 
52349   windows_path="$new_path"
52350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52351     unix_path=`$CYGPATH -u "$windows_path"`
52352     new_path="$unix_path"
52353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52355     new_path="$unix_path"
52356   fi
52357 
52358   if test "x$path" != "x$new_path"; then
52359     CYGWIN_WINDOWSSDKDIR="$new_path"
52360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&5
52361 $as_echo "$as_me: Rewriting CYGWIN_WINDOWSSDKDIR to \"$new_path\"" >&6;}
52362   fi
52363 
52364   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52365   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52366 
52367   else
52368     # We're on a posix platform. Hooray! :)
52369     path="$CYGWIN_WINDOWSSDKDIR"
52370     has_space=`$ECHO "$path" | $GREP " "`
52371     if test "x$has_space" != x; then
52372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&5
52373 $as_echo "$as_me: The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is invalid." >&6;}
52374       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52375     fi
52376 
52377     # Use eval to expand a potential ~
52378     eval path="$path"
52379     if test ! -f "$path" && test ! -d "$path"; then
52380       as_fn_error $? "The path of CYGWIN_WINDOWSSDKDIR, which resolves as \"$path\", is not found." "$LINENO" 5
52381     fi
52382 
52383     CYGWIN_WINDOWSSDKDIR="`cd "$path"; $THEPWDCMD -L`"
52384   fi
52385 
52386       dll_subdir=$OPENJDK_TARGET_CPU
52387       if test "x$dll_subdir" = "xx86_64"; then
52388         dll_subdir="x64"
52389       fi
52390       UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
52391       if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
52392         # Try with version subdir
52393         UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
52394             2> /dev/null | $SORT -d | $HEAD -n1`"
52395         if test -z "$UCRT_DLL_DIR" \
52396             || test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
52397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52398 $as_echo "no" >&6; }
52399           as_fn_error $? "Could not find any dlls in $UCRT_DLL_DIR" "$LINENO" 5
52400         else
52401           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52402 $as_echo "$UCRT_DLL_DIR" >&6; }
52403         fi
52404       else
52405         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCRT_DLL_DIR" >&5
52406 $as_echo "$UCRT_DLL_DIR" >&6; }
52407       fi
52408     fi
52409   else
52410     UCRT_DLL_DIR=
52411   fi
52412 
52413 
52414 
52415 
52416 # Check whether --with-dxsdk was given.
52417 if test "${with_dxsdk+set}" = set; then :
52418   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52419 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52420 fi
52421 
52422 
52423 
52424 
52425 # Check whether --with-dxsdk-lib was given.
52426 if test "${with_dxsdk_lib+set}" = set; then :
52427   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52428 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52429 fi
52430 
52431 
52432 
52433 
52434 # Check whether --with-dxsdk-include was given.
52435 if test "${with_dxsdk_include+set}" = set; then :
52436   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52437 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52438 fi
52439 
52440 
52441   fi
52442 
52443 
52444 ###############################################################################
52445 #
52446 # We need to do some final tweaking, when everything else is done.
52447 #
52448 ###############################################################################
52449 
52450 
52451   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52452 
52453 
52454   # The name of the Service Agent jar.
52455   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52456   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52457     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52458   fi
52459 
52460 
52461 
52462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52463 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52464 
52465     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
52466       ENABLE_INTREE_EC=yes
52467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52468 $as_echo "yes" >&6; }
52469     else
52470       ENABLE_INTREE_EC=no
52471       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52472 $as_echo "no" >&6; }
52473     fi
52474 
52475 
52476 
52477 
52478 ###############################################################################
52479 #
52480 # Configure parts of the build that only affect the build performance,
52481 # not the result.
52482 #
52483 ###############################################################################
52484 
52485 
52486   # How many cores do we have on this build system?
52487 
52488 # Check whether --with-num-cores was given.
52489 if test "${with_num_cores+set}" = set; then :
52490   withval=$with_num_cores;
52491 fi
52492 
52493   if test "x$with_num_cores" = x; then
52494     # The number of cores were not specified, try to probe them.
52495 
52496   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52497 $as_echo_n "checking for number of cores... " >&6; }
52498   NUM_CORES=1
52499   FOUND_CORES=no
52500 
52501   if test -f /proc/cpuinfo; then
52502     # Looks like a Linux (or cygwin) system
52503     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52504     FOUND_CORES=yes
52505   elif test -x /usr/sbin/psrinfo; then
52506     # Looks like a Solaris system
52507     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52508     FOUND_CORES=yes
52509   elif test -x /usr/sbin/system_profiler; then
52510     # Looks like a MacOSX system
52511     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52512     FOUND_CORES=yes
52513   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52514     NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[0-9]*" | $CUT -d "=" -f 2`
52515     if test -n "$NUM_LCPU"; then
52516       NUM_CORES=$NUM_LCPU
52517       FOUND_CORES=yes
52518     fi
52519   elif test -n "$NUMBER_OF_PROCESSORS"; then
52520     # On windows, look in the env
52521     NUM_CORES=$NUMBER_OF_PROCESSORS
52522     FOUND_CORES=yes
52523   fi
52524 
52525   if test "x$FOUND_CORES" = xyes; then
52526     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52527 $as_echo "$NUM_CORES" >&6; }
52528   else
52529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52530 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
52531     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52532 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52533   fi
52534 
52535   else
52536     NUM_CORES=$with_num_cores
52537   fi
52538 
52539 
52540 
52541   # How much memory do we have on this build system?
52542 
52543 # Check whether --with-memory-size was given.
52544 if test "${with_memory_size+set}" = set; then :
52545   withval=$with_memory_size;
52546 fi
52547 
52548   if test "x$with_memory_size" = x; then
52549     # The memory size was not specified, try to probe it.
52550 
52551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52552 $as_echo_n "checking for memory size... " >&6; }
52553   # Default to 1024 MB
52554   MEMORY_SIZE=1024
52555   FOUND_MEM=no
52556 
52557   if test -f /proc/meminfo; then
52558     # Looks like a Linux (or cygwin) system
52559     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52560     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52561     FOUND_MEM=yes
52562   elif test -x /usr/sbin/prtconf; then
52563     # Looks like a Solaris or AIX system
52564     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52565     FOUND_MEM=yes
52566   elif test -x /usr/sbin/system_profiler; then
52567     # Looks like a MacOSX system
52568     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52569     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52570     FOUND_MEM=yes
52571   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52572     # Windows, but without cygwin
52573     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52574     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52575     FOUND_MEM=yes
52576   fi
52577 
52578   if test "x$FOUND_MEM" = xyes; then
52579     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52580 $as_echo "$MEMORY_SIZE MB" >&6; }
52581   else
52582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
52583 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
52584     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52585 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52586   fi
52587 
52588   else
52589     MEMORY_SIZE=$with_memory_size
52590   fi
52591 
52592 
52593 
52594   # Provide a decent default number of parallel jobs for make depending on
52595   # number of cores, amount of memory and machine architecture.
52596 
52597 # Check whether --with-jobs was given.
52598 if test "${with_jobs+set}" = set; then :
52599   withval=$with_jobs;
52600 fi
52601 
52602   if test "x$with_jobs" = x; then
52603     # Number of jobs was not specified, calculate.
52604     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52605 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52606     # Approximate memory in GB, rounding up a bit.
52607     memory_gb=`expr $MEMORY_SIZE / 1100`
52608     # Pick the lowest of memory in gb and number of cores.
52609     if test "$memory_gb" -lt "$NUM_CORES"; then
52610       JOBS="$memory_gb"
52611     else
52612       JOBS="$NUM_CORES"
52613       # On bigger machines, leave some room for other processes to run
52614       if test "$JOBS" -gt "4"; then
52615         JOBS=`expr $JOBS '*' 90 / 100`
52616       fi
52617     fi
52618     # Cap number of jobs to 16
52619     if test "$JOBS" -gt "16"; then
52620       JOBS=16
52621     fi
52622     if test "$JOBS" -eq "0"; then
52623       JOBS=1
52624     fi
52625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52626 $as_echo "$JOBS" >&6; }
52627   else
52628     JOBS=$with_jobs
52629   fi
52630 
52631 
52632 
52633 # Setup smart javac (after cores and memory have been setup)
52634 
52635 
52636 # Check whether --with-sjavac-server-java was given.
52637 if test "${with_sjavac_server_java+set}" = set; then :
52638   withval=$with_sjavac_server_java;
52639 fi
52640 
52641 
52642   if test "x$with_sjavac_server_java" != x; then
52643     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52644     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52645     if test "x$FOUND_VERSION" = x; then
52646       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52647     fi
52648   else
52649     SJAVAC_SERVER_JAVA=""
52650     # Hotspot specific options.
52651 
52652   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
52653   $ECHO "Command: $JAVA -verbosegc -version" >&5
52654   OUTPUT=`$JAVA -verbosegc -version 2>&1`
52655   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52656   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52657   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52658     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
52659     JVM_ARG_OK=true
52660   else
52661     $ECHO "Arg failed:" >&5
52662     $ECHO "$OUTPUT" >&5
52663     JVM_ARG_OK=false
52664   fi
52665 
52666     # JRockit specific options.
52667 
52668   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
52669   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
52670   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
52671   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52672   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52673   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52674     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
52675     JVM_ARG_OK=true
52676   else
52677     $ECHO "Arg failed:" >&5
52678     $ECHO "$OUTPUT" >&5
52679     JVM_ARG_OK=false
52680   fi
52681 
52682     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
52683   fi
52684 
52685 
52686   if test "$MEMORY_SIZE" -gt "2500"; then
52687 
52688   $ECHO "Check if jvm arg is ok: -d64" >&5
52689   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52690   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52691   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52692   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52693   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52694     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
52695     JVM_ARG_OK=true
52696   else
52697     $ECHO "Arg failed:" >&5
52698     $ECHO "$OUTPUT" >&5
52699     JVM_ARG_OK=false
52700   fi
52701 
52702     if test "$JVM_ARG_OK" = true; then
52703       JVM_64BIT=true
52704       JVM_ARG_OK=false
52705     fi
52706   fi
52707 
52708   if test "$JVM_64BIT" = true; then
52709     if test "$MEMORY_SIZE" -gt "17000"; then
52710 
52711   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
52712   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
52713   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
52714   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52715   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52716   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52717     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
52718     JVM_ARG_OK=true
52719   else
52720     $ECHO "Arg failed:" >&5
52721     $ECHO "$OUTPUT" >&5
52722     JVM_ARG_OK=false
52723   fi
52724 
52725     fi
52726     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
52727 
52728   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
52729   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
52730   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
52731   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52732   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52733   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52734     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
52735     JVM_ARG_OK=true
52736   else
52737     $ECHO "Arg failed:" >&5
52738     $ECHO "$OUTPUT" >&5
52739     JVM_ARG_OK=false
52740   fi
52741 
52742     fi
52743     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
52744 
52745   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
52746   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
52747   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
52748   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52749   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52750   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52751     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
52752     JVM_ARG_OK=true
52753   else
52754     $ECHO "Arg failed:" >&5
52755     $ECHO "$OUTPUT" >&5
52756     JVM_ARG_OK=false
52757   fi
52758 
52759     fi
52760     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
52761 
52762   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
52763   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
52764   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
52765   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52766   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52767   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52768     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
52769     JVM_ARG_OK=true
52770   else
52771     $ECHO "Arg failed:" >&5
52772     $ECHO "$OUTPUT" >&5
52773     JVM_ARG_OK=false
52774   fi
52775 
52776     fi
52777   fi
52778   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
52779 
52780   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
52781   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
52782   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
52783   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52784   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52785   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52786     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
52787     JVM_ARG_OK=true
52788   else
52789     $ECHO "Arg failed:" >&5
52790     $ECHO "$OUTPUT" >&5
52791     JVM_ARG_OK=false
52792   fi
52793 
52794   fi
52795   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
52796 
52797   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
52798   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
52799   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
52800   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52801   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52802   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52803     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
52804     JVM_ARG_OK=true
52805   else
52806     $ECHO "Arg failed:" >&5
52807     $ECHO "$OUTPUT" >&5
52808     JVM_ARG_OK=false
52809   fi
52810 
52811   fi
52812   if test "$JVM_ARG_OK" = false; then
52813 
52814   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
52815   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
52816   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
52817   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52818   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52819   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52820     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
52821     JVM_ARG_OK=true
52822   else
52823     $ECHO "Arg failed:" >&5
52824     $ECHO "$OUTPUT" >&5
52825     JVM_ARG_OK=false
52826   fi
52827 
52828   fi
52829 
52830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52831 $as_echo_n "checking whether to use sjavac... " >&6; }
52832   # Check whether --enable-sjavac was given.
52833 if test "${enable_sjavac+set}" = set; then :
52834   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52835 else
52836   ENABLE_SJAVAC='no'
52837 fi
52838 
52839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52840 $as_echo "$ENABLE_SJAVAC" >&6; }
52841 
52842 
52843   if test "x$ENABLE_SJAVAC" = xyes; then
52844     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
52845   else
52846     SJAVAC_SERVER_DIR=
52847   fi
52848 
52849 
52850 
52851 # Can the C/C++ compiler use precompiled headers?
52852 
52853 
52854   ###############################################################################
52855   #
52856   # Can the C/C++ compiler use precompiled headers?
52857   #
52858   # Check whether --enable-precompiled-headers was given.
52859 if test "${enable_precompiled_headers+set}" = set; then :
52860   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52861 else
52862   ENABLE_PRECOMPH=yes
52863 fi
52864 
52865 
52866   USE_PRECOMPILED_HEADER=1
52867   if test "x$ENABLE_PRECOMPH" = xno; then
52868     USE_PRECOMPILED_HEADER=0
52869   fi
52870 
52871   if test "x$ENABLE_PRECOMPH" = xyes; then
52872     # Check that the compiler actually supports precomp headers.
52873     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52874       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52875 $as_echo_n "checking that precompiled headers work... " >&6; }
52876       echo "int alfa();" > conftest.h
52877       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52878       if test ! -f conftest.hpp.gch; then
52879         USE_PRECOMPILED_HEADER=0
52880         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52881 $as_echo "no" >&6; }
52882       else
52883         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52884 $as_echo "yes" >&6; }
52885       fi
52886       rm -f conftest.h conftest.hpp.gch
52887     fi
52888   fi
52889 
52890 
52891 
52892 
52893 # Setup use of ccache, if available
52894 
52895   # Check whether --enable-ccache was given.
52896 if test "${enable_ccache+set}" = set; then :
52897   enableval=$enable_ccache;
52898 fi
52899 
52900 
52901   CCACHE=
52902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52903 $as_echo_n "checking is ccache enabled... " >&6; }
52904   ENABLE_CCACHE=$enable_ccache
52905   if test "x$enable_ccache" = xyes; then
52906     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52907 $as_echo "yes" >&6; }
52908     OLD_PATH="$PATH"
52909     if test "x$TOOLCHAIN_PATH" != x; then
52910       PATH=$TOOLCHAIN_PATH:$PATH
52911     fi
52912 
52913 
52914 
52915   # Publish this variable in the help.
52916 
52917 
52918   if test "x$CCACHE" = x; then
52919     # The variable is not set by user, try to locate tool using the code snippet
52920     for ac_prog in ccache
52921 do
52922   # Extract the first word of "$ac_prog", so it can be a program name with args.
52923 set dummy $ac_prog; ac_word=$2
52924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52925 $as_echo_n "checking for $ac_word... " >&6; }
52926 if ${ac_cv_path_CCACHE+:} false; then :
52927   $as_echo_n "(cached) " >&6
52928 else
52929   case $CCACHE in
52930   [\\/]* | ?:[\\/]*)
52931   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52932   ;;
52933   *)
52934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52935 for as_dir in $PATH
52936 do
52937   IFS=$as_save_IFS
52938   test -z "$as_dir" && as_dir=.
52939     for ac_exec_ext in '' $ac_executable_extensions; do
52940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52941     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52943     break 2
52944   fi
52945 done
52946   done
52947 IFS=$as_save_IFS
52948 
52949   ;;
52950 esac
52951 fi
52952 CCACHE=$ac_cv_path_CCACHE
52953 if test -n "$CCACHE"; then
52954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52955 $as_echo "$CCACHE" >&6; }
52956 else
52957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52958 $as_echo "no" >&6; }
52959 fi
52960 
52961 
52962   test -n "$CCACHE" && break
52963 done
52964 
52965   else
52966     # The variable is set, but is it from the command line or the environment?
52967 
52968     # Try to remove the string !CCACHE! from our list.
52969     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52970     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52971       # If it failed, the variable was not from the command line. Ignore it,
52972       # but warn the user (except for BASH, which is always set by the calling BASH).
52973       if test "xCCACHE" != xBASH; then
52974         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52975 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52976       fi
52977       # Try to locate tool using the code snippet
52978       for ac_prog in ccache
52979 do
52980   # Extract the first word of "$ac_prog", so it can be a program name with args.
52981 set dummy $ac_prog; ac_word=$2
52982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52983 $as_echo_n "checking for $ac_word... " >&6; }
52984 if ${ac_cv_path_CCACHE+:} false; then :
52985   $as_echo_n "(cached) " >&6
52986 else
52987   case $CCACHE in
52988   [\\/]* | ?:[\\/]*)
52989   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52990   ;;
52991   *)
52992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52993 for as_dir in $PATH
52994 do
52995   IFS=$as_save_IFS
52996   test -z "$as_dir" && as_dir=.
52997     for ac_exec_ext in '' $ac_executable_extensions; do
52998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52999     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53001     break 2
53002   fi
53003 done
53004   done
53005 IFS=$as_save_IFS
53006 
53007   ;;
53008 esac
53009 fi
53010 CCACHE=$ac_cv_path_CCACHE
53011 if test -n "$CCACHE"; then
53012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53013 $as_echo "$CCACHE" >&6; }
53014 else
53015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53016 $as_echo "no" >&6; }
53017 fi
53018 
53019 
53020   test -n "$CCACHE" && break
53021 done
53022 
53023     else
53024       # If it succeeded, then it was overridden by the user. We will use it
53025       # for the tool.
53026 
53027       # First remove it from the list of overridden variables, so we can test
53028       # for unknown variables in the end.
53029       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53030 
53031       # Check if the provided tool contains a complete path.
53032       tool_specified="$CCACHE"
53033       tool_basename="${tool_specified##*/}"
53034       if test "x$tool_basename" = "x$tool_specified"; then
53035         # A command without a complete path is provided, search $PATH.
53036         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53037 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53038         # Extract the first word of "$tool_basename", so it can be a program name with args.
53039 set dummy $tool_basename; ac_word=$2
53040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53041 $as_echo_n "checking for $ac_word... " >&6; }
53042 if ${ac_cv_path_CCACHE+:} false; then :
53043   $as_echo_n "(cached) " >&6
53044 else
53045   case $CCACHE in
53046   [\\/]* | ?:[\\/]*)
53047   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53048   ;;
53049   *)
53050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53051 for as_dir in $PATH
53052 do
53053   IFS=$as_save_IFS
53054   test -z "$as_dir" && as_dir=.
53055     for ac_exec_ext in '' $ac_executable_extensions; do
53056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53057     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53059     break 2
53060   fi
53061 done
53062   done
53063 IFS=$as_save_IFS
53064 
53065   ;;
53066 esac
53067 fi
53068 CCACHE=$ac_cv_path_CCACHE
53069 if test -n "$CCACHE"; then
53070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53071 $as_echo "$CCACHE" >&6; }
53072 else
53073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53074 $as_echo "no" >&6; }
53075 fi
53076 
53077 
53078         if test "x$CCACHE" = x; then
53079           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53080         fi
53081       else
53082         # Otherwise we believe it is a complete path. Use it as it is.
53083         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53084 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53086 $as_echo_n "checking for CCACHE... " >&6; }
53087         if test ! -x "$tool_specified"; then
53088           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53089 $as_echo "not found" >&6; }
53090           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53091         fi
53092         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53093 $as_echo "$tool_specified" >&6; }
53094       fi
53095     fi
53096   fi
53097 
53098 
53099 
53100   if test "x$CCACHE" = x; then
53101     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53102   fi
53103 
53104 
53105     CCACHE_STATUS="enabled"
53106     PATH="$OLD_PATH"
53107   elif test "x$enable_ccache" = xno; then
53108     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53109 $as_echo "no, explicitly disabled" >&6; }
53110   elif test "x$enable_ccache" = x; then
53111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53112 $as_echo "no" >&6; }
53113   else
53114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53115 $as_echo "unknown" >&6; }
53116     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53117   fi
53118 
53119 
53120 
53121 # Check whether --with-ccache-dir was given.
53122 if test "${with_ccache_dir+set}" = set; then :
53123   withval=$with_ccache_dir;
53124 fi
53125 
53126 
53127   if test "x$with_ccache_dir" != x; then
53128     # When using a non home ccache directory, assume the use is to share ccache files
53129     # with other users. Thus change the umask.
53130     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53131     if test "x$CCACHE" = x; then
53132       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53133 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53134     fi
53135   fi
53136 
53137   if test "x$CCACHE" != x; then
53138 
53139   if test "x$CCACHE" != x; then
53140     # Only use ccache if it is 3.1.4 or later, which supports
53141     # precompiled headers.
53142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
53143 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
53144     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
53145     if test "x$HAS_GOOD_CCACHE" = x; then
53146       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
53147 $as_echo "no, disabling ccache" >&6; }
53148       CCACHE=
53149       CCACHE_STATUS="disabled"
53150     else
53151       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53152 $as_echo "yes" >&6; }
53153       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53154 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53155       PUSHED_FLAGS="$CXXFLAGS"
53156       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
53157       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53158 /* end confdefs.h.  */
53159 
53160 int
53161 main ()
53162 {
53163 
53164   ;
53165   return 0;
53166 }
53167 _ACEOF
53168 if ac_fn_cxx_try_compile "$LINENO"; then :
53169   CC_KNOWS_CCACHE_TRICK=yes
53170 else
53171   CC_KNOWS_CCACHE_TRICK=no
53172 fi
53173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53174       CXXFLAGS="$PUSHED_FLAGS"
53175       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53177 $as_echo "yes" >&6; }
53178       else
53179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
53180 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
53181         CCACHE=
53182         CCACHE_STATUS="disabled"
53183       fi
53184     fi
53185   fi
53186 
53187   if test "x$CCACHE" != x; then
53188     CCACHE_SLOPPINESS=time_macros
53189     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
53190     CCACHE_FLAGS=-fpch-preprocess
53191 
53192     if test "x$SET_CCACHE_DIR" != x; then
53193       mkdir -p $CCACHE_DIR > /dev/null 2>&1
53194       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53195     fi
53196   fi
53197 
53198   fi
53199 
53200 
53201 ###############################################################################
53202 #
53203 # And now the finish...
53204 #
53205 ###############################################################################
53206 
53207 # Check for some common pitfalls
53208 
53209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53210     file_to_test="$SRC_ROOT/LICENSE"
53211     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53212       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
53213     fi
53214   fi
53215 
53216 
53217   # Did user specify any unknown variables?
53218 
53219   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53220     # Replace the separating ! with spaces before presenting for end user.
53221     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53223 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53224   fi
53225 
53226 
53227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53228 $as_echo_n "checking if build directory is on local disk... " >&6; }
53229 
53230   # df -l lists only local disks; if the given directory is not found then
53231   # a non-zero exit code is given
53232   if test "x$DF" = x; then
53233     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53234       # msys does not have df; use Windows "net use" instead.
53235       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53236       if test "x$IS_NETWORK_DISK" = x; then
53237         OUTPUT_DIR_IS_LOCAL="yes"
53238       else
53239         OUTPUT_DIR_IS_LOCAL="no"
53240       fi
53241     else
53242       # No df here, say it's local
53243       OUTPUT_DIR_IS_LOCAL="yes"
53244     fi
53245   else
53246     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53247       OUTPUT_DIR_IS_LOCAL="yes"
53248     else
53249       OUTPUT_DIR_IS_LOCAL="no"
53250     fi
53251   fi
53252 
53253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53254 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53255 
53256 
53257 
53258   # Check if the user has any old-style ALT_ variables set.
53259   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53260 
53261   # Before generating output files, test if they exist. If they do, this is a reconfigure.
53262   # Since we can't properly handle the dependencies for this, warn the user about the situation
53263   if test -e $OUTPUT_ROOT/spec.gmk; then
53264     IS_RECONFIGURE=yes
53265   else
53266     IS_RECONFIGURE=no
53267   fi
53268 
53269 
53270 # At the end, call the custom hook. (Dummy macro if no custom sources available)
53271 
53272 
53273 # We're messing a bit with internal autoconf variables to put the config.status
53274 # in the output directory instead of the current directory.
53275 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
53276 
53277 # Create the actual output files. Now the main work of configure is done.
53278 cat >confcache <<\_ACEOF
53279 # This file is a shell script that caches the results of configure
53280 # tests run on this system so they can be shared between configure
53281 # scripts and configure runs, see configure's option --config-cache.
53282 # It is not useful on other systems.  If it contains results you don't
53283 # want to keep, you may remove or edit it.
53284 #
53285 # config.status only pays attention to the cache file if you give it
53286 # the --recheck option to rerun configure.
53287 #
53288 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53289 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53290 # following values.
53291 
53292 _ACEOF
53293 
53294 # The following way of writing the cache mishandles newlines in values,
53295 # but we know of no workaround that is simple, portable, and efficient.
53296 # So, we kill variables containing newlines.
53297 # Ultrix sh set writes to stderr and can't be redirected directly,
53298 # and sets the high bit in the cache file unless we assign to the vars.
53299 (
53300   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53301     eval ac_val=\$$ac_var
53302     case $ac_val in #(
53303     *${as_nl}*)
53304       case $ac_var in #(
53305       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53306 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53307       esac
53308       case $ac_var in #(
53309       _ | IFS | as_nl) ;; #(
53310       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53311       *) { eval $ac_var=; unset $ac_var;} ;;
53312       esac ;;
53313     esac
53314   done
53315 
53316   (set) 2>&1 |
53317     case $as_nl`(ac_space=' '; set) 2>&1` in #(
53318     *${as_nl}ac_space=\ *)
53319       # `set' does not quote correctly, so add quotes: double-quote
53320       # substitution turns \\\\ into \\, and sed turns \\ into \.
53321       sed -n \
53322         "s/'/'\\\\''/g;
53323           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53324       ;; #(
53325     *)
53326       # `set' quotes correctly as required by POSIX, so do not add quotes.
53327       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53328       ;;
53329     esac |
53330     sort
53331 ) |
53332   sed '
53333      /^ac_cv_env_/b end
53334      t clear
53335      :clear
53336      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53337      t end
53338      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53339      :end' >>confcache
53340 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53341   if test -w "$cache_file"; then
53342     if test "x$cache_file" != "x/dev/null"; then
53343       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53344 $as_echo "$as_me: updating cache $cache_file" >&6;}
53345       if test ! -f "$cache_file" || test -h "$cache_file"; then
53346         cat confcache >"$cache_file"
53347       else
53348         case $cache_file in #(
53349         */* | ?:*)
53350           mv -f confcache "$cache_file"$$ &&
53351           mv -f "$cache_file"$$ "$cache_file" ;; #(
53352         *)
53353           mv -f confcache "$cache_file" ;;
53354         esac
53355       fi
53356     fi
53357   else
53358     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53359 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53360   fi
53361 fi
53362 rm -f confcache
53363 
53364 test "x$prefix" = xNONE && prefix=$ac_default_prefix
53365 # Let make expand exec_prefix.
53366 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53367 
53368 DEFS=-DHAVE_CONFIG_H
53369 
53370 ac_libobjs=
53371 ac_ltlibobjs=
53372 U=
53373 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53374   # 1. Remove the extension, and $U if already installed.
53375   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53376   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53377   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53378   #    will be set to the directory where LIBOBJS objects are built.
53379   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53380   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53381 done
53382 LIBOBJS=$ac_libobjs
53383 
53384 LTLIBOBJS=$ac_ltlibobjs
53385 
53386 
53387 
53388 : "${CONFIG_STATUS=./config.status}"
53389 ac_write_fail=0
53390 ac_clean_files_save=$ac_clean_files
53391 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53392 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53393 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53394 as_write_fail=0
53395 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53396 #! $SHELL
53397 # Generated by $as_me.
53398 # Run this file to recreate the current configuration.
53399 # Compiler output produced by configure, useful for debugging
53400 # configure, is in config.log if it exists.
53401 
53402 debug=false
53403 ac_cs_recheck=false
53404 ac_cs_silent=false
53405 
53406 SHELL=\${CONFIG_SHELL-$SHELL}
53407 export SHELL
53408 _ASEOF
53409 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53410 ## -------------------- ##
53411 ## M4sh Initialization. ##
53412 ## -------------------- ##
53413 
53414 # Be more Bourne compatible
53415 DUALCASE=1; export DUALCASE # for MKS sh
53416 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53417   emulate sh
53418   NULLCMD=:
53419   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53420   # is contrary to our usage.  Disable this feature.
53421   alias -g '${1+"$@"}'='"$@"'
53422   setopt NO_GLOB_SUBST
53423 else
53424   case `(set -o) 2>/dev/null` in #(
53425   *posix*) :
53426     set -o posix ;; #(
53427   *) :
53428      ;;
53429 esac
53430 fi
53431 
53432 
53433 as_nl='
53434 '
53435 export as_nl
53436 # Printing a long string crashes Solaris 7 /usr/bin/printf.
53437 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53438 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53439 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53440 # Prefer a ksh shell builtin over an external printf program on Solaris,
53441 # but without wasting forks for bash or zsh.
53442 if test -z "$BASH_VERSION$ZSH_VERSION" \
53443     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53444   as_echo='print -r --'
53445   as_echo_n='print -rn --'
53446 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53447   as_echo='printf %s\n'
53448   as_echo_n='printf %s'
53449 else
53450   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53451     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53452     as_echo_n='/usr/ucb/echo -n'
53453   else
53454     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53455     as_echo_n_body='eval
53456       arg=$1;
53457       case $arg in #(
53458       *"$as_nl"*)
53459         expr "X$arg" : "X\\(.*\\)$as_nl";
53460         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53461       esac;
53462       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53463     '
53464     export as_echo_n_body
53465     as_echo_n='sh -c $as_echo_n_body as_echo'
53466   fi
53467   export as_echo_body
53468   as_echo='sh -c $as_echo_body as_echo'
53469 fi
53470 
53471 # The user is always right.
53472 if test "${PATH_SEPARATOR+set}" != set; then
53473   PATH_SEPARATOR=:
53474   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53475     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53476       PATH_SEPARATOR=';'
53477   }
53478 fi
53479 
53480 
53481 # IFS
53482 # We need space, tab and new line, in precisely that order.  Quoting is
53483 # there to prevent editors from complaining about space-tab.
53484 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
53485 # splitting by setting IFS to empty value.)
53486 IFS=" ""        $as_nl"
53487 
53488 # Find who we are.  Look in the path if we contain no directory separator.
53489 as_myself=
53490 case $0 in #((
53491   *[\\/]* ) as_myself=$0 ;;
53492   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53493 for as_dir in $PATH
53494 do
53495   IFS=$as_save_IFS
53496   test -z "$as_dir" && as_dir=.
53497     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53498   done
53499 IFS=$as_save_IFS
53500 
53501      ;;
53502 esac
53503 # We did not find ourselves, most probably we were run as `sh COMMAND'
53504 # in which case we are not to be found in the path.
53505 if test "x$as_myself" = x; then
53506   as_myself=$0
53507 fi
53508 if test ! -f "$as_myself"; then
53509   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53510   exit 1
53511 fi
53512 
53513 # Unset variables that we do not need and which cause bugs (e.g. in
53514 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53515 # suppresses any "Segmentation fault" message there.  '((' could
53516 # trigger a bug in pdksh 5.2.14.
53517 for as_var in BASH_ENV ENV MAIL MAILPATH
53518 do eval test x\${$as_var+set} = xset \
53519   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53520 done
53521 PS1='$ '
53522 PS2='> '
53523 PS4='+ '
53524 
53525 # NLS nuisances.
53526 LC_ALL=C
53527 export LC_ALL
53528 LANGUAGE=C
53529 export LANGUAGE
53530 
53531 # CDPATH.
53532 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53533 
53534 
53535 # as_fn_error STATUS ERROR [LINENO LOG_FD]
53536 # ----------------------------------------
53537 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53538 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53539 # script with STATUS, using 1 if that was 0.
53540 as_fn_error ()
53541 {
53542   as_status=$1; test $as_status -eq 0 && as_status=1
53543   if test "$4"; then
53544     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53545     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53546   fi
53547   $as_echo "$as_me: error: $2" >&2
53548   as_fn_exit $as_status
53549 } # as_fn_error
53550 
53551 
53552 # as_fn_set_status STATUS
53553 # -----------------------
53554 # Set $? to STATUS, without forking.
53555 as_fn_set_status ()
53556 {
53557   return $1
53558 } # as_fn_set_status
53559 
53560 # as_fn_exit STATUS
53561 # -----------------
53562 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53563 as_fn_exit ()
53564 {
53565   set +e
53566   as_fn_set_status $1
53567   exit $1
53568 } # as_fn_exit
53569 
53570 # as_fn_unset VAR
53571 # ---------------
53572 # Portably unset VAR.
53573 as_fn_unset ()
53574 {
53575   { eval $1=; unset $1;}
53576 }
53577 as_unset=as_fn_unset
53578 # as_fn_append VAR VALUE
53579 # ----------------------
53580 # Append the text in VALUE to the end of the definition contained in VAR. Take
53581 # advantage of any shell optimizations that allow amortized linear growth over
53582 # repeated appends, instead of the typical quadratic growth present in naive
53583 # implementations.
53584 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53585   eval 'as_fn_append ()
53586   {
53587     eval $1+=\$2
53588   }'
53589 else
53590   as_fn_append ()
53591   {
53592     eval $1=\$$1\$2
53593   }
53594 fi # as_fn_append
53595 
53596 # as_fn_arith ARG...
53597 # ------------------
53598 # Perform arithmetic evaluation on the ARGs, and store the result in the
53599 # global $as_val. Take advantage of shells that can avoid forks. The arguments
53600 # must be portable across $(()) and expr.
53601 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53602   eval 'as_fn_arith ()
53603   {
53604     as_val=$(( $* ))
53605   }'
53606 else
53607   as_fn_arith ()
53608   {
53609     as_val=`expr "$@" || test $? -eq 1`
53610   }
53611 fi # as_fn_arith
53612 
53613 
53614 if expr a : '\(a\)' >/dev/null 2>&1 &&
53615    test "X`expr 00001 : '.*\(...\)'`" = X001; then
53616   as_expr=expr
53617 else
53618   as_expr=false
53619 fi
53620 
53621 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53622   as_basename=basename
53623 else
53624   as_basename=false
53625 fi
53626 
53627 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53628   as_dirname=dirname
53629 else
53630   as_dirname=false
53631 fi
53632 
53633 as_me=`$as_basename -- "$0" ||
53634 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53635          X"$0" : 'X\(//\)$' \| \
53636          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53637 $as_echo X/"$0" |
53638     sed '/^.*\/\([^/][^/]*\)\/*$/{
53639             s//\1/
53640             q
53641           }
53642           /^X\/\(\/\/\)$/{
53643             s//\1/
53644             q
53645           }
53646           /^X\/\(\/\).*/{
53647             s//\1/
53648             q
53649           }
53650           s/.*/./; q'`
53651 
53652 # Avoid depending upon Character Ranges.
53653 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53654 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53655 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53656 as_cr_digits='0123456789'
53657 as_cr_alnum=$as_cr_Letters$as_cr_digits
53658 
53659 ECHO_C= ECHO_N= ECHO_T=
53660 case `echo -n x` in #(((((
53661 -n*)
53662   case `echo 'xy\c'` in
53663   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
53664   xy)  ECHO_C='\c';;
53665   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53666        ECHO_T=' ';;
53667   esac;;
53668 *)
53669   ECHO_N='-n';;
53670 esac
53671 
53672 rm -f conf$$ conf$$.exe conf$$.file
53673 if test -d conf$$.dir; then
53674   rm -f conf$$.dir/conf$$.file
53675 else
53676   rm -f conf$$.dir
53677   mkdir conf$$.dir 2>/dev/null
53678 fi
53679 if (echo >conf$$.file) 2>/dev/null; then
53680   if ln -s conf$$.file conf$$ 2>/dev/null; then
53681     as_ln_s='ln -s'
53682     # ... but there are two gotchas:
53683     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53684     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53685     # In both cases, we have to default to `cp -pR'.
53686     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53687       as_ln_s='cp -pR'
53688   elif ln conf$$.file conf$$ 2>/dev/null; then
53689     as_ln_s=ln
53690   else
53691     as_ln_s='cp -pR'
53692   fi
53693 else
53694   as_ln_s='cp -pR'
53695 fi
53696 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53697 rmdir conf$$.dir 2>/dev/null
53698 
53699 
53700 # as_fn_mkdir_p
53701 # -------------
53702 # Create "$as_dir" as a directory, including parents if necessary.
53703 as_fn_mkdir_p ()
53704 {
53705 
53706   case $as_dir in #(
53707   -*) as_dir=./$as_dir;;
53708   esac
53709   test -d "$as_dir" || eval $as_mkdir_p || {
53710     as_dirs=
53711     while :; do
53712       case $as_dir in #(
53713       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53714       *) as_qdir=$as_dir;;
53715       esac
53716       as_dirs="'$as_qdir' $as_dirs"
53717       as_dir=`$as_dirname -- "$as_dir" ||
53718 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53719          X"$as_dir" : 'X\(//\)[^/]' \| \
53720          X"$as_dir" : 'X\(//\)$' \| \
53721          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53722 $as_echo X"$as_dir" |
53723     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53724             s//\1/
53725             q
53726           }
53727           /^X\(\/\/\)[^/].*/{
53728             s//\1/
53729             q
53730           }
53731           /^X\(\/\/\)$/{
53732             s//\1/
53733             q
53734           }
53735           /^X\(\/\).*/{
53736             s//\1/
53737             q
53738           }
53739           s/.*/./; q'`
53740       test -d "$as_dir" && break
53741     done
53742     test -z "$as_dirs" || eval "mkdir $as_dirs"
53743   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53744 
53745 
53746 } # as_fn_mkdir_p
53747 if mkdir -p . 2>/dev/null; then
53748   as_mkdir_p='mkdir -p "$as_dir"'
53749 else
53750   test -d ./-p && rmdir ./-p
53751   as_mkdir_p=false
53752 fi
53753 
53754 
53755 # as_fn_executable_p FILE
53756 # -----------------------
53757 # Test if FILE is an executable regular file.
53758 as_fn_executable_p ()
53759 {
53760   test -f "$1" && test -x "$1"
53761 } # as_fn_executable_p
53762 as_test_x='test -x'
53763 as_executable_p=as_fn_executable_p
53764 
53765 # Sed expression to map a string onto a valid CPP name.
53766 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53767 
53768 # Sed expression to map a string onto a valid variable name.
53769 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53770 
53771 
53772 exec 6>&1
53773 ## ----------------------------------- ##
53774 ## Main body of $CONFIG_STATUS script. ##
53775 ## ----------------------------------- ##
53776 _ASEOF
53777 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53778 
53779 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53780 # Save the log message, to keep $0 and so on meaningful, and to
53781 # report actual input values of CONFIG_FILES etc. instead of their
53782 # values after options handling.
53783 ac_log="
53784 This file was extended by OpenJDK $as_me jdk8, which was
53785 generated by GNU Autoconf 2.69.  Invocation command line was
53786 
53787   CONFIG_FILES    = $CONFIG_FILES
53788   CONFIG_HEADERS  = $CONFIG_HEADERS
53789   CONFIG_LINKS    = $CONFIG_LINKS
53790   CONFIG_COMMANDS = $CONFIG_COMMANDS
53791   $ $0 $@
53792 
53793 on `(hostname || uname -n) 2>/dev/null | sed 1q`
53794 "
53795 
53796 _ACEOF
53797 
53798 case $ac_config_files in *"
53799 "*) set x $ac_config_files; shift; ac_config_files=$*;;
53800 esac
53801 
53802 case $ac_config_headers in *"
53803 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
53804 esac
53805 
53806 
53807 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53808 # Files that config.status was made for.
53809 config_files="$ac_config_files"
53810 config_headers="$ac_config_headers"
53811 
53812 _ACEOF
53813 
53814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53815 ac_cs_usage="\
53816 \`$as_me' instantiates files and other configuration actions
53817 from templates according to the current configuration.  Unless the files
53818 and actions are specified as TAGs, all are instantiated by default.
53819 
53820 Usage: $0 [OPTION]... [TAG]...
53821 
53822   -h, --help       print this help, then exit
53823   -V, --version    print version number and configuration settings, then exit
53824       --config     print configuration, then exit
53825   -q, --quiet, --silent
53826                    do not print progress messages
53827   -d, --debug      don't remove temporary files
53828       --recheck    update $as_me by reconfiguring in the same conditions
53829       --file=FILE[:TEMPLATE]
53830                    instantiate the configuration file FILE
53831       --header=FILE[:TEMPLATE]
53832                    instantiate the configuration header FILE
53833 
53834 Configuration files:
53835 $config_files
53836 
53837 Configuration headers:
53838 $config_headers
53839 
53840 Report bugs to <build-dev@openjdk.java.net>.
53841 OpenJDK home page: <http://openjdk.java.net>."
53842 
53843 _ACEOF
53844 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53845 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53846 ac_cs_version="\\
53847 OpenJDK config.status jdk8
53848 configured by $0, generated by GNU Autoconf 2.69,
53849   with options \\"\$ac_cs_config\\"
53850 
53851 Copyright (C) 2012 Free Software Foundation, Inc.
53852 This config.status script is free software; the Free Software Foundation
53853 gives unlimited permission to copy, distribute and modify it."
53854 
53855 ac_pwd='$ac_pwd'
53856 srcdir='$srcdir'
53857 AWK='$AWK'
53858 test -n "\$AWK" || AWK=awk
53859 _ACEOF
53860 
53861 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53862 # The default lists apply if the user does not specify any file.
53863 ac_need_defaults=:
53864 while test $# != 0
53865 do
53866   case $1 in
53867   --*=?*)
53868     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53869     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53870     ac_shift=:
53871     ;;
53872   --*=)
53873     ac_option=`expr "X$1" : 'X\([^=]*\)='`
53874     ac_optarg=
53875     ac_shift=:
53876     ;;
53877   *)
53878     ac_option=$1
53879     ac_optarg=$2
53880     ac_shift=shift
53881     ;;
53882   esac
53883 
53884   case $ac_option in
53885   # Handling of the options.
53886   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53887     ac_cs_recheck=: ;;
53888   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53889     $as_echo "$ac_cs_version"; exit ;;
53890   --config | --confi | --conf | --con | --co | --c )
53891     $as_echo "$ac_cs_config"; exit ;;
53892   --debug | --debu | --deb | --de | --d | -d )
53893     debug=: ;;
53894   --file | --fil | --fi | --f )
53895     $ac_shift
53896     case $ac_optarg in
53897     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53898     '') as_fn_error $? "missing file argument" ;;
53899     esac
53900     as_fn_append CONFIG_FILES " '$ac_optarg'"
53901     ac_need_defaults=false;;
53902   --header | --heade | --head | --hea )
53903     $ac_shift
53904     case $ac_optarg in
53905     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53906     esac
53907     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
53908     ac_need_defaults=false;;
53909   --he | --h)
53910     # Conflict between --help and --header
53911     as_fn_error $? "ambiguous option: \`$1'
53912 Try \`$0 --help' for more information.";;
53913   --help | --hel | -h )
53914     $as_echo "$ac_cs_usage"; exit ;;
53915   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53916   | -silent | --silent | --silen | --sile | --sil | --si | --s)
53917     ac_cs_silent=: ;;
53918 
53919   # This is an error.
53920   -*) as_fn_error $? "unrecognized option: \`$1'
53921 Try \`$0 --help' for more information." ;;
53922 
53923   *) as_fn_append ac_config_targets " $1"
53924      ac_need_defaults=false ;;
53925 
53926   esac
53927   shift
53928 done
53929 
53930 ac_configure_extra_args=
53931 
53932 if $ac_cs_silent; then
53933   exec 6>/dev/null
53934   ac_configure_extra_args="$ac_configure_extra_args --silent"
53935 fi
53936 
53937 _ACEOF
53938 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53939 if \$ac_cs_recheck; then
53940   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53941   shift
53942   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53943   CONFIG_SHELL='$SHELL'
53944   export CONFIG_SHELL
53945   exec "\$@"
53946 fi
53947 
53948 _ACEOF
53949 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53950 exec 5>>config.log
53951 {
53952   echo
53953   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53954 ## Running $as_me. ##
53955 _ASBOX
53956   $as_echo "$ac_log"
53957 } >&5
53958 
53959 _ACEOF
53960 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53961 _ACEOF
53962 
53963 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53964 
53965 # Handling of arguments.
53966 for ac_config_target in $ac_config_targets
53967 do
53968   case $ac_config_target in
53969     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
53970     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53971     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53972     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53973     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53974     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
53975     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53976 
53977   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53978   esac
53979 done
53980 
53981 
53982 # If the user did not use the arguments to specify the items to instantiate,
53983 # then the envvar interface is used.  Set only those that are not.
53984 # We use the long form for the default assignment because of an extremely
53985 # bizarre bug on SunOS 4.1.3.
53986 if $ac_need_defaults; then
53987   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53988   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
53989 fi
53990 
53991 # Have a temporary directory for convenience.  Make it in the build tree
53992 # simply because there is no reason against having it here, and in addition,
53993 # creating and moving files from /tmp can sometimes cause problems.
53994 # Hook for its removal unless debugging.
53995 # Note that there is a small window in which the directory will not be cleaned:
53996 # after its creation but before its name has been assigned to `$tmp'.
53997 $debug ||
53998 {
53999   tmp= ac_tmp=
54000   trap 'exit_status=$?
54001   : "${ac_tmp:=$tmp}"
54002   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54003 ' 0
54004   trap 'as_fn_exit 1' 1 2 13 15
54005 }
54006 # Create a (secure) tmp directory for tmp files.
54007 
54008 {
54009   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54010   test -d "$tmp"
54011 }  ||
54012 {
54013   tmp=./conf$$-$RANDOM
54014   (umask 077 && mkdir "$tmp")
54015 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54016 ac_tmp=$tmp
54017 
54018 # Set up the scripts for CONFIG_FILES section.
54019 # No need to generate them if there are no CONFIG_FILES.
54020 # This happens for instance with `./config.status config.h'.
54021 if test -n "$CONFIG_FILES"; then
54022 
54023 
54024 ac_cr=`echo X | tr X '\015'`
54025 # On cygwin, bash can eat \r inside `` if the user requested igncr.
54026 # But we know of no other shell where ac_cr would be empty at this
54027 # point, so we can use a bashism as a fallback.
54028 if test "x$ac_cr" = x; then
54029   eval ac_cr=\$\'\\r\'
54030 fi
54031 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54032 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54033   ac_cs_awk_cr='\\r'
54034 else
54035   ac_cs_awk_cr=$ac_cr
54036 fi
54037 
54038 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54039 _ACEOF
54040 
54041 
54042 {
54043   echo "cat >conf$$subs.awk <<_ACEOF" &&
54044   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54045   echo "_ACEOF"
54046 } >conf$$subs.sh ||
54047   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54048 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54049 ac_delim='%!_!# '
54050 for ac_last_try in false false false false false :; do
54051   . ./conf$$subs.sh ||
54052     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54053 
54054   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54055   if test $ac_delim_n = $ac_delim_num; then
54056     break
54057   elif $ac_last_try; then
54058     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54059   else
54060     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54061   fi
54062 done
54063 rm -f conf$$subs.sh
54064 
54065 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54066 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54067 _ACEOF
54068 sed -n '
54069 h
54070 s/^/S["/; s/!.*/"]=/
54071 p
54072 g
54073 s/^[^!]*!//
54074 :repl
54075 t repl
54076 s/'"$ac_delim"'$//
54077 t delim
54078 :nl
54079 h
54080 s/\(.\{148\}\)..*/\1/
54081 t more1
54082 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54083 p
54084 n
54085 b repl
54086 :more1
54087 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54088 p
54089 g
54090 s/.\{148\}//
54091 t nl
54092 :delim
54093 h
54094 s/\(.\{148\}\)..*/\1/
54095 t more2
54096 s/["\\]/\\&/g; s/^/"/; s/$/"/
54097 p
54098 b
54099 :more2
54100 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54101 p
54102 g
54103 s/.\{148\}//
54104 t delim
54105 ' <conf$$subs.awk | sed '
54106 /^[^""]/{
54107   N
54108   s/\n//
54109 }
54110 ' >>$CONFIG_STATUS || ac_write_fail=1
54111 rm -f conf$$subs.awk
54112 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54113 _ACAWK
54114 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54115   for (key in S) S_is_set[key] = 1
54116   FS = ""
54117 
54118 }
54119 {
54120   line = $ 0
54121   nfields = split(line, field, "@")
54122   substed = 0
54123   len = length(field[1])
54124   for (i = 2; i < nfields; i++) {
54125     key = field[i]
54126     keylen = length(key)
54127     if (S_is_set[key]) {
54128       value = S[key]
54129       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54130       len += length(value) + length(field[++i])
54131       substed = 1
54132     } else
54133       len += 1 + keylen
54134   }
54135 
54136   print line
54137 }
54138 
54139 _ACAWK
54140 _ACEOF
54141 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54142 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54143   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54144 else
54145   cat
54146 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54147   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54148 _ACEOF
54149 
54150 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54151 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54152 # trailing colons and then remove the whole line if VPATH becomes empty
54153 # (actually we leave an empty line to preserve line numbers).
54154 if test "x$srcdir" = x.; then
54155   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
54156 h
54157 s///
54158 s/^/:/
54159 s/[      ]*$/:/
54160 s/:\$(srcdir):/:/g
54161 s/:\${srcdir}:/:/g
54162 s/:@srcdir@:/:/g
54163 s/^:*//
54164 s/:*$//
54165 x
54166 s/\(=[   ]*\).*/\1/
54167 G
54168 s/\n//
54169 s/^[^=]*=[       ]*$//
54170 }'
54171 fi
54172 
54173 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54174 fi # test -n "$CONFIG_FILES"
54175 
54176 # Set up the scripts for CONFIG_HEADERS section.
54177 # No need to generate them if there are no CONFIG_HEADERS.
54178 # This happens for instance with `./config.status Makefile'.
54179 if test -n "$CONFIG_HEADERS"; then
54180 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
54181 BEGIN {
54182 _ACEOF
54183 
54184 # Transform confdefs.h into an awk script `defines.awk', embedded as
54185 # here-document in config.status, that substitutes the proper values into
54186 # config.h.in to produce config.h.
54187 
54188 # Create a delimiter string that does not exist in confdefs.h, to ease
54189 # handling of long lines.
54190 ac_delim='%!_!# '
54191 for ac_last_try in false false :; do
54192   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
54193   if test -z "$ac_tt"; then
54194     break
54195   elif $ac_last_try; then
54196     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
54197   else
54198     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54199   fi
54200 done
54201 
54202 # For the awk script, D is an array of macro values keyed by name,
54203 # likewise P contains macro parameters if any.  Preserve backslash
54204 # newline sequences.
54205 
54206 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
54207 sed -n '
54208 s/.\{148\}/&'"$ac_delim"'/g
54209 t rset
54210 :rset
54211 s/^[     ]*#[    ]*define[       ][      ]*/ /
54212 t def
54213 d
54214 :def
54215 s/\\$//
54216 t bsnl
54217 s/["\\]/\\&/g
54218 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
54219 D["\1"]=" \3"/p
54220 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
54221 d
54222 :bsnl
54223 s/["\\]/\\&/g
54224 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
54225 D["\1"]=" \3\\\\\\n"\\/p
54226 t cont
54227 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
54228 t cont
54229 d
54230 :cont
54231 n
54232 s/.\{148\}/&'"$ac_delim"'/g
54233 t clear
54234 :clear
54235 s/\\$//
54236 t bsnlc
54237 s/["\\]/\\&/g; s/^/"/; s/$/"/p
54238 d
54239 :bsnlc
54240 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
54241 b cont
54242 ' <confdefs.h | sed '
54243 s/'"$ac_delim"'/"\\\
54244 "/g' >>$CONFIG_STATUS || ac_write_fail=1
54245 
54246 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54247   for (key in D) D_is_set[key] = 1
54248   FS = ""
54249 }
54250 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
54251   line = \$ 0
54252   split(line, arg, " ")
54253   if (arg[1] == "#") {
54254     defundef = arg[2]
54255     mac1 = arg[3]
54256   } else {
54257     defundef = substr(arg[1], 2)
54258     mac1 = arg[2]
54259   }
54260   split(mac1, mac2, "(") #)
54261   macro = mac2[1]
54262   prefix = substr(line, 1, index(line, defundef) - 1)
54263   if (D_is_set[macro]) {
54264     # Preserve the white space surrounding the "#".
54265     print prefix "define", macro P[macro] D[macro]
54266     next
54267   } else {
54268     # Replace #undef with comments.  This is necessary, for example,
54269     # in the case of _POSIX_SOURCE, which is predefined and required
54270     # on some systems where configure will not decide to define it.
54271     if (defundef == "undef") {
54272       print "/*", prefix defundef, macro, "*/"
54273       next
54274     }
54275   }
54276 }
54277 { print }
54278 _ACAWK
54279 _ACEOF
54280 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54281   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
54282 fi # test -n "$CONFIG_HEADERS"
54283 
54284 
54285 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
54286 shift
54287 for ac_tag
54288 do
54289   case $ac_tag in
54290   :[FHLC]) ac_mode=$ac_tag; continue;;
54291   esac
54292   case $ac_mode$ac_tag in
54293   :[FHL]*:*);;
54294   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54295   :[FH]-) ac_tag=-:-;;
54296   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54297   esac
54298   ac_save_IFS=$IFS
54299   IFS=:
54300   set x $ac_tag
54301   IFS=$ac_save_IFS
54302   shift
54303   ac_file=$1
54304   shift
54305 
54306   case $ac_mode in
54307   :L) ac_source=$1;;
54308   :[FH])
54309     ac_file_inputs=
54310     for ac_f
54311     do
54312       case $ac_f in
54313       -) ac_f="$ac_tmp/stdin";;
54314       *) # Look for the file first in the build tree, then in the source tree
54315          # (if the path is not absolute).  The absolute path cannot be DOS-style,
54316          # because $ac_f cannot contain `:'.
54317          test -f "$ac_f" ||
54318            case $ac_f in
54319            [\\/$]*) false;;
54320            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54321            esac ||
54322            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54323       esac
54324       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54325       as_fn_append ac_file_inputs " '$ac_f'"
54326     done
54327 
54328     # Let's still pretend it is `configure' which instantiates (i.e., don't
54329     # use $as_me), people would be surprised to read:
54330     #    /* config.h.  Generated by config.status.  */
54331     configure_input='Generated from '`
54332           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54333         `' by configure.'
54334     if test x"$ac_file" != x-; then
54335       configure_input="$ac_file.  $configure_input"
54336       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54337 $as_echo "$as_me: creating $ac_file" >&6;}
54338     fi
54339     # Neutralize special characters interpreted by sed in replacement strings.
54340     case $configure_input in #(
54341     *\&* | *\|* | *\\* )
54342        ac_sed_conf_input=`$as_echo "$configure_input" |
54343        sed 's/[\\\\&|]/\\\\&/g'`;; #(
54344     *) ac_sed_conf_input=$configure_input;;
54345     esac
54346 
54347     case $ac_tag in
54348     *:-:* | *:-) cat >"$ac_tmp/stdin" \
54349       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54350     esac
54351     ;;
54352   esac
54353 
54354   ac_dir=`$as_dirname -- "$ac_file" ||
54355 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54356          X"$ac_file" : 'X\(//\)[^/]' \| \
54357          X"$ac_file" : 'X\(//\)$' \| \
54358          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54359 $as_echo X"$ac_file" |
54360     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54361             s//\1/
54362             q
54363           }
54364           /^X\(\/\/\)[^/].*/{
54365             s//\1/
54366             q
54367           }
54368           /^X\(\/\/\)$/{
54369             s//\1/
54370             q
54371           }
54372           /^X\(\/\).*/{
54373             s//\1/
54374             q
54375           }
54376           s/.*/./; q'`
54377   as_dir="$ac_dir"; as_fn_mkdir_p
54378   ac_builddir=.
54379 
54380 case "$ac_dir" in
54381 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54382 *)
54383   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54384   # A ".." for each directory in $ac_dir_suffix.
54385   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54386   case $ac_top_builddir_sub in
54387   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54388   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54389   esac ;;
54390 esac
54391 ac_abs_top_builddir=$ac_pwd
54392 ac_abs_builddir=$ac_pwd$ac_dir_suffix
54393 # for backward compatibility:
54394 ac_top_builddir=$ac_top_build_prefix
54395 
54396 case $srcdir in
54397   .)  # We are building in place.
54398     ac_srcdir=.
54399     ac_top_srcdir=$ac_top_builddir_sub
54400     ac_abs_top_srcdir=$ac_pwd ;;
54401   [\\/]* | ?:[\\/]* )  # Absolute name.
54402     ac_srcdir=$srcdir$ac_dir_suffix;
54403     ac_top_srcdir=$srcdir
54404     ac_abs_top_srcdir=$srcdir ;;
54405   *) # Relative name.
54406     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54407     ac_top_srcdir=$ac_top_build_prefix$srcdir
54408     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54409 esac
54410 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54411 
54412 
54413   case $ac_mode in
54414   :F)
54415   #
54416   # CONFIG_FILE
54417   #
54418 
54419 _ACEOF
54420 
54421 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54422 # If the template does not know about datarootdir, expand it.
54423 # FIXME: This hack should be removed a few years after 2.60.
54424 ac_datarootdir_hack=; ac_datarootdir_seen=
54425 ac_sed_dataroot='
54426 /datarootdir/ {
54427   p
54428   q
54429 }
54430 /@datadir@/p
54431 /@docdir@/p
54432 /@infodir@/p
54433 /@localedir@/p
54434 /@mandir@/p'
54435 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54436 *datarootdir*) ac_datarootdir_seen=yes;;
54437 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54438   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54439 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54440 _ACEOF
54441 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54442   ac_datarootdir_hack='
54443   s&@datadir@&$datadir&g
54444   s&@docdir@&$docdir&g
54445   s&@infodir@&$infodir&g
54446   s&@localedir@&$localedir&g
54447   s&@mandir@&$mandir&g
54448   s&\\\${datarootdir}&$datarootdir&g' ;;
54449 esac
54450 _ACEOF
54451 
54452 # Neutralize VPATH when `$srcdir' = `.'.
54453 # Shell code in configure.ac might set extrasub.
54454 # FIXME: do we really want to maintain this feature?
54455 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54456 ac_sed_extra="$ac_vpsub
54457 $extrasub
54458 _ACEOF
54459 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54460 :t
54461 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54462 s|@configure_input@|$ac_sed_conf_input|;t t
54463 s&@top_builddir@&$ac_top_builddir_sub&;t t
54464 s&@top_build_prefix@&$ac_top_build_prefix&;t t
54465 s&@srcdir@&$ac_srcdir&;t t
54466 s&@abs_srcdir@&$ac_abs_srcdir&;t t
54467 s&@top_srcdir@&$ac_top_srcdir&;t t
54468 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54469 s&@builddir@&$ac_builddir&;t t
54470 s&@abs_builddir@&$ac_abs_builddir&;t t
54471 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54472 $ac_datarootdir_hack
54473 "
54474 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54475   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54476 
54477 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54478   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54479   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
54480       "$ac_tmp/out"`; test -z "$ac_out"; } &&
54481   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54482 which seems to be undefined.  Please make sure it is defined" >&5
54483 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54484 which seems to be undefined.  Please make sure it is defined" >&2;}
54485 
54486   rm -f "$ac_tmp/stdin"
54487   case $ac_file in
54488   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54489   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54490   esac \
54491   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54492  ;;
54493   :H)
54494   #
54495   # CONFIG_HEADER
54496   #
54497   if test x"$ac_file" != x-; then
54498     {
54499       $as_echo "/* $configure_input  */" \
54500       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
54501     } >"$ac_tmp/config.h" \
54502       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54503     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
54504       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
54505 $as_echo "$as_me: $ac_file is unchanged" >&6;}
54506     else
54507       rm -f "$ac_file"
54508       mv "$ac_tmp/config.h" "$ac_file" \
54509         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54510     fi
54511   else
54512     $as_echo "/* $configure_input  */" \
54513       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
54514       || as_fn_error $? "could not create -" "$LINENO" 5
54515   fi
54516  ;;
54517 
54518 
54519   esac
54520 
54521 done # for ac_tag
54522 
54523 
54524 as_fn_exit 0
54525 _ACEOF
54526 ac_clean_files=$ac_clean_files_save
54527 
54528 test $ac_write_fail = 0 ||
54529   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54530 
54531 
54532 # configure is writing to config.log, and then calls config.status.
54533 # config.status does its own redirection, appending to config.log.
54534 # Unfortunately, on DOS this fails, as config.log is still kept open
54535 # by configure, so config.status won't be able to write to it; its
54536 # output is simply discarded.  So we exec the FD to /dev/null,
54537 # effectively closing config.log, so it can be properly (re)opened and
54538 # appended to by config.status.  When coming back to configure, we
54539 # need to make the FD available again.
54540 if test "$no_create" != yes; then
54541   ac_cs_success=:
54542   ac_config_status_args=
54543   test "$silent" = yes &&
54544     ac_config_status_args="$ac_config_status_args --quiet"
54545   exec 5>/dev/null
54546   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54547   exec 5>>config.log
54548   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54549   # would make configure fail if this is the last instruction.
54550   $ac_cs_success || as_fn_exit 1
54551 fi
54552 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54553   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54554 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54555 fi
54556 
54557 
54558 
54559 # Try to move the config.log file to the output directory.
54560 if test -e ./config.log; then
54561   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
54562 fi
54563 
54564 # Make the compare script executable
54565 $CHMOD +x $OUTPUT_ROOT/compare.sh
54566 
54567 # Finally output some useful information to the user
54568 
54569   # Finally output some useful information to the user
54570 
54571   printf "\n"
54572   printf "====================================================\n"
54573   printf "A new configuration has been successfully created in\n"
54574   printf "$OUTPUT_ROOT\n"
54575   if test "x$CONFIGURE_COMMAND_LINE" != x; then
54576     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54577   else
54578     printf "using default settings.\n"
54579   fi
54580 
54581   printf "\n"
54582   printf "Configuration summary:\n"
54583   printf "* Debug level:    $DEBUG_LEVEL\n"
54584   printf "* JDK variant:    $JDK_VARIANT\n"
54585   printf "* JVM variants:   $with_jvm_variants\n"
54586   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54587 
54588   printf "\n"
54589   printf "Tools summary:\n"
54590   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54591     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54592   fi
54593   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54594   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
54595   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54596   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54597 
54598   printf "\n"
54599   printf "Build performance summary:\n"
54600   printf "* Cores to use:   $JOBS\n"
54601   printf "* Memory limit:   $MEMORY_SIZE MB\n"
54602   if test "x$CCACHE_STATUS" != "x"; then
54603     printf "* ccache status:  $CCACHE_STATUS\n"
54604   fi
54605   printf "\n"
54606 
54607   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54608     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54609     printf "will result in longer build times.\n"
54610     printf "\n"
54611   fi
54612 
54613   if test "x$FOUND_ALT_VARIABLES" != "x"; then
54614     printf "WARNING: You have old-style ALT_ environment variables set.\n"
54615     printf "These are not respected, and will be ignored. It is recommended\n"
54616     printf "that you clean your environment. The following variables are set:\n"
54617     printf "$FOUND_ALT_VARIABLES\n"
54618     printf "\n"
54619   fi
54620 
54621   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54622     printf "WARNING: Your build output directory is not on a local disk.\n"
54623     printf "This will severely degrade build performance!\n"
54624     printf "It is recommended that you create an output directory on a local disk,\n"
54625     printf "and run the configure script again from that directory.\n"
54626     printf "\n"
54627   fi
54628 
54629   if test "x$IS_RECONFIGURE" = "xyes"; then
54630     printf "WARNING: The result of this configuration has overridden an older\n"
54631     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54632     printf "proper build. Failure to do so might result in strange build problems.\n"
54633     printf "\n"
54634   fi
54635 
54636   if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
54637     printf "WARNING: The toolchain version used is known to have issues. Please\n"
54638     printf "consider using a supported version unless you know what you are doing.\n"
54639     printf "\n"
54640   fi
54641 
54642 
54643 if test -e "$OUTPUT_ROOT/config.log"; then
54644   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
54645   if test $? -eq 0; then
54646     printf "The following warnings were produced. Repeated here for convenience:\n"
54647     # We must quote sed expression (using []) to stop m4 from eating the [].
54648     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
54649     printf "\n"
54650   fi
54651 fi
54652 
54653