1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk8'
 590 PACKAGE_STRING='OpenJDK jdk8'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CCACHE
 633 USE_PRECOMPILED_HEADER
 634 SJAVAC_SERVER_DIR
 635 ENABLE_SJAVAC
 636 SJAVAC_SERVER_JAVA
 637 JOBS
 638 MEMORY_SIZE
 639 NUM_CORES
 640 ENABLE_INTREE_EC
 641 SALIB_NAME
 642 HOTSPOT_MAKE_ARGS
 643 MSVCP_DLL
 644 MSVCR_DLL
 645 LIBCXX
 646 LLVM_LIBS
 647 LLVM_LDFLAGS
 648 LLVM_CFLAGS
 649 LLVM_CONFIG
 650 LIBFFI_LIBS
 651 LIBFFI_CFLAGS
 652 STATIC_CXX_SETTING
 653 LIBDL
 654 LIBM
 655 LIBZIP_CAN_USE_MMAP
 656 USE_EXTERNAL_LIBZ
 657 USE_EXTERNAL_LIBGIF
 658 USE_EXTERNAL_LIBJPEG
 659 ALSA_LIBS
 660 ALSA_CFLAGS
 661 FREETYPE_BUNDLE_LIB_PATH
 662 FREETYPE_LIBS
 663 FREETYPE_CFLAGS
 664 CUPS_CFLAGS
 665 X_EXTRA_LIBS
 666 X_LIBS
 667 X_PRE_LIBS
 668 X_CFLAGS
 669 XMKMF
 670 FIXPATH
 671 ZIP_DEBUGINFO_FILES
 672 ENABLE_DEBUG_SYMBOLS
 673 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 674 ZERO_ARCHFLAG
 675 LDFLAGS_CXX_JDK
 676 LDFLAGS_JDKEXE_SUFFIX
 677 LDFLAGS_JDKLIB_SUFFIX
 678 LDFLAGS_JDKEXE
 679 LDFLAGS_JDKLIB
 680 CXXFLAGS_JDKEXE
 681 CXXFLAGS_JDKLIB
 682 CFLAGS_JDKEXE
 683 CFLAGS_JDKLIB
 684 MACOSX_VERSION_MIN
 685 NO_LIFETIME_DSE_CFLAG
 686 NO_DELETE_NULL_POINTER_CHECKS_CFLAG
 687 LEGACY_EXTRA_LDFLAGS
 688 LEGACY_EXTRA_CXXFLAGS
 689 LEGACY_EXTRA_CFLAGS
 690 CXXSTD_CXXFLAG
 691 CXX_O_FLAG_NONE
 692 CXX_O_FLAG_NORM
 693 CXX_O_FLAG_HI
 694 CXX_O_FLAG_HIGHEST
 695 C_O_FLAG_NONE
 696 C_O_FLAG_NORM
 697 C_O_FLAG_HI
 698 C_O_FLAG_HIGHEST
 699 CXXFLAGS_DEBUG_SYMBOLS
 700 CFLAGS_DEBUG_SYMBOLS
 701 CXX_FLAG_DEPS
 702 C_FLAG_DEPS
 703 SET_SHARED_LIBRARY_MAPFILE
 704 SET_SHARED_LIBRARY_NAME
 705 SET_SHARED_LIBRARY_ORIGIN
 706 SET_EXECUTABLE_ORIGIN
 707 SHARED_LIBRARY_FLAGS
 708 CXX_FLAG_REORDER
 709 C_FLAG_REORDER
 710 SYSROOT_LDFLAGS
 711 SYSROOT_CFLAGS
 712 RC_FLAGS
 713 AR_OUT_OPTION
 714 LD_OUT_OPTION
 715 EXE_OUT_OPTION
 716 CC_OUT_OPTION
 717 POST_MCS_CMD
 718 POST_STRIP_CMD
 719 ARFLAGS
 720 COMPILER_TARGET_BITS_FLAG
 721 JT_HOME
 722 JTREGEXE
 723 USING_BROKEN_SUSE_LD
 724 PACKAGE_PATH
 725 LDEXECXX
 726 LDEXE
 727 USE_CLANG
 728 HOTSPOT_LD
 729 HOTSPOT_CXX
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 BUILD_LD
 733 BUILD_CXX
 734 BUILD_CC
 735 ac_ct_OBJDUMP
 736 OBJDUMP
 737 ac_ct_OBJCOPY
 738 OBJCOPY
 739 ac_ct_NM
 740 OTOOL
 741 ac_ct_STRIP
 742 MCS
 743 GNM
 744 NM
 745 STRIP
 746 MSBUILD
 747 DUMPBIN
 748 RC
 749 MT
 750 LIPO
 751 ac_ct_OBJC
 752 OBJCFLAGS
 753 OBJC
 754 ac_ct_AR
 755 AR
 756 AS
 757 LDCXX
 758 LD
 759 CXXCPP
 760 CPP
 761 CXX_VERSION_NUMBER
 762 CC_VERSION_NUMBER
 763 ac_ct_CXX
 764 CXXFLAGS
 765 CXX
 766 ac_ct_PROPER_COMPILER_CXX
 767 PROPER_COMPILER_CXX
 768 TOOLCHAIN_PATH_CXX
 769 POTENTIAL_CXX
 770 OBJEXT
 771 EXEEXT
 772 ac_ct_CC
 773 CPPFLAGS
 774 LDFLAGS
 775 CFLAGS
 776 CC
 777 ac_ct_PROPER_COMPILER_CC
 778 PROPER_COMPILER_CC
 779 TOOLCHAIN_PATH_CC
 780 POTENTIAL_CC
 781 SDKPATH
 782 XCODEBUILD
 783 SET_DEVELOPER_DIR
 784 VS_LIB
 785 VS_INCLUDE
 786 VS_PATH
 787 CYGWIN_LINK
 788 EXE_SUFFIX
 789 OBJ_SUFFIX
 790 STATIC_LIBRARY
 791 SHARED_LIBRARY
 792 STATIC_LIBRARY_SUFFIX
 793 SHARED_LIBRARY_SUFFIX
 794 LIBRARY_PREFIX
 795 TOOLCHAIN_TYPE
 796 BUILD_HOTSPOT
 797 HOTSPOT_DIST
 798 BUILD_OUTPUT
 799 OVERRIDE_SRC_ROOT
 800 ADD_SRC_ROOT
 801 JDK_TOPDIR
 802 NASHORN_TOPDIR
 803 HOTSPOT_TOPDIR
 804 JAXWS_TOPDIR
 805 JAXP_TOPDIR
 806 CORBA_TOPDIR
 807 LANGTOOLS_TOPDIR
 808 JAVA_FLAGS_SMALL
 809 JAVA_FLAGS_BIG
 810 JAVA_FLAGS
 811 BOOT_JDK_BITS
 812 JAVAC_FLAGS
 813 BOOT_JDK_SOURCETARGET
 814 BOOT_JDK
 815 BOOT_TOOLSJAR
 816 BOOT_RTJAR
 817 JAVA_CHECK
 818 JAVAC_CHECK
 819 COOKED_BUILD_NUMBER
 820 COOKED_JDK_UPDATE_VERSION
 821 JDK_VERSION
 822 COPYRIGHT_YEAR
 823 MACOSX_BUNDLE_ID_BASE
 824 MACOSX_BUNDLE_NAME_BASE
 825 COMPANY_NAME
 826 JDK_RC_PLATFORM_NAME
 827 PRODUCT_SUFFIX
 828 PRODUCT_NAME
 829 LAUNCHER_NAME
 830 MILESTONE
 831 JDK_BUILD_NUMBER
 832 JDK_UPDATE_VERSION
 833 JDK_MICRO_VERSION
 834 JDK_MINOR_VERSION
 835 JDK_MAJOR_VERSION
 836 USER_RELEASE_SUFFIX
 837 COMPRESS_JARS
 838 UNLIMITED_CRYPTO
 839 CACERTS_FILE
 840 TEST_IN_BUILD
 841 BUILD_HEADLESS
 842 SUPPORT_HEADFUL
 843 SUPPORT_HEADLESS
 844 BDEPS_FTP
 845 BDEPS_UNZIP
 846 OS_VERSION_MICRO
 847 OS_VERSION_MINOR
 848 OS_VERSION_MAJOR
 849 PKG_CONFIG
 850 CODESIGN
 851 XATTR
 852 DSYMUTIL
 853 IS_GNU_TIME
 854 TIME
 855 STAT
 856 HG
 857 READELF
 858 LDD
 859 ZIP
 860 UNZIP
 861 FIND_DELETE
 862 MAKE
 863 CHECK_TOOLSDIR_MAKE
 864 CHECK_TOOLSDIR_GMAKE
 865 CHECK_MAKE
 866 CHECK_GMAKE
 867 PKGHANDLER
 868 OUTPUT_ROOT
 869 CONF_NAME
 870 SPEC
 871 BUILD_VARIANT_RELEASE
 872 DEBUG_CLASSFILES
 873 FASTDEBUG
 874 VARIANT
 875 DEBUG_LEVEL
 876 MACOSX_UNIVERSAL
 877 INCLUDE_SA
 878 JVM_VARIANT_CORE
 879 JVM_VARIANT_ZEROSHARK
 880 JVM_VARIANT_ZERO
 881 JVM_VARIANT_KERNEL
 882 JVM_VARIANT_MINIMAL1
 883 JVM_VARIANT_CLIENT
 884 JVM_VARIANT_SERVER
 885 JVM_VARIANTS
 886 JVM_INTERPRETER
 887 JDK_VARIANT
 888 SET_OPENJDK
 889 BUILD_LOG_WRAPPER
 890 BUILD_LOG_PREVIOUS
 891 BUILD_LOG
 892 TOPDIR
 893 PATH_SEP
 894 ZERO_ARCHDEF
 895 DEFINE_CROSS_COMPILE_ARCH
 896 LP64
 897 OPENJDK_TARGET_OS_EXPORT_DIR
 898 OPENJDK_TARGET_OS_API_DIR
 899 OPENJDK_TARGET_CPU_JLI_CFLAGS
 900 OPENJDK_TARGET_CPU_OSARCH
 901 OPENJDK_TARGET_CPU_ISADIR
 902 OPENJDK_TARGET_CPU_LIBDIR
 903 OPENJDK_TARGET_CPU_LEGACY_LIB
 904 OPENJDK_TARGET_CPU_LEGACY
 905 REQUIRED_OS_VERSION
 906 REQUIRED_OS_NAME
 907 COMPILE_TYPE
 908 OPENJDK_TARGET_CPU_ENDIAN
 909 OPENJDK_TARGET_CPU_BITS
 910 OPENJDK_TARGET_CPU_ARCH
 911 OPENJDK_TARGET_CPU
 912 OPENJDK_TARGET_OS_ENV
 913 OPENJDK_TARGET_OS_API
 914 OPENJDK_TARGET_OS
 915 OPENJDK_BUILD_CPU_ENDIAN
 916 OPENJDK_BUILD_CPU_BITS
 917 OPENJDK_BUILD_CPU_ARCH
 918 OPENJDK_BUILD_CPU
 919 OPENJDK_BUILD_OS_ENV
 920 OPENJDK_BUILD_OS_API
 921 OPENJDK_BUILD_OS
 922 OPENJDK_BUILD_AUTOCONF_NAME
 923 OPENJDK_TARGET_AUTOCONF_NAME
 924 target_os
 925 target_vendor
 926 target_cpu
 927 target
 928 host_os
 929 host_vendor
 930 host_cpu
 931 host
 932 build_os
 933 build_vendor
 934 build_cpu
 935 build
 936 CPIO
 937 SETFILE
 938 DF
 939 READLINK
 940 CYGPATH
 941 SED
 942 FGREP
 943 EGREP
 944 GREP
 945 AWK
 946 XARGS
 947 WHICH
 948 WC
 949 UNIQ
 950 UNAME
 951 TR
 952 TOUCH
 953 TEE
 954 TAR
 955 TAIL
 956 SORT
 957 SH
 958 RM
 959 PRINTF
 960 NAWK
 961 MV
 962 MKTEMP
 963 MKDIR
 964 LS
 965 LN
 966 HEAD
 967 FIND
 968 FILE
 969 EXPR
 970 ECHO
 971 DIRNAME
 972 DIFF
 973 DATE
 974 CUT
 975 CP
 976 COMM
 977 CMP
 978 CHMOD
 979 CAT
 980 BASH
 981 BASENAME
 982 DATE_WHEN_CONFIGURED
 983 CONFIGURE_COMMAND_LINE
 984 CUSTOM_MAKE_DIR
 985 target_alias
 986 host_alias
 987 build_alias
 988 LIBS
 989 ECHO_T
 990 ECHO_N
 991 ECHO_C
 992 DEFS
 993 mandir
 994 localedir
 995 libdir
 996 psdir
 997 pdfdir
 998 dvidir
 999 htmldir
1000 infodir
1001 docdir
1002 oldincludedir
1003 includedir
1004 localstatedir
1005 sharedstatedir
1006 sysconfdir
1007 datadir
1008 datarootdir
1009 libexecdir
1010 sbindir
1011 bindir
1012 program_transform_name
1013 prefix
1014 exec_prefix
1015 PACKAGE_URL
1016 PACKAGE_BUGREPORT
1017 PACKAGE_STRING
1018 PACKAGE_VERSION
1019 PACKAGE_TARNAME
1020 PACKAGE_NAME
1021 PATH_SEPARATOR
1022 SHELL'
1023 ac_subst_files=''
1024 ac_user_opts='
1025 enable_option_checking
1026 with_custom_make_dir
1027 with_target_bits
1028 enable_openjdk_only
1029 with_jdk_variant
1030 with_jvm_interpreter
1031 with_jvm_variants
1032 enable_debug
1033 with_debug_level
1034 with_devkit
1035 with_sys_root
1036 with_sysroot
1037 with_tools_dir
1038 with_toolchain_path
1039 with_extra_path
1040 with_xcode_path
1041 with_conf_name
1042 with_builddeps_conf
1043 with_builddeps_server
1044 with_builddeps_dir
1045 with_builddeps_group
1046 enable_headful
1047 enable_hotspot_test_in_build
1048 with_cacerts_file
1049 enable_unlimited_crypto
1050 with_milestone
1051 with_update_version
1052 with_user_release_suffix
1053 with_build_number
1054 with_copyright_year
1055 with_boot_jdk
1056 with_boot_jdk_jvmargs
1057 with_add_source_root
1058 with_override_source_root
1059 with_adds_and_overrides
1060 with_override_langtools
1061 with_override_corba
1062 with_override_jaxp
1063 with_override_jaxws
1064 with_override_hotspot
1065 with_override_nashorn
1066 with_override_jdk
1067 with_import_hotspot
1068 with_toolchain_type
1069 with_toolchain_version
1070 with_jtreg
1071 with_extra_cflags
1072 with_extra_cxxflags
1073 with_extra_ldflags
1074 enable_debug_symbols
1075 enable_zip_debug_info
1076 enable_macosx_runtime_support
1077 with_x
1078 with_cups
1079 with_cups_include
1080 with_freetype
1081 with_freetype_include
1082 with_freetype_lib
1083 with_freetype_src
1084 enable_freetype_bundling
1085 with_alsa
1086 with_alsa_include
1087 with_alsa_lib
1088 with_giflib
1089 with_zlib
1090 with_stdc__lib
1091 with_msvcr_dll
1092 with_msvcp_dll
1093 with_dxsdk
1094 with_dxsdk_lib
1095 with_dxsdk_include
1096 with_num_cores
1097 with_memory_size
1098 with_jobs
1099 with_sjavac_server_java
1100 enable_sjavac
1101 enable_precompiled_headers
1102 enable_ccache
1103 with_ccache_dir
1104 '
1105       ac_precious_vars='build_alias
1106 host_alias
1107 target_alias
1108 BASENAME
1109 BASH
1110 CAT
1111 CHMOD
1112 CMP
1113 COMM
1114 CP
1115 CUT
1116 DATE
1117 DIFF
1118 DIRNAME
1119 ECHO
1120 EXPR
1121 FILE
1122 FIND
1123 HEAD
1124 LN
1125 LS
1126 MKDIR
1127 MKTEMP
1128 MV
1129 NAWK
1130 PRINTF
1131 RM
1132 SH
1133 SORT
1134 TAIL
1135 TAR
1136 TEE
1137 TOUCH
1138 TR
1139 UNAME
1140 UNIQ
1141 WC
1142 WHICH
1143 XARGS
1144 AWK
1145 GREP
1146 EGREP
1147 FGREP
1148 SED
1149 CYGPATH
1150 READLINK
1151 DF
1152 SETFILE
1153 CPIO
1154 UNZIP
1155 ZIP
1156 LDD
1157 READELF
1158 HG
1159 STAT
1160 TIME
1161 DSYMUTIL
1162 XATTR
1163 CODESIGN
1164 PKG_CONFIG
1165 CC
1166 CFLAGS
1167 LDFLAGS
1168 LIBS
1169 CPPFLAGS
1170 CXX
1171 CXXFLAGS
1172 CCC
1173 CPP
1174 CXXCPP
1175 AS
1176 AR
1177 OBJC
1178 OBJCFLAGS
1179 LIPO
1180 STRIP
1181 NM
1182 GNM
1183 MCS
1184 OBJCOPY
1185 OBJDUMP
1186 BUILD_CC
1187 BUILD_CXX
1188 BUILD_LD
1189 JTREGEXE
1190 XMKMF
1191 FREETYPE_CFLAGS
1192 FREETYPE_LIBS
1193 ALSA_CFLAGS
1194 ALSA_LIBS
1195 LIBFFI_CFLAGS
1196 LIBFFI_LIBS
1197 CCACHE'
1198 
1199 
1200 # Initialize some variables set by options.
1201 ac_init_help=
1202 ac_init_version=false
1203 ac_unrecognized_opts=
1204 ac_unrecognized_sep=
1205 # The variables have the same names as the options, with
1206 # dashes changed to underlines.
1207 cache_file=/dev/null
1208 exec_prefix=NONE
1209 no_create=
1210 no_recursion=
1211 prefix=NONE
1212 program_prefix=NONE
1213 program_suffix=NONE
1214 program_transform_name=s,x,x,
1215 silent=
1216 site=
1217 srcdir=
1218 verbose=
1219 x_includes=NONE
1220 x_libraries=NONE
1221 
1222 # Installation directory options.
1223 # These are left unexpanded so users can "make install exec_prefix=/foo"
1224 # and all the variables that are supposed to be based on exec_prefix
1225 # by default will actually change.
1226 # Use braces instead of parens because sh, perl, etc. also accept them.
1227 # (The list follows the same order as the GNU Coding Standards.)
1228 bindir='${exec_prefix}/bin'
1229 sbindir='${exec_prefix}/sbin'
1230 libexecdir='${exec_prefix}/libexec'
1231 datarootdir='${prefix}/share'
1232 datadir='${datarootdir}'
1233 sysconfdir='${prefix}/etc'
1234 sharedstatedir='${prefix}/com'
1235 localstatedir='${prefix}/var'
1236 includedir='${prefix}/include'
1237 oldincludedir='/usr/include'
1238 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1239 infodir='${datarootdir}/info'
1240 htmldir='${docdir}'
1241 dvidir='${docdir}'
1242 pdfdir='${docdir}'
1243 psdir='${docdir}'
1244 libdir='${exec_prefix}/lib'
1245 localedir='${datarootdir}/locale'
1246 mandir='${datarootdir}/man'
1247 
1248 ac_prev=
1249 ac_dashdash=
1250 for ac_option
1251 do
1252   # If the previous option needs an argument, assign it.
1253   if test -n "$ac_prev"; then
1254     eval $ac_prev=\$ac_option
1255     ac_prev=
1256     continue
1257   fi
1258 
1259   case $ac_option in
1260   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1261   *=)   ac_optarg= ;;
1262   *)    ac_optarg=yes ;;
1263   esac
1264 
1265   # Accept the important Cygnus configure options, so we can diagnose typos.
1266 
1267   case $ac_dashdash$ac_option in
1268   --)
1269     ac_dashdash=yes ;;
1270 
1271   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1272     ac_prev=bindir ;;
1273   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1274     bindir=$ac_optarg ;;
1275 
1276   -build | --build | --buil | --bui | --bu)
1277     ac_prev=build_alias ;;
1278   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1279     build_alias=$ac_optarg ;;
1280 
1281   -cache-file | --cache-file | --cache-fil | --cache-fi \
1282   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1283     ac_prev=cache_file ;;
1284   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1285   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1286     cache_file=$ac_optarg ;;
1287 
1288   --config-cache | -C)
1289     cache_file=config.cache ;;
1290 
1291   -datadir | --datadir | --datadi | --datad)
1292     ac_prev=datadir ;;
1293   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1294     datadir=$ac_optarg ;;
1295 
1296   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1297   | --dataroo | --dataro | --datar)
1298     ac_prev=datarootdir ;;
1299   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1300   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1301     datarootdir=$ac_optarg ;;
1302 
1303   -disable-* | --disable-*)
1304     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1305     # Reject names that are not valid shell variable names.
1306     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1307       as_fn_error $? "invalid feature name: $ac_useropt"
1308     ac_useropt_orig=$ac_useropt
1309     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1310     case $ac_user_opts in
1311       *"
1312 "enable_$ac_useropt"
1313 "*) ;;
1314       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1315          ac_unrecognized_sep=', ';;
1316     esac
1317     eval enable_$ac_useropt=no ;;
1318 
1319   -docdir | --docdir | --docdi | --doc | --do)
1320     ac_prev=docdir ;;
1321   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1322     docdir=$ac_optarg ;;
1323 
1324   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1325     ac_prev=dvidir ;;
1326   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1327     dvidir=$ac_optarg ;;
1328 
1329   -enable-* | --enable-*)
1330     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1331     # Reject names that are not valid shell variable names.
1332     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1333       as_fn_error $? "invalid feature name: $ac_useropt"
1334     ac_useropt_orig=$ac_useropt
1335     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1336     case $ac_user_opts in
1337       *"
1338 "enable_$ac_useropt"
1339 "*) ;;
1340       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1341          ac_unrecognized_sep=', ';;
1342     esac
1343     eval enable_$ac_useropt=\$ac_optarg ;;
1344 
1345   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1346   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1347   | --exec | --exe | --ex)
1348     ac_prev=exec_prefix ;;
1349   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1350   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1351   | --exec=* | --exe=* | --ex=*)
1352     exec_prefix=$ac_optarg ;;
1353 
1354   -gas | --gas | --ga | --g)
1355     # Obsolete; use --with-gas.
1356     with_gas=yes ;;
1357 
1358   -help | --help | --hel | --he | -h)
1359     ac_init_help=long ;;
1360   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1361     ac_init_help=recursive ;;
1362   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1363     ac_init_help=short ;;
1364 
1365   -host | --host | --hos | --ho)
1366     ac_prev=host_alias ;;
1367   -host=* | --host=* | --hos=* | --ho=*)
1368     host_alias=$ac_optarg ;;
1369 
1370   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1371     ac_prev=htmldir ;;
1372   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1373   | --ht=*)
1374     htmldir=$ac_optarg ;;
1375 
1376   -includedir | --includedir | --includedi | --included | --include \
1377   | --includ | --inclu | --incl | --inc)
1378     ac_prev=includedir ;;
1379   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1380   | --includ=* | --inclu=* | --incl=* | --inc=*)
1381     includedir=$ac_optarg ;;
1382 
1383   -infodir | --infodir | --infodi | --infod | --info | --inf)
1384     ac_prev=infodir ;;
1385   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1386     infodir=$ac_optarg ;;
1387 
1388   -libdir | --libdir | --libdi | --libd)
1389     ac_prev=libdir ;;
1390   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1391     libdir=$ac_optarg ;;
1392 
1393   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1394   | --libexe | --libex | --libe)
1395     ac_prev=libexecdir ;;
1396   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1397   | --libexe=* | --libex=* | --libe=*)
1398     libexecdir=$ac_optarg ;;
1399 
1400   -localedir | --localedir | --localedi | --localed | --locale)
1401     ac_prev=localedir ;;
1402   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1403     localedir=$ac_optarg ;;
1404 
1405   -localstatedir | --localstatedir | --localstatedi | --localstated \
1406   | --localstate | --localstat | --localsta | --localst | --locals)
1407     ac_prev=localstatedir ;;
1408   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1409   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1410     localstatedir=$ac_optarg ;;
1411 
1412   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1413     ac_prev=mandir ;;
1414   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1415     mandir=$ac_optarg ;;
1416 
1417   -nfp | --nfp | --nf)
1418     # Obsolete; use --without-fp.
1419     with_fp=no ;;
1420 
1421   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1422   | --no-cr | --no-c | -n)
1423     no_create=yes ;;
1424 
1425   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1426   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1427     no_recursion=yes ;;
1428 
1429   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1430   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1431   | --oldin | --oldi | --old | --ol | --o)
1432     ac_prev=oldincludedir ;;
1433   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1434   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1435   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1436     oldincludedir=$ac_optarg ;;
1437 
1438   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1439     ac_prev=prefix ;;
1440   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1441     prefix=$ac_optarg ;;
1442 
1443   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1444   | --program-pre | --program-pr | --program-p)
1445     ac_prev=program_prefix ;;
1446   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1447   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1448     program_prefix=$ac_optarg ;;
1449 
1450   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1451   | --program-suf | --program-su | --program-s)
1452     ac_prev=program_suffix ;;
1453   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1454   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1455     program_suffix=$ac_optarg ;;
1456 
1457   -program-transform-name | --program-transform-name \
1458   | --program-transform-nam | --program-transform-na \
1459   | --program-transform-n | --program-transform- \
1460   | --program-transform | --program-transfor \
1461   | --program-transfo | --program-transf \
1462   | --program-trans | --program-tran \
1463   | --progr-tra | --program-tr | --program-t)
1464     ac_prev=program_transform_name ;;
1465   -program-transform-name=* | --program-transform-name=* \
1466   | --program-transform-nam=* | --program-transform-na=* \
1467   | --program-transform-n=* | --program-transform-=* \
1468   | --program-transform=* | --program-transfor=* \
1469   | --program-transfo=* | --program-transf=* \
1470   | --program-trans=* | --program-tran=* \
1471   | --progr-tra=* | --program-tr=* | --program-t=*)
1472     program_transform_name=$ac_optarg ;;
1473 
1474   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1475     ac_prev=pdfdir ;;
1476   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1477     pdfdir=$ac_optarg ;;
1478 
1479   -psdir | --psdir | --psdi | --psd | --ps)
1480     ac_prev=psdir ;;
1481   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1482     psdir=$ac_optarg ;;
1483 
1484   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1485   | -silent | --silent | --silen | --sile | --sil)
1486     silent=yes ;;
1487 
1488   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1489     ac_prev=sbindir ;;
1490   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1491   | --sbi=* | --sb=*)
1492     sbindir=$ac_optarg ;;
1493 
1494   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1495   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1496   | --sharedst | --shareds | --shared | --share | --shar \
1497   | --sha | --sh)
1498     ac_prev=sharedstatedir ;;
1499   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1500   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1501   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1502   | --sha=* | --sh=*)
1503     sharedstatedir=$ac_optarg ;;
1504 
1505   -site | --site | --sit)
1506     ac_prev=site ;;
1507   -site=* | --site=* | --sit=*)
1508     site=$ac_optarg ;;
1509 
1510   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1511     ac_prev=srcdir ;;
1512   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1513     srcdir=$ac_optarg ;;
1514 
1515   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1516   | --syscon | --sysco | --sysc | --sys | --sy)
1517     ac_prev=sysconfdir ;;
1518   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1519   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1520     sysconfdir=$ac_optarg ;;
1521 
1522   -target | --target | --targe | --targ | --tar | --ta | --t)
1523     ac_prev=target_alias ;;
1524   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1525     target_alias=$ac_optarg ;;
1526 
1527   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1528     verbose=yes ;;
1529 
1530   -version | --version | --versio | --versi | --vers | -V)
1531     ac_init_version=: ;;
1532 
1533   -with-* | --with-*)
1534     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1535     # Reject names that are not valid shell variable names.
1536     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1537       as_fn_error $? "invalid package name: $ac_useropt"
1538     ac_useropt_orig=$ac_useropt
1539     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1540     case $ac_user_opts in
1541       *"
1542 "with_$ac_useropt"
1543 "*) ;;
1544       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1545          ac_unrecognized_sep=', ';;
1546     esac
1547     eval with_$ac_useropt=\$ac_optarg ;;
1548 
1549   -without-* | --without-*)
1550     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1551     # Reject names that are not valid shell variable names.
1552     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1553       as_fn_error $? "invalid package name: $ac_useropt"
1554     ac_useropt_orig=$ac_useropt
1555     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1556     case $ac_user_opts in
1557       *"
1558 "with_$ac_useropt"
1559 "*) ;;
1560       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1561          ac_unrecognized_sep=', ';;
1562     esac
1563     eval with_$ac_useropt=no ;;
1564 
1565   --x)
1566     # Obsolete; use --with-x.
1567     with_x=yes ;;
1568 
1569   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1570   | --x-incl | --x-inc | --x-in | --x-i)
1571     ac_prev=x_includes ;;
1572   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1573   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1574     x_includes=$ac_optarg ;;
1575 
1576   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1577   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1578     ac_prev=x_libraries ;;
1579   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1580   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1581     x_libraries=$ac_optarg ;;
1582 
1583   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1584 Try \`$0 --help' for more information"
1585     ;;
1586 
1587   *=*)
1588     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1589     # Reject names that are not valid shell variable names.
1590     case $ac_envvar in #(
1591       '' | [0-9]* | *[!_$as_cr_alnum]* )
1592       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1593     esac
1594     eval $ac_envvar=\$ac_optarg
1595     export $ac_envvar ;;
1596 
1597   *)
1598     # FIXME: should be removed in autoconf 3.0.
1599     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1600     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1601       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1602     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1603     ;;
1604 
1605   esac
1606 done
1607 
1608 if test -n "$ac_prev"; then
1609   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1610   as_fn_error $? "missing argument to $ac_option"
1611 fi
1612 
1613 if test -n "$ac_unrecognized_opts"; then
1614   case $enable_option_checking in
1615     no) ;;
1616     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1617     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1618   esac
1619 fi
1620 
1621 # Check all directory arguments for consistency.
1622 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1623                 datadir sysconfdir sharedstatedir localstatedir includedir \
1624                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1625                 libdir localedir mandir
1626 do
1627   eval ac_val=\$$ac_var
1628   # Remove trailing slashes.
1629   case $ac_val in
1630     */ )
1631       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1632       eval $ac_var=\$ac_val;;
1633   esac
1634   # Be sure to have absolute directory names.
1635   case $ac_val in
1636     [\\/$]* | ?:[\\/]* )  continue;;
1637     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1638   esac
1639   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1640 done
1641 
1642 # There might be people who depend on the old broken behavior: `$host'
1643 # used to hold the argument of --host etc.
1644 # FIXME: To remove some day.
1645 build=$build_alias
1646 host=$host_alias
1647 target=$target_alias
1648 
1649 # FIXME: To remove some day.
1650 if test "x$host_alias" != x; then
1651   if test "x$build_alias" = x; then
1652     cross_compiling=maybe
1653   elif test "x$build_alias" != "x$host_alias"; then
1654     cross_compiling=yes
1655   fi
1656 fi
1657 
1658 ac_tool_prefix=
1659 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1660 
1661 test "$silent" = yes && exec 6>/dev/null
1662 
1663 
1664 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1665 ac_ls_di=`ls -di .` &&
1666 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1667   as_fn_error $? "working directory cannot be determined"
1668 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1669   as_fn_error $? "pwd does not report name of working directory"
1670 
1671 
1672 # Find the source files, if location was not specified.
1673 if test -z "$srcdir"; then
1674   ac_srcdir_defaulted=yes
1675   # Try the directory containing this script, then the parent directory.
1676   ac_confdir=`$as_dirname -- "$as_myself" ||
1677 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1678          X"$as_myself" : 'X\(//\)[^/]' \| \
1679          X"$as_myself" : 'X\(//\)$' \| \
1680          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1681 $as_echo X"$as_myself" |
1682     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1683             s//\1/
1684             q
1685           }
1686           /^X\(\/\/\)[^/].*/{
1687             s//\1/
1688             q
1689           }
1690           /^X\(\/\/\)$/{
1691             s//\1/
1692             q
1693           }
1694           /^X\(\/\).*/{
1695             s//\1/
1696             q
1697           }
1698           s/.*/./; q'`
1699   srcdir=$ac_confdir
1700   if test ! -r "$srcdir/$ac_unique_file"; then
1701     srcdir=..
1702   fi
1703 else
1704   ac_srcdir_defaulted=no
1705 fi
1706 if test ! -r "$srcdir/$ac_unique_file"; then
1707   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1708   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1709 fi
1710 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1711 ac_abs_confdir=`(
1712         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1713         pwd)`
1714 # When building in place, set srcdir=.
1715 if test "$ac_abs_confdir" = "$ac_pwd"; then
1716   srcdir=.
1717 fi
1718 # Remove unnecessary trailing slashes from srcdir.
1719 # Double slashes in file names in object file debugging info
1720 # mess up M-x gdb in Emacs.
1721 case $srcdir in
1722 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1723 esac
1724 for ac_var in $ac_precious_vars; do
1725   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1726   eval ac_env_${ac_var}_value=\$${ac_var}
1727   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1728   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1729 done
1730 
1731 #
1732 # Report the --help message.
1733 #
1734 if test "$ac_init_help" = "long"; then
1735   # Omit some internal or obsolete options to make the list less imposing.
1736   # This message is too long to be a string in the A/UX 3.1 sh.
1737   cat <<_ACEOF
1738 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1739 
1740 Usage: $0 [OPTION]... [VAR=VALUE]...
1741 
1742 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1743 VAR=VALUE.  See below for descriptions of some of the useful variables.
1744 
1745 Defaults for the options are specified in brackets.
1746 
1747 Configuration:
1748   -h, --help              display this help and exit
1749       --help=short        display options specific to this package
1750       --help=recursive    display the short help of all the included packages
1751   -V, --version           display version information and exit
1752   -q, --quiet, --silent   do not print \`checking ...' messages
1753       --cache-file=FILE   cache test results in FILE [disabled]
1754   -C, --config-cache      alias for \`--cache-file=config.cache'
1755   -n, --no-create         do not create output files
1756       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1757 
1758 Installation directories:
1759   --prefix=PREFIX         install architecture-independent files in PREFIX
1760                           [$ac_default_prefix]
1761   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1762                           [PREFIX]
1763 
1764 By default, \`make install' will install all the files in
1765 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1766 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1767 for instance \`--prefix=\$HOME'.
1768 
1769 For better control, use the options below.
1770 
1771 Fine tuning of the installation directories:
1772   --bindir=DIR            user executables [EPREFIX/bin]
1773   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1774   --libexecdir=DIR        program executables [EPREFIX/libexec]
1775   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1776   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1777   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1778   --libdir=DIR            object code libraries [EPREFIX/lib]
1779   --includedir=DIR        C header files [PREFIX/include]
1780   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1781   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1782   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1783   --infodir=DIR           info documentation [DATAROOTDIR/info]
1784   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1785   --mandir=DIR            man documentation [DATAROOTDIR/man]
1786   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1787   --htmldir=DIR           html documentation [DOCDIR]
1788   --dvidir=DIR            dvi documentation [DOCDIR]
1789   --pdfdir=DIR            pdf documentation [DOCDIR]
1790   --psdir=DIR             ps documentation [DOCDIR]
1791 _ACEOF
1792 
1793   cat <<\_ACEOF
1794 
1795 X features:
1796   --x-includes=DIR    X include files are in DIR
1797   --x-libraries=DIR   X library files are in DIR
1798 
1799 System types:
1800   --build=BUILD     configure for building on BUILD [guessed]
1801   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1802   --target=TARGET   configure for building compilers for TARGET [HOST]
1803 _ACEOF
1804 fi
1805 
1806 if test -n "$ac_init_help"; then
1807   case $ac_init_help in
1808      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1809    esac
1810   cat <<\_ACEOF
1811 
1812 Optional Features:
1813   --disable-option-checking  ignore unrecognized --enable/--with options
1814   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1815   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1816   --enable-openjdk-only   suppress building custom source even if present
1817                           [disabled]
1818   --enable-debug          set the debug level to fastdebug (shorthand for
1819                           --with-debug-level=fastdebug) [disabled]
1820   --disable-headful       disable building headful support (graphical UI
1821                           support) [enabled]
1822   --enable-hotspot-test-in-build
1823                           run the Queens test after Hotspot build [disabled]
1824   --enable-unlimited-crypto
1825                           Enable unlimited crypto policy [disabled]
1826   --disable-debug-symbols disable generation of debug symbols [enabled]
1827   --disable-zip-debug-info
1828                           disable zipping of debug-info files [enabled]
1829   --enable-macosx-runtime-support
1830                           Deprecated. Option is kept for backwards
1831                           compatibility and is ignored
1832   --disable-freetype-bundling
1833                           disable bundling of the freetype library with the
1834                           build result [enabled on Windows or when using
1835                           --with-freetype, disabled otherwise]
1836   --enable-sjavac         use sjavac to do fast incremental compiles
1837                           [disabled]
1838   --disable-precompiled-headers
1839                           disable using precompiled headers when compiling C++
1840                           [enabled]
1841   --enable-ccache         enable using ccache to speed up recompilations
1842                           [disabled]
1843 
1844 Optional Packages:
1845   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1846   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1847   --with-custom-make-dir  use this directory for custom build/make files
1848   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1849                           support it), e.g. --with-target-bits=32 [guessed]
1850   --with-jdk-variant      JDK variant to build (normal) [normal]
1851   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1852   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1853                           client, minimal1, kernel, zero, zeroshark, core)
1854                           [server]
1855   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1856                           [release]
1857   --with-devkit           use this devkit for compilers, tools and resources
1858   --with-sys-root         alias for --with-sysroot for backwards compatability
1859   --with-sysroot          use this directory as sysroot)
1860   --with-tools-dir        alias for --with-toolchain-path for backwards
1861                           compatibility
1862   --with-toolchain-path   prepend these directories when searching for
1863                           toolchain binaries (compilers etc)
1864   --with-extra-path       prepend these directories to the default path
1865   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1866                           10.9 and later)
1867   --with-conf-name        use this as the name of the configuration [generated
1868                           from important configuration options]
1869   --with-builddeps-conf   use this configuration file for the builddeps
1870   --with-builddeps-server download and use build dependencies from this server
1871                           url
1872   --with-builddeps-dir    store downloaded build dependencies here
1873                           [/localhome/builddeps]
1874   --with-builddeps-group  chgrp the downloaded build dependencies to this
1875                           group
1876   --with-cacerts-file     specify alternative cacerts file
1877   --with-milestone        Set milestone value for build [internal]
1878   --with-update-version   Set update version value for build [b00]
1879   --with-user-release-suffix
1880                           Add a custom string to the version string if build
1881                           number isn't set.[username_builddateb00]
1882   --with-build-number     Set build number value for build [b00]
1883   --with-copyright-year   Set copyright year value for build [current year]
1884   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1885   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1886                           invocations of the Boot JDK, overriding the default
1887                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1888                           -enableassertions"
1889   --with-add-source-root  for each and every source directory, look in this
1890                           additional source root for the same directory; if it
1891                           exists and have files in it, include it in the build
1892   --with-override-source-root
1893                           for each and every source directory, look in this
1894                           override source root for the same directory; if it
1895                           exists, use that directory instead and ignore the
1896                           directory in the original source root
1897   --with-adds-and-overrides
1898                           use the subdirs 'adds' and 'overrides' in the
1899                           specified directory as add-source-root and
1900                           override-source-root
1901   --with-override-langtools
1902                           use this langtools dir for the build
1903   --with-override-corba   use this corba dir for the build
1904   --with-override-jaxp    use this jaxp dir for the build
1905   --with-override-jaxws   use this jaxws dir for the build
1906   --with-override-hotspot use this hotspot dir for the build
1907   --with-override-nashorn use this nashorn dir for the build
1908   --with-override-jdk     use this jdk dir for the build
1909   --with-import-hotspot   import hotspot binaries from this jdk image or
1910                           hotspot build dist dir instead of building from
1911                           source
1912   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1913                           to show possible values [platform dependent]
1914   --with-toolchain-version
1915                           the version of the toolchain to look for, use
1916                           '--help' to show possible values [platform
1917                           dependent]
1918   --with-jtreg            Regression Test Harness [probed]
1919   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1920   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1921   --with-extra-ldflags    extra flags to be used when linking jdk
1922   --with-x                use the X Window System
1923   --with-cups             specify prefix directory for the cups package
1924                           (expecting the headers under PATH/include)
1925   --with-cups-include     specify directory for the cups include files
1926   --with-freetype         specify prefix directory for the freetype package
1927                           (expecting the libraries under PATH/lib and the
1928                           headers under PATH/include)
1929   --with-freetype-include specify directory for the freetype include files
1930   --with-freetype-lib     specify directory for the freetype library
1931   --with-freetype-src     specify directory with freetype sources to
1932                           automatically build the library (experimental,
1933                           Windows-only)
1934   --with-alsa             specify prefix directory for the alsa package
1935                           (expecting the libraries under PATH/lib and the
1936                           headers under PATH/include)
1937   --with-alsa-include     specify directory for the alsa include files
1938   --with-alsa-lib         specify directory for the alsa library
1939   --with-giflib           use giflib from build system or OpenJDK source
1940                           (system, bundled) [bundled]
1941   --with-zlib             use zlib from build system or OpenJDK source
1942                           (system, bundled) [bundled]
1943   --with-stdc++lib=<static>,<dynamic>,<default>
1944                           force linking of the C++ runtime on Linux to either
1945                           static or dynamic, default is static with dynamic as
1946                           fallback
1947   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1948                           (Windows only) [probed]
1949   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1950                           (Windows only) [probed]
1951   --with-dxsdk            Deprecated. Option is kept for backwards
1952                           compatibility and is ignored
1953   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1954                           compatibility and is ignored
1955   --with-dxsdk-include    Deprecated. Option is kept for backwards
1956                           compatibility and is ignored
1957   --with-num-cores        number of cores in the build system, e.g.
1958                           --with-num-cores=8 [probed]
1959   --with-memory-size      memory (in MB) available in the build system, e.g.
1960                           --with-memory-size=1024 [probed]
1961   --with-jobs             number of parallel jobs to let make run [calculated
1962                           based on cores and memory]
1963   --with-sjavac-server-java
1964                           use this java binary for running the sjavac
1965                           background server [Boot JDK java]
1966   --with-ccache-dir       where to store ccache files [~/.ccache]
1967 
1968 Some influential environment variables:
1969   BASENAME    Override default value for BASENAME
1970   BASH        Override default value for BASH
1971   CAT         Override default value for CAT
1972   CHMOD       Override default value for CHMOD
1973   CMP         Override default value for CMP
1974   COMM        Override default value for COMM
1975   CP          Override default value for CP
1976   CUT         Override default value for CUT
1977   DATE        Override default value for DATE
1978   DIFF        Override default value for DIFF
1979   DIRNAME     Override default value for DIRNAME
1980   ECHO        Override default value for ECHO
1981   EXPR        Override default value for EXPR
1982   FILE        Override default value for FILE
1983   FIND        Override default value for FIND
1984   HEAD        Override default value for HEAD
1985   LN          Override default value for LN
1986   LS          Override default value for LS
1987   MKDIR       Override default value for MKDIR
1988   MKTEMP      Override default value for MKTEMP
1989   MV          Override default value for MV
1990   NAWK        Override default value for NAWK
1991   PRINTF      Override default value for PRINTF
1992   RM          Override default value for RM
1993   SH          Override default value for SH
1994   SORT        Override default value for SORT
1995   TAIL        Override default value for TAIL
1996   TAR         Override default value for TAR
1997   TEE         Override default value for TEE
1998   TOUCH       Override default value for TOUCH
1999   TR          Override default value for TR
2000   UNAME       Override default value for UNAME
2001   UNIQ        Override default value for UNIQ
2002   WC          Override default value for WC
2003   WHICH       Override default value for WHICH
2004   XARGS       Override default value for XARGS
2005   AWK         Override default value for AWK
2006   GREP        Override default value for GREP
2007   EGREP       Override default value for EGREP
2008   FGREP       Override default value for FGREP
2009   SED         Override default value for SED
2010   CYGPATH     Override default value for CYGPATH
2011   READLINK    Override default value for READLINK
2012   DF          Override default value for DF
2013   SETFILE     Override default value for SETFILE
2014   CPIO        Override default value for CPIO
2015   UNZIP       Override default value for UNZIP
2016   ZIP         Override default value for ZIP
2017   LDD         Override default value for LDD
2018   READELF     Override default value for READELF
2019   HG          Override default value for HG
2020   STAT        Override default value for STAT
2021   TIME        Override default value for TIME
2022   DSYMUTIL    Override default value for DSYMUTIL
2023   XATTR       Override default value for XATTR
2024   CODESIGN    Override default value for CODESIGN
2025   PKG_CONFIG  path to pkg-config utility
2026   CC          C compiler command
2027   CFLAGS      C compiler flags
2028   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2029               nonstandard directory <lib dir>
2030   LIBS        libraries to pass to the linker, e.g. -l<library>
2031   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2032               you have headers in a nonstandard directory <include dir>
2033   CXX         C++ compiler command
2034   CXXFLAGS    C++ compiler flags
2035   CPP         C preprocessor
2036   CXXCPP      C++ preprocessor
2037   AS          Override default value for AS
2038   AR          Override default value for AR
2039   OBJC        Objective C compiler command
2040   OBJCFLAGS   Objective C compiler flags
2041   LIPO        Override default value for LIPO
2042   STRIP       Override default value for STRIP
2043   NM          Override default value for NM
2044   GNM         Override default value for GNM
2045   MCS         Override default value for MCS
2046   OBJCOPY     Override default value for OBJCOPY
2047   OBJDUMP     Override default value for OBJDUMP
2048   BUILD_CC    Override default value for BUILD_CC
2049   BUILD_CXX   Override default value for BUILD_CXX
2050   BUILD_LD    Override default value for BUILD_LD
2051   JTREGEXE    Override default value for JTREGEXE
2052   XMKMF       Path to xmkmf, Makefile generator for X Window System
2053   FREETYPE_CFLAGS
2054               C compiler flags for FREETYPE, overriding pkg-config
2055   FREETYPE_LIBS
2056               linker flags for FREETYPE, overriding pkg-config
2057   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2058   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2059   LIBFFI_CFLAGS
2060               C compiler flags for LIBFFI, overriding pkg-config
2061   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2062   CCACHE      Override default value for CCACHE
2063 
2064 Use these variables to override the choices made by `configure' or to help
2065 it to find libraries and programs with nonstandard names/locations.
2066 
2067 Report bugs to <build-dev@openjdk.java.net>.
2068 OpenJDK home page: <http://openjdk.java.net>.
2069 _ACEOF
2070 ac_status=$?
2071 fi
2072 
2073 if test "$ac_init_help" = "recursive"; then
2074   # If there are subdirs, report their specific --help.
2075   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2076     test -d "$ac_dir" ||
2077       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2078       continue
2079     ac_builddir=.
2080 
2081 case "$ac_dir" in
2082 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2083 *)
2084   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2085   # A ".." for each directory in $ac_dir_suffix.
2086   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2087   case $ac_top_builddir_sub in
2088   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2089   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2090   esac ;;
2091 esac
2092 ac_abs_top_builddir=$ac_pwd
2093 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2094 # for backward compatibility:
2095 ac_top_builddir=$ac_top_build_prefix
2096 
2097 case $srcdir in
2098   .)  # We are building in place.
2099     ac_srcdir=.
2100     ac_top_srcdir=$ac_top_builddir_sub
2101     ac_abs_top_srcdir=$ac_pwd ;;
2102   [\\/]* | ?:[\\/]* )  # Absolute name.
2103     ac_srcdir=$srcdir$ac_dir_suffix;
2104     ac_top_srcdir=$srcdir
2105     ac_abs_top_srcdir=$srcdir ;;
2106   *) # Relative name.
2107     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2108     ac_top_srcdir=$ac_top_build_prefix$srcdir
2109     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2110 esac
2111 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2112 
2113     cd "$ac_dir" || { ac_status=$?; continue; }
2114     # Check for guested configure.
2115     if test -f "$ac_srcdir/configure.gnu"; then
2116       echo &&
2117       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2118     elif test -f "$ac_srcdir/configure"; then
2119       echo &&
2120       $SHELL "$ac_srcdir/configure" --help=recursive
2121     else
2122       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2123     fi || ac_status=$?
2124     cd "$ac_pwd" || { ac_status=$?; break; }
2125   done
2126 fi
2127 
2128 test -n "$ac_init_help" && exit $ac_status
2129 if $ac_init_version; then
2130   cat <<\_ACEOF
2131 OpenJDK configure jdk8
2132 generated by GNU Autoconf 2.69
2133 
2134 Copyright (C) 2012 Free Software Foundation, Inc.
2135 This configure script is free software; the Free Software Foundation
2136 gives unlimited permission to copy, distribute and modify it.
2137 _ACEOF
2138   exit
2139 fi
2140 
2141 ## ------------------------ ##
2142 ## Autoconf initialization. ##
2143 ## ------------------------ ##
2144 
2145 # ac_fn_c_try_compile LINENO
2146 # --------------------------
2147 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2148 ac_fn_c_try_compile ()
2149 {
2150   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2151   rm -f conftest.$ac_objext
2152   if { { ac_try="$ac_compile"
2153 case "(($ac_try" in
2154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2155   *) ac_try_echo=$ac_try;;
2156 esac
2157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2158 $as_echo "$ac_try_echo"; } >&5
2159   (eval "$ac_compile") 2>conftest.err
2160   ac_status=$?
2161   if test -s conftest.err; then
2162     grep -v '^ *+' conftest.err >conftest.er1
2163     cat conftest.er1 >&5
2164     mv -f conftest.er1 conftest.err
2165   fi
2166   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2167   test $ac_status = 0; } && {
2168          test -z "$ac_c_werror_flag" ||
2169          test ! -s conftest.err
2170        } && test -s conftest.$ac_objext; then :
2171   ac_retval=0
2172 else
2173   $as_echo "$as_me: failed program was:" >&5
2174 sed 's/^/| /' conftest.$ac_ext >&5
2175 
2176         ac_retval=1
2177 fi
2178   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2179   as_fn_set_status $ac_retval
2180 
2181 } # ac_fn_c_try_compile
2182 
2183 # ac_fn_cxx_try_compile LINENO
2184 # ----------------------------
2185 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2186 ac_fn_cxx_try_compile ()
2187 {
2188   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189   rm -f conftest.$ac_objext
2190   if { { ac_try="$ac_compile"
2191 case "(($ac_try" in
2192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2193   *) ac_try_echo=$ac_try;;
2194 esac
2195 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2196 $as_echo "$ac_try_echo"; } >&5
2197   (eval "$ac_compile") 2>conftest.err
2198   ac_status=$?
2199   if test -s conftest.err; then
2200     grep -v '^ *+' conftest.err >conftest.er1
2201     cat conftest.er1 >&5
2202     mv -f conftest.er1 conftest.err
2203   fi
2204   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2205   test $ac_status = 0; } && {
2206          test -z "$ac_cxx_werror_flag" ||
2207          test ! -s conftest.err
2208        } && test -s conftest.$ac_objext; then :
2209   ac_retval=0
2210 else
2211   $as_echo "$as_me: failed program was:" >&5
2212 sed 's/^/| /' conftest.$ac_ext >&5
2213 
2214         ac_retval=1
2215 fi
2216   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2217   as_fn_set_status $ac_retval
2218 
2219 } # ac_fn_cxx_try_compile
2220 
2221 # ac_fn_c_try_cpp LINENO
2222 # ----------------------
2223 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2224 ac_fn_c_try_cpp ()
2225 {
2226   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227   if { { ac_try="$ac_cpp conftest.$ac_ext"
2228 case "(($ac_try" in
2229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230   *) ac_try_echo=$ac_try;;
2231 esac
2232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233 $as_echo "$ac_try_echo"; } >&5
2234   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2235   ac_status=$?
2236   if test -s conftest.err; then
2237     grep -v '^ *+' conftest.err >conftest.er1
2238     cat conftest.er1 >&5
2239     mv -f conftest.er1 conftest.err
2240   fi
2241   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242   test $ac_status = 0; } > conftest.i && {
2243          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2244          test ! -s conftest.err
2245        }; then :
2246   ac_retval=0
2247 else
2248   $as_echo "$as_me: failed program was:" >&5
2249 sed 's/^/| /' conftest.$ac_ext >&5
2250 
2251     ac_retval=1
2252 fi
2253   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254   as_fn_set_status $ac_retval
2255 
2256 } # ac_fn_c_try_cpp
2257 
2258 # ac_fn_cxx_try_cpp LINENO
2259 # ------------------------
2260 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2261 ac_fn_cxx_try_cpp ()
2262 {
2263   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264   if { { ac_try="$ac_cpp conftest.$ac_ext"
2265 case "(($ac_try" in
2266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267   *) ac_try_echo=$ac_try;;
2268 esac
2269 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270 $as_echo "$ac_try_echo"; } >&5
2271   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2272   ac_status=$?
2273   if test -s conftest.err; then
2274     grep -v '^ *+' conftest.err >conftest.er1
2275     cat conftest.er1 >&5
2276     mv -f conftest.er1 conftest.err
2277   fi
2278   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279   test $ac_status = 0; } > conftest.i && {
2280          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2281          test ! -s conftest.err
2282        }; then :
2283   ac_retval=0
2284 else
2285   $as_echo "$as_me: failed program was:" >&5
2286 sed 's/^/| /' conftest.$ac_ext >&5
2287 
2288     ac_retval=1
2289 fi
2290   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291   as_fn_set_status $ac_retval
2292 
2293 } # ac_fn_cxx_try_cpp
2294 
2295 # ac_fn_objc_try_compile LINENO
2296 # -----------------------------
2297 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2298 ac_fn_objc_try_compile ()
2299 {
2300   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301   rm -f conftest.$ac_objext
2302   if { { ac_try="$ac_compile"
2303 case "(($ac_try" in
2304   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2305   *) ac_try_echo=$ac_try;;
2306 esac
2307 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2308 $as_echo "$ac_try_echo"; } >&5
2309   (eval "$ac_compile") 2>conftest.err
2310   ac_status=$?
2311   if test -s conftest.err; then
2312     grep -v '^ *+' conftest.err >conftest.er1
2313     cat conftest.er1 >&5
2314     mv -f conftest.er1 conftest.err
2315   fi
2316   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2317   test $ac_status = 0; } && {
2318          test -z "$ac_objc_werror_flag" ||
2319          test ! -s conftest.err
2320        } && test -s conftest.$ac_objext; then :
2321   ac_retval=0
2322 else
2323   $as_echo "$as_me: failed program was:" >&5
2324 sed 's/^/| /' conftest.$ac_ext >&5
2325 
2326         ac_retval=1
2327 fi
2328   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2329   as_fn_set_status $ac_retval
2330 
2331 } # ac_fn_objc_try_compile
2332 
2333 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2334 # ---------------------------------------------------------
2335 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2336 # the include files in INCLUDES and setting the cache variable VAR
2337 # accordingly.
2338 ac_fn_cxx_check_header_mongrel ()
2339 {
2340   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2341   if eval \${$3+:} false; then :
2342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2343 $as_echo_n "checking for $2... " >&6; }
2344 if eval \${$3+:} false; then :
2345   $as_echo_n "(cached) " >&6
2346 fi
2347 eval ac_res=\$$3
2348                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349 $as_echo "$ac_res" >&6; }
2350 else
2351   # Is the header compilable?
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2353 $as_echo_n "checking $2 usability... " >&6; }
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355 /* end confdefs.h.  */
2356 $4
2357 #include <$2>
2358 _ACEOF
2359 if ac_fn_cxx_try_compile "$LINENO"; then :
2360   ac_header_compiler=yes
2361 else
2362   ac_header_compiler=no
2363 fi
2364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2366 $as_echo "$ac_header_compiler" >&6; }
2367 
2368 # Is the header present?
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2370 $as_echo_n "checking $2 presence... " >&6; }
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372 /* end confdefs.h.  */
2373 #include <$2>
2374 _ACEOF
2375 if ac_fn_cxx_try_cpp "$LINENO"; then :
2376   ac_header_preproc=yes
2377 else
2378   ac_header_preproc=no
2379 fi
2380 rm -f conftest.err conftest.i conftest.$ac_ext
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2382 $as_echo "$ac_header_preproc" >&6; }
2383 
2384 # So?  What about this header?
2385 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2386   yes:no: )
2387     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2388 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2389     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2390 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2391     ;;
2392   no:yes:* )
2393     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2394 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2395     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2396 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2397     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2398 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2399     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2400 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2402 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2403 ( $as_echo "## ----------------------------------------- ##
2404 ## Report this to build-dev@openjdk.java.net ##
2405 ## ----------------------------------------- ##"
2406      ) | sed "s/^/$as_me: WARNING:     /" >&2
2407     ;;
2408 esac
2409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2410 $as_echo_n "checking for $2... " >&6; }
2411 if eval \${$3+:} false; then :
2412   $as_echo_n "(cached) " >&6
2413 else
2414   eval "$3=\$ac_header_compiler"
2415 fi
2416 eval ac_res=\$$3
2417                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418 $as_echo "$ac_res" >&6; }
2419 fi
2420   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421 
2422 } # ac_fn_cxx_check_header_mongrel
2423 
2424 # ac_fn_cxx_try_run LINENO
2425 # ------------------------
2426 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2427 # that executables *can* be run.
2428 ac_fn_cxx_try_run ()
2429 {
2430   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431   if { { ac_try="$ac_link"
2432 case "(($ac_try" in
2433   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434   *) ac_try_echo=$ac_try;;
2435 esac
2436 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437 $as_echo "$ac_try_echo"; } >&5
2438   (eval "$ac_link") 2>&5
2439   ac_status=$?
2440   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2442   { { case "(($ac_try" in
2443   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2444   *) ac_try_echo=$ac_try;;
2445 esac
2446 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2447 $as_echo "$ac_try_echo"; } >&5
2448   (eval "$ac_try") 2>&5
2449   ac_status=$?
2450   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451   test $ac_status = 0; }; }; then :
2452   ac_retval=0
2453 else
2454   $as_echo "$as_me: program exited with status $ac_status" >&5
2455        $as_echo "$as_me: failed program was:" >&5
2456 sed 's/^/| /' conftest.$ac_ext >&5
2457 
2458        ac_retval=$ac_status
2459 fi
2460   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2461   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2462   as_fn_set_status $ac_retval
2463 
2464 } # ac_fn_cxx_try_run
2465 
2466 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2467 # ---------------------------------------------------------
2468 # Tests whether HEADER exists and can be compiled using the include files in
2469 # INCLUDES, setting the cache variable VAR accordingly.
2470 ac_fn_cxx_check_header_compile ()
2471 {
2472   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2474 $as_echo_n "checking for $2... " >&6; }
2475 if eval \${$3+:} false; then :
2476   $as_echo_n "(cached) " >&6
2477 else
2478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2479 /* end confdefs.h.  */
2480 $4
2481 #include <$2>
2482 _ACEOF
2483 if ac_fn_cxx_try_compile "$LINENO"; then :
2484   eval "$3=yes"
2485 else
2486   eval "$3=no"
2487 fi
2488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2489 fi
2490 eval ac_res=\$$3
2491                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2492 $as_echo "$ac_res" >&6; }
2493   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2494 
2495 } # ac_fn_cxx_check_header_compile
2496 
2497 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2498 # ----------------------------------------------
2499 # Tries to find the compile-time value of EXPR in a program that includes
2500 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2501 # computed
2502 ac_fn_cxx_compute_int ()
2503 {
2504   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2505   if test "$cross_compiling" = yes; then
2506     # Depending upon the size, compute the lo and hi bounds.
2507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2508 /* end confdefs.h.  */
2509 $4
2510 int
2511 main ()
2512 {
2513 static int test_array [1 - 2 * !(($2) >= 0)];
2514 test_array [0] = 0;
2515 return test_array [0];
2516 
2517   ;
2518   return 0;
2519 }
2520 _ACEOF
2521 if ac_fn_cxx_try_compile "$LINENO"; then :
2522   ac_lo=0 ac_mid=0
2523   while :; do
2524     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2525 /* end confdefs.h.  */
2526 $4
2527 int
2528 main ()
2529 {
2530 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2531 test_array [0] = 0;
2532 return test_array [0];
2533 
2534   ;
2535   return 0;
2536 }
2537 _ACEOF
2538 if ac_fn_cxx_try_compile "$LINENO"; then :
2539   ac_hi=$ac_mid; break
2540 else
2541   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2542                         if test $ac_lo -le $ac_mid; then
2543                           ac_lo= ac_hi=
2544                           break
2545                         fi
2546                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2547 fi
2548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2549   done
2550 else
2551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2552 /* end confdefs.h.  */
2553 $4
2554 int
2555 main ()
2556 {
2557 static int test_array [1 - 2 * !(($2) < 0)];
2558 test_array [0] = 0;
2559 return test_array [0];
2560 
2561   ;
2562   return 0;
2563 }
2564 _ACEOF
2565 if ac_fn_cxx_try_compile "$LINENO"; then :
2566   ac_hi=-1 ac_mid=-1
2567   while :; do
2568     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2569 /* end confdefs.h.  */
2570 $4
2571 int
2572 main ()
2573 {
2574 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2575 test_array [0] = 0;
2576 return test_array [0];
2577 
2578   ;
2579   return 0;
2580 }
2581 _ACEOF
2582 if ac_fn_cxx_try_compile "$LINENO"; then :
2583   ac_lo=$ac_mid; break
2584 else
2585   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2586                         if test $ac_mid -le $ac_hi; then
2587                           ac_lo= ac_hi=
2588                           break
2589                         fi
2590                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2591 fi
2592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2593   done
2594 else
2595   ac_lo= ac_hi=
2596 fi
2597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598 fi
2599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2600 # Binary search between lo and hi bounds.
2601 while test "x$ac_lo" != "x$ac_hi"; do
2602   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604 /* end confdefs.h.  */
2605 $4
2606 int
2607 main ()
2608 {
2609 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2610 test_array [0] = 0;
2611 return test_array [0];
2612 
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 if ac_fn_cxx_try_compile "$LINENO"; then :
2618   ac_hi=$ac_mid
2619 else
2620   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2621 fi
2622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2623 done
2624 case $ac_lo in #((
2625 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2626 '') ac_retval=1 ;;
2627 esac
2628   else
2629     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630 /* end confdefs.h.  */
2631 $4
2632 static long int longval () { return $2; }
2633 static unsigned long int ulongval () { return $2; }
2634 #include <stdio.h>
2635 #include <stdlib.h>
2636 int
2637 main ()
2638 {
2639 
2640   FILE *f = fopen ("conftest.val", "w");
2641   if (! f)
2642     return 1;
2643   if (($2) < 0)
2644     {
2645       long int i = longval ();
2646       if (i != ($2))
2647         return 1;
2648       fprintf (f, "%ld", i);
2649     }
2650   else
2651     {
2652       unsigned long int i = ulongval ();
2653       if (i != ($2))
2654         return 1;
2655       fprintf (f, "%lu", i);
2656     }
2657   /* Do not output a trailing newline, as this causes \r\n confusion
2658      on some platforms.  */
2659   return ferror (f) || fclose (f) != 0;
2660 
2661   ;
2662   return 0;
2663 }
2664 _ACEOF
2665 if ac_fn_cxx_try_run "$LINENO"; then :
2666   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2667 else
2668   ac_retval=1
2669 fi
2670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2671   conftest.$ac_objext conftest.beam conftest.$ac_ext
2672 rm -f conftest.val
2673 
2674   fi
2675   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2676   as_fn_set_status $ac_retval
2677 
2678 } # ac_fn_cxx_compute_int
2679 
2680 # ac_fn_cxx_try_link LINENO
2681 # -------------------------
2682 # Try to link conftest.$ac_ext, and return whether this succeeded.
2683 ac_fn_cxx_try_link ()
2684 {
2685   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2686   rm -f conftest.$ac_objext conftest$ac_exeext
2687   if { { ac_try="$ac_link"
2688 case "(($ac_try" in
2689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690   *) ac_try_echo=$ac_try;;
2691 esac
2692 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693 $as_echo "$ac_try_echo"; } >&5
2694   (eval "$ac_link") 2>conftest.err
2695   ac_status=$?
2696   if test -s conftest.err; then
2697     grep -v '^ *+' conftest.err >conftest.er1
2698     cat conftest.er1 >&5
2699     mv -f conftest.er1 conftest.err
2700   fi
2701   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2702   test $ac_status = 0; } && {
2703          test -z "$ac_cxx_werror_flag" ||
2704          test ! -s conftest.err
2705        } && test -s conftest$ac_exeext && {
2706          test "$cross_compiling" = yes ||
2707          test -x conftest$ac_exeext
2708        }; then :
2709   ac_retval=0
2710 else
2711   $as_echo "$as_me: failed program was:" >&5
2712 sed 's/^/| /' conftest.$ac_ext >&5
2713 
2714         ac_retval=1
2715 fi
2716   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2717   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2718   # interfere with the next link command; also delete a directory that is
2719   # left behind by Apple's compiler.  We do this before executing the actions.
2720   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2721   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2722   as_fn_set_status $ac_retval
2723 
2724 } # ac_fn_cxx_try_link
2725 
2726 # ac_fn_cxx_check_func LINENO FUNC VAR
2727 # ------------------------------------
2728 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2729 ac_fn_cxx_check_func ()
2730 {
2731   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2733 $as_echo_n "checking for $2... " >&6; }
2734 if eval \${$3+:} false; then :
2735   $as_echo_n "(cached) " >&6
2736 else
2737   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2738 /* end confdefs.h.  */
2739 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2740    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2741 #define $2 innocuous_$2
2742 
2743 /* System header to define __stub macros and hopefully few prototypes,
2744     which can conflict with char $2 (); below.
2745     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2746     <limits.h> exists even on freestanding compilers.  */
2747 
2748 #ifdef __STDC__
2749 # include <limits.h>
2750 #else
2751 # include <assert.h>
2752 #endif
2753 
2754 #undef $2
2755 
2756 /* Override any GCC internal prototype to avoid an error.
2757    Use char because int might match the return type of a GCC
2758    builtin and then its argument prototype would still apply.  */
2759 #ifdef __cplusplus
2760 extern "C"
2761 #endif
2762 char $2 ();
2763 /* The GNU C library defines this for functions which it implements
2764     to always fail with ENOSYS.  Some functions are actually named
2765     something starting with __ and the normal name is an alias.  */
2766 #if defined __stub_$2 || defined __stub___$2
2767 choke me
2768 #endif
2769 
2770 int
2771 main ()
2772 {
2773 return $2 ();
2774   ;
2775   return 0;
2776 }
2777 _ACEOF
2778 if ac_fn_cxx_try_link "$LINENO"; then :
2779   eval "$3=yes"
2780 else
2781   eval "$3=no"
2782 fi
2783 rm -f core conftest.err conftest.$ac_objext \
2784     conftest$ac_exeext conftest.$ac_ext
2785 fi
2786 eval ac_res=\$$3
2787                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2788 $as_echo "$ac_res" >&6; }
2789   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2790 
2791 } # ac_fn_cxx_check_func
2792 
2793 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2794 # -------------------------------------------------------
2795 # Tests whether HEADER exists and can be compiled using the include files in
2796 # INCLUDES, setting the cache variable VAR accordingly.
2797 ac_fn_c_check_header_compile ()
2798 {
2799   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2801 $as_echo_n "checking for $2... " >&6; }
2802 if eval \${$3+:} false; then :
2803   $as_echo_n "(cached) " >&6
2804 else
2805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 /* end confdefs.h.  */
2807 $4
2808 #include <$2>
2809 _ACEOF
2810 if ac_fn_c_try_compile "$LINENO"; then :
2811   eval "$3=yes"
2812 else
2813   eval "$3=no"
2814 fi
2815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2816 fi
2817 eval ac_res=\$$3
2818                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2819 $as_echo "$ac_res" >&6; }
2820   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2821 
2822 } # ac_fn_c_check_header_compile
2823 cat >config.log <<_ACEOF
2824 This file contains any messages produced by compilers while
2825 running configure, to aid debugging if configure makes a mistake.
2826 
2827 It was created by OpenJDK $as_me jdk8, which was
2828 generated by GNU Autoconf 2.69.  Invocation command line was
2829 
2830   $ $0 $@
2831 
2832 _ACEOF
2833 exec 5>>config.log
2834 {
2835 cat <<_ASUNAME
2836 ## --------- ##
2837 ## Platform. ##
2838 ## --------- ##
2839 
2840 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2841 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2842 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2843 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2844 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2845 
2846 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2847 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2848 
2849 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2850 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2851 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2852 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2853 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2854 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2855 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2856 
2857 _ASUNAME
2858 
2859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2860 for as_dir in $PATH
2861 do
2862   IFS=$as_save_IFS
2863   test -z "$as_dir" && as_dir=.
2864     $as_echo "PATH: $as_dir"
2865   done
2866 IFS=$as_save_IFS
2867 
2868 } >&5
2869 
2870 cat >&5 <<_ACEOF
2871 
2872 
2873 ## ----------- ##
2874 ## Core tests. ##
2875 ## ----------- ##
2876 
2877 _ACEOF
2878 
2879 
2880 # Keep a trace of the command line.
2881 # Strip out --no-create and --no-recursion so they do not pile up.
2882 # Strip out --silent because we don't want to record it for future runs.
2883 # Also quote any args containing shell meta-characters.
2884 # Make two passes to allow for proper duplicate-argument suppression.
2885 ac_configure_args=
2886 ac_configure_args0=
2887 ac_configure_args1=
2888 ac_must_keep_next=false
2889 for ac_pass in 1 2
2890 do
2891   for ac_arg
2892   do
2893     case $ac_arg in
2894     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2895     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2896     | -silent | --silent | --silen | --sile | --sil)
2897       continue ;;
2898     *\'*)
2899       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2900     esac
2901     case $ac_pass in
2902     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2903     2)
2904       as_fn_append ac_configure_args1 " '$ac_arg'"
2905       if test $ac_must_keep_next = true; then
2906         ac_must_keep_next=false # Got value, back to normal.
2907       else
2908         case $ac_arg in
2909           *=* | --config-cache | -C | -disable-* | --disable-* \
2910           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2911           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2912           | -with-* | --with-* | -without-* | --without-* | --x)
2913             case "$ac_configure_args0 " in
2914               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2915             esac
2916             ;;
2917           -* ) ac_must_keep_next=true ;;
2918         esac
2919       fi
2920       as_fn_append ac_configure_args " '$ac_arg'"
2921       ;;
2922     esac
2923   done
2924 done
2925 { ac_configure_args0=; unset ac_configure_args0;}
2926 { ac_configure_args1=; unset ac_configure_args1;}
2927 
2928 # When interrupted or exit'd, cleanup temporary files, and complete
2929 # config.log.  We remove comments because anyway the quotes in there
2930 # would cause problems or look ugly.
2931 # WARNING: Use '\'' to represent an apostrophe within the trap.
2932 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2933 trap 'exit_status=$?
2934   # Save into config.log some information that might help in debugging.
2935   {
2936     echo
2937 
2938     $as_echo "## ---------------- ##
2939 ## Cache variables. ##
2940 ## ---------------- ##"
2941     echo
2942     # The following way of writing the cache mishandles newlines in values,
2943 (
2944   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2945     eval ac_val=\$$ac_var
2946     case $ac_val in #(
2947     *${as_nl}*)
2948       case $ac_var in #(
2949       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2950 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2951       esac
2952       case $ac_var in #(
2953       _ | IFS | as_nl) ;; #(
2954       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2955       *) { eval $ac_var=; unset $ac_var;} ;;
2956       esac ;;
2957     esac
2958   done
2959   (set) 2>&1 |
2960     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2961     *${as_nl}ac_space=\ *)
2962       sed -n \
2963         "s/'\''/'\''\\\\'\'''\''/g;
2964           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2965       ;; #(
2966     *)
2967       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2968       ;;
2969     esac |
2970     sort
2971 )
2972     echo
2973 
2974     $as_echo "## ----------------- ##
2975 ## Output variables. ##
2976 ## ----------------- ##"
2977     echo
2978     for ac_var in $ac_subst_vars
2979     do
2980       eval ac_val=\$$ac_var
2981       case $ac_val in
2982       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2983       esac
2984       $as_echo "$ac_var='\''$ac_val'\''"
2985     done | sort
2986     echo
2987 
2988     if test -n "$ac_subst_files"; then
2989       $as_echo "## ------------------- ##
2990 ## File substitutions. ##
2991 ## ------------------- ##"
2992       echo
2993       for ac_var in $ac_subst_files
2994       do
2995         eval ac_val=\$$ac_var
2996         case $ac_val in
2997         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2998         esac
2999         $as_echo "$ac_var='\''$ac_val'\''"
3000       done | sort
3001       echo
3002     fi
3003 
3004     if test -s confdefs.h; then
3005       $as_echo "## ----------- ##
3006 ## confdefs.h. ##
3007 ## ----------- ##"
3008       echo
3009       cat confdefs.h
3010       echo
3011     fi
3012     test "$ac_signal" != 0 &&
3013       $as_echo "$as_me: caught signal $ac_signal"
3014     $as_echo "$as_me: exit $exit_status"
3015   } >&5
3016   rm -f core *.core core.conftest.* &&
3017     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3018     exit $exit_status
3019 ' 0
3020 for ac_signal in 1 2 13 15; do
3021   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3022 done
3023 ac_signal=0
3024 
3025 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3026 rm -f -r conftest* confdefs.h
3027 
3028 $as_echo "/* confdefs.h */" > confdefs.h
3029 
3030 # Predefined preprocessor variables.
3031 
3032 cat >>confdefs.h <<_ACEOF
3033 #define PACKAGE_NAME "$PACKAGE_NAME"
3034 _ACEOF
3035 
3036 cat >>confdefs.h <<_ACEOF
3037 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3038 _ACEOF
3039 
3040 cat >>confdefs.h <<_ACEOF
3041 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3042 _ACEOF
3043 
3044 cat >>confdefs.h <<_ACEOF
3045 #define PACKAGE_STRING "$PACKAGE_STRING"
3046 _ACEOF
3047 
3048 cat >>confdefs.h <<_ACEOF
3049 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3050 _ACEOF
3051 
3052 cat >>confdefs.h <<_ACEOF
3053 #define PACKAGE_URL "$PACKAGE_URL"
3054 _ACEOF
3055 
3056 
3057 # Let the site file select an alternate cache file if it wants to.
3058 # Prefer an explicitly selected file to automatically selected ones.
3059 ac_site_file1=NONE
3060 ac_site_file2=NONE
3061 if test -n "$CONFIG_SITE"; then
3062   # We do not want a PATH search for config.site.
3063   case $CONFIG_SITE in #((
3064     -*)  ac_site_file1=./$CONFIG_SITE;;
3065     */*) ac_site_file1=$CONFIG_SITE;;
3066     *)   ac_site_file1=./$CONFIG_SITE;;
3067   esac
3068 elif test "x$prefix" != xNONE; then
3069   ac_site_file1=$prefix/share/config.site
3070   ac_site_file2=$prefix/etc/config.site
3071 else
3072   ac_site_file1=$ac_default_prefix/share/config.site
3073   ac_site_file2=$ac_default_prefix/etc/config.site
3074 fi
3075 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3076 do
3077   test "x$ac_site_file" = xNONE && continue
3078   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3079     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3080 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3081     sed 's/^/| /' "$ac_site_file" >&5
3082     . "$ac_site_file" \
3083       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3084 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3085 as_fn_error $? "failed to load site script $ac_site_file
3086 See \`config.log' for more details" "$LINENO" 5; }
3087   fi
3088 done
3089 
3090 if test -r "$cache_file"; then
3091   # Some versions of bash will fail to source /dev/null (special files
3092   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3093   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3094     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3095 $as_echo "$as_me: loading cache $cache_file" >&6;}
3096     case $cache_file in
3097       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3098       *)                      . "./$cache_file";;
3099     esac
3100   fi
3101 else
3102   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3103 $as_echo "$as_me: creating cache $cache_file" >&6;}
3104   >$cache_file
3105 fi
3106 
3107 # Check that the precious variables saved in the cache have kept the same
3108 # value.
3109 ac_cache_corrupted=false
3110 for ac_var in $ac_precious_vars; do
3111   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3112   eval ac_new_set=\$ac_env_${ac_var}_set
3113   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3114   eval ac_new_val=\$ac_env_${ac_var}_value
3115   case $ac_old_set,$ac_new_set in
3116     set,)
3117       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3118 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3119       ac_cache_corrupted=: ;;
3120     ,set)
3121       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3122 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3123       ac_cache_corrupted=: ;;
3124     ,);;
3125     *)
3126       if test "x$ac_old_val" != "x$ac_new_val"; then
3127         # differences in whitespace do not lead to failure.
3128         ac_old_val_w=`echo x $ac_old_val`
3129         ac_new_val_w=`echo x $ac_new_val`
3130         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3131           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3132 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3133           ac_cache_corrupted=:
3134         else
3135           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3136 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3137           eval $ac_var=\$ac_old_val
3138         fi
3139         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3140 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3141         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3142 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3143       fi;;
3144   esac
3145   # Pass precious variables to config.status.
3146   if test "$ac_new_set" = set; then
3147     case $ac_new_val in
3148     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3149     *) ac_arg=$ac_var=$ac_new_val ;;
3150     esac
3151     case " $ac_configure_args " in
3152       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3153       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3154     esac
3155   fi
3156 done
3157 if $ac_cache_corrupted; then
3158   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3160   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3161 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3162   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3163 fi
3164 ## -------------------- ##
3165 ## Main body of script. ##
3166 ## -------------------- ##
3167 
3168 ac_ext=c
3169 ac_cpp='$CPP $CPPFLAGS'
3170 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3171 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3173 
3174 
3175 
3176 ac_aux_dir=
3177 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3178   if test -f "$ac_dir/install-sh"; then
3179     ac_aux_dir=$ac_dir
3180     ac_install_sh="$ac_aux_dir/install-sh -c"
3181     break
3182   elif test -f "$ac_dir/install.sh"; then
3183     ac_aux_dir=$ac_dir
3184     ac_install_sh="$ac_aux_dir/install.sh -c"
3185     break
3186   elif test -f "$ac_dir/shtool"; then
3187     ac_aux_dir=$ac_dir
3188     ac_install_sh="$ac_aux_dir/shtool install -c"
3189     break
3190   fi
3191 done
3192 if test -z "$ac_aux_dir"; then
3193   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
3194 fi
3195 
3196 # These three variables are undocumented and unsupported,
3197 # and are intended to be withdrawn in a future Autoconf release.
3198 # They can cause serious problems if a builder's source tree is in a directory
3199 # whose full name contains unusual characters.
3200 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3201 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3202 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3203 
3204 
3205 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3206 
3207 #
3208 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3209 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3210 #
3211 # This code is free software; you can redistribute it and/or modify it
3212 # under the terms of the GNU General Public License version 2 only, as
3213 # published by the Free Software Foundation.  Oracle designates this
3214 # particular file as subject to the "Classpath" exception as provided
3215 # by Oracle in the LICENSE file that accompanied this code.
3216 #
3217 # This code is distributed in the hope that it will be useful, but WITHOUT
3218 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3219 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3220 # version 2 for more details (a copy is included in the LICENSE file that
3221 # accompanied this code).
3222 #
3223 # You should have received a copy of the GNU General Public License version
3224 # 2 along with this work; if not, write to the Free Software Foundation,
3225 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3226 #
3227 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3228 # or visit www.oracle.com if you need additional information or have any
3229 # questions.
3230 #
3231 
3232 #
3233 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3234 #
3235 # This program is free software; you can redistribute it and/or modify
3236 # it under the terms of the GNU General Public License as published by
3237 # the Free Software Foundation; either version 2 of the License, or
3238 # (at your option) any later version.
3239 #
3240 # This program is distributed in the hope that it will be useful, but
3241 # WITHOUT ANY WARRANTY; without even the implied warranty of
3242 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3243 # General Public License for more details.
3244 #
3245 # You should have received a copy of the GNU General Public License
3246 # along with this program; if not, write to the Free Software
3247 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3248 #
3249 # As a special exception to the GNU General Public License, if you
3250 # distribute this file as part of a program that contains a
3251 # configuration script generated by Autoconf, you may include it under
3252 # the same distribution terms that you use for the rest of that program.
3253 
3254 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3255 # ----------------------------------
3256 # PKG_PROG_PKG_CONFIG
3257 
3258 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3259 #
3260 # Check to see whether a particular set of modules exists.  Similar
3261 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3262 #
3263 #
3264 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3265 # this or PKG_CHECK_MODULES is called, or make sure to call
3266 # PKG_CHECK_EXISTS manually
3267 # --------------------------------------------------------------
3268 
3269 
3270 
3271 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3272 # ---------------------------------------------
3273 # _PKG_CONFIG
3274 
3275 # _PKG_SHORT_ERRORS_SUPPORTED
3276 # -----------------------------
3277 # _PKG_SHORT_ERRORS_SUPPORTED
3278 
3279 
3280 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3281 # [ACTION-IF-NOT-FOUND])
3282 #
3283 #
3284 # Note that if there is a possibility the first call to
3285 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3286 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3287 #
3288 #
3289 # --------------------------------------------------------------
3290 # PKG_CHECK_MODULES
3291 
3292 
3293 # Include these first...
3294 #
3295 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3296 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3297 #
3298 # This code is free software; you can redistribute it and/or modify it
3299 # under the terms of the GNU General Public License version 2 only, as
3300 # published by the Free Software Foundation.  Oracle designates this
3301 # particular file as subject to the "Classpath" exception as provided
3302 # by Oracle in the LICENSE file that accompanied this code.
3303 #
3304 # This code is distributed in the hope that it will be useful, but WITHOUT
3305 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3306 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3307 # version 2 for more details (a copy is included in the LICENSE file that
3308 # accompanied this code).
3309 #
3310 # You should have received a copy of the GNU General Public License version
3311 # 2 along with this work; if not, write to the Free Software Foundation,
3312 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3313 #
3314 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3315 # or visit www.oracle.com if you need additional information or have any
3316 # questions.
3317 #
3318 
3319 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3320 # If so, then append $1 to $2 \
3321 # Also set JVM_ARG_OK to true/false depending on outcome.
3322 
3323 
3324 # Appends a string to a path variable, only adding the : when needed.
3325 
3326 
3327 # Prepends a string to a path variable, only adding the : when needed.
3328 
3329 
3330 # This will make sure the given variable points to a full and proper
3331 # path. This means:
3332 # 1) There will be no spaces in the path. On posix platforms,
3333 #    spaces in the path will result in an error. On Windows,
3334 #    the path will be rewritten using short-style to be space-free.
3335 # 2) The path will be absolute, and it will be in unix-style (on
3336 #     cygwin).
3337 # $1: The name of the variable to fix
3338 
3339 
3340 # This will make sure the given variable points to a executable
3341 # with a full and proper path. This means:
3342 # 1) There will be no spaces in the path. On posix platforms,
3343 #    spaces in the path will result in an error. On Windows,
3344 #    the path will be rewritten using short-style to be space-free.
3345 # 2) The path will be absolute, and it will be in unix-style (on
3346 #     cygwin).
3347 # Any arguments given to the executable is preserved.
3348 # If the input variable does not have a directory specification, then
3349 # it need to be in the PATH.
3350 # $1: The name of the variable to fix
3351 
3352 
3353 
3354 
3355 # Register a --with argument but mark it as deprecated
3356 # $1: The name of the with argument to deprecate, not including --with-
3357 
3358 
3359 # Register a --enable argument but mark it as deprecated
3360 # $1: The name of the with argument to deprecate, not including --enable-
3361 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3362 
3363 
3364 
3365 
3366 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3367 # $1: variable to check
3368 
3369 
3370 # Check that there are no unprocessed overridden variables left.
3371 # If so, they are an incorrect argument and we will exit with an error.
3372 
3373 
3374 # Setup a tool for the given variable. If correctly specified by the user,
3375 # use that value, otherwise search for the tool using the supplied code snippet.
3376 # $1: variable to set
3377 # $2: code snippet to call to look for the tool
3378 
3379 
3380 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3381 # $1: variable to set
3382 # $2: executable name (or list of names) to look for
3383 
3384 
3385 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3386 # $1: variable to set
3387 # $2: executable name (or list of names) to look for
3388 
3389 
3390 # Like BASIC_PATH_PROGS but fails if no tool was found.
3391 # $1: variable to set
3392 # $2: executable name (or list of names) to look for
3393 
3394 
3395 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3396 # $1: variable to set
3397 # $2: autoconf macro to call to look for the special tool
3398 
3399 
3400 # Setup the most fundamental tools that relies on not much else to set up,
3401 # but is used by much of the early bootstrap code.
3402 
3403 
3404 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3405 
3406 
3407 # Evaluates platform specific overrides for devkit variables.
3408 # $1: Name of variable
3409 
3410 
3411 
3412 
3413 
3414 
3415 
3416 
3417 
3418 #%%% Simple tools %%%
3419 
3420 # Check if we have found a usable version of make
3421 # $1: the path to a potential make binary (or empty)
3422 # $2: the description on how we found this
3423 
3424 
3425 # Goes looking for a usable version of GNU make.
3426 
3427 
3428 
3429 
3430 
3431 
3432 # Check if build directory is on local disk. If not possible to determine,
3433 # we prefer to claim it's local.
3434 # Argument 1: directory to test
3435 # Argument 2: what to do if it is on local disk
3436 # Argument 3: what to do otherwise (remote disk or failure)
3437 
3438 
3439 # Check that source files have basic read permissions set. This might
3440 # not be the case in cygwin in certain conditions.
3441 
3442 
3443 
3444 
3445 #
3446 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3447 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3448 #
3449 # This code is free software; you can redistribute it and/or modify it
3450 # under the terms of the GNU General Public License version 2 only, as
3451 # published by the Free Software Foundation.  Oracle designates this
3452 # particular file as subject to the "Classpath" exception as provided
3453 # by Oracle in the LICENSE file that accompanied this code.
3454 #
3455 # This code is distributed in the hope that it will be useful, but WITHOUT
3456 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3457 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3458 # version 2 for more details (a copy is included in the LICENSE file that
3459 # accompanied this code).
3460 #
3461 # You should have received a copy of the GNU General Public License version
3462 # 2 along with this work; if not, write to the Free Software Foundation,
3463 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3464 #
3465 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3466 # or visit www.oracle.com if you need additional information or have any
3467 # questions.
3468 #
3469 
3470 
3471 
3472 
3473 
3474 # Helper function which possibly converts a path using DOS-style short mode.
3475 # If so, the updated path is stored in $new_path.
3476 # $1: The path to check
3477 
3478 
3479 # Helper function which possibly converts a path using DOS-style short mode.
3480 # If so, the updated path is stored in $new_path.
3481 # $1: The path to check
3482 
3483 
3484 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3485 # and could probably be heavily simplified. However, all changes in this
3486 # area tend to need lot of testing in different scenarios, and in lack of
3487 # proper unit testing, cleaning this up has not been deemed worth the effort
3488 # at the moment.
3489 
3490 
3491 
3492 
3493 
3494 
3495 
3496 
3497 
3498 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3499 
3500 
3501 
3502 
3503 #
3504 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3505 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506 #
3507 # This code is free software; you can redistribute it and/or modify it
3508 # under the terms of the GNU General Public License version 2 only, as
3509 # published by the Free Software Foundation.  Oracle designates this
3510 # particular file as subject to the "Classpath" exception as provided
3511 # by Oracle in the LICENSE file that accompanied this code.
3512 #
3513 # This code is distributed in the hope that it will be useful, but WITHOUT
3514 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516 # version 2 for more details (a copy is included in the LICENSE file that
3517 # accompanied this code).
3518 #
3519 # You should have received a copy of the GNU General Public License version
3520 # 2 along with this work; if not, write to the Free Software Foundation,
3521 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522 #
3523 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524 # or visit www.oracle.com if you need additional information or have any
3525 # questions.
3526 #
3527 
3528 
3529 
3530 
3531 
3532 
3533 
3534 
3535 
3536 
3537 
3538 # ... then the rest
3539 #
3540 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3541 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542 #
3543 # This code is free software; you can redistribute it and/or modify it
3544 # under the terms of the GNU General Public License version 2 only, as
3545 # published by the Free Software Foundation.  Oracle designates this
3546 # particular file as subject to the "Classpath" exception as provided
3547 # by Oracle in the LICENSE file that accompanied this code.
3548 #
3549 # This code is distributed in the hope that it will be useful, but WITHOUT
3550 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552 # version 2 for more details (a copy is included in the LICENSE file that
3553 # accompanied this code).
3554 #
3555 # You should have received a copy of the GNU General Public License version
3556 # 2 along with this work; if not, write to the Free Software Foundation,
3557 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558 #
3559 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560 # or visit www.oracle.com if you need additional information or have any
3561 # questions.
3562 #
3563 
3564 # Execute the check given as argument, and verify the result
3565 # If the Boot JDK was previously found, do nothing
3566 # $1 A command line (typically autoconf macro) to execute
3567 
3568 
3569 # Test: Is bootjdk explicitely set by command line arguments?
3570 
3571 
3572 # Test: Is bootjdk available from builddeps?
3573 
3574 
3575 # Test: Is $JAVA_HOME set?
3576 
3577 
3578 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3579 
3580 
3581 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3582 
3583 
3584 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3585 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3586 # $1 = Path to directory containing jdk installations.
3587 # $2 = String to append to the found JDK directory to get the proper JDK home
3588 
3589 
3590 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3591 # environmental variable as base for where to look.
3592 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3593 
3594 
3595 # Test: Is there a JDK installed in default, well-known locations?
3596 
3597 
3598 # Check that a command-line tool in the Boot JDK is correct
3599 # $1 = name of variable to assign
3600 # $2 = name of binary
3601 
3602 
3603 ###############################################################################
3604 #
3605 # We need a Boot JDK to bootstrap the build.
3606 #
3607 
3608 
3609 
3610 
3611 
3612 #
3613 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3614 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3615 #
3616 # This code is free software; you can redistribute it and/or modify it
3617 # under the terms of the GNU General Public License version 2 only, as
3618 # published by the Free Software Foundation.  Oracle designates this
3619 # particular file as subject to the "Classpath" exception as provided
3620 # by Oracle in the LICENSE file that accompanied this code.
3621 #
3622 # This code is distributed in the hope that it will be useful, but WITHOUT
3623 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3624 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3625 # version 2 for more details (a copy is included in the LICENSE file that
3626 # accompanied this code).
3627 #
3628 # You should have received a copy of the GNU General Public License version
3629 # 2 along with this work; if not, write to the Free Software Foundation,
3630 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3631 #
3632 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3633 # or visit www.oracle.com if you need additional information or have any
3634 # questions.
3635 #
3636 
3637 
3638 
3639 
3640 
3641 
3642 
3643 
3644 
3645 
3646 
3647 
3648 
3649 
3650 
3651 
3652 
3653 
3654 
3655 
3656 #
3657 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3658 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3659 #
3660 # This code is free software; you can redistribute it and/or modify it
3661 # under the terms of the GNU General Public License version 2 only, as
3662 # published by the Free Software Foundation.  Oracle designates this
3663 # particular file as subject to the "Classpath" exception as provided
3664 # by Oracle in the LICENSE file that accompanied this code.
3665 #
3666 # This code is distributed in the hope that it will be useful, but WITHOUT
3667 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3668 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3669 # version 2 for more details (a copy is included in the LICENSE file that
3670 # accompanied this code).
3671 #
3672 # You should have received a copy of the GNU General Public License version
3673 # 2 along with this work; if not, write to the Free Software Foundation,
3674 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3675 #
3676 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3677 # or visit www.oracle.com if you need additional information or have any
3678 # questions.
3679 #
3680 
3681 
3682 
3683 
3684 
3685 # Documentation on common flags used for solstudio in HIGHEST.
3686 #
3687 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3688 #          done with care, there are some assumptions below that need to
3689 #          be understood about the use of pointers, and IEEE behavior.
3690 #
3691 # -fns: Use non-standard floating point mode (not IEEE 754)
3692 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3693 # -fsingle: Use single precision floating point with 'float'
3694 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3695 #   (Source with excessing pointer casting and data access with mixed
3696 #    pointer types are not recommended)
3697 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3698 #   (If you expect perfect errno behavior, do not use this)
3699 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3700 # -xrestrict: Pointer parameters to functions do not overlap
3701 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3702 #    If you pass in multiple pointers to the same data, do not use this)
3703 # -xlibmil: Inline some library routines
3704 #   (If you expect perfect errno behavior, do not use this)
3705 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3706 #   (If you expect perfect errno behavior, do not use this)
3707 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3708 
3709     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3710     # Bug?
3711     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3712     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3713     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3714     #fi
3715 
3716 
3717 
3718 
3719 
3720 
3721 # FLAGS_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3722 #                                  [RUN-IF-FALSE])
3723 # ------------------------------------------------------------
3724 # Check that the C compiler supports an argument
3725 
3726 
3727 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3728 #                                    [RUN-IF-FALSE])
3729 # ------------------------------------------------------------
3730 # Check that the C++ compiler supports an argument
3731 
3732 
3733 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3734 #                                [RUN-IF-FALSE])
3735 # ------------------------------------------------------------
3736 # Check that the C and C++ compilers support an argument
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 #
3745 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3746 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3747 #
3748 # This code is free software; you can redistribute it and/or modify it
3749 # under the terms of the GNU General Public License version 2 only, as
3750 # published by the Free Software Foundation.  Oracle designates this
3751 # particular file as subject to the "Classpath" exception as provided
3752 # by Oracle in the LICENSE file that accompanied this code.
3753 #
3754 # This code is distributed in the hope that it will be useful, but WITHOUT
3755 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3756 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3757 # version 2 for more details (a copy is included in the LICENSE file that
3758 # accompanied this code).
3759 #
3760 # You should have received a copy of the GNU General Public License version
3761 # 2 along with this work; if not, write to the Free Software Foundation,
3762 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3763 #
3764 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3765 # or visit www.oracle.com if you need additional information or have any
3766 # questions.
3767 #
3768 
3769 
3770 
3771 
3772 
3773 cygwin_help() {
3774   case $1 in
3775     unzip)
3776       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3777       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3778       ;;
3779     zip)
3780       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3781       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3782       ;;
3783     make)
3784       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3785       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3786       ;;
3787     freetype)
3788       HELP_MSG="
3789 The freetype library can now be build during the configure process.
3790 Download the freetype sources and unpack them into an arbitrary directory:
3791 
3792 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3793 tar -xzf freetype-2.5.3.tar.gz
3794 
3795 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3796 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3797 builds or into '<freetype_src>/lib32' for 32-bit builds.
3798 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3799 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3800       ;;
3801   esac
3802 }
3803 
3804 msys_help() {
3805   PKGHANDLER_COMMAND=""
3806 }
3807 
3808 apt_help() {
3809   case $1 in
3810     devkit)
3811       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3812     openjdk)
3813       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3814     alsa)
3815       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3816     cups)
3817       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3818     freetype)
3819       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3820     pulse)
3821       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3822     x11)
3823       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3824     ccache)
3825       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3826   esac
3827 }
3828 
3829 yum_help() {
3830   case $1 in
3831     devkit)
3832       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3833     openjdk)
3834       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3835     alsa)
3836       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3837     cups)
3838       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3839     freetype)
3840       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3841     pulse)
3842       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3843     x11)
3844       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3845     ccache)
3846       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3847   esac
3848 }
3849 
3850 port_help() {
3851   PKGHANDLER_COMMAND=""
3852 }
3853 
3854 pkgutil_help() {
3855   PKGHANDLER_COMMAND=""
3856 }
3857 
3858 pkgadd_help() {
3859   PKGHANDLER_COMMAND=""
3860 }
3861 
3862 # This function will check if we're called from the "configure" wrapper while
3863 # printing --help. If so, we will print out additional information that can
3864 # only be extracted within the autoconf script, and then exit. This must be
3865 # called at the very beginning in configure.ac.
3866 
3867 
3868 
3869 
3870 #
3871 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3872 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3873 #
3874 # This code is free software; you can redistribute it and/or modify it
3875 # under the terms of the GNU General Public License version 2 only, as
3876 # published by the Free Software Foundation.  Oracle designates this
3877 # particular file as subject to the "Classpath" exception as provided
3878 # by Oracle in the LICENSE file that accompanied this code.
3879 #
3880 # This code is distributed in the hope that it will be useful, but WITHOUT
3881 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3882 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3883 # version 2 for more details (a copy is included in the LICENSE file that
3884 # accompanied this code).
3885 #
3886 # You should have received a copy of the GNU General Public License version
3887 # 2 along with this work; if not, write to the Free Software Foundation,
3888 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3889 #
3890 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3891 # or visit www.oracle.com if you need additional information or have any
3892 # questions.
3893 #
3894 
3895 
3896 
3897 
3898 
3899 
3900 
3901 
3902 
3903 
3904 ###############################################################################
3905 #
3906 # Should we build only OpenJDK even if closed sources are present?
3907 #
3908 
3909 
3910 
3911 
3912 ###############################################################################
3913 #
3914 # Setup version numbers
3915 #
3916 
3917 
3918 
3919 
3920 
3921 
3922 # Support for customization of the build process. Some build files
3923 # will include counterparts from this location, if they exist. This allows
3924 # for a degree of customization of the build targets and the rules/recipes
3925 # to create them
3926 
3927 # Check whether --with-custom-make-dir was given.
3928 if test "${with_custom_make_dir+set}" = set; then :
3929   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3930 fi
3931 
3932 
3933 
3934 #
3935 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3936 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3937 #
3938 # This code is free software; you can redistribute it and/or modify it
3939 # under the terms of the GNU General Public License version 2 only, as
3940 # published by the Free Software Foundation.  Oracle designates this
3941 # particular file as subject to the "Classpath" exception as provided
3942 # by Oracle in the LICENSE file that accompanied this code.
3943 #
3944 # This code is distributed in the hope that it will be useful, but WITHOUT
3945 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3946 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3947 # version 2 for more details (a copy is included in the LICENSE file that
3948 # accompanied this code).
3949 #
3950 # You should have received a copy of the GNU General Public License version
3951 # 2 along with this work; if not, write to the Free Software Foundation,
3952 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3953 #
3954 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3955 # or visit www.oracle.com if you need additional information or have any
3956 # questions.
3957 #
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 #
3980 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3981 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3982 #
3983 # This code is free software; you can redistribute it and/or modify it
3984 # under the terms of the GNU General Public License version 2 only, as
3985 # published by the Free Software Foundation.  Oracle designates this
3986 # particular file as subject to the "Classpath" exception as provided
3987 # by Oracle in the LICENSE file that accompanied this code.
3988 #
3989 # This code is distributed in the hope that it will be useful, but WITHOUT
3990 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3991 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3992 # version 2 for more details (a copy is included in the LICENSE file that
3993 # accompanied this code).
3994 #
3995 # You should have received a copy of the GNU General Public License version
3996 # 2 along with this work; if not, write to the Free Software Foundation,
3997 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3998 #
3999 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4000 # or visit www.oracle.com if you need additional information or have any
4001 # questions.
4002 #
4003 
4004 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4005 # Converts autoconf style CPU name to OpenJDK style, into
4006 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4007 
4008 
4009 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4010 # Converts autoconf style OS name to OpenJDK style, into
4011 # VAR_OS and VAR_OS_API.
4012 
4013 
4014 # Expects $host_os $host_cpu $build_os and $build_cpu
4015 # and $with_target_bits to have been setup!
4016 #
4017 # Translate the standard triplet(quadruplet) definition
4018 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4019 # OPENJDK_BUILD_OS, etc.
4020 
4021 
4022 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4023 # accordingly. Must be done after setting up build and target system, but before
4024 # doing anything else with these values.
4025 
4026 
4027 # Setup the legacy variables, for controlling the old makefiles.
4028 #
4029 
4030 
4031 
4032 
4033 #%%% Build and target systems %%%
4034 
4035 
4036 
4037 
4038 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4039 # Add -mX to various FLAGS variables.
4040 
4041 
4042 
4043 
4044 
4045 
4046 #
4047 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4048 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049 #
4050 # This code is free software; you can redistribute it and/or modify it
4051 # under the terms of the GNU General Public License version 2 only, as
4052 # published by the Free Software Foundation.  Oracle designates this
4053 # particular file as subject to the "Classpath" exception as provided
4054 # by Oracle in the LICENSE file that accompanied this code.
4055 #
4056 # This code is distributed in the hope that it will be useful, but WITHOUT
4057 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4059 # version 2 for more details (a copy is included in the LICENSE file that
4060 # accompanied this code).
4061 #
4062 # You should have received a copy of the GNU General Public License version
4063 # 2 along with this work; if not, write to the Free Software Foundation,
4064 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065 #
4066 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067 # or visit www.oracle.com if you need additional information or have any
4068 # questions.
4069 #
4070 
4071 
4072 
4073 
4074 
4075 
4076 
4077 
4078 #
4079 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4080 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4081 #
4082 # This code is free software; you can redistribute it and/or modify it
4083 # under the terms of the GNU General Public License version 2 only, as
4084 # published by the Free Software Foundation.  Oracle designates this
4085 # particular file as subject to the "Classpath" exception as provided
4086 # by Oracle in the LICENSE file that accompanied this code.
4087 #
4088 # This code is distributed in the hope that it will be useful, but WITHOUT
4089 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4090 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4091 # version 2 for more details (a copy is included in the LICENSE file that
4092 # accompanied this code).
4093 #
4094 # You should have received a copy of the GNU General Public License version
4095 # 2 along with this work; if not, write to the Free Software Foundation,
4096 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4097 #
4098 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4099 # or visit www.oracle.com if you need additional information or have any
4100 # questions.
4101 #
4102 
4103 ########################################################################
4104 # This file is responsible for detecting, verifying and setting up the
4105 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4106 # proper paths to the binaries, but it will not setup any flags.
4107 #
4108 # The binaries used is determined by the toolchain type, which is the family of
4109 # compilers and related tools that are used.
4110 ########################################################################
4111 
4112 
4113 # All valid toolchains, regardless of platform (used by help.m4)
4114 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4115 
4116 # These toolchains are valid on different platforms
4117 VALID_TOOLCHAINS_linux="gcc clang"
4118 VALID_TOOLCHAINS_solaris="solstudio"
4119 VALID_TOOLCHAINS_macosx="gcc clang"
4120 VALID_TOOLCHAINS_aix="xlc"
4121 VALID_TOOLCHAINS_windows="microsoft"
4122 
4123 # Toolchain descriptions
4124 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4125 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4126 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4127 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4128 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4129 
4130 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4131 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4132 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4133 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4134 
4135 
4136 # Check if the configured compiler (C and C++) is of a specific version or
4137 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4138 #
4139 # Arguments:
4140 #   $1:   The version string to check against the found version
4141 #   $2:   block to run if the compiler is at least this version (>=)
4142 #   $3:   block to run if the compiler is older than this version (<)
4143 
4144 
4145 
4146 # Setup a number of variables describing how native output files are
4147 # named on this platform/toolchain.
4148 
4149 
4150 # Determine which toolchain type to use, and make sure it is valid for this
4151 # platform. Setup various information about the selected toolchain.
4152 
4153 
4154 # Before we start detecting the toolchain executables, we might need some
4155 # special setup, e.g. additional paths etc.
4156 
4157 
4158 # Restore path, etc
4159 
4160 
4161 # Check if a compiler is of the toolchain type we expect, and save the version
4162 # information from it. If the compiler does not match the expected type,
4163 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4164 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4165 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4166 #
4167 # $1 = compiler to test (CC or CXX)
4168 # $2 = human readable name of compiler (C or C++)
4169 
4170 
4171 
4172 # Try to locate the given C or C++ compiler in the path, or otherwise.
4173 #
4174 # $1 = compiler to test (CC or CXX)
4175 # $2 = human readable name of compiler (C or C++)
4176 # $3 = list of compiler names to search for
4177 
4178 
4179 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4180 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4181 # archiver (AR). Verify that the compilers are correct according to the
4182 # toolchain type.
4183 
4184 
4185 # Setup additional tools that is considered a part of the toolchain, but not the
4186 # core part. Many of these are highly platform-specific and do not exist,
4187 # and/or are not needed on all platforms.
4188 
4189 
4190 # Setup the build tools (i.e, the compiler and linker used to build programs
4191 # that should be run on the build platform, not the target platform, as a build
4192 # helper). Since the non-cross-compile case uses the normal, target compilers
4193 # for this, we can only do this after these have been setup.
4194 
4195 
4196 # Setup legacy variables that are still needed as alternative ways to refer to
4197 # parts of the toolchain.
4198 
4199 
4200 # Do some additional checks on the detected tools.
4201 
4202 
4203 # Setup the JTReg Regression Test Harness.
4204 
4205 
4206 
4207 #
4208 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
4209 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4210 #
4211 # This code is free software; you can redistribute it and/or modify it
4212 # under the terms of the GNU General Public License version 2 only, as
4213 # published by the Free Software Foundation.  Oracle designates this
4214 # particular file as subject to the "Classpath" exception as provided
4215 # by Oracle in the LICENSE file that accompanied this code.
4216 #
4217 # This code is distributed in the hope that it will be useful, but WITHOUT
4218 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4219 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4220 # version 2 for more details (a copy is included in the LICENSE file that
4221 # accompanied this code).
4222 #
4223 # You should have received a copy of the GNU General Public License version
4224 # 2 along with this work; if not, write to the Free Software Foundation,
4225 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4226 #
4227 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4228 # or visit www.oracle.com if you need additional information or have any
4229 # questions.
4230 #
4231 
4232 ################################################################################
4233 
4234 VALID_VS_VERSIONS="2010 2012 2013"
4235 
4236 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4237 VS_VERSION_INTERNAL_2010=100
4238 VS_MSVCR_2010=msvcr100.dll
4239 # We don't use msvcp on Visual Studio 2010
4240 #VS_MSVCP_2010=msvcp100.dll
4241 VS_ENVVAR_2010="VS100COMNTOOLS"
4242 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4243 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4244 VS_VS_PLATFORM_NAME_2010="v100"
4245 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4246 
4247 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4248 VS_VERSION_INTERNAL_2012=110
4249 VS_MSVCR_2012=msvcr110.dll
4250 VS_MSVCP_2012=msvcp110.dll
4251 VS_ENVVAR_2012="VS110COMNTOOLS"
4252 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4253 VS_SDK_INSTALLDIR_2012=
4254 VS_VS_PLATFORM_NAME_2012="v110"
4255 VS_SDK_PLATFORM_NAME_2012=
4256 
4257 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4258 VS_VERSION_INTERNAL_2013=120
4259 VS_MSVCR_2013=msvcr120.dll
4260 VS_MSVCP_2013=msvcp120.dll
4261 VS_ENVVAR_2013="VS120COMNTOOLS"
4262 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4263 VS_SDK_INSTALLDIR_2013=
4264 VS_VS_PLATFORM_NAME_2013="v120"
4265 VS_SDK_PLATFORM_NAME_2013=
4266 
4267 ################################################################################
4268 
4269 
4270 
4271 ################################################################################
4272 
4273 
4274 
4275 ################################################################################
4276 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4277 # build environment and assigns it to VS_ENV_CMD
4278 
4279 
4280 ################################################################################
4281 
4282 
4283 
4284 ################################################################################
4285 # Check if the VS env variables were setup prior to running configure.
4286 # If not, then find vcvarsall.bat and run it automatically, and integrate
4287 # the set env variables into the spec file.
4288 
4289 
4290 
4291 
4292 
4293 
4294 
4295 
4296 
4297 
4298 
4299 
4300 
4301 
4302 # This line needs to be here, verbatim, after all includes and the dummy hook
4303 # definitions. It is replaced with custom functionality when building
4304 # custom sources.
4305 #CUSTOM_AUTOCONF_INCLUDE
4306 
4307 # Do not change or remove the following line, it is needed for consistency checks:
4308 DATE_WHEN_GENERATED=1526679992
4309 
4310 ###############################################################################
4311 #
4312 # Initialization / Boot-strapping
4313 #
4314 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4315 # thus it jumps back and forth, each time gaining something needed later on.
4316 #
4317 ###############################################################################
4318 
4319 # If we are requested to print additional help, do that and then exit.
4320 # This must be the very first call.
4321 
4322   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4323     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4324     $PRINTF "Which are valid to use depends on the build platform.\n"
4325     for toolchain in $VALID_TOOLCHAINS_all; do
4326       # Use indirect variable referencing
4327       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4328       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4329       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4330     done
4331 
4332     # And now exit directly
4333     exit 0
4334   fi
4335 
4336 
4337 # Basic initialization that must happen first of all in the normal process.
4338 
4339   # Save the original command line. This is passed to us by the wrapper configure script.
4340 
4341   DATE_WHEN_CONFIGURED=`LANG=C date`
4342 
4343   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4344 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4345   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4346 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4347 
4348 
4349   # Start with tools that do not need have cross compilation support
4350   # and can be expected to be found in the default PATH. These tools are
4351   # used by configure. Nor are these tools expected to be found in the
4352   # devkit from the builddeps server either, since they are
4353   # needed to download the devkit.
4354 
4355   # First are all the simple required tools.
4356 
4357 
4358 
4359   # Publish this variable in the help.
4360 
4361 
4362   if test "x$BASENAME" = x; then
4363     # The variable is not set by user, try to locate tool using the code snippet
4364     for ac_prog in basename
4365 do
4366   # Extract the first word of "$ac_prog", so it can be a program name with args.
4367 set dummy $ac_prog; ac_word=$2
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4369 $as_echo_n "checking for $ac_word... " >&6; }
4370 if ${ac_cv_path_BASENAME+:} false; then :
4371   $as_echo_n "(cached) " >&6
4372 else
4373   case $BASENAME in
4374   [\\/]* | ?:[\\/]*)
4375   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4376   ;;
4377   *)
4378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4379 for as_dir in $PATH
4380 do
4381   IFS=$as_save_IFS
4382   test -z "$as_dir" && as_dir=.
4383     for ac_exec_ext in '' $ac_executable_extensions; do
4384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4385     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4387     break 2
4388   fi
4389 done
4390   done
4391 IFS=$as_save_IFS
4392 
4393   ;;
4394 esac
4395 fi
4396 BASENAME=$ac_cv_path_BASENAME
4397 if test -n "$BASENAME"; then
4398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4399 $as_echo "$BASENAME" >&6; }
4400 else
4401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4402 $as_echo "no" >&6; }
4403 fi
4404 
4405 
4406   test -n "$BASENAME" && break
4407 done
4408 
4409   else
4410     # The variable is set, but is it from the command line or the environment?
4411 
4412     # Try to remove the string !BASENAME! from our list.
4413     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4414     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4415       # If it failed, the variable was not from the command line. Ignore it,
4416       # but warn the user (except for BASH, which is always set by the calling BASH).
4417       if test "xBASENAME" != xBASH; then
4418         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4419 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4420       fi
4421       # Try to locate tool using the code snippet
4422       for ac_prog in basename
4423 do
4424   # Extract the first word of "$ac_prog", so it can be a program name with args.
4425 set dummy $ac_prog; ac_word=$2
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4427 $as_echo_n "checking for $ac_word... " >&6; }
4428 if ${ac_cv_path_BASENAME+:} false; then :
4429   $as_echo_n "(cached) " >&6
4430 else
4431   case $BASENAME in
4432   [\\/]* | ?:[\\/]*)
4433   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4434   ;;
4435   *)
4436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4437 for as_dir in $PATH
4438 do
4439   IFS=$as_save_IFS
4440   test -z "$as_dir" && as_dir=.
4441     for ac_exec_ext in '' $ac_executable_extensions; do
4442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4443     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4445     break 2
4446   fi
4447 done
4448   done
4449 IFS=$as_save_IFS
4450 
4451   ;;
4452 esac
4453 fi
4454 BASENAME=$ac_cv_path_BASENAME
4455 if test -n "$BASENAME"; then
4456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4457 $as_echo "$BASENAME" >&6; }
4458 else
4459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4460 $as_echo "no" >&6; }
4461 fi
4462 
4463 
4464   test -n "$BASENAME" && break
4465 done
4466 
4467     else
4468       # If it succeeded, then it was overridden by the user. We will use it
4469       # for the tool.
4470 
4471       # First remove it from the list of overridden variables, so we can test
4472       # for unknown variables in the end.
4473       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4474 
4475       # Check if the provided tool contains a complete path.
4476       tool_specified="$BASENAME"
4477       tool_basename="${tool_specified##*/}"
4478       if test "x$tool_basename" = "x$tool_specified"; then
4479         # A command without a complete path is provided, search $PATH.
4480         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4481 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4482         # Extract the first word of "$tool_basename", so it can be a program name with args.
4483 set dummy $tool_basename; ac_word=$2
4484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4485 $as_echo_n "checking for $ac_word... " >&6; }
4486 if ${ac_cv_path_BASENAME+:} false; then :
4487   $as_echo_n "(cached) " >&6
4488 else
4489   case $BASENAME in
4490   [\\/]* | ?:[\\/]*)
4491   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4492   ;;
4493   *)
4494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4495 for as_dir in $PATH
4496 do
4497   IFS=$as_save_IFS
4498   test -z "$as_dir" && as_dir=.
4499     for ac_exec_ext in '' $ac_executable_extensions; do
4500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4501     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4503     break 2
4504   fi
4505 done
4506   done
4507 IFS=$as_save_IFS
4508 
4509   ;;
4510 esac
4511 fi
4512 BASENAME=$ac_cv_path_BASENAME
4513 if test -n "$BASENAME"; then
4514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4515 $as_echo "$BASENAME" >&6; }
4516 else
4517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4518 $as_echo "no" >&6; }
4519 fi
4520 
4521 
4522         if test "x$BASENAME" = x; then
4523           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4524         fi
4525       else
4526         # Otherwise we believe it is a complete path. Use it as it is.
4527         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4528 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4529         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4530 $as_echo_n "checking for BASENAME... " >&6; }
4531         if test ! -x "$tool_specified"; then
4532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4533 $as_echo "not found" >&6; }
4534           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4535         fi
4536         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4537 $as_echo "$tool_specified" >&6; }
4538       fi
4539     fi
4540   fi
4541 
4542 
4543 
4544   if test "x$BASENAME" = x; then
4545     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4546   fi
4547 
4548 
4549 
4550 
4551 
4552   # Publish this variable in the help.
4553 
4554 
4555   if test "x$BASH" = x; then
4556     # The variable is not set by user, try to locate tool using the code snippet
4557     for ac_prog in bash
4558 do
4559   # Extract the first word of "$ac_prog", so it can be a program name with args.
4560 set dummy $ac_prog; ac_word=$2
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4562 $as_echo_n "checking for $ac_word... " >&6; }
4563 if ${ac_cv_path_BASH+:} false; then :
4564   $as_echo_n "(cached) " >&6
4565 else
4566   case $BASH in
4567   [\\/]* | ?:[\\/]*)
4568   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4569   ;;
4570   *)
4571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572 for as_dir in $PATH
4573 do
4574   IFS=$as_save_IFS
4575   test -z "$as_dir" && as_dir=.
4576     for ac_exec_ext in '' $ac_executable_extensions; do
4577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4578     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4580     break 2
4581   fi
4582 done
4583   done
4584 IFS=$as_save_IFS
4585 
4586   ;;
4587 esac
4588 fi
4589 BASH=$ac_cv_path_BASH
4590 if test -n "$BASH"; then
4591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4592 $as_echo "$BASH" >&6; }
4593 else
4594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4595 $as_echo "no" >&6; }
4596 fi
4597 
4598 
4599   test -n "$BASH" && break
4600 done
4601 
4602   else
4603     # The variable is set, but is it from the command line or the environment?
4604 
4605     # Try to remove the string !BASH! from our list.
4606     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4607     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4608       # If it failed, the variable was not from the command line. Ignore it,
4609       # but warn the user (except for BASH, which is always set by the calling BASH).
4610       if test "xBASH" != xBASH; then
4611         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4612 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4613       fi
4614       # Try to locate tool using the code snippet
4615       for ac_prog in bash
4616 do
4617   # Extract the first word of "$ac_prog", so it can be a program name with args.
4618 set dummy $ac_prog; ac_word=$2
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620 $as_echo_n "checking for $ac_word... " >&6; }
4621 if ${ac_cv_path_BASH+:} false; then :
4622   $as_echo_n "(cached) " >&6
4623 else
4624   case $BASH in
4625   [\\/]* | ?:[\\/]*)
4626   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4627   ;;
4628   *)
4629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630 for as_dir in $PATH
4631 do
4632   IFS=$as_save_IFS
4633   test -z "$as_dir" && as_dir=.
4634     for ac_exec_ext in '' $ac_executable_extensions; do
4635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4636     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638     break 2
4639   fi
4640 done
4641   done
4642 IFS=$as_save_IFS
4643 
4644   ;;
4645 esac
4646 fi
4647 BASH=$ac_cv_path_BASH
4648 if test -n "$BASH"; then
4649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4650 $as_echo "$BASH" >&6; }
4651 else
4652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653 $as_echo "no" >&6; }
4654 fi
4655 
4656 
4657   test -n "$BASH" && break
4658 done
4659 
4660     else
4661       # If it succeeded, then it was overridden by the user. We will use it
4662       # for the tool.
4663 
4664       # First remove it from the list of overridden variables, so we can test
4665       # for unknown variables in the end.
4666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4667 
4668       # Check if the provided tool contains a complete path.
4669       tool_specified="$BASH"
4670       tool_basename="${tool_specified##*/}"
4671       if test "x$tool_basename" = "x$tool_specified"; then
4672         # A command without a complete path is provided, search $PATH.
4673         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4674 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4675         # Extract the first word of "$tool_basename", so it can be a program name with args.
4676 set dummy $tool_basename; ac_word=$2
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678 $as_echo_n "checking for $ac_word... " >&6; }
4679 if ${ac_cv_path_BASH+:} false; then :
4680   $as_echo_n "(cached) " >&6
4681 else
4682   case $BASH in
4683   [\\/]* | ?:[\\/]*)
4684   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4685   ;;
4686   *)
4687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688 for as_dir in $PATH
4689 do
4690   IFS=$as_save_IFS
4691   test -z "$as_dir" && as_dir=.
4692     for ac_exec_ext in '' $ac_executable_extensions; do
4693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4694     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4696     break 2
4697   fi
4698 done
4699   done
4700 IFS=$as_save_IFS
4701 
4702   ;;
4703 esac
4704 fi
4705 BASH=$ac_cv_path_BASH
4706 if test -n "$BASH"; then
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4708 $as_echo "$BASH" >&6; }
4709 else
4710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4711 $as_echo "no" >&6; }
4712 fi
4713 
4714 
4715         if test "x$BASH" = x; then
4716           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4717         fi
4718       else
4719         # Otherwise we believe it is a complete path. Use it as it is.
4720         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4721 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4723 $as_echo_n "checking for BASH... " >&6; }
4724         if test ! -x "$tool_specified"; then
4725           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4726 $as_echo "not found" >&6; }
4727           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4728         fi
4729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4730 $as_echo "$tool_specified" >&6; }
4731       fi
4732     fi
4733   fi
4734 
4735 
4736 
4737   if test "x$BASH" = x; then
4738     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4739   fi
4740 
4741 
4742 
4743 
4744 
4745   # Publish this variable in the help.
4746 
4747 
4748   if test "x$CAT" = x; then
4749     # The variable is not set by user, try to locate tool using the code snippet
4750     for ac_prog in cat
4751 do
4752   # Extract the first word of "$ac_prog", so it can be a program name with args.
4753 set dummy $ac_prog; ac_word=$2
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755 $as_echo_n "checking for $ac_word... " >&6; }
4756 if ${ac_cv_path_CAT+:} false; then :
4757   $as_echo_n "(cached) " >&6
4758 else
4759   case $CAT in
4760   [\\/]* | ?:[\\/]*)
4761   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4762   ;;
4763   *)
4764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765 for as_dir in $PATH
4766 do
4767   IFS=$as_save_IFS
4768   test -z "$as_dir" && as_dir=.
4769     for ac_exec_ext in '' $ac_executable_extensions; do
4770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4771     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4773     break 2
4774   fi
4775 done
4776   done
4777 IFS=$as_save_IFS
4778 
4779   ;;
4780 esac
4781 fi
4782 CAT=$ac_cv_path_CAT
4783 if test -n "$CAT"; then
4784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4785 $as_echo "$CAT" >&6; }
4786 else
4787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4788 $as_echo "no" >&6; }
4789 fi
4790 
4791 
4792   test -n "$CAT" && break
4793 done
4794 
4795   else
4796     # The variable is set, but is it from the command line or the environment?
4797 
4798     # Try to remove the string !CAT! from our list.
4799     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4800     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4801       # If it failed, the variable was not from the command line. Ignore it,
4802       # but warn the user (except for BASH, which is always set by the calling BASH).
4803       if test "xCAT" != xBASH; then
4804         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4805 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4806       fi
4807       # Try to locate tool using the code snippet
4808       for ac_prog in cat
4809 do
4810   # Extract the first word of "$ac_prog", so it can be a program name with args.
4811 set dummy $ac_prog; ac_word=$2
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813 $as_echo_n "checking for $ac_word... " >&6; }
4814 if ${ac_cv_path_CAT+:} false; then :
4815   $as_echo_n "(cached) " >&6
4816 else
4817   case $CAT in
4818   [\\/]* | ?:[\\/]*)
4819   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4820   ;;
4821   *)
4822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823 for as_dir in $PATH
4824 do
4825   IFS=$as_save_IFS
4826   test -z "$as_dir" && as_dir=.
4827     for ac_exec_ext in '' $ac_executable_extensions; do
4828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4829     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4831     break 2
4832   fi
4833 done
4834   done
4835 IFS=$as_save_IFS
4836 
4837   ;;
4838 esac
4839 fi
4840 CAT=$ac_cv_path_CAT
4841 if test -n "$CAT"; then
4842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4843 $as_echo "$CAT" >&6; }
4844 else
4845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846 $as_echo "no" >&6; }
4847 fi
4848 
4849 
4850   test -n "$CAT" && break
4851 done
4852 
4853     else
4854       # If it succeeded, then it was overridden by the user. We will use it
4855       # for the tool.
4856 
4857       # First remove it from the list of overridden variables, so we can test
4858       # for unknown variables in the end.
4859       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4860 
4861       # Check if the provided tool contains a complete path.
4862       tool_specified="$CAT"
4863       tool_basename="${tool_specified##*/}"
4864       if test "x$tool_basename" = "x$tool_specified"; then
4865         # A command without a complete path is provided, search $PATH.
4866         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4867 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4868         # Extract the first word of "$tool_basename", so it can be a program name with args.
4869 set dummy $tool_basename; ac_word=$2
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871 $as_echo_n "checking for $ac_word... " >&6; }
4872 if ${ac_cv_path_CAT+:} false; then :
4873   $as_echo_n "(cached) " >&6
4874 else
4875   case $CAT in
4876   [\\/]* | ?:[\\/]*)
4877   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4878   ;;
4879   *)
4880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881 for as_dir in $PATH
4882 do
4883   IFS=$as_save_IFS
4884   test -z "$as_dir" && as_dir=.
4885     for ac_exec_ext in '' $ac_executable_extensions; do
4886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4887     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889     break 2
4890   fi
4891 done
4892   done
4893 IFS=$as_save_IFS
4894 
4895   ;;
4896 esac
4897 fi
4898 CAT=$ac_cv_path_CAT
4899 if test -n "$CAT"; then
4900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4901 $as_echo "$CAT" >&6; }
4902 else
4903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904 $as_echo "no" >&6; }
4905 fi
4906 
4907 
4908         if test "x$CAT" = x; then
4909           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4910         fi
4911       else
4912         # Otherwise we believe it is a complete path. Use it as it is.
4913         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4914 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4915         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4916 $as_echo_n "checking for CAT... " >&6; }
4917         if test ! -x "$tool_specified"; then
4918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4919 $as_echo "not found" >&6; }
4920           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4921         fi
4922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4923 $as_echo "$tool_specified" >&6; }
4924       fi
4925     fi
4926   fi
4927 
4928 
4929 
4930   if test "x$CAT" = x; then
4931     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4932   fi
4933 
4934 
4935 
4936 
4937 
4938   # Publish this variable in the help.
4939 
4940 
4941   if test "x$CHMOD" = x; then
4942     # The variable is not set by user, try to locate tool using the code snippet
4943     for ac_prog in chmod
4944 do
4945   # Extract the first word of "$ac_prog", so it can be a program name with args.
4946 set dummy $ac_prog; ac_word=$2
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948 $as_echo_n "checking for $ac_word... " >&6; }
4949 if ${ac_cv_path_CHMOD+:} false; then :
4950   $as_echo_n "(cached) " >&6
4951 else
4952   case $CHMOD in
4953   [\\/]* | ?:[\\/]*)
4954   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4955   ;;
4956   *)
4957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958 for as_dir in $PATH
4959 do
4960   IFS=$as_save_IFS
4961   test -z "$as_dir" && as_dir=.
4962     for ac_exec_ext in '' $ac_executable_extensions; do
4963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966     break 2
4967   fi
4968 done
4969   done
4970 IFS=$as_save_IFS
4971 
4972   ;;
4973 esac
4974 fi
4975 CHMOD=$ac_cv_path_CHMOD
4976 if test -n "$CHMOD"; then
4977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4978 $as_echo "$CHMOD" >&6; }
4979 else
4980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981 $as_echo "no" >&6; }
4982 fi
4983 
4984 
4985   test -n "$CHMOD" && break
4986 done
4987 
4988   else
4989     # The variable is set, but is it from the command line or the environment?
4990 
4991     # Try to remove the string !CHMOD! from our list.
4992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4994       # If it failed, the variable was not from the command line. Ignore it,
4995       # but warn the user (except for BASH, which is always set by the calling BASH).
4996       if test "xCHMOD" != xBASH; then
4997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4998 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4999       fi
5000       # Try to locate tool using the code snippet
5001       for ac_prog in chmod
5002 do
5003   # Extract the first word of "$ac_prog", so it can be a program name with args.
5004 set dummy $ac_prog; ac_word=$2
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006 $as_echo_n "checking for $ac_word... " >&6; }
5007 if ${ac_cv_path_CHMOD+:} false; then :
5008   $as_echo_n "(cached) " >&6
5009 else
5010   case $CHMOD in
5011   [\\/]* | ?:[\\/]*)
5012   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5013   ;;
5014   *)
5015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016 for as_dir in $PATH
5017 do
5018   IFS=$as_save_IFS
5019   test -z "$as_dir" && as_dir=.
5020     for ac_exec_ext in '' $ac_executable_extensions; do
5021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024     break 2
5025   fi
5026 done
5027   done
5028 IFS=$as_save_IFS
5029 
5030   ;;
5031 esac
5032 fi
5033 CHMOD=$ac_cv_path_CHMOD
5034 if test -n "$CHMOD"; then
5035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5036 $as_echo "$CHMOD" >&6; }
5037 else
5038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039 $as_echo "no" >&6; }
5040 fi
5041 
5042 
5043   test -n "$CHMOD" && break
5044 done
5045 
5046     else
5047       # If it succeeded, then it was overridden by the user. We will use it
5048       # for the tool.
5049 
5050       # First remove it from the list of overridden variables, so we can test
5051       # for unknown variables in the end.
5052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5053 
5054       # Check if the provided tool contains a complete path.
5055       tool_specified="$CHMOD"
5056       tool_basename="${tool_specified##*/}"
5057       if test "x$tool_basename" = "x$tool_specified"; then
5058         # A command without a complete path is provided, search $PATH.
5059         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5060 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5061         # Extract the first word of "$tool_basename", so it can be a program name with args.
5062 set dummy $tool_basename; ac_word=$2
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064 $as_echo_n "checking for $ac_word... " >&6; }
5065 if ${ac_cv_path_CHMOD+:} false; then :
5066   $as_echo_n "(cached) " >&6
5067 else
5068   case $CHMOD in
5069   [\\/]* | ?:[\\/]*)
5070   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5071   ;;
5072   *)
5073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074 for as_dir in $PATH
5075 do
5076   IFS=$as_save_IFS
5077   test -z "$as_dir" && as_dir=.
5078     for ac_exec_ext in '' $ac_executable_extensions; do
5079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5080     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082     break 2
5083   fi
5084 done
5085   done
5086 IFS=$as_save_IFS
5087 
5088   ;;
5089 esac
5090 fi
5091 CHMOD=$ac_cv_path_CHMOD
5092 if test -n "$CHMOD"; then
5093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5094 $as_echo "$CHMOD" >&6; }
5095 else
5096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097 $as_echo "no" >&6; }
5098 fi
5099 
5100 
5101         if test "x$CHMOD" = x; then
5102           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5103         fi
5104       else
5105         # Otherwise we believe it is a complete path. Use it as it is.
5106         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5107 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5109 $as_echo_n "checking for CHMOD... " >&6; }
5110         if test ! -x "$tool_specified"; then
5111           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5112 $as_echo "not found" >&6; }
5113           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5114         fi
5115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5116 $as_echo "$tool_specified" >&6; }
5117       fi
5118     fi
5119   fi
5120 
5121 
5122 
5123   if test "x$CHMOD" = x; then
5124     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5125   fi
5126 
5127 
5128 
5129 
5130 
5131   # Publish this variable in the help.
5132 
5133 
5134   if test "x$CMP" = x; then
5135     # The variable is not set by user, try to locate tool using the code snippet
5136     for ac_prog in cmp
5137 do
5138   # Extract the first word of "$ac_prog", so it can be a program name with args.
5139 set dummy $ac_prog; ac_word=$2
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141 $as_echo_n "checking for $ac_word... " >&6; }
5142 if ${ac_cv_path_CMP+:} false; then :
5143   $as_echo_n "(cached) " >&6
5144 else
5145   case $CMP in
5146   [\\/]* | ?:[\\/]*)
5147   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5148   ;;
5149   *)
5150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151 for as_dir in $PATH
5152 do
5153   IFS=$as_save_IFS
5154   test -z "$as_dir" && as_dir=.
5155     for ac_exec_ext in '' $ac_executable_extensions; do
5156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5157     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159     break 2
5160   fi
5161 done
5162   done
5163 IFS=$as_save_IFS
5164 
5165   ;;
5166 esac
5167 fi
5168 CMP=$ac_cv_path_CMP
5169 if test -n "$CMP"; then
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5171 $as_echo "$CMP" >&6; }
5172 else
5173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174 $as_echo "no" >&6; }
5175 fi
5176 
5177 
5178   test -n "$CMP" && break
5179 done
5180 
5181   else
5182     # The variable is set, but is it from the command line or the environment?
5183 
5184     # Try to remove the string !CMP! from our list.
5185     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5186     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5187       # If it failed, the variable was not from the command line. Ignore it,
5188       # but warn the user (except for BASH, which is always set by the calling BASH).
5189       if test "xCMP" != xBASH; then
5190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5191 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5192       fi
5193       # Try to locate tool using the code snippet
5194       for ac_prog in cmp
5195 do
5196   # Extract the first word of "$ac_prog", so it can be a program name with args.
5197 set dummy $ac_prog; ac_word=$2
5198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5199 $as_echo_n "checking for $ac_word... " >&6; }
5200 if ${ac_cv_path_CMP+:} false; then :
5201   $as_echo_n "(cached) " >&6
5202 else
5203   case $CMP in
5204   [\\/]* | ?:[\\/]*)
5205   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5206   ;;
5207   *)
5208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5209 for as_dir in $PATH
5210 do
5211   IFS=$as_save_IFS
5212   test -z "$as_dir" && as_dir=.
5213     for ac_exec_ext in '' $ac_executable_extensions; do
5214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5215     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5217     break 2
5218   fi
5219 done
5220   done
5221 IFS=$as_save_IFS
5222 
5223   ;;
5224 esac
5225 fi
5226 CMP=$ac_cv_path_CMP
5227 if test -n "$CMP"; then
5228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5229 $as_echo "$CMP" >&6; }
5230 else
5231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5232 $as_echo "no" >&6; }
5233 fi
5234 
5235 
5236   test -n "$CMP" && break
5237 done
5238 
5239     else
5240       # If it succeeded, then it was overridden by the user. We will use it
5241       # for the tool.
5242 
5243       # First remove it from the list of overridden variables, so we can test
5244       # for unknown variables in the end.
5245       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5246 
5247       # Check if the provided tool contains a complete path.
5248       tool_specified="$CMP"
5249       tool_basename="${tool_specified##*/}"
5250       if test "x$tool_basename" = "x$tool_specified"; then
5251         # A command without a complete path is provided, search $PATH.
5252         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5253 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5254         # Extract the first word of "$tool_basename", so it can be a program name with args.
5255 set dummy $tool_basename; ac_word=$2
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257 $as_echo_n "checking for $ac_word... " >&6; }
5258 if ${ac_cv_path_CMP+:} false; then :
5259   $as_echo_n "(cached) " >&6
5260 else
5261   case $CMP in
5262   [\\/]* | ?:[\\/]*)
5263   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5264   ;;
5265   *)
5266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267 for as_dir in $PATH
5268 do
5269   IFS=$as_save_IFS
5270   test -z "$as_dir" && as_dir=.
5271     for ac_exec_ext in '' $ac_executable_extensions; do
5272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5273     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275     break 2
5276   fi
5277 done
5278   done
5279 IFS=$as_save_IFS
5280 
5281   ;;
5282 esac
5283 fi
5284 CMP=$ac_cv_path_CMP
5285 if test -n "$CMP"; then
5286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5287 $as_echo "$CMP" >&6; }
5288 else
5289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290 $as_echo "no" >&6; }
5291 fi
5292 
5293 
5294         if test "x$CMP" = x; then
5295           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5296         fi
5297       else
5298         # Otherwise we believe it is a complete path. Use it as it is.
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5300 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5302 $as_echo_n "checking for CMP... " >&6; }
5303         if test ! -x "$tool_specified"; then
5304           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5305 $as_echo "not found" >&6; }
5306           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5307         fi
5308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5309 $as_echo "$tool_specified" >&6; }
5310       fi
5311     fi
5312   fi
5313 
5314 
5315 
5316   if test "x$CMP" = x; then
5317     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5318   fi
5319 
5320 
5321 
5322 
5323 
5324   # Publish this variable in the help.
5325 
5326 
5327   if test "x$COMM" = x; then
5328     # The variable is not set by user, try to locate tool using the code snippet
5329     for ac_prog in comm
5330 do
5331   # Extract the first word of "$ac_prog", so it can be a program name with args.
5332 set dummy $ac_prog; ac_word=$2
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334 $as_echo_n "checking for $ac_word... " >&6; }
5335 if ${ac_cv_path_COMM+:} false; then :
5336   $as_echo_n "(cached) " >&6
5337 else
5338   case $COMM in
5339   [\\/]* | ?:[\\/]*)
5340   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5341   ;;
5342   *)
5343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344 for as_dir in $PATH
5345 do
5346   IFS=$as_save_IFS
5347   test -z "$as_dir" && as_dir=.
5348     for ac_exec_ext in '' $ac_executable_extensions; do
5349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352     break 2
5353   fi
5354 done
5355   done
5356 IFS=$as_save_IFS
5357 
5358   ;;
5359 esac
5360 fi
5361 COMM=$ac_cv_path_COMM
5362 if test -n "$COMM"; then
5363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5364 $as_echo "$COMM" >&6; }
5365 else
5366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367 $as_echo "no" >&6; }
5368 fi
5369 
5370 
5371   test -n "$COMM" && break
5372 done
5373 
5374   else
5375     # The variable is set, but is it from the command line or the environment?
5376 
5377     # Try to remove the string !COMM! from our list.
5378     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5379     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5380       # If it failed, the variable was not from the command line. Ignore it,
5381       # but warn the user (except for BASH, which is always set by the calling BASH).
5382       if test "xCOMM" != xBASH; then
5383         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5384 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5385       fi
5386       # Try to locate tool using the code snippet
5387       for ac_prog in comm
5388 do
5389   # Extract the first word of "$ac_prog", so it can be a program name with args.
5390 set dummy $ac_prog; ac_word=$2
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 $as_echo_n "checking for $ac_word... " >&6; }
5393 if ${ac_cv_path_COMM+:} false; then :
5394   $as_echo_n "(cached) " >&6
5395 else
5396   case $COMM in
5397   [\\/]* | ?:[\\/]*)
5398   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5399   ;;
5400   *)
5401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404   IFS=$as_save_IFS
5405   test -z "$as_dir" && as_dir=.
5406     for ac_exec_ext in '' $ac_executable_extensions; do
5407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410     break 2
5411   fi
5412 done
5413   done
5414 IFS=$as_save_IFS
5415 
5416   ;;
5417 esac
5418 fi
5419 COMM=$ac_cv_path_COMM
5420 if test -n "$COMM"; then
5421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5422 $as_echo "$COMM" >&6; }
5423 else
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 fi
5427 
5428 
5429   test -n "$COMM" && break
5430 done
5431 
5432     else
5433       # If it succeeded, then it was overridden by the user. We will use it
5434       # for the tool.
5435 
5436       # First remove it from the list of overridden variables, so we can test
5437       # for unknown variables in the end.
5438       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5439 
5440       # Check if the provided tool contains a complete path.
5441       tool_specified="$COMM"
5442       tool_basename="${tool_specified##*/}"
5443       if test "x$tool_basename" = "x$tool_specified"; then
5444         # A command without a complete path is provided, search $PATH.
5445         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5446 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5447         # Extract the first word of "$tool_basename", so it can be a program name with args.
5448 set dummy $tool_basename; ac_word=$2
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5450 $as_echo_n "checking for $ac_word... " >&6; }
5451 if ${ac_cv_path_COMM+:} false; then :
5452   $as_echo_n "(cached) " >&6
5453 else
5454   case $COMM in
5455   [\\/]* | ?:[\\/]*)
5456   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5457   ;;
5458   *)
5459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5460 for as_dir in $PATH
5461 do
5462   IFS=$as_save_IFS
5463   test -z "$as_dir" && as_dir=.
5464     for ac_exec_ext in '' $ac_executable_extensions; do
5465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5466     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5468     break 2
5469   fi
5470 done
5471   done
5472 IFS=$as_save_IFS
5473 
5474   ;;
5475 esac
5476 fi
5477 COMM=$ac_cv_path_COMM
5478 if test -n "$COMM"; then
5479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5480 $as_echo "$COMM" >&6; }
5481 else
5482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483 $as_echo "no" >&6; }
5484 fi
5485 
5486 
5487         if test "x$COMM" = x; then
5488           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5489         fi
5490       else
5491         # Otherwise we believe it is a complete path. Use it as it is.
5492         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5493 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5494         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5495 $as_echo_n "checking for COMM... " >&6; }
5496         if test ! -x "$tool_specified"; then
5497           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5498 $as_echo "not found" >&6; }
5499           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5500         fi
5501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5502 $as_echo "$tool_specified" >&6; }
5503       fi
5504     fi
5505   fi
5506 
5507 
5508 
5509   if test "x$COMM" = x; then
5510     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5511   fi
5512 
5513 
5514 
5515 
5516 
5517   # Publish this variable in the help.
5518 
5519 
5520   if test "x$CP" = x; then
5521     # The variable is not set by user, try to locate tool using the code snippet
5522     for ac_prog in cp
5523 do
5524   # Extract the first word of "$ac_prog", so it can be a program name with args.
5525 set dummy $ac_prog; ac_word=$2
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5527 $as_echo_n "checking for $ac_word... " >&6; }
5528 if ${ac_cv_path_CP+:} false; then :
5529   $as_echo_n "(cached) " >&6
5530 else
5531   case $CP in
5532   [\\/]* | ?:[\\/]*)
5533   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5534   ;;
5535   *)
5536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5537 for as_dir in $PATH
5538 do
5539   IFS=$as_save_IFS
5540   test -z "$as_dir" && as_dir=.
5541     for ac_exec_ext in '' $ac_executable_extensions; do
5542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5543     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5545     break 2
5546   fi
5547 done
5548   done
5549 IFS=$as_save_IFS
5550 
5551   ;;
5552 esac
5553 fi
5554 CP=$ac_cv_path_CP
5555 if test -n "$CP"; then
5556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5557 $as_echo "$CP" >&6; }
5558 else
5559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5560 $as_echo "no" >&6; }
5561 fi
5562 
5563 
5564   test -n "$CP" && break
5565 done
5566 
5567   else
5568     # The variable is set, but is it from the command line or the environment?
5569 
5570     # Try to remove the string !CP! from our list.
5571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5573       # If it failed, the variable was not from the command line. Ignore it,
5574       # but warn the user (except for BASH, which is always set by the calling BASH).
5575       if test "xCP" != xBASH; then
5576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5577 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5578       fi
5579       # Try to locate tool using the code snippet
5580       for ac_prog in cp
5581 do
5582   # Extract the first word of "$ac_prog", so it can be a program name with args.
5583 set dummy $ac_prog; ac_word=$2
5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585 $as_echo_n "checking for $ac_word... " >&6; }
5586 if ${ac_cv_path_CP+:} false; then :
5587   $as_echo_n "(cached) " >&6
5588 else
5589   case $CP in
5590   [\\/]* | ?:[\\/]*)
5591   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5592   ;;
5593   *)
5594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5595 for as_dir in $PATH
5596 do
5597   IFS=$as_save_IFS
5598   test -z "$as_dir" && as_dir=.
5599     for ac_exec_ext in '' $ac_executable_extensions; do
5600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5601     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5603     break 2
5604   fi
5605 done
5606   done
5607 IFS=$as_save_IFS
5608 
5609   ;;
5610 esac
5611 fi
5612 CP=$ac_cv_path_CP
5613 if test -n "$CP"; then
5614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5615 $as_echo "$CP" >&6; }
5616 else
5617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618 $as_echo "no" >&6; }
5619 fi
5620 
5621 
5622   test -n "$CP" && break
5623 done
5624 
5625     else
5626       # If it succeeded, then it was overridden by the user. We will use it
5627       # for the tool.
5628 
5629       # First remove it from the list of overridden variables, so we can test
5630       # for unknown variables in the end.
5631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5632 
5633       # Check if the provided tool contains a complete path.
5634       tool_specified="$CP"
5635       tool_basename="${tool_specified##*/}"
5636       if test "x$tool_basename" = "x$tool_specified"; then
5637         # A command without a complete path is provided, search $PATH.
5638         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5639 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5640         # Extract the first word of "$tool_basename", so it can be a program name with args.
5641 set dummy $tool_basename; ac_word=$2
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643 $as_echo_n "checking for $ac_word... " >&6; }
5644 if ${ac_cv_path_CP+:} false; then :
5645   $as_echo_n "(cached) " >&6
5646 else
5647   case $CP in
5648   [\\/]* | ?:[\\/]*)
5649   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5650   ;;
5651   *)
5652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653 for as_dir in $PATH
5654 do
5655   IFS=$as_save_IFS
5656   test -z "$as_dir" && as_dir=.
5657     for ac_exec_ext in '' $ac_executable_extensions; do
5658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661     break 2
5662   fi
5663 done
5664   done
5665 IFS=$as_save_IFS
5666 
5667   ;;
5668 esac
5669 fi
5670 CP=$ac_cv_path_CP
5671 if test -n "$CP"; then
5672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5673 $as_echo "$CP" >&6; }
5674 else
5675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676 $as_echo "no" >&6; }
5677 fi
5678 
5679 
5680         if test "x$CP" = x; then
5681           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5682         fi
5683       else
5684         # Otherwise we believe it is a complete path. Use it as it is.
5685         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5686 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5687         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5688 $as_echo_n "checking for CP... " >&6; }
5689         if test ! -x "$tool_specified"; then
5690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5691 $as_echo "not found" >&6; }
5692           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5693         fi
5694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5695 $as_echo "$tool_specified" >&6; }
5696       fi
5697     fi
5698   fi
5699 
5700 
5701 
5702   if test "x$CP" = x; then
5703     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5704   fi
5705 
5706 
5707 
5708 
5709 
5710   # Publish this variable in the help.
5711 
5712 
5713   if test "x$CUT" = x; then
5714     # The variable is not set by user, try to locate tool using the code snippet
5715     for ac_prog in cut
5716 do
5717   # Extract the first word of "$ac_prog", so it can be a program name with args.
5718 set dummy $ac_prog; ac_word=$2
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720 $as_echo_n "checking for $ac_word... " >&6; }
5721 if ${ac_cv_path_CUT+:} false; then :
5722   $as_echo_n "(cached) " >&6
5723 else
5724   case $CUT in
5725   [\\/]* | ?:[\\/]*)
5726   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5727   ;;
5728   *)
5729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730 for as_dir in $PATH
5731 do
5732   IFS=$as_save_IFS
5733   test -z "$as_dir" && as_dir=.
5734     for ac_exec_ext in '' $ac_executable_extensions; do
5735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738     break 2
5739   fi
5740 done
5741   done
5742 IFS=$as_save_IFS
5743 
5744   ;;
5745 esac
5746 fi
5747 CUT=$ac_cv_path_CUT
5748 if test -n "$CUT"; then
5749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5750 $as_echo "$CUT" >&6; }
5751 else
5752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753 $as_echo "no" >&6; }
5754 fi
5755 
5756 
5757   test -n "$CUT" && break
5758 done
5759 
5760   else
5761     # The variable is set, but is it from the command line or the environment?
5762 
5763     # Try to remove the string !CUT! from our list.
5764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5766       # If it failed, the variable was not from the command line. Ignore it,
5767       # but warn the user (except for BASH, which is always set by the calling BASH).
5768       if test "xCUT" != xBASH; then
5769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5770 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5771       fi
5772       # Try to locate tool using the code snippet
5773       for ac_prog in cut
5774 do
5775   # Extract the first word of "$ac_prog", so it can be a program name with args.
5776 set dummy $ac_prog; ac_word=$2
5777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778 $as_echo_n "checking for $ac_word... " >&6; }
5779 if ${ac_cv_path_CUT+:} false; then :
5780   $as_echo_n "(cached) " >&6
5781 else
5782   case $CUT in
5783   [\\/]* | ?:[\\/]*)
5784   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5785   ;;
5786   *)
5787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788 for as_dir in $PATH
5789 do
5790   IFS=$as_save_IFS
5791   test -z "$as_dir" && as_dir=.
5792     for ac_exec_ext in '' $ac_executable_extensions; do
5793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5794     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796     break 2
5797   fi
5798 done
5799   done
5800 IFS=$as_save_IFS
5801 
5802   ;;
5803 esac
5804 fi
5805 CUT=$ac_cv_path_CUT
5806 if test -n "$CUT"; then
5807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5808 $as_echo "$CUT" >&6; }
5809 else
5810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5811 $as_echo "no" >&6; }
5812 fi
5813 
5814 
5815   test -n "$CUT" && break
5816 done
5817 
5818     else
5819       # If it succeeded, then it was overridden by the user. We will use it
5820       # for the tool.
5821 
5822       # First remove it from the list of overridden variables, so we can test
5823       # for unknown variables in the end.
5824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5825 
5826       # Check if the provided tool contains a complete path.
5827       tool_specified="$CUT"
5828       tool_basename="${tool_specified##*/}"
5829       if test "x$tool_basename" = "x$tool_specified"; then
5830         # A command without a complete path is provided, search $PATH.
5831         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5832 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5833         # Extract the first word of "$tool_basename", so it can be a program name with args.
5834 set dummy $tool_basename; ac_word=$2
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5836 $as_echo_n "checking for $ac_word... " >&6; }
5837 if ${ac_cv_path_CUT+:} false; then :
5838   $as_echo_n "(cached) " >&6
5839 else
5840   case $CUT in
5841   [\\/]* | ?:[\\/]*)
5842   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5843   ;;
5844   *)
5845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5846 for as_dir in $PATH
5847 do
5848   IFS=$as_save_IFS
5849   test -z "$as_dir" && as_dir=.
5850     for ac_exec_ext in '' $ac_executable_extensions; do
5851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5852     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5854     break 2
5855   fi
5856 done
5857   done
5858 IFS=$as_save_IFS
5859 
5860   ;;
5861 esac
5862 fi
5863 CUT=$ac_cv_path_CUT
5864 if test -n "$CUT"; then
5865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5866 $as_echo "$CUT" >&6; }
5867 else
5868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5869 $as_echo "no" >&6; }
5870 fi
5871 
5872 
5873         if test "x$CUT" = x; then
5874           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5875         fi
5876       else
5877         # Otherwise we believe it is a complete path. Use it as it is.
5878         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5879 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5880         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5881 $as_echo_n "checking for CUT... " >&6; }
5882         if test ! -x "$tool_specified"; then
5883           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5884 $as_echo "not found" >&6; }
5885           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5886         fi
5887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5888 $as_echo "$tool_specified" >&6; }
5889       fi
5890     fi
5891   fi
5892 
5893 
5894 
5895   if test "x$CUT" = x; then
5896     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5897   fi
5898 
5899 
5900 
5901 
5902 
5903   # Publish this variable in the help.
5904 
5905 
5906   if test "x$DATE" = x; then
5907     # The variable is not set by user, try to locate tool using the code snippet
5908     for ac_prog in date
5909 do
5910   # Extract the first word of "$ac_prog", so it can be a program name with args.
5911 set dummy $ac_prog; ac_word=$2
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913 $as_echo_n "checking for $ac_word... " >&6; }
5914 if ${ac_cv_path_DATE+:} false; then :
5915   $as_echo_n "(cached) " >&6
5916 else
5917   case $DATE in
5918   [\\/]* | ?:[\\/]*)
5919   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5920   ;;
5921   *)
5922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923 for as_dir in $PATH
5924 do
5925   IFS=$as_save_IFS
5926   test -z "$as_dir" && as_dir=.
5927     for ac_exec_ext in '' $ac_executable_extensions; do
5928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5929     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931     break 2
5932   fi
5933 done
5934   done
5935 IFS=$as_save_IFS
5936 
5937   ;;
5938 esac
5939 fi
5940 DATE=$ac_cv_path_DATE
5941 if test -n "$DATE"; then
5942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5943 $as_echo "$DATE" >&6; }
5944 else
5945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5946 $as_echo "no" >&6; }
5947 fi
5948 
5949 
5950   test -n "$DATE" && break
5951 done
5952 
5953   else
5954     # The variable is set, but is it from the command line or the environment?
5955 
5956     # Try to remove the string !DATE! from our list.
5957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5959       # If it failed, the variable was not from the command line. Ignore it,
5960       # but warn the user (except for BASH, which is always set by the calling BASH).
5961       if test "xDATE" != xBASH; then
5962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5963 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5964       fi
5965       # Try to locate tool using the code snippet
5966       for ac_prog in date
5967 do
5968   # Extract the first word of "$ac_prog", so it can be a program name with args.
5969 set dummy $ac_prog; ac_word=$2
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971 $as_echo_n "checking for $ac_word... " >&6; }
5972 if ${ac_cv_path_DATE+:} false; then :
5973   $as_echo_n "(cached) " >&6
5974 else
5975   case $DATE in
5976   [\\/]* | ?:[\\/]*)
5977   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5978   ;;
5979   *)
5980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981 for as_dir in $PATH
5982 do
5983   IFS=$as_save_IFS
5984   test -z "$as_dir" && as_dir=.
5985     for ac_exec_ext in '' $ac_executable_extensions; do
5986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5987     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5989     break 2
5990   fi
5991 done
5992   done
5993 IFS=$as_save_IFS
5994 
5995   ;;
5996 esac
5997 fi
5998 DATE=$ac_cv_path_DATE
5999 if test -n "$DATE"; then
6000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6001 $as_echo "$DATE" >&6; }
6002 else
6003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004 $as_echo "no" >&6; }
6005 fi
6006 
6007 
6008   test -n "$DATE" && break
6009 done
6010 
6011     else
6012       # If it succeeded, then it was overridden by the user. We will use it
6013       # for the tool.
6014 
6015       # First remove it from the list of overridden variables, so we can test
6016       # for unknown variables in the end.
6017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6018 
6019       # Check if the provided tool contains a complete path.
6020       tool_specified="$DATE"
6021       tool_basename="${tool_specified##*/}"
6022       if test "x$tool_basename" = "x$tool_specified"; then
6023         # A command without a complete path is provided, search $PATH.
6024         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6025 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6026         # Extract the first word of "$tool_basename", so it can be a program name with args.
6027 set dummy $tool_basename; ac_word=$2
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6029 $as_echo_n "checking for $ac_word... " >&6; }
6030 if ${ac_cv_path_DATE+:} false; then :
6031   $as_echo_n "(cached) " >&6
6032 else
6033   case $DATE in
6034   [\\/]* | ?:[\\/]*)
6035   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6036   ;;
6037   *)
6038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039 for as_dir in $PATH
6040 do
6041   IFS=$as_save_IFS
6042   test -z "$as_dir" && as_dir=.
6043     for ac_exec_ext in '' $ac_executable_extensions; do
6044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6045     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6047     break 2
6048   fi
6049 done
6050   done
6051 IFS=$as_save_IFS
6052 
6053   ;;
6054 esac
6055 fi
6056 DATE=$ac_cv_path_DATE
6057 if test -n "$DATE"; then
6058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6059 $as_echo "$DATE" >&6; }
6060 else
6061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6062 $as_echo "no" >&6; }
6063 fi
6064 
6065 
6066         if test "x$DATE" = x; then
6067           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6068         fi
6069       else
6070         # Otherwise we believe it is a complete path. Use it as it is.
6071         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6072 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6074 $as_echo_n "checking for DATE... " >&6; }
6075         if test ! -x "$tool_specified"; then
6076           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6077 $as_echo "not found" >&6; }
6078           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6079         fi
6080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6081 $as_echo "$tool_specified" >&6; }
6082       fi
6083     fi
6084   fi
6085 
6086 
6087 
6088   if test "x$DATE" = x; then
6089     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6090   fi
6091 
6092 
6093 
6094 
6095 
6096   # Publish this variable in the help.
6097 
6098 
6099   if test "x$DIFF" = x; then
6100     # The variable is not set by user, try to locate tool using the code snippet
6101     for ac_prog in gdiff diff
6102 do
6103   # Extract the first word of "$ac_prog", so it can be a program name with args.
6104 set dummy $ac_prog; ac_word=$2
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106 $as_echo_n "checking for $ac_word... " >&6; }
6107 if ${ac_cv_path_DIFF+:} false; then :
6108   $as_echo_n "(cached) " >&6
6109 else
6110   case $DIFF in
6111   [\\/]* | ?:[\\/]*)
6112   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6113   ;;
6114   *)
6115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116 for as_dir in $PATH
6117 do
6118   IFS=$as_save_IFS
6119   test -z "$as_dir" && as_dir=.
6120     for ac_exec_ext in '' $ac_executable_extensions; do
6121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6122     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124     break 2
6125   fi
6126 done
6127   done
6128 IFS=$as_save_IFS
6129 
6130   ;;
6131 esac
6132 fi
6133 DIFF=$ac_cv_path_DIFF
6134 if test -n "$DIFF"; then
6135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6136 $as_echo "$DIFF" >&6; }
6137 else
6138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139 $as_echo "no" >&6; }
6140 fi
6141 
6142 
6143   test -n "$DIFF" && break
6144 done
6145 
6146   else
6147     # The variable is set, but is it from the command line or the environment?
6148 
6149     # Try to remove the string !DIFF! from our list.
6150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6152       # If it failed, the variable was not from the command line. Ignore it,
6153       # but warn the user (except for BASH, which is always set by the calling BASH).
6154       if test "xDIFF" != xBASH; then
6155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6156 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6157       fi
6158       # Try to locate tool using the code snippet
6159       for ac_prog in gdiff diff
6160 do
6161   # Extract the first word of "$ac_prog", so it can be a program name with args.
6162 set dummy $ac_prog; ac_word=$2
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6164 $as_echo_n "checking for $ac_word... " >&6; }
6165 if ${ac_cv_path_DIFF+:} false; then :
6166   $as_echo_n "(cached) " >&6
6167 else
6168   case $DIFF in
6169   [\\/]* | ?:[\\/]*)
6170   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6171   ;;
6172   *)
6173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174 for as_dir in $PATH
6175 do
6176   IFS=$as_save_IFS
6177   test -z "$as_dir" && as_dir=.
6178     for ac_exec_ext in '' $ac_executable_extensions; do
6179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182     break 2
6183   fi
6184 done
6185   done
6186 IFS=$as_save_IFS
6187 
6188   ;;
6189 esac
6190 fi
6191 DIFF=$ac_cv_path_DIFF
6192 if test -n "$DIFF"; then
6193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6194 $as_echo "$DIFF" >&6; }
6195 else
6196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197 $as_echo "no" >&6; }
6198 fi
6199 
6200 
6201   test -n "$DIFF" && break
6202 done
6203 
6204     else
6205       # If it succeeded, then it was overridden by the user. We will use it
6206       # for the tool.
6207 
6208       # First remove it from the list of overridden variables, so we can test
6209       # for unknown variables in the end.
6210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6211 
6212       # Check if the provided tool contains a complete path.
6213       tool_specified="$DIFF"
6214       tool_basename="${tool_specified##*/}"
6215       if test "x$tool_basename" = "x$tool_specified"; then
6216         # A command without a complete path is provided, search $PATH.
6217         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6218 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6219         # Extract the first word of "$tool_basename", so it can be a program name with args.
6220 set dummy $tool_basename; ac_word=$2
6221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6222 $as_echo_n "checking for $ac_word... " >&6; }
6223 if ${ac_cv_path_DIFF+:} false; then :
6224   $as_echo_n "(cached) " >&6
6225 else
6226   case $DIFF in
6227   [\\/]* | ?:[\\/]*)
6228   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6229   ;;
6230   *)
6231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232 for as_dir in $PATH
6233 do
6234   IFS=$as_save_IFS
6235   test -z "$as_dir" && as_dir=.
6236     for ac_exec_ext in '' $ac_executable_extensions; do
6237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6238     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240     break 2
6241   fi
6242 done
6243   done
6244 IFS=$as_save_IFS
6245 
6246   ;;
6247 esac
6248 fi
6249 DIFF=$ac_cv_path_DIFF
6250 if test -n "$DIFF"; then
6251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6252 $as_echo "$DIFF" >&6; }
6253 else
6254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255 $as_echo "no" >&6; }
6256 fi
6257 
6258 
6259         if test "x$DIFF" = x; then
6260           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6261         fi
6262       else
6263         # Otherwise we believe it is a complete path. Use it as it is.
6264         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6265 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6267 $as_echo_n "checking for DIFF... " >&6; }
6268         if test ! -x "$tool_specified"; then
6269           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6270 $as_echo "not found" >&6; }
6271           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6272         fi
6273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6274 $as_echo "$tool_specified" >&6; }
6275       fi
6276     fi
6277   fi
6278 
6279 
6280 
6281   if test "x$DIFF" = x; then
6282     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6283   fi
6284 
6285 
6286 
6287 
6288 
6289   # Publish this variable in the help.
6290 
6291 
6292   if test "x$DIRNAME" = x; then
6293     # The variable is not set by user, try to locate tool using the code snippet
6294     for ac_prog in dirname
6295 do
6296   # Extract the first word of "$ac_prog", so it can be a program name with args.
6297 set dummy $ac_prog; ac_word=$2
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6299 $as_echo_n "checking for $ac_word... " >&6; }
6300 if ${ac_cv_path_DIRNAME+:} false; then :
6301   $as_echo_n "(cached) " >&6
6302 else
6303   case $DIRNAME in
6304   [\\/]* | ?:[\\/]*)
6305   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6306   ;;
6307   *)
6308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6309 for as_dir in $PATH
6310 do
6311   IFS=$as_save_IFS
6312   test -z "$as_dir" && as_dir=.
6313     for ac_exec_ext in '' $ac_executable_extensions; do
6314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6315     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6317     break 2
6318   fi
6319 done
6320   done
6321 IFS=$as_save_IFS
6322 
6323   ;;
6324 esac
6325 fi
6326 DIRNAME=$ac_cv_path_DIRNAME
6327 if test -n "$DIRNAME"; then
6328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6329 $as_echo "$DIRNAME" >&6; }
6330 else
6331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332 $as_echo "no" >&6; }
6333 fi
6334 
6335 
6336   test -n "$DIRNAME" && break
6337 done
6338 
6339   else
6340     # The variable is set, but is it from the command line or the environment?
6341 
6342     # Try to remove the string !DIRNAME! from our list.
6343     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6344     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6345       # If it failed, the variable was not from the command line. Ignore it,
6346       # but warn the user (except for BASH, which is always set by the calling BASH).
6347       if test "xDIRNAME" != xBASH; then
6348         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6349 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6350       fi
6351       # Try to locate tool using the code snippet
6352       for ac_prog in dirname
6353 do
6354   # Extract the first word of "$ac_prog", so it can be a program name with args.
6355 set dummy $ac_prog; ac_word=$2
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6357 $as_echo_n "checking for $ac_word... " >&6; }
6358 if ${ac_cv_path_DIRNAME+:} false; then :
6359   $as_echo_n "(cached) " >&6
6360 else
6361   case $DIRNAME in
6362   [\\/]* | ?:[\\/]*)
6363   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6364   ;;
6365   *)
6366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367 for as_dir in $PATH
6368 do
6369   IFS=$as_save_IFS
6370   test -z "$as_dir" && as_dir=.
6371     for ac_exec_ext in '' $ac_executable_extensions; do
6372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6373     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6375     break 2
6376   fi
6377 done
6378   done
6379 IFS=$as_save_IFS
6380 
6381   ;;
6382 esac
6383 fi
6384 DIRNAME=$ac_cv_path_DIRNAME
6385 if test -n "$DIRNAME"; then
6386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6387 $as_echo "$DIRNAME" >&6; }
6388 else
6389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390 $as_echo "no" >&6; }
6391 fi
6392 
6393 
6394   test -n "$DIRNAME" && break
6395 done
6396 
6397     else
6398       # If it succeeded, then it was overridden by the user. We will use it
6399       # for the tool.
6400 
6401       # First remove it from the list of overridden variables, so we can test
6402       # for unknown variables in the end.
6403       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6404 
6405       # Check if the provided tool contains a complete path.
6406       tool_specified="$DIRNAME"
6407       tool_basename="${tool_specified##*/}"
6408       if test "x$tool_basename" = "x$tool_specified"; then
6409         # A command without a complete path is provided, search $PATH.
6410         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6411 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6412         # Extract the first word of "$tool_basename", so it can be a program name with args.
6413 set dummy $tool_basename; ac_word=$2
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415 $as_echo_n "checking for $ac_word... " >&6; }
6416 if ${ac_cv_path_DIRNAME+:} false; then :
6417   $as_echo_n "(cached) " >&6
6418 else
6419   case $DIRNAME in
6420   [\\/]* | ?:[\\/]*)
6421   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6422   ;;
6423   *)
6424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425 for as_dir in $PATH
6426 do
6427   IFS=$as_save_IFS
6428   test -z "$as_dir" && as_dir=.
6429     for ac_exec_ext in '' $ac_executable_extensions; do
6430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6431     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6433     break 2
6434   fi
6435 done
6436   done
6437 IFS=$as_save_IFS
6438 
6439   ;;
6440 esac
6441 fi
6442 DIRNAME=$ac_cv_path_DIRNAME
6443 if test -n "$DIRNAME"; then
6444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6445 $as_echo "$DIRNAME" >&6; }
6446 else
6447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6448 $as_echo "no" >&6; }
6449 fi
6450 
6451 
6452         if test "x$DIRNAME" = x; then
6453           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6454         fi
6455       else
6456         # Otherwise we believe it is a complete path. Use it as it is.
6457         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6458 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6460 $as_echo_n "checking for DIRNAME... " >&6; }
6461         if test ! -x "$tool_specified"; then
6462           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6463 $as_echo "not found" >&6; }
6464           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6465         fi
6466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6467 $as_echo "$tool_specified" >&6; }
6468       fi
6469     fi
6470   fi
6471 
6472 
6473 
6474   if test "x$DIRNAME" = x; then
6475     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6476   fi
6477 
6478 
6479 
6480 
6481 
6482   # Publish this variable in the help.
6483 
6484 
6485   if test "x$ECHO" = x; then
6486     # The variable is not set by user, try to locate tool using the code snippet
6487     for ac_prog in echo
6488 do
6489   # Extract the first word of "$ac_prog", so it can be a program name with args.
6490 set dummy $ac_prog; ac_word=$2
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6492 $as_echo_n "checking for $ac_word... " >&6; }
6493 if ${ac_cv_path_ECHO+:} false; then :
6494   $as_echo_n "(cached) " >&6
6495 else
6496   case $ECHO in
6497   [\\/]* | ?:[\\/]*)
6498   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6499   ;;
6500   *)
6501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6502 for as_dir in $PATH
6503 do
6504   IFS=$as_save_IFS
6505   test -z "$as_dir" && as_dir=.
6506     for ac_exec_ext in '' $ac_executable_extensions; do
6507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6508     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6510     break 2
6511   fi
6512 done
6513   done
6514 IFS=$as_save_IFS
6515 
6516   ;;
6517 esac
6518 fi
6519 ECHO=$ac_cv_path_ECHO
6520 if test -n "$ECHO"; then
6521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6522 $as_echo "$ECHO" >&6; }
6523 else
6524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525 $as_echo "no" >&6; }
6526 fi
6527 
6528 
6529   test -n "$ECHO" && break
6530 done
6531 
6532   else
6533     # The variable is set, but is it from the command line or the environment?
6534 
6535     # Try to remove the string !ECHO! from our list.
6536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6538       # If it failed, the variable was not from the command line. Ignore it,
6539       # but warn the user (except for BASH, which is always set by the calling BASH).
6540       if test "xECHO" != xBASH; then
6541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6542 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6543       fi
6544       # Try to locate tool using the code snippet
6545       for ac_prog in echo
6546 do
6547   # Extract the first word of "$ac_prog", so it can be a program name with args.
6548 set dummy $ac_prog; ac_word=$2
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550 $as_echo_n "checking for $ac_word... " >&6; }
6551 if ${ac_cv_path_ECHO+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   case $ECHO in
6555   [\\/]* | ?:[\\/]*)
6556   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6557   ;;
6558   *)
6559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6560 for as_dir in $PATH
6561 do
6562   IFS=$as_save_IFS
6563   test -z "$as_dir" && as_dir=.
6564     for ac_exec_ext in '' $ac_executable_extensions; do
6565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6566     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6568     break 2
6569   fi
6570 done
6571   done
6572 IFS=$as_save_IFS
6573 
6574   ;;
6575 esac
6576 fi
6577 ECHO=$ac_cv_path_ECHO
6578 if test -n "$ECHO"; then
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6580 $as_echo "$ECHO" >&6; }
6581 else
6582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583 $as_echo "no" >&6; }
6584 fi
6585 
6586 
6587   test -n "$ECHO" && break
6588 done
6589 
6590     else
6591       # If it succeeded, then it was overridden by the user. We will use it
6592       # for the tool.
6593 
6594       # First remove it from the list of overridden variables, so we can test
6595       # for unknown variables in the end.
6596       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6597 
6598       # Check if the provided tool contains a complete path.
6599       tool_specified="$ECHO"
6600       tool_basename="${tool_specified##*/}"
6601       if test "x$tool_basename" = "x$tool_specified"; then
6602         # A command without a complete path is provided, search $PATH.
6603         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6604 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6605         # Extract the first word of "$tool_basename", so it can be a program name with args.
6606 set dummy $tool_basename; ac_word=$2
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6608 $as_echo_n "checking for $ac_word... " >&6; }
6609 if ${ac_cv_path_ECHO+:} false; then :
6610   $as_echo_n "(cached) " >&6
6611 else
6612   case $ECHO in
6613   [\\/]* | ?:[\\/]*)
6614   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6615   ;;
6616   *)
6617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6618 for as_dir in $PATH
6619 do
6620   IFS=$as_save_IFS
6621   test -z "$as_dir" && as_dir=.
6622     for ac_exec_ext in '' $ac_executable_extensions; do
6623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6624     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6626     break 2
6627   fi
6628 done
6629   done
6630 IFS=$as_save_IFS
6631 
6632   ;;
6633 esac
6634 fi
6635 ECHO=$ac_cv_path_ECHO
6636 if test -n "$ECHO"; then
6637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6638 $as_echo "$ECHO" >&6; }
6639 else
6640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6641 $as_echo "no" >&6; }
6642 fi
6643 
6644 
6645         if test "x$ECHO" = x; then
6646           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6647         fi
6648       else
6649         # Otherwise we believe it is a complete path. Use it as it is.
6650         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6651 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6653 $as_echo_n "checking for ECHO... " >&6; }
6654         if test ! -x "$tool_specified"; then
6655           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6656 $as_echo "not found" >&6; }
6657           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6658         fi
6659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6660 $as_echo "$tool_specified" >&6; }
6661       fi
6662     fi
6663   fi
6664 
6665 
6666 
6667   if test "x$ECHO" = x; then
6668     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6669   fi
6670 
6671 
6672 
6673 
6674 
6675   # Publish this variable in the help.
6676 
6677 
6678   if test "x$EXPR" = x; then
6679     # The variable is not set by user, try to locate tool using the code snippet
6680     for ac_prog in expr
6681 do
6682   # Extract the first word of "$ac_prog", so it can be a program name with args.
6683 set dummy $ac_prog; ac_word=$2
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685 $as_echo_n "checking for $ac_word... " >&6; }
6686 if ${ac_cv_path_EXPR+:} false; then :
6687   $as_echo_n "(cached) " >&6
6688 else
6689   case $EXPR in
6690   [\\/]* | ?:[\\/]*)
6691   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6692   ;;
6693   *)
6694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695 for as_dir in $PATH
6696 do
6697   IFS=$as_save_IFS
6698   test -z "$as_dir" && as_dir=.
6699     for ac_exec_ext in '' $ac_executable_extensions; do
6700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6701     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703     break 2
6704   fi
6705 done
6706   done
6707 IFS=$as_save_IFS
6708 
6709   ;;
6710 esac
6711 fi
6712 EXPR=$ac_cv_path_EXPR
6713 if test -n "$EXPR"; then
6714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6715 $as_echo "$EXPR" >&6; }
6716 else
6717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718 $as_echo "no" >&6; }
6719 fi
6720 
6721 
6722   test -n "$EXPR" && break
6723 done
6724 
6725   else
6726     # The variable is set, but is it from the command line or the environment?
6727 
6728     # Try to remove the string !EXPR! from our list.
6729     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6730     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6731       # If it failed, the variable was not from the command line. Ignore it,
6732       # but warn the user (except for BASH, which is always set by the calling BASH).
6733       if test "xEXPR" != xBASH; then
6734         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6735 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6736       fi
6737       # Try to locate tool using the code snippet
6738       for ac_prog in expr
6739 do
6740   # Extract the first word of "$ac_prog", so it can be a program name with args.
6741 set dummy $ac_prog; ac_word=$2
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743 $as_echo_n "checking for $ac_word... " >&6; }
6744 if ${ac_cv_path_EXPR+:} false; then :
6745   $as_echo_n "(cached) " >&6
6746 else
6747   case $EXPR in
6748   [\\/]* | ?:[\\/]*)
6749   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6750   ;;
6751   *)
6752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753 for as_dir in $PATH
6754 do
6755   IFS=$as_save_IFS
6756   test -z "$as_dir" && as_dir=.
6757     for ac_exec_ext in '' $ac_executable_extensions; do
6758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761     break 2
6762   fi
6763 done
6764   done
6765 IFS=$as_save_IFS
6766 
6767   ;;
6768 esac
6769 fi
6770 EXPR=$ac_cv_path_EXPR
6771 if test -n "$EXPR"; then
6772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6773 $as_echo "$EXPR" >&6; }
6774 else
6775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776 $as_echo "no" >&6; }
6777 fi
6778 
6779 
6780   test -n "$EXPR" && break
6781 done
6782 
6783     else
6784       # If it succeeded, then it was overridden by the user. We will use it
6785       # for the tool.
6786 
6787       # First remove it from the list of overridden variables, so we can test
6788       # for unknown variables in the end.
6789       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6790 
6791       # Check if the provided tool contains a complete path.
6792       tool_specified="$EXPR"
6793       tool_basename="${tool_specified##*/}"
6794       if test "x$tool_basename" = "x$tool_specified"; then
6795         # A command without a complete path is provided, search $PATH.
6796         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6797 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6798         # Extract the first word of "$tool_basename", so it can be a program name with args.
6799 set dummy $tool_basename; ac_word=$2
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6801 $as_echo_n "checking for $ac_word... " >&6; }
6802 if ${ac_cv_path_EXPR+:} false; then :
6803   $as_echo_n "(cached) " >&6
6804 else
6805   case $EXPR in
6806   [\\/]* | ?:[\\/]*)
6807   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6808   ;;
6809   *)
6810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811 for as_dir in $PATH
6812 do
6813   IFS=$as_save_IFS
6814   test -z "$as_dir" && as_dir=.
6815     for ac_exec_ext in '' $ac_executable_extensions; do
6816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6817     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6819     break 2
6820   fi
6821 done
6822   done
6823 IFS=$as_save_IFS
6824 
6825   ;;
6826 esac
6827 fi
6828 EXPR=$ac_cv_path_EXPR
6829 if test -n "$EXPR"; then
6830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6831 $as_echo "$EXPR" >&6; }
6832 else
6833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834 $as_echo "no" >&6; }
6835 fi
6836 
6837 
6838         if test "x$EXPR" = x; then
6839           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6840         fi
6841       else
6842         # Otherwise we believe it is a complete path. Use it as it is.
6843         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6844 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6845         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6846 $as_echo_n "checking for EXPR... " >&6; }
6847         if test ! -x "$tool_specified"; then
6848           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6849 $as_echo "not found" >&6; }
6850           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6851         fi
6852         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6853 $as_echo "$tool_specified" >&6; }
6854       fi
6855     fi
6856   fi
6857 
6858 
6859 
6860   if test "x$EXPR" = x; then
6861     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6862   fi
6863 
6864 
6865 
6866 
6867 
6868   # Publish this variable in the help.
6869 
6870 
6871   if test "x$FILE" = x; then
6872     # The variable is not set by user, try to locate tool using the code snippet
6873     for ac_prog in file
6874 do
6875   # Extract the first word of "$ac_prog", so it can be a program name with args.
6876 set dummy $ac_prog; ac_word=$2
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6878 $as_echo_n "checking for $ac_word... " >&6; }
6879 if ${ac_cv_path_FILE+:} false; then :
6880   $as_echo_n "(cached) " >&6
6881 else
6882   case $FILE in
6883   [\\/]* | ?:[\\/]*)
6884   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6885   ;;
6886   *)
6887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6888 for as_dir in $PATH
6889 do
6890   IFS=$as_save_IFS
6891   test -z "$as_dir" && as_dir=.
6892     for ac_exec_ext in '' $ac_executable_extensions; do
6893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6894     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6896     break 2
6897   fi
6898 done
6899   done
6900 IFS=$as_save_IFS
6901 
6902   ;;
6903 esac
6904 fi
6905 FILE=$ac_cv_path_FILE
6906 if test -n "$FILE"; then
6907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6908 $as_echo "$FILE" >&6; }
6909 else
6910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6911 $as_echo "no" >&6; }
6912 fi
6913 
6914 
6915   test -n "$FILE" && break
6916 done
6917 
6918   else
6919     # The variable is set, but is it from the command line or the environment?
6920 
6921     # Try to remove the string !FILE! from our list.
6922     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6923     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6924       # If it failed, the variable was not from the command line. Ignore it,
6925       # but warn the user (except for BASH, which is always set by the calling BASH).
6926       if test "xFILE" != xBASH; then
6927         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6928 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6929       fi
6930       # Try to locate tool using the code snippet
6931       for ac_prog in file
6932 do
6933   # Extract the first word of "$ac_prog", so it can be a program name with args.
6934 set dummy $ac_prog; ac_word=$2
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6936 $as_echo_n "checking for $ac_word... " >&6; }
6937 if ${ac_cv_path_FILE+:} false; then :
6938   $as_echo_n "(cached) " >&6
6939 else
6940   case $FILE in
6941   [\\/]* | ?:[\\/]*)
6942   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6943   ;;
6944   *)
6945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6946 for as_dir in $PATH
6947 do
6948   IFS=$as_save_IFS
6949   test -z "$as_dir" && as_dir=.
6950     for ac_exec_ext in '' $ac_executable_extensions; do
6951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6952     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6954     break 2
6955   fi
6956 done
6957   done
6958 IFS=$as_save_IFS
6959 
6960   ;;
6961 esac
6962 fi
6963 FILE=$ac_cv_path_FILE
6964 if test -n "$FILE"; then
6965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6966 $as_echo "$FILE" >&6; }
6967 else
6968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969 $as_echo "no" >&6; }
6970 fi
6971 
6972 
6973   test -n "$FILE" && break
6974 done
6975 
6976     else
6977       # If it succeeded, then it was overridden by the user. We will use it
6978       # for the tool.
6979 
6980       # First remove it from the list of overridden variables, so we can test
6981       # for unknown variables in the end.
6982       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6983 
6984       # Check if the provided tool contains a complete path.
6985       tool_specified="$FILE"
6986       tool_basename="${tool_specified##*/}"
6987       if test "x$tool_basename" = "x$tool_specified"; then
6988         # A command without a complete path is provided, search $PATH.
6989         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6990 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6991         # Extract the first word of "$tool_basename", so it can be a program name with args.
6992 set dummy $tool_basename; ac_word=$2
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6994 $as_echo_n "checking for $ac_word... " >&6; }
6995 if ${ac_cv_path_FILE+:} false; then :
6996   $as_echo_n "(cached) " >&6
6997 else
6998   case $FILE in
6999   [\\/]* | ?:[\\/]*)
7000   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7001   ;;
7002   *)
7003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7004 for as_dir in $PATH
7005 do
7006   IFS=$as_save_IFS
7007   test -z "$as_dir" && as_dir=.
7008     for ac_exec_ext in '' $ac_executable_extensions; do
7009   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7010     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7012     break 2
7013   fi
7014 done
7015   done
7016 IFS=$as_save_IFS
7017 
7018   ;;
7019 esac
7020 fi
7021 FILE=$ac_cv_path_FILE
7022 if test -n "$FILE"; then
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7024 $as_echo "$FILE" >&6; }
7025 else
7026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7027 $as_echo "no" >&6; }
7028 fi
7029 
7030 
7031         if test "x$FILE" = x; then
7032           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7033         fi
7034       else
7035         # Otherwise we believe it is a complete path. Use it as it is.
7036         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7037 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7038         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7039 $as_echo_n "checking for FILE... " >&6; }
7040         if test ! -x "$tool_specified"; then
7041           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7042 $as_echo "not found" >&6; }
7043           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7044         fi
7045         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7046 $as_echo "$tool_specified" >&6; }
7047       fi
7048     fi
7049   fi
7050 
7051 
7052 
7053   if test "x$FILE" = x; then
7054     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7055   fi
7056 
7057 
7058 
7059 
7060 
7061   # Publish this variable in the help.
7062 
7063 
7064   if test "x$FIND" = x; then
7065     # The variable is not set by user, try to locate tool using the code snippet
7066     for ac_prog in find
7067 do
7068   # Extract the first word of "$ac_prog", so it can be a program name with args.
7069 set dummy $ac_prog; ac_word=$2
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071 $as_echo_n "checking for $ac_word... " >&6; }
7072 if ${ac_cv_path_FIND+:} false; then :
7073   $as_echo_n "(cached) " >&6
7074 else
7075   case $FIND in
7076   [\\/]* | ?:[\\/]*)
7077   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7078   ;;
7079   *)
7080   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081 for as_dir in $PATH
7082 do
7083   IFS=$as_save_IFS
7084   test -z "$as_dir" && as_dir=.
7085     for ac_exec_ext in '' $ac_executable_extensions; do
7086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089     break 2
7090   fi
7091 done
7092   done
7093 IFS=$as_save_IFS
7094 
7095   ;;
7096 esac
7097 fi
7098 FIND=$ac_cv_path_FIND
7099 if test -n "$FIND"; then
7100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7101 $as_echo "$FIND" >&6; }
7102 else
7103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104 $as_echo "no" >&6; }
7105 fi
7106 
7107 
7108   test -n "$FIND" && break
7109 done
7110 
7111   else
7112     # The variable is set, but is it from the command line or the environment?
7113 
7114     # Try to remove the string !FIND! from our list.
7115     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7116     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7117       # If it failed, the variable was not from the command line. Ignore it,
7118       # but warn the user (except for BASH, which is always set by the calling BASH).
7119       if test "xFIND" != xBASH; then
7120         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7121 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7122       fi
7123       # Try to locate tool using the code snippet
7124       for ac_prog in find
7125 do
7126   # Extract the first word of "$ac_prog", so it can be a program name with args.
7127 set dummy $ac_prog; ac_word=$2
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129 $as_echo_n "checking for $ac_word... " >&6; }
7130 if ${ac_cv_path_FIND+:} false; then :
7131   $as_echo_n "(cached) " >&6
7132 else
7133   case $FIND in
7134   [\\/]* | ?:[\\/]*)
7135   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7136   ;;
7137   *)
7138   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139 for as_dir in $PATH
7140 do
7141   IFS=$as_save_IFS
7142   test -z "$as_dir" && as_dir=.
7143     for ac_exec_ext in '' $ac_executable_extensions; do
7144   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7146     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147     break 2
7148   fi
7149 done
7150   done
7151 IFS=$as_save_IFS
7152 
7153   ;;
7154 esac
7155 fi
7156 FIND=$ac_cv_path_FIND
7157 if test -n "$FIND"; then
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7159 $as_echo "$FIND" >&6; }
7160 else
7161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162 $as_echo "no" >&6; }
7163 fi
7164 
7165 
7166   test -n "$FIND" && break
7167 done
7168 
7169     else
7170       # If it succeeded, then it was overridden by the user. We will use it
7171       # for the tool.
7172 
7173       # First remove it from the list of overridden variables, so we can test
7174       # for unknown variables in the end.
7175       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7176 
7177       # Check if the provided tool contains a complete path.
7178       tool_specified="$FIND"
7179       tool_basename="${tool_specified##*/}"
7180       if test "x$tool_basename" = "x$tool_specified"; then
7181         # A command without a complete path is provided, search $PATH.
7182         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7183 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7184         # Extract the first word of "$tool_basename", so it can be a program name with args.
7185 set dummy $tool_basename; ac_word=$2
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7187 $as_echo_n "checking for $ac_word... " >&6; }
7188 if ${ac_cv_path_FIND+:} false; then :
7189   $as_echo_n "(cached) " >&6
7190 else
7191   case $FIND in
7192   [\\/]* | ?:[\\/]*)
7193   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7194   ;;
7195   *)
7196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7197 for as_dir in $PATH
7198 do
7199   IFS=$as_save_IFS
7200   test -z "$as_dir" && as_dir=.
7201     for ac_exec_ext in '' $ac_executable_extensions; do
7202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7203     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7205     break 2
7206   fi
7207 done
7208   done
7209 IFS=$as_save_IFS
7210 
7211   ;;
7212 esac
7213 fi
7214 FIND=$ac_cv_path_FIND
7215 if test -n "$FIND"; then
7216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7217 $as_echo "$FIND" >&6; }
7218 else
7219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220 $as_echo "no" >&6; }
7221 fi
7222 
7223 
7224         if test "x$FIND" = x; then
7225           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7226         fi
7227       else
7228         # Otherwise we believe it is a complete path. Use it as it is.
7229         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7230 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7231         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7232 $as_echo_n "checking for FIND... " >&6; }
7233         if test ! -x "$tool_specified"; then
7234           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7235 $as_echo "not found" >&6; }
7236           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7237         fi
7238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7239 $as_echo "$tool_specified" >&6; }
7240       fi
7241     fi
7242   fi
7243 
7244 
7245 
7246   if test "x$FIND" = x; then
7247     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7248   fi
7249 
7250 
7251 
7252 
7253 
7254   # Publish this variable in the help.
7255 
7256 
7257   if test "x$HEAD" = x; then
7258     # The variable is not set by user, try to locate tool using the code snippet
7259     for ac_prog in head
7260 do
7261   # Extract the first word of "$ac_prog", so it can be a program name with args.
7262 set dummy $ac_prog; ac_word=$2
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7264 $as_echo_n "checking for $ac_word... " >&6; }
7265 if ${ac_cv_path_HEAD+:} false; then :
7266   $as_echo_n "(cached) " >&6
7267 else
7268   case $HEAD in
7269   [\\/]* | ?:[\\/]*)
7270   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7271   ;;
7272   *)
7273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7274 for as_dir in $PATH
7275 do
7276   IFS=$as_save_IFS
7277   test -z "$as_dir" && as_dir=.
7278     for ac_exec_ext in '' $ac_executable_extensions; do
7279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7280     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7282     break 2
7283   fi
7284 done
7285   done
7286 IFS=$as_save_IFS
7287 
7288   ;;
7289 esac
7290 fi
7291 HEAD=$ac_cv_path_HEAD
7292 if test -n "$HEAD"; then
7293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7294 $as_echo "$HEAD" >&6; }
7295 else
7296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297 $as_echo "no" >&6; }
7298 fi
7299 
7300 
7301   test -n "$HEAD" && break
7302 done
7303 
7304   else
7305     # The variable is set, but is it from the command line or the environment?
7306 
7307     # Try to remove the string !HEAD! from our list.
7308     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7309     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7310       # If it failed, the variable was not from the command line. Ignore it,
7311       # but warn the user (except for BASH, which is always set by the calling BASH).
7312       if test "xHEAD" != xBASH; then
7313         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7314 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7315       fi
7316       # Try to locate tool using the code snippet
7317       for ac_prog in head
7318 do
7319   # Extract the first word of "$ac_prog", so it can be a program name with args.
7320 set dummy $ac_prog; ac_word=$2
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322 $as_echo_n "checking for $ac_word... " >&6; }
7323 if ${ac_cv_path_HEAD+:} false; then :
7324   $as_echo_n "(cached) " >&6
7325 else
7326   case $HEAD in
7327   [\\/]* | ?:[\\/]*)
7328   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7329   ;;
7330   *)
7331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7332 for as_dir in $PATH
7333 do
7334   IFS=$as_save_IFS
7335   test -z "$as_dir" && as_dir=.
7336     for ac_exec_ext in '' $ac_executable_extensions; do
7337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7338     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7340     break 2
7341   fi
7342 done
7343   done
7344 IFS=$as_save_IFS
7345 
7346   ;;
7347 esac
7348 fi
7349 HEAD=$ac_cv_path_HEAD
7350 if test -n "$HEAD"; then
7351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7352 $as_echo "$HEAD" >&6; }
7353 else
7354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7355 $as_echo "no" >&6; }
7356 fi
7357 
7358 
7359   test -n "$HEAD" && break
7360 done
7361 
7362     else
7363       # If it succeeded, then it was overridden by the user. We will use it
7364       # for the tool.
7365 
7366       # First remove it from the list of overridden variables, so we can test
7367       # for unknown variables in the end.
7368       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7369 
7370       # Check if the provided tool contains a complete path.
7371       tool_specified="$HEAD"
7372       tool_basename="${tool_specified##*/}"
7373       if test "x$tool_basename" = "x$tool_specified"; then
7374         # A command without a complete path is provided, search $PATH.
7375         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7376 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7377         # Extract the first word of "$tool_basename", so it can be a program name with args.
7378 set dummy $tool_basename; ac_word=$2
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7380 $as_echo_n "checking for $ac_word... " >&6; }
7381 if ${ac_cv_path_HEAD+:} false; then :
7382   $as_echo_n "(cached) " >&6
7383 else
7384   case $HEAD in
7385   [\\/]* | ?:[\\/]*)
7386   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7387   ;;
7388   *)
7389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7390 for as_dir in $PATH
7391 do
7392   IFS=$as_save_IFS
7393   test -z "$as_dir" && as_dir=.
7394     for ac_exec_ext in '' $ac_executable_extensions; do
7395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7396     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7398     break 2
7399   fi
7400 done
7401   done
7402 IFS=$as_save_IFS
7403 
7404   ;;
7405 esac
7406 fi
7407 HEAD=$ac_cv_path_HEAD
7408 if test -n "$HEAD"; then
7409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7410 $as_echo "$HEAD" >&6; }
7411 else
7412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7413 $as_echo "no" >&6; }
7414 fi
7415 
7416 
7417         if test "x$HEAD" = x; then
7418           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7419         fi
7420       else
7421         # Otherwise we believe it is a complete path. Use it as it is.
7422         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7423 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7424         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7425 $as_echo_n "checking for HEAD... " >&6; }
7426         if test ! -x "$tool_specified"; then
7427           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7428 $as_echo "not found" >&6; }
7429           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7430         fi
7431         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7432 $as_echo "$tool_specified" >&6; }
7433       fi
7434     fi
7435   fi
7436 
7437 
7438 
7439   if test "x$HEAD" = x; then
7440     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7441   fi
7442 
7443 
7444 
7445 
7446 
7447   # Publish this variable in the help.
7448 
7449 
7450   if test "x$LN" = x; then
7451     # The variable is not set by user, try to locate tool using the code snippet
7452     for ac_prog in ln
7453 do
7454   # Extract the first word of "$ac_prog", so it can be a program name with args.
7455 set dummy $ac_prog; ac_word=$2
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7457 $as_echo_n "checking for $ac_word... " >&6; }
7458 if ${ac_cv_path_LN+:} false; then :
7459   $as_echo_n "(cached) " >&6
7460 else
7461   case $LN in
7462   [\\/]* | ?:[\\/]*)
7463   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7464   ;;
7465   *)
7466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7467 for as_dir in $PATH
7468 do
7469   IFS=$as_save_IFS
7470   test -z "$as_dir" && as_dir=.
7471     for ac_exec_ext in '' $ac_executable_extensions; do
7472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7473     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7475     break 2
7476   fi
7477 done
7478   done
7479 IFS=$as_save_IFS
7480 
7481   ;;
7482 esac
7483 fi
7484 LN=$ac_cv_path_LN
7485 if test -n "$LN"; then
7486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7487 $as_echo "$LN" >&6; }
7488 else
7489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7490 $as_echo "no" >&6; }
7491 fi
7492 
7493 
7494   test -n "$LN" && break
7495 done
7496 
7497   else
7498     # The variable is set, but is it from the command line or the environment?
7499 
7500     # Try to remove the string !LN! from our list.
7501     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7502     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7503       # If it failed, the variable was not from the command line. Ignore it,
7504       # but warn the user (except for BASH, which is always set by the calling BASH).
7505       if test "xLN" != xBASH; then
7506         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7507 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7508       fi
7509       # Try to locate tool using the code snippet
7510       for ac_prog in ln
7511 do
7512   # Extract the first word of "$ac_prog", so it can be a program name with args.
7513 set dummy $ac_prog; ac_word=$2
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7515 $as_echo_n "checking for $ac_word... " >&6; }
7516 if ${ac_cv_path_LN+:} false; then :
7517   $as_echo_n "(cached) " >&6
7518 else
7519   case $LN in
7520   [\\/]* | ?:[\\/]*)
7521   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7522   ;;
7523   *)
7524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525 for as_dir in $PATH
7526 do
7527   IFS=$as_save_IFS
7528   test -z "$as_dir" && as_dir=.
7529     for ac_exec_ext in '' $ac_executable_extensions; do
7530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7533     break 2
7534   fi
7535 done
7536   done
7537 IFS=$as_save_IFS
7538 
7539   ;;
7540 esac
7541 fi
7542 LN=$ac_cv_path_LN
7543 if test -n "$LN"; then
7544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7545 $as_echo "$LN" >&6; }
7546 else
7547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7548 $as_echo "no" >&6; }
7549 fi
7550 
7551 
7552   test -n "$LN" && break
7553 done
7554 
7555     else
7556       # If it succeeded, then it was overridden by the user. We will use it
7557       # for the tool.
7558 
7559       # First remove it from the list of overridden variables, so we can test
7560       # for unknown variables in the end.
7561       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7562 
7563       # Check if the provided tool contains a complete path.
7564       tool_specified="$LN"
7565       tool_basename="${tool_specified##*/}"
7566       if test "x$tool_basename" = "x$tool_specified"; then
7567         # A command without a complete path is provided, search $PATH.
7568         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7569 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7570         # Extract the first word of "$tool_basename", so it can be a program name with args.
7571 set dummy $tool_basename; ac_word=$2
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7573 $as_echo_n "checking for $ac_word... " >&6; }
7574 if ${ac_cv_path_LN+:} false; then :
7575   $as_echo_n "(cached) " >&6
7576 else
7577   case $LN in
7578   [\\/]* | ?:[\\/]*)
7579   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7580   ;;
7581   *)
7582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7583 for as_dir in $PATH
7584 do
7585   IFS=$as_save_IFS
7586   test -z "$as_dir" && as_dir=.
7587     for ac_exec_ext in '' $ac_executable_extensions; do
7588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7589     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7591     break 2
7592   fi
7593 done
7594   done
7595 IFS=$as_save_IFS
7596 
7597   ;;
7598 esac
7599 fi
7600 LN=$ac_cv_path_LN
7601 if test -n "$LN"; then
7602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7603 $as_echo "$LN" >&6; }
7604 else
7605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7606 $as_echo "no" >&6; }
7607 fi
7608 
7609 
7610         if test "x$LN" = x; then
7611           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7612         fi
7613       else
7614         # Otherwise we believe it is a complete path. Use it as it is.
7615         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7616 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7617         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7618 $as_echo_n "checking for LN... " >&6; }
7619         if test ! -x "$tool_specified"; then
7620           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7621 $as_echo "not found" >&6; }
7622           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7623         fi
7624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7625 $as_echo "$tool_specified" >&6; }
7626       fi
7627     fi
7628   fi
7629 
7630 
7631 
7632   if test "x$LN" = x; then
7633     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7634   fi
7635 
7636 
7637 
7638 
7639 
7640   # Publish this variable in the help.
7641 
7642 
7643   if test "x$LS" = x; then
7644     # The variable is not set by user, try to locate tool using the code snippet
7645     for ac_prog in ls
7646 do
7647   # Extract the first word of "$ac_prog", so it can be a program name with args.
7648 set dummy $ac_prog; ac_word=$2
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7650 $as_echo_n "checking for $ac_word... " >&6; }
7651 if ${ac_cv_path_LS+:} false; then :
7652   $as_echo_n "(cached) " >&6
7653 else
7654   case $LS in
7655   [\\/]* | ?:[\\/]*)
7656   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7657   ;;
7658   *)
7659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7660 for as_dir in $PATH
7661 do
7662   IFS=$as_save_IFS
7663   test -z "$as_dir" && as_dir=.
7664     for ac_exec_ext in '' $ac_executable_extensions; do
7665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7666     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7668     break 2
7669   fi
7670 done
7671   done
7672 IFS=$as_save_IFS
7673 
7674   ;;
7675 esac
7676 fi
7677 LS=$ac_cv_path_LS
7678 if test -n "$LS"; then
7679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7680 $as_echo "$LS" >&6; }
7681 else
7682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683 $as_echo "no" >&6; }
7684 fi
7685 
7686 
7687   test -n "$LS" && break
7688 done
7689 
7690   else
7691     # The variable is set, but is it from the command line or the environment?
7692 
7693     # Try to remove the string !LS! from our list.
7694     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7695     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7696       # If it failed, the variable was not from the command line. Ignore it,
7697       # but warn the user (except for BASH, which is always set by the calling BASH).
7698       if test "xLS" != xBASH; then
7699         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7700 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7701       fi
7702       # Try to locate tool using the code snippet
7703       for ac_prog in ls
7704 do
7705   # Extract the first word of "$ac_prog", so it can be a program name with args.
7706 set dummy $ac_prog; ac_word=$2
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7708 $as_echo_n "checking for $ac_word... " >&6; }
7709 if ${ac_cv_path_LS+:} false; then :
7710   $as_echo_n "(cached) " >&6
7711 else
7712   case $LS in
7713   [\\/]* | ?:[\\/]*)
7714   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7715   ;;
7716   *)
7717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718 for as_dir in $PATH
7719 do
7720   IFS=$as_save_IFS
7721   test -z "$as_dir" && as_dir=.
7722     for ac_exec_ext in '' $ac_executable_extensions; do
7723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726     break 2
7727   fi
7728 done
7729   done
7730 IFS=$as_save_IFS
7731 
7732   ;;
7733 esac
7734 fi
7735 LS=$ac_cv_path_LS
7736 if test -n "$LS"; then
7737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7738 $as_echo "$LS" >&6; }
7739 else
7740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741 $as_echo "no" >&6; }
7742 fi
7743 
7744 
7745   test -n "$LS" && break
7746 done
7747 
7748     else
7749       # If it succeeded, then it was overridden by the user. We will use it
7750       # for the tool.
7751 
7752       # First remove it from the list of overridden variables, so we can test
7753       # for unknown variables in the end.
7754       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7755 
7756       # Check if the provided tool contains a complete path.
7757       tool_specified="$LS"
7758       tool_basename="${tool_specified##*/}"
7759       if test "x$tool_basename" = "x$tool_specified"; then
7760         # A command without a complete path is provided, search $PATH.
7761         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7762 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7763         # Extract the first word of "$tool_basename", so it can be a program name with args.
7764 set dummy $tool_basename; ac_word=$2
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7766 $as_echo_n "checking for $ac_word... " >&6; }
7767 if ${ac_cv_path_LS+:} false; then :
7768   $as_echo_n "(cached) " >&6
7769 else
7770   case $LS in
7771   [\\/]* | ?:[\\/]*)
7772   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7773   ;;
7774   *)
7775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7776 for as_dir in $PATH
7777 do
7778   IFS=$as_save_IFS
7779   test -z "$as_dir" && as_dir=.
7780     for ac_exec_ext in '' $ac_executable_extensions; do
7781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7782     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7784     break 2
7785   fi
7786 done
7787   done
7788 IFS=$as_save_IFS
7789 
7790   ;;
7791 esac
7792 fi
7793 LS=$ac_cv_path_LS
7794 if test -n "$LS"; then
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7796 $as_echo "$LS" >&6; }
7797 else
7798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799 $as_echo "no" >&6; }
7800 fi
7801 
7802 
7803         if test "x$LS" = x; then
7804           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7805         fi
7806       else
7807         # Otherwise we believe it is a complete path. Use it as it is.
7808         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7809 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7810         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7811 $as_echo_n "checking for LS... " >&6; }
7812         if test ! -x "$tool_specified"; then
7813           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7814 $as_echo "not found" >&6; }
7815           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7816         fi
7817         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7818 $as_echo "$tool_specified" >&6; }
7819       fi
7820     fi
7821   fi
7822 
7823 
7824 
7825   if test "x$LS" = x; then
7826     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7827   fi
7828 
7829 
7830 
7831 
7832 
7833   # Publish this variable in the help.
7834 
7835 
7836   if test "x$MKDIR" = x; then
7837     # The variable is not set by user, try to locate tool using the code snippet
7838     for ac_prog in mkdir
7839 do
7840   # Extract the first word of "$ac_prog", so it can be a program name with args.
7841 set dummy $ac_prog; ac_word=$2
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7843 $as_echo_n "checking for $ac_word... " >&6; }
7844 if ${ac_cv_path_MKDIR+:} false; then :
7845   $as_echo_n "(cached) " >&6
7846 else
7847   case $MKDIR in
7848   [\\/]* | ?:[\\/]*)
7849   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7850   ;;
7851   *)
7852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7853 for as_dir in $PATH
7854 do
7855   IFS=$as_save_IFS
7856   test -z "$as_dir" && as_dir=.
7857     for ac_exec_ext in '' $ac_executable_extensions; do
7858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7859     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7861     break 2
7862   fi
7863 done
7864   done
7865 IFS=$as_save_IFS
7866 
7867   ;;
7868 esac
7869 fi
7870 MKDIR=$ac_cv_path_MKDIR
7871 if test -n "$MKDIR"; then
7872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7873 $as_echo "$MKDIR" >&6; }
7874 else
7875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876 $as_echo "no" >&6; }
7877 fi
7878 
7879 
7880   test -n "$MKDIR" && break
7881 done
7882 
7883   else
7884     # The variable is set, but is it from the command line or the environment?
7885 
7886     # Try to remove the string !MKDIR! from our list.
7887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7889       # If it failed, the variable was not from the command line. Ignore it,
7890       # but warn the user (except for BASH, which is always set by the calling BASH).
7891       if test "xMKDIR" != xBASH; then
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7893 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7894       fi
7895       # Try to locate tool using the code snippet
7896       for ac_prog in mkdir
7897 do
7898   # Extract the first word of "$ac_prog", so it can be a program name with args.
7899 set dummy $ac_prog; ac_word=$2
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7901 $as_echo_n "checking for $ac_word... " >&6; }
7902 if ${ac_cv_path_MKDIR+:} false; then :
7903   $as_echo_n "(cached) " >&6
7904 else
7905   case $MKDIR in
7906   [\\/]* | ?:[\\/]*)
7907   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7908   ;;
7909   *)
7910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913   IFS=$as_save_IFS
7914   test -z "$as_dir" && as_dir=.
7915     for ac_exec_ext in '' $ac_executable_extensions; do
7916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919     break 2
7920   fi
7921 done
7922   done
7923 IFS=$as_save_IFS
7924 
7925   ;;
7926 esac
7927 fi
7928 MKDIR=$ac_cv_path_MKDIR
7929 if test -n "$MKDIR"; then
7930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7931 $as_echo "$MKDIR" >&6; }
7932 else
7933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934 $as_echo "no" >&6; }
7935 fi
7936 
7937 
7938   test -n "$MKDIR" && break
7939 done
7940 
7941     else
7942       # If it succeeded, then it was overridden by the user. We will use it
7943       # for the tool.
7944 
7945       # First remove it from the list of overridden variables, so we can test
7946       # for unknown variables in the end.
7947       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7948 
7949       # Check if the provided tool contains a complete path.
7950       tool_specified="$MKDIR"
7951       tool_basename="${tool_specified##*/}"
7952       if test "x$tool_basename" = "x$tool_specified"; then
7953         # A command without a complete path is provided, search $PATH.
7954         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7955 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7956         # Extract the first word of "$tool_basename", so it can be a program name with args.
7957 set dummy $tool_basename; ac_word=$2
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7959 $as_echo_n "checking for $ac_word... " >&6; }
7960 if ${ac_cv_path_MKDIR+:} false; then :
7961   $as_echo_n "(cached) " >&6
7962 else
7963   case $MKDIR in
7964   [\\/]* | ?:[\\/]*)
7965   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7966   ;;
7967   *)
7968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7969 for as_dir in $PATH
7970 do
7971   IFS=$as_save_IFS
7972   test -z "$as_dir" && as_dir=.
7973     for ac_exec_ext in '' $ac_executable_extensions; do
7974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7975     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7977     break 2
7978   fi
7979 done
7980   done
7981 IFS=$as_save_IFS
7982 
7983   ;;
7984 esac
7985 fi
7986 MKDIR=$ac_cv_path_MKDIR
7987 if test -n "$MKDIR"; then
7988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7989 $as_echo "$MKDIR" >&6; }
7990 else
7991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7992 $as_echo "no" >&6; }
7993 fi
7994 
7995 
7996         if test "x$MKDIR" = x; then
7997           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7998         fi
7999       else
8000         # Otherwise we believe it is a complete path. Use it as it is.
8001         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8002 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8003         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8004 $as_echo_n "checking for MKDIR... " >&6; }
8005         if test ! -x "$tool_specified"; then
8006           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8007 $as_echo "not found" >&6; }
8008           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8009         fi
8010         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8011 $as_echo "$tool_specified" >&6; }
8012       fi
8013     fi
8014   fi
8015 
8016 
8017 
8018   if test "x$MKDIR" = x; then
8019     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8020   fi
8021 
8022 
8023 
8024 
8025 
8026   # Publish this variable in the help.
8027 
8028 
8029   if test "x$MKTEMP" = x; then
8030     # The variable is not set by user, try to locate tool using the code snippet
8031     for ac_prog in mktemp
8032 do
8033   # Extract the first word of "$ac_prog", so it can be a program name with args.
8034 set dummy $ac_prog; ac_word=$2
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8036 $as_echo_n "checking for $ac_word... " >&6; }
8037 if ${ac_cv_path_MKTEMP+:} false; then :
8038   $as_echo_n "(cached) " >&6
8039 else
8040   case $MKTEMP in
8041   [\\/]* | ?:[\\/]*)
8042   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8043   ;;
8044   *)
8045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8046 for as_dir in $PATH
8047 do
8048   IFS=$as_save_IFS
8049   test -z "$as_dir" && as_dir=.
8050     for ac_exec_ext in '' $ac_executable_extensions; do
8051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8052     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8054     break 2
8055   fi
8056 done
8057   done
8058 IFS=$as_save_IFS
8059 
8060   ;;
8061 esac
8062 fi
8063 MKTEMP=$ac_cv_path_MKTEMP
8064 if test -n "$MKTEMP"; then
8065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8066 $as_echo "$MKTEMP" >&6; }
8067 else
8068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069 $as_echo "no" >&6; }
8070 fi
8071 
8072 
8073   test -n "$MKTEMP" && break
8074 done
8075 
8076   else
8077     # The variable is set, but is it from the command line or the environment?
8078 
8079     # Try to remove the string !MKTEMP! from our list.
8080     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8081     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8082       # If it failed, the variable was not from the command line. Ignore it,
8083       # but warn the user (except for BASH, which is always set by the calling BASH).
8084       if test "xMKTEMP" != xBASH; then
8085         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8086 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8087       fi
8088       # Try to locate tool using the code snippet
8089       for ac_prog in mktemp
8090 do
8091   # Extract the first word of "$ac_prog", so it can be a program name with args.
8092 set dummy $ac_prog; ac_word=$2
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8094 $as_echo_n "checking for $ac_word... " >&6; }
8095 if ${ac_cv_path_MKTEMP+:} false; then :
8096   $as_echo_n "(cached) " >&6
8097 else
8098   case $MKTEMP in
8099   [\\/]* | ?:[\\/]*)
8100   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8101   ;;
8102   *)
8103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104 for as_dir in $PATH
8105 do
8106   IFS=$as_save_IFS
8107   test -z "$as_dir" && as_dir=.
8108     for ac_exec_ext in '' $ac_executable_extensions; do
8109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8110     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8112     break 2
8113   fi
8114 done
8115   done
8116 IFS=$as_save_IFS
8117 
8118   ;;
8119 esac
8120 fi
8121 MKTEMP=$ac_cv_path_MKTEMP
8122 if test -n "$MKTEMP"; then
8123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8124 $as_echo "$MKTEMP" >&6; }
8125 else
8126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127 $as_echo "no" >&6; }
8128 fi
8129 
8130 
8131   test -n "$MKTEMP" && break
8132 done
8133 
8134     else
8135       # If it succeeded, then it was overridden by the user. We will use it
8136       # for the tool.
8137 
8138       # First remove it from the list of overridden variables, so we can test
8139       # for unknown variables in the end.
8140       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8141 
8142       # Check if the provided tool contains a complete path.
8143       tool_specified="$MKTEMP"
8144       tool_basename="${tool_specified##*/}"
8145       if test "x$tool_basename" = "x$tool_specified"; then
8146         # A command without a complete path is provided, search $PATH.
8147         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8148 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8149         # Extract the first word of "$tool_basename", so it can be a program name with args.
8150 set dummy $tool_basename; ac_word=$2
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8152 $as_echo_n "checking for $ac_word... " >&6; }
8153 if ${ac_cv_path_MKTEMP+:} false; then :
8154   $as_echo_n "(cached) " >&6
8155 else
8156   case $MKTEMP in
8157   [\\/]* | ?:[\\/]*)
8158   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8159   ;;
8160   *)
8161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8162 for as_dir in $PATH
8163 do
8164   IFS=$as_save_IFS
8165   test -z "$as_dir" && as_dir=.
8166     for ac_exec_ext in '' $ac_executable_extensions; do
8167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8168     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8170     break 2
8171   fi
8172 done
8173   done
8174 IFS=$as_save_IFS
8175 
8176   ;;
8177 esac
8178 fi
8179 MKTEMP=$ac_cv_path_MKTEMP
8180 if test -n "$MKTEMP"; then
8181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8182 $as_echo "$MKTEMP" >&6; }
8183 else
8184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8185 $as_echo "no" >&6; }
8186 fi
8187 
8188 
8189         if test "x$MKTEMP" = x; then
8190           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8191         fi
8192       else
8193         # Otherwise we believe it is a complete path. Use it as it is.
8194         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8195 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8197 $as_echo_n "checking for MKTEMP... " >&6; }
8198         if test ! -x "$tool_specified"; then
8199           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8200 $as_echo "not found" >&6; }
8201           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8202         fi
8203         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8204 $as_echo "$tool_specified" >&6; }
8205       fi
8206     fi
8207   fi
8208 
8209 
8210 
8211   if test "x$MKTEMP" = x; then
8212     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8213   fi
8214 
8215 
8216 
8217 
8218 
8219   # Publish this variable in the help.
8220 
8221 
8222   if test "x$MV" = x; then
8223     # The variable is not set by user, try to locate tool using the code snippet
8224     for ac_prog in mv
8225 do
8226   # Extract the first word of "$ac_prog", so it can be a program name with args.
8227 set dummy $ac_prog; ac_word=$2
8228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229 $as_echo_n "checking for $ac_word... " >&6; }
8230 if ${ac_cv_path_MV+:} false; then :
8231   $as_echo_n "(cached) " >&6
8232 else
8233   case $MV in
8234   [\\/]* | ?:[\\/]*)
8235   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8236   ;;
8237   *)
8238   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239 for as_dir in $PATH
8240 do
8241   IFS=$as_save_IFS
8242   test -z "$as_dir" && as_dir=.
8243     for ac_exec_ext in '' $ac_executable_extensions; do
8244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247     break 2
8248   fi
8249 done
8250   done
8251 IFS=$as_save_IFS
8252 
8253   ;;
8254 esac
8255 fi
8256 MV=$ac_cv_path_MV
8257 if test -n "$MV"; then
8258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8259 $as_echo "$MV" >&6; }
8260 else
8261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262 $as_echo "no" >&6; }
8263 fi
8264 
8265 
8266   test -n "$MV" && break
8267 done
8268 
8269   else
8270     # The variable is set, but is it from the command line or the environment?
8271 
8272     # Try to remove the string !MV! from our list.
8273     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8274     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8275       # If it failed, the variable was not from the command line. Ignore it,
8276       # but warn the user (except for BASH, which is always set by the calling BASH).
8277       if test "xMV" != xBASH; then
8278         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8279 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8280       fi
8281       # Try to locate tool using the code snippet
8282       for ac_prog in mv
8283 do
8284   # Extract the first word of "$ac_prog", so it can be a program name with args.
8285 set dummy $ac_prog; ac_word=$2
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287 $as_echo_n "checking for $ac_word... " >&6; }
8288 if ${ac_cv_path_MV+:} false; then :
8289   $as_echo_n "(cached) " >&6
8290 else
8291   case $MV in
8292   [\\/]* | ?:[\\/]*)
8293   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8294   ;;
8295   *)
8296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297 for as_dir in $PATH
8298 do
8299   IFS=$as_save_IFS
8300   test -z "$as_dir" && as_dir=.
8301     for ac_exec_ext in '' $ac_executable_extensions; do
8302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305     break 2
8306   fi
8307 done
8308   done
8309 IFS=$as_save_IFS
8310 
8311   ;;
8312 esac
8313 fi
8314 MV=$ac_cv_path_MV
8315 if test -n "$MV"; then
8316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8317 $as_echo "$MV" >&6; }
8318 else
8319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320 $as_echo "no" >&6; }
8321 fi
8322 
8323 
8324   test -n "$MV" && break
8325 done
8326 
8327     else
8328       # If it succeeded, then it was overridden by the user. We will use it
8329       # for the tool.
8330 
8331       # First remove it from the list of overridden variables, so we can test
8332       # for unknown variables in the end.
8333       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8334 
8335       # Check if the provided tool contains a complete path.
8336       tool_specified="$MV"
8337       tool_basename="${tool_specified##*/}"
8338       if test "x$tool_basename" = "x$tool_specified"; then
8339         # A command without a complete path is provided, search $PATH.
8340         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8341 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8342         # Extract the first word of "$tool_basename", so it can be a program name with args.
8343 set dummy $tool_basename; ac_word=$2
8344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8345 $as_echo_n "checking for $ac_word... " >&6; }
8346 if ${ac_cv_path_MV+:} false; then :
8347   $as_echo_n "(cached) " >&6
8348 else
8349   case $MV in
8350   [\\/]* | ?:[\\/]*)
8351   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8352   ;;
8353   *)
8354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8355 for as_dir in $PATH
8356 do
8357   IFS=$as_save_IFS
8358   test -z "$as_dir" && as_dir=.
8359     for ac_exec_ext in '' $ac_executable_extensions; do
8360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8361     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8363     break 2
8364   fi
8365 done
8366   done
8367 IFS=$as_save_IFS
8368 
8369   ;;
8370 esac
8371 fi
8372 MV=$ac_cv_path_MV
8373 if test -n "$MV"; then
8374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8375 $as_echo "$MV" >&6; }
8376 else
8377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378 $as_echo "no" >&6; }
8379 fi
8380 
8381 
8382         if test "x$MV" = x; then
8383           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8384         fi
8385       else
8386         # Otherwise we believe it is a complete path. Use it as it is.
8387         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8388 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8389         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8390 $as_echo_n "checking for MV... " >&6; }
8391         if test ! -x "$tool_specified"; then
8392           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8393 $as_echo "not found" >&6; }
8394           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8395         fi
8396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8397 $as_echo "$tool_specified" >&6; }
8398       fi
8399     fi
8400   fi
8401 
8402 
8403 
8404   if test "x$MV" = x; then
8405     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8406   fi
8407 
8408 
8409 
8410 
8411 
8412   # Publish this variable in the help.
8413 
8414 
8415   if test "x$NAWK" = x; then
8416     # The variable is not set by user, try to locate tool using the code snippet
8417     for ac_prog in nawk gawk awk
8418 do
8419   # Extract the first word of "$ac_prog", so it can be a program name with args.
8420 set dummy $ac_prog; ac_word=$2
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422 $as_echo_n "checking for $ac_word... " >&6; }
8423 if ${ac_cv_path_NAWK+:} false; then :
8424   $as_echo_n "(cached) " >&6
8425 else
8426   case $NAWK in
8427   [\\/]* | ?:[\\/]*)
8428   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8429   ;;
8430   *)
8431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432 for as_dir in $PATH
8433 do
8434   IFS=$as_save_IFS
8435   test -z "$as_dir" && as_dir=.
8436     for ac_exec_ext in '' $ac_executable_extensions; do
8437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440     break 2
8441   fi
8442 done
8443   done
8444 IFS=$as_save_IFS
8445 
8446   ;;
8447 esac
8448 fi
8449 NAWK=$ac_cv_path_NAWK
8450 if test -n "$NAWK"; then
8451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8452 $as_echo "$NAWK" >&6; }
8453 else
8454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455 $as_echo "no" >&6; }
8456 fi
8457 
8458 
8459   test -n "$NAWK" && break
8460 done
8461 
8462   else
8463     # The variable is set, but is it from the command line or the environment?
8464 
8465     # Try to remove the string !NAWK! from our list.
8466     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8467     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8468       # If it failed, the variable was not from the command line. Ignore it,
8469       # but warn the user (except for BASH, which is always set by the calling BASH).
8470       if test "xNAWK" != xBASH; then
8471         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8472 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8473       fi
8474       # Try to locate tool using the code snippet
8475       for ac_prog in nawk gawk awk
8476 do
8477   # Extract the first word of "$ac_prog", so it can be a program name with args.
8478 set dummy $ac_prog; ac_word=$2
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8480 $as_echo_n "checking for $ac_word... " >&6; }
8481 if ${ac_cv_path_NAWK+:} false; then :
8482   $as_echo_n "(cached) " >&6
8483 else
8484   case $NAWK in
8485   [\\/]* | ?:[\\/]*)
8486   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8487   ;;
8488   *)
8489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490 for as_dir in $PATH
8491 do
8492   IFS=$as_save_IFS
8493   test -z "$as_dir" && as_dir=.
8494     for ac_exec_ext in '' $ac_executable_extensions; do
8495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8496     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8498     break 2
8499   fi
8500 done
8501   done
8502 IFS=$as_save_IFS
8503 
8504   ;;
8505 esac
8506 fi
8507 NAWK=$ac_cv_path_NAWK
8508 if test -n "$NAWK"; then
8509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8510 $as_echo "$NAWK" >&6; }
8511 else
8512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513 $as_echo "no" >&6; }
8514 fi
8515 
8516 
8517   test -n "$NAWK" && break
8518 done
8519 
8520     else
8521       # If it succeeded, then it was overridden by the user. We will use it
8522       # for the tool.
8523 
8524       # First remove it from the list of overridden variables, so we can test
8525       # for unknown variables in the end.
8526       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8527 
8528       # Check if the provided tool contains a complete path.
8529       tool_specified="$NAWK"
8530       tool_basename="${tool_specified##*/}"
8531       if test "x$tool_basename" = "x$tool_specified"; then
8532         # A command without a complete path is provided, search $PATH.
8533         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8534 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8535         # Extract the first word of "$tool_basename", so it can be a program name with args.
8536 set dummy $tool_basename; ac_word=$2
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8538 $as_echo_n "checking for $ac_word... " >&6; }
8539 if ${ac_cv_path_NAWK+:} false; then :
8540   $as_echo_n "(cached) " >&6
8541 else
8542   case $NAWK in
8543   [\\/]* | ?:[\\/]*)
8544   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8545   ;;
8546   *)
8547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8548 for as_dir in $PATH
8549 do
8550   IFS=$as_save_IFS
8551   test -z "$as_dir" && as_dir=.
8552     for ac_exec_ext in '' $ac_executable_extensions; do
8553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8554     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8556     break 2
8557   fi
8558 done
8559   done
8560 IFS=$as_save_IFS
8561 
8562   ;;
8563 esac
8564 fi
8565 NAWK=$ac_cv_path_NAWK
8566 if test -n "$NAWK"; then
8567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8568 $as_echo "$NAWK" >&6; }
8569 else
8570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571 $as_echo "no" >&6; }
8572 fi
8573 
8574 
8575         if test "x$NAWK" = x; then
8576           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8577         fi
8578       else
8579         # Otherwise we believe it is a complete path. Use it as it is.
8580         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8581 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8583 $as_echo_n "checking for NAWK... " >&6; }
8584         if test ! -x "$tool_specified"; then
8585           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8586 $as_echo "not found" >&6; }
8587           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8588         fi
8589         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8590 $as_echo "$tool_specified" >&6; }
8591       fi
8592     fi
8593   fi
8594 
8595 
8596 
8597   if test "x$NAWK" = x; then
8598     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8599   fi
8600 
8601 
8602 
8603 
8604 
8605   # Publish this variable in the help.
8606 
8607 
8608   if test "x$PRINTF" = x; then
8609     # The variable is not set by user, try to locate tool using the code snippet
8610     for ac_prog in printf
8611 do
8612   # Extract the first word of "$ac_prog", so it can be a program name with args.
8613 set dummy $ac_prog; ac_word=$2
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8615 $as_echo_n "checking for $ac_word... " >&6; }
8616 if ${ac_cv_path_PRINTF+:} false; then :
8617   $as_echo_n "(cached) " >&6
8618 else
8619   case $PRINTF in
8620   [\\/]* | ?:[\\/]*)
8621   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8622   ;;
8623   *)
8624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8625 for as_dir in $PATH
8626 do
8627   IFS=$as_save_IFS
8628   test -z "$as_dir" && as_dir=.
8629     for ac_exec_ext in '' $ac_executable_extensions; do
8630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8631     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8633     break 2
8634   fi
8635 done
8636   done
8637 IFS=$as_save_IFS
8638 
8639   ;;
8640 esac
8641 fi
8642 PRINTF=$ac_cv_path_PRINTF
8643 if test -n "$PRINTF"; then
8644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8645 $as_echo "$PRINTF" >&6; }
8646 else
8647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8648 $as_echo "no" >&6; }
8649 fi
8650 
8651 
8652   test -n "$PRINTF" && break
8653 done
8654 
8655   else
8656     # The variable is set, but is it from the command line or the environment?
8657 
8658     # Try to remove the string !PRINTF! from our list.
8659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8661       # If it failed, the variable was not from the command line. Ignore it,
8662       # but warn the user (except for BASH, which is always set by the calling BASH).
8663       if test "xPRINTF" != xBASH; then
8664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8665 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8666       fi
8667       # Try to locate tool using the code snippet
8668       for ac_prog in printf
8669 do
8670   # Extract the first word of "$ac_prog", so it can be a program name with args.
8671 set dummy $ac_prog; ac_word=$2
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8673 $as_echo_n "checking for $ac_word... " >&6; }
8674 if ${ac_cv_path_PRINTF+:} false; then :
8675   $as_echo_n "(cached) " >&6
8676 else
8677   case $PRINTF in
8678   [\\/]* | ?:[\\/]*)
8679   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8680   ;;
8681   *)
8682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8683 for as_dir in $PATH
8684 do
8685   IFS=$as_save_IFS
8686   test -z "$as_dir" && as_dir=.
8687     for ac_exec_ext in '' $ac_executable_extensions; do
8688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8689     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8691     break 2
8692   fi
8693 done
8694   done
8695 IFS=$as_save_IFS
8696 
8697   ;;
8698 esac
8699 fi
8700 PRINTF=$ac_cv_path_PRINTF
8701 if test -n "$PRINTF"; then
8702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8703 $as_echo "$PRINTF" >&6; }
8704 else
8705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8706 $as_echo "no" >&6; }
8707 fi
8708 
8709 
8710   test -n "$PRINTF" && break
8711 done
8712 
8713     else
8714       # If it succeeded, then it was overridden by the user. We will use it
8715       # for the tool.
8716 
8717       # First remove it from the list of overridden variables, so we can test
8718       # for unknown variables in the end.
8719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8720 
8721       # Check if the provided tool contains a complete path.
8722       tool_specified="$PRINTF"
8723       tool_basename="${tool_specified##*/}"
8724       if test "x$tool_basename" = "x$tool_specified"; then
8725         # A command without a complete path is provided, search $PATH.
8726         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8727 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8728         # Extract the first word of "$tool_basename", so it can be a program name with args.
8729 set dummy $tool_basename; ac_word=$2
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8731 $as_echo_n "checking for $ac_word... " >&6; }
8732 if ${ac_cv_path_PRINTF+:} false; then :
8733   $as_echo_n "(cached) " >&6
8734 else
8735   case $PRINTF in
8736   [\\/]* | ?:[\\/]*)
8737   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8738   ;;
8739   *)
8740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741 for as_dir in $PATH
8742 do
8743   IFS=$as_save_IFS
8744   test -z "$as_dir" && as_dir=.
8745     for ac_exec_ext in '' $ac_executable_extensions; do
8746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8747     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8749     break 2
8750   fi
8751 done
8752   done
8753 IFS=$as_save_IFS
8754 
8755   ;;
8756 esac
8757 fi
8758 PRINTF=$ac_cv_path_PRINTF
8759 if test -n "$PRINTF"; then
8760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8761 $as_echo "$PRINTF" >&6; }
8762 else
8763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764 $as_echo "no" >&6; }
8765 fi
8766 
8767 
8768         if test "x$PRINTF" = x; then
8769           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8770         fi
8771       else
8772         # Otherwise we believe it is a complete path. Use it as it is.
8773         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8774 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8776 $as_echo_n "checking for PRINTF... " >&6; }
8777         if test ! -x "$tool_specified"; then
8778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8779 $as_echo "not found" >&6; }
8780           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8781         fi
8782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8783 $as_echo "$tool_specified" >&6; }
8784       fi
8785     fi
8786   fi
8787 
8788 
8789 
8790   if test "x$PRINTF" = x; then
8791     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8792   fi
8793 
8794 
8795 
8796 
8797 
8798   # Publish this variable in the help.
8799 
8800 
8801   if test "x$RM" = x; then
8802     # The variable is not set by user, try to locate tool using the code snippet
8803     for ac_prog in rm
8804 do
8805   # Extract the first word of "$ac_prog", so it can be a program name with args.
8806 set dummy $ac_prog; ac_word=$2
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8808 $as_echo_n "checking for $ac_word... " >&6; }
8809 if ${ac_cv_path_RM+:} false; then :
8810   $as_echo_n "(cached) " >&6
8811 else
8812   case $RM in
8813   [\\/]* | ?:[\\/]*)
8814   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8815   ;;
8816   *)
8817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8818 for as_dir in $PATH
8819 do
8820   IFS=$as_save_IFS
8821   test -z "$as_dir" && as_dir=.
8822     for ac_exec_ext in '' $ac_executable_extensions; do
8823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8824     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8826     break 2
8827   fi
8828 done
8829   done
8830 IFS=$as_save_IFS
8831 
8832   ;;
8833 esac
8834 fi
8835 RM=$ac_cv_path_RM
8836 if test -n "$RM"; then
8837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8838 $as_echo "$RM" >&6; }
8839 else
8840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841 $as_echo "no" >&6; }
8842 fi
8843 
8844 
8845   test -n "$RM" && break
8846 done
8847 
8848   else
8849     # The variable is set, but is it from the command line or the environment?
8850 
8851     # Try to remove the string !RM! from our list.
8852     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8853     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8854       # If it failed, the variable was not from the command line. Ignore it,
8855       # but warn the user (except for BASH, which is always set by the calling BASH).
8856       if test "xRM" != xBASH; then
8857         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8858 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8859       fi
8860       # Try to locate tool using the code snippet
8861       for ac_prog in rm
8862 do
8863   # Extract the first word of "$ac_prog", so it can be a program name with args.
8864 set dummy $ac_prog; ac_word=$2
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8866 $as_echo_n "checking for $ac_word... " >&6; }
8867 if ${ac_cv_path_RM+:} false; then :
8868   $as_echo_n "(cached) " >&6
8869 else
8870   case $RM in
8871   [\\/]* | ?:[\\/]*)
8872   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8873   ;;
8874   *)
8875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8876 for as_dir in $PATH
8877 do
8878   IFS=$as_save_IFS
8879   test -z "$as_dir" && as_dir=.
8880     for ac_exec_ext in '' $ac_executable_extensions; do
8881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8882     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8884     break 2
8885   fi
8886 done
8887   done
8888 IFS=$as_save_IFS
8889 
8890   ;;
8891 esac
8892 fi
8893 RM=$ac_cv_path_RM
8894 if test -n "$RM"; then
8895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8896 $as_echo "$RM" >&6; }
8897 else
8898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899 $as_echo "no" >&6; }
8900 fi
8901 
8902 
8903   test -n "$RM" && break
8904 done
8905 
8906     else
8907       # If it succeeded, then it was overridden by the user. We will use it
8908       # for the tool.
8909 
8910       # First remove it from the list of overridden variables, so we can test
8911       # for unknown variables in the end.
8912       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8913 
8914       # Check if the provided tool contains a complete path.
8915       tool_specified="$RM"
8916       tool_basename="${tool_specified##*/}"
8917       if test "x$tool_basename" = "x$tool_specified"; then
8918         # A command without a complete path is provided, search $PATH.
8919         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8920 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8921         # Extract the first word of "$tool_basename", so it can be a program name with args.
8922 set dummy $tool_basename; ac_word=$2
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8924 $as_echo_n "checking for $ac_word... " >&6; }
8925 if ${ac_cv_path_RM+:} false; then :
8926   $as_echo_n "(cached) " >&6
8927 else
8928   case $RM in
8929   [\\/]* | ?:[\\/]*)
8930   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8931   ;;
8932   *)
8933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8934 for as_dir in $PATH
8935 do
8936   IFS=$as_save_IFS
8937   test -z "$as_dir" && as_dir=.
8938     for ac_exec_ext in '' $ac_executable_extensions; do
8939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8940     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8942     break 2
8943   fi
8944 done
8945   done
8946 IFS=$as_save_IFS
8947 
8948   ;;
8949 esac
8950 fi
8951 RM=$ac_cv_path_RM
8952 if test -n "$RM"; then
8953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8954 $as_echo "$RM" >&6; }
8955 else
8956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957 $as_echo "no" >&6; }
8958 fi
8959 
8960 
8961         if test "x$RM" = x; then
8962           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8963         fi
8964       else
8965         # Otherwise we believe it is a complete path. Use it as it is.
8966         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8967 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8969 $as_echo_n "checking for RM... " >&6; }
8970         if test ! -x "$tool_specified"; then
8971           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8972 $as_echo "not found" >&6; }
8973           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8974         fi
8975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8976 $as_echo "$tool_specified" >&6; }
8977       fi
8978     fi
8979   fi
8980 
8981 
8982 
8983   if test "x$RM" = x; then
8984     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8985   fi
8986 
8987 
8988 
8989 
8990 
8991   # Publish this variable in the help.
8992 
8993 
8994   if test "x$SH" = x; then
8995     # The variable is not set by user, try to locate tool using the code snippet
8996     for ac_prog in sh
8997 do
8998   # Extract the first word of "$ac_prog", so it can be a program name with args.
8999 set dummy $ac_prog; ac_word=$2
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9001 $as_echo_n "checking for $ac_word... " >&6; }
9002 if ${ac_cv_path_SH+:} false; then :
9003   $as_echo_n "(cached) " >&6
9004 else
9005   case $SH in
9006   [\\/]* | ?:[\\/]*)
9007   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9008   ;;
9009   *)
9010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9011 for as_dir in $PATH
9012 do
9013   IFS=$as_save_IFS
9014   test -z "$as_dir" && as_dir=.
9015     for ac_exec_ext in '' $ac_executable_extensions; do
9016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9017     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9019     break 2
9020   fi
9021 done
9022   done
9023 IFS=$as_save_IFS
9024 
9025   ;;
9026 esac
9027 fi
9028 SH=$ac_cv_path_SH
9029 if test -n "$SH"; then
9030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9031 $as_echo "$SH" >&6; }
9032 else
9033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034 $as_echo "no" >&6; }
9035 fi
9036 
9037 
9038   test -n "$SH" && break
9039 done
9040 
9041   else
9042     # The variable is set, but is it from the command line or the environment?
9043 
9044     # Try to remove the string !SH! from our list.
9045     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9046     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9047       # If it failed, the variable was not from the command line. Ignore it,
9048       # but warn the user (except for BASH, which is always set by the calling BASH).
9049       if test "xSH" != xBASH; then
9050         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9051 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9052       fi
9053       # Try to locate tool using the code snippet
9054       for ac_prog in sh
9055 do
9056   # Extract the first word of "$ac_prog", so it can be a program name with args.
9057 set dummy $ac_prog; ac_word=$2
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9059 $as_echo_n "checking for $ac_word... " >&6; }
9060 if ${ac_cv_path_SH+:} false; then :
9061   $as_echo_n "(cached) " >&6
9062 else
9063   case $SH in
9064   [\\/]* | ?:[\\/]*)
9065   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9066   ;;
9067   *)
9068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9069 for as_dir in $PATH
9070 do
9071   IFS=$as_save_IFS
9072   test -z "$as_dir" && as_dir=.
9073     for ac_exec_ext in '' $ac_executable_extensions; do
9074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9075     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9077     break 2
9078   fi
9079 done
9080   done
9081 IFS=$as_save_IFS
9082 
9083   ;;
9084 esac
9085 fi
9086 SH=$ac_cv_path_SH
9087 if test -n "$SH"; then
9088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9089 $as_echo "$SH" >&6; }
9090 else
9091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092 $as_echo "no" >&6; }
9093 fi
9094 
9095 
9096   test -n "$SH" && break
9097 done
9098 
9099     else
9100       # If it succeeded, then it was overridden by the user. We will use it
9101       # for the tool.
9102 
9103       # First remove it from the list of overridden variables, so we can test
9104       # for unknown variables in the end.
9105       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9106 
9107       # Check if the provided tool contains a complete path.
9108       tool_specified="$SH"
9109       tool_basename="${tool_specified##*/}"
9110       if test "x$tool_basename" = "x$tool_specified"; then
9111         # A command without a complete path is provided, search $PATH.
9112         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9113 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9114         # Extract the first word of "$tool_basename", so it can be a program name with args.
9115 set dummy $tool_basename; ac_word=$2
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9117 $as_echo_n "checking for $ac_word... " >&6; }
9118 if ${ac_cv_path_SH+:} false; then :
9119   $as_echo_n "(cached) " >&6
9120 else
9121   case $SH in
9122   [\\/]* | ?:[\\/]*)
9123   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9124   ;;
9125   *)
9126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9127 for as_dir in $PATH
9128 do
9129   IFS=$as_save_IFS
9130   test -z "$as_dir" && as_dir=.
9131     for ac_exec_ext in '' $ac_executable_extensions; do
9132   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9133     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9134     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9135     break 2
9136   fi
9137 done
9138   done
9139 IFS=$as_save_IFS
9140 
9141   ;;
9142 esac
9143 fi
9144 SH=$ac_cv_path_SH
9145 if test -n "$SH"; then
9146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9147 $as_echo "$SH" >&6; }
9148 else
9149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150 $as_echo "no" >&6; }
9151 fi
9152 
9153 
9154         if test "x$SH" = x; then
9155           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9156         fi
9157       else
9158         # Otherwise we believe it is a complete path. Use it as it is.
9159         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9160 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9161         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9162 $as_echo_n "checking for SH... " >&6; }
9163         if test ! -x "$tool_specified"; then
9164           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9165 $as_echo "not found" >&6; }
9166           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9167         fi
9168         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9169 $as_echo "$tool_specified" >&6; }
9170       fi
9171     fi
9172   fi
9173 
9174 
9175 
9176   if test "x$SH" = x; then
9177     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9178   fi
9179 
9180 
9181 
9182 
9183 
9184   # Publish this variable in the help.
9185 
9186 
9187   if test "x$SORT" = x; then
9188     # The variable is not set by user, try to locate tool using the code snippet
9189     for ac_prog in sort
9190 do
9191   # Extract the first word of "$ac_prog", so it can be a program name with args.
9192 set dummy $ac_prog; ac_word=$2
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194 $as_echo_n "checking for $ac_word... " >&6; }
9195 if ${ac_cv_path_SORT+:} false; then :
9196   $as_echo_n "(cached) " >&6
9197 else
9198   case $SORT in
9199   [\\/]* | ?:[\\/]*)
9200   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9201   ;;
9202   *)
9203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204 for as_dir in $PATH
9205 do
9206   IFS=$as_save_IFS
9207   test -z "$as_dir" && as_dir=.
9208     for ac_exec_ext in '' $ac_executable_extensions; do
9209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212     break 2
9213   fi
9214 done
9215   done
9216 IFS=$as_save_IFS
9217 
9218   ;;
9219 esac
9220 fi
9221 SORT=$ac_cv_path_SORT
9222 if test -n "$SORT"; then
9223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9224 $as_echo "$SORT" >&6; }
9225 else
9226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227 $as_echo "no" >&6; }
9228 fi
9229 
9230 
9231   test -n "$SORT" && break
9232 done
9233 
9234   else
9235     # The variable is set, but is it from the command line or the environment?
9236 
9237     # Try to remove the string !SORT! from our list.
9238     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9239     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9240       # If it failed, the variable was not from the command line. Ignore it,
9241       # but warn the user (except for BASH, which is always set by the calling BASH).
9242       if test "xSORT" != xBASH; then
9243         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9244 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9245       fi
9246       # Try to locate tool using the code snippet
9247       for ac_prog in sort
9248 do
9249   # Extract the first word of "$ac_prog", so it can be a program name with args.
9250 set dummy $ac_prog; ac_word=$2
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9252 $as_echo_n "checking for $ac_word... " >&6; }
9253 if ${ac_cv_path_SORT+:} false; then :
9254   $as_echo_n "(cached) " >&6
9255 else
9256   case $SORT in
9257   [\\/]* | ?:[\\/]*)
9258   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9259   ;;
9260   *)
9261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9262 for as_dir in $PATH
9263 do
9264   IFS=$as_save_IFS
9265   test -z "$as_dir" && as_dir=.
9266     for ac_exec_ext in '' $ac_executable_extensions; do
9267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9268     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9270     break 2
9271   fi
9272 done
9273   done
9274 IFS=$as_save_IFS
9275 
9276   ;;
9277 esac
9278 fi
9279 SORT=$ac_cv_path_SORT
9280 if test -n "$SORT"; then
9281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9282 $as_echo "$SORT" >&6; }
9283 else
9284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285 $as_echo "no" >&6; }
9286 fi
9287 
9288 
9289   test -n "$SORT" && break
9290 done
9291 
9292     else
9293       # If it succeeded, then it was overridden by the user. We will use it
9294       # for the tool.
9295 
9296       # First remove it from the list of overridden variables, so we can test
9297       # for unknown variables in the end.
9298       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9299 
9300       # Check if the provided tool contains a complete path.
9301       tool_specified="$SORT"
9302       tool_basename="${tool_specified##*/}"
9303       if test "x$tool_basename" = "x$tool_specified"; then
9304         # A command without a complete path is provided, search $PATH.
9305         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9306 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9307         # Extract the first word of "$tool_basename", so it can be a program name with args.
9308 set dummy $tool_basename; ac_word=$2
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9310 $as_echo_n "checking for $ac_word... " >&6; }
9311 if ${ac_cv_path_SORT+:} false; then :
9312   $as_echo_n "(cached) " >&6
9313 else
9314   case $SORT in
9315   [\\/]* | ?:[\\/]*)
9316   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9317   ;;
9318   *)
9319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9320 for as_dir in $PATH
9321 do
9322   IFS=$as_save_IFS
9323   test -z "$as_dir" && as_dir=.
9324     for ac_exec_ext in '' $ac_executable_extensions; do
9325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9326     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9328     break 2
9329   fi
9330 done
9331   done
9332 IFS=$as_save_IFS
9333 
9334   ;;
9335 esac
9336 fi
9337 SORT=$ac_cv_path_SORT
9338 if test -n "$SORT"; then
9339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9340 $as_echo "$SORT" >&6; }
9341 else
9342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9343 $as_echo "no" >&6; }
9344 fi
9345 
9346 
9347         if test "x$SORT" = x; then
9348           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9349         fi
9350       else
9351         # Otherwise we believe it is a complete path. Use it as it is.
9352         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9353 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9354         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9355 $as_echo_n "checking for SORT... " >&6; }
9356         if test ! -x "$tool_specified"; then
9357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9358 $as_echo "not found" >&6; }
9359           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9360         fi
9361         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9362 $as_echo "$tool_specified" >&6; }
9363       fi
9364     fi
9365   fi
9366 
9367 
9368 
9369   if test "x$SORT" = x; then
9370     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9371   fi
9372 
9373 
9374 
9375 
9376 
9377   # Publish this variable in the help.
9378 
9379 
9380   if test "x$TAIL" = x; then
9381     # The variable is not set by user, try to locate tool using the code snippet
9382     for ac_prog in tail
9383 do
9384   # Extract the first word of "$ac_prog", so it can be a program name with args.
9385 set dummy $ac_prog; ac_word=$2
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9387 $as_echo_n "checking for $ac_word... " >&6; }
9388 if ${ac_cv_path_TAIL+:} false; then :
9389   $as_echo_n "(cached) " >&6
9390 else
9391   case $TAIL in
9392   [\\/]* | ?:[\\/]*)
9393   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9394   ;;
9395   *)
9396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9397 for as_dir in $PATH
9398 do
9399   IFS=$as_save_IFS
9400   test -z "$as_dir" && as_dir=.
9401     for ac_exec_ext in '' $ac_executable_extensions; do
9402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9403     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9405     break 2
9406   fi
9407 done
9408   done
9409 IFS=$as_save_IFS
9410 
9411   ;;
9412 esac
9413 fi
9414 TAIL=$ac_cv_path_TAIL
9415 if test -n "$TAIL"; then
9416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9417 $as_echo "$TAIL" >&6; }
9418 else
9419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420 $as_echo "no" >&6; }
9421 fi
9422 
9423 
9424   test -n "$TAIL" && break
9425 done
9426 
9427   else
9428     # The variable is set, but is it from the command line or the environment?
9429 
9430     # Try to remove the string !TAIL! from our list.
9431     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9432     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9433       # If it failed, the variable was not from the command line. Ignore it,
9434       # but warn the user (except for BASH, which is always set by the calling BASH).
9435       if test "xTAIL" != xBASH; then
9436         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9437 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9438       fi
9439       # Try to locate tool using the code snippet
9440       for ac_prog in tail
9441 do
9442   # Extract the first word of "$ac_prog", so it can be a program name with args.
9443 set dummy $ac_prog; ac_word=$2
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9445 $as_echo_n "checking for $ac_word... " >&6; }
9446 if ${ac_cv_path_TAIL+:} false; then :
9447   $as_echo_n "(cached) " >&6
9448 else
9449   case $TAIL in
9450   [\\/]* | ?:[\\/]*)
9451   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9452   ;;
9453   *)
9454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9455 for as_dir in $PATH
9456 do
9457   IFS=$as_save_IFS
9458   test -z "$as_dir" && as_dir=.
9459     for ac_exec_ext in '' $ac_executable_extensions; do
9460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9461     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9463     break 2
9464   fi
9465 done
9466   done
9467 IFS=$as_save_IFS
9468 
9469   ;;
9470 esac
9471 fi
9472 TAIL=$ac_cv_path_TAIL
9473 if test -n "$TAIL"; then
9474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9475 $as_echo "$TAIL" >&6; }
9476 else
9477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478 $as_echo "no" >&6; }
9479 fi
9480 
9481 
9482   test -n "$TAIL" && break
9483 done
9484 
9485     else
9486       # If it succeeded, then it was overridden by the user. We will use it
9487       # for the tool.
9488 
9489       # First remove it from the list of overridden variables, so we can test
9490       # for unknown variables in the end.
9491       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9492 
9493       # Check if the provided tool contains a complete path.
9494       tool_specified="$TAIL"
9495       tool_basename="${tool_specified##*/}"
9496       if test "x$tool_basename" = "x$tool_specified"; then
9497         # A command without a complete path is provided, search $PATH.
9498         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9499 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9500         # Extract the first word of "$tool_basename", so it can be a program name with args.
9501 set dummy $tool_basename; ac_word=$2
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9503 $as_echo_n "checking for $ac_word... " >&6; }
9504 if ${ac_cv_path_TAIL+:} false; then :
9505   $as_echo_n "(cached) " >&6
9506 else
9507   case $TAIL in
9508   [\\/]* | ?:[\\/]*)
9509   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9510   ;;
9511   *)
9512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9513 for as_dir in $PATH
9514 do
9515   IFS=$as_save_IFS
9516   test -z "$as_dir" && as_dir=.
9517     for ac_exec_ext in '' $ac_executable_extensions; do
9518   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9519     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9520     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9521     break 2
9522   fi
9523 done
9524   done
9525 IFS=$as_save_IFS
9526 
9527   ;;
9528 esac
9529 fi
9530 TAIL=$ac_cv_path_TAIL
9531 if test -n "$TAIL"; then
9532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9533 $as_echo "$TAIL" >&6; }
9534 else
9535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536 $as_echo "no" >&6; }
9537 fi
9538 
9539 
9540         if test "x$TAIL" = x; then
9541           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9542         fi
9543       else
9544         # Otherwise we believe it is a complete path. Use it as it is.
9545         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9546 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9547         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9548 $as_echo_n "checking for TAIL... " >&6; }
9549         if test ! -x "$tool_specified"; then
9550           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9551 $as_echo "not found" >&6; }
9552           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9553         fi
9554         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9555 $as_echo "$tool_specified" >&6; }
9556       fi
9557     fi
9558   fi
9559 
9560 
9561 
9562   if test "x$TAIL" = x; then
9563     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9564   fi
9565 
9566 
9567 
9568 
9569 
9570   # Publish this variable in the help.
9571 
9572 
9573   if test "x$TAR" = x; then
9574     # The variable is not set by user, try to locate tool using the code snippet
9575     for ac_prog in tar
9576 do
9577   # Extract the first word of "$ac_prog", so it can be a program name with args.
9578 set dummy $ac_prog; ac_word=$2
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9580 $as_echo_n "checking for $ac_word... " >&6; }
9581 if ${ac_cv_path_TAR+:} false; then :
9582   $as_echo_n "(cached) " >&6
9583 else
9584   case $TAR in
9585   [\\/]* | ?:[\\/]*)
9586   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9587   ;;
9588   *)
9589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9590 for as_dir in $PATH
9591 do
9592   IFS=$as_save_IFS
9593   test -z "$as_dir" && as_dir=.
9594     for ac_exec_ext in '' $ac_executable_extensions; do
9595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9596     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9598     break 2
9599   fi
9600 done
9601   done
9602 IFS=$as_save_IFS
9603 
9604   ;;
9605 esac
9606 fi
9607 TAR=$ac_cv_path_TAR
9608 if test -n "$TAR"; then
9609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9610 $as_echo "$TAR" >&6; }
9611 else
9612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613 $as_echo "no" >&6; }
9614 fi
9615 
9616 
9617   test -n "$TAR" && break
9618 done
9619 
9620   else
9621     # The variable is set, but is it from the command line or the environment?
9622 
9623     # Try to remove the string !TAR! from our list.
9624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9626       # If it failed, the variable was not from the command line. Ignore it,
9627       # but warn the user (except for BASH, which is always set by the calling BASH).
9628       if test "xTAR" != xBASH; then
9629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9630 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9631       fi
9632       # Try to locate tool using the code snippet
9633       for ac_prog in tar
9634 do
9635   # Extract the first word of "$ac_prog", so it can be a program name with args.
9636 set dummy $ac_prog; ac_word=$2
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638 $as_echo_n "checking for $ac_word... " >&6; }
9639 if ${ac_cv_path_TAR+:} false; then :
9640   $as_echo_n "(cached) " >&6
9641 else
9642   case $TAR in
9643   [\\/]* | ?:[\\/]*)
9644   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9645   ;;
9646   *)
9647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648 for as_dir in $PATH
9649 do
9650   IFS=$as_save_IFS
9651   test -z "$as_dir" && as_dir=.
9652     for ac_exec_ext in '' $ac_executable_extensions; do
9653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656     break 2
9657   fi
9658 done
9659   done
9660 IFS=$as_save_IFS
9661 
9662   ;;
9663 esac
9664 fi
9665 TAR=$ac_cv_path_TAR
9666 if test -n "$TAR"; then
9667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9668 $as_echo "$TAR" >&6; }
9669 else
9670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671 $as_echo "no" >&6; }
9672 fi
9673 
9674 
9675   test -n "$TAR" && break
9676 done
9677 
9678     else
9679       # If it succeeded, then it was overridden by the user. We will use it
9680       # for the tool.
9681 
9682       # First remove it from the list of overridden variables, so we can test
9683       # for unknown variables in the end.
9684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9685 
9686       # Check if the provided tool contains a complete path.
9687       tool_specified="$TAR"
9688       tool_basename="${tool_specified##*/}"
9689       if test "x$tool_basename" = "x$tool_specified"; then
9690         # A command without a complete path is provided, search $PATH.
9691         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9692 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9693         # Extract the first word of "$tool_basename", so it can be a program name with args.
9694 set dummy $tool_basename; ac_word=$2
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9696 $as_echo_n "checking for $ac_word... " >&6; }
9697 if ${ac_cv_path_TAR+:} false; then :
9698   $as_echo_n "(cached) " >&6
9699 else
9700   case $TAR in
9701   [\\/]* | ?:[\\/]*)
9702   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9703   ;;
9704   *)
9705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706 for as_dir in $PATH
9707 do
9708   IFS=$as_save_IFS
9709   test -z "$as_dir" && as_dir=.
9710     for ac_exec_ext in '' $ac_executable_extensions; do
9711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9714     break 2
9715   fi
9716 done
9717   done
9718 IFS=$as_save_IFS
9719 
9720   ;;
9721 esac
9722 fi
9723 TAR=$ac_cv_path_TAR
9724 if test -n "$TAR"; then
9725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9726 $as_echo "$TAR" >&6; }
9727 else
9728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729 $as_echo "no" >&6; }
9730 fi
9731 
9732 
9733         if test "x$TAR" = x; then
9734           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9735         fi
9736       else
9737         # Otherwise we believe it is a complete path. Use it as it is.
9738         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9739 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9740         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9741 $as_echo_n "checking for TAR... " >&6; }
9742         if test ! -x "$tool_specified"; then
9743           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9744 $as_echo "not found" >&6; }
9745           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9746         fi
9747         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9748 $as_echo "$tool_specified" >&6; }
9749       fi
9750     fi
9751   fi
9752 
9753 
9754 
9755   if test "x$TAR" = x; then
9756     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9757   fi
9758 
9759 
9760 
9761 
9762 
9763   # Publish this variable in the help.
9764 
9765 
9766   if test "x$TEE" = x; then
9767     # The variable is not set by user, try to locate tool using the code snippet
9768     for ac_prog in tee
9769 do
9770   # Extract the first word of "$ac_prog", so it can be a program name with args.
9771 set dummy $ac_prog; ac_word=$2
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773 $as_echo_n "checking for $ac_word... " >&6; }
9774 if ${ac_cv_path_TEE+:} false; then :
9775   $as_echo_n "(cached) " >&6
9776 else
9777   case $TEE in
9778   [\\/]* | ?:[\\/]*)
9779   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9780   ;;
9781   *)
9782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9783 for as_dir in $PATH
9784 do
9785   IFS=$as_save_IFS
9786   test -z "$as_dir" && as_dir=.
9787     for ac_exec_ext in '' $ac_executable_extensions; do
9788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9789     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9791     break 2
9792   fi
9793 done
9794   done
9795 IFS=$as_save_IFS
9796 
9797   ;;
9798 esac
9799 fi
9800 TEE=$ac_cv_path_TEE
9801 if test -n "$TEE"; then
9802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9803 $as_echo "$TEE" >&6; }
9804 else
9805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806 $as_echo "no" >&6; }
9807 fi
9808 
9809 
9810   test -n "$TEE" && break
9811 done
9812 
9813   else
9814     # The variable is set, but is it from the command line or the environment?
9815 
9816     # Try to remove the string !TEE! from our list.
9817     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9818     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9819       # If it failed, the variable was not from the command line. Ignore it,
9820       # but warn the user (except for BASH, which is always set by the calling BASH).
9821       if test "xTEE" != xBASH; then
9822         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9823 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9824       fi
9825       # Try to locate tool using the code snippet
9826       for ac_prog in tee
9827 do
9828   # Extract the first word of "$ac_prog", so it can be a program name with args.
9829 set dummy $ac_prog; ac_word=$2
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9831 $as_echo_n "checking for $ac_word... " >&6; }
9832 if ${ac_cv_path_TEE+:} false; then :
9833   $as_echo_n "(cached) " >&6
9834 else
9835   case $TEE in
9836   [\\/]* | ?:[\\/]*)
9837   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9838   ;;
9839   *)
9840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9841 for as_dir in $PATH
9842 do
9843   IFS=$as_save_IFS
9844   test -z "$as_dir" && as_dir=.
9845     for ac_exec_ext in '' $ac_executable_extensions; do
9846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9847     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9849     break 2
9850   fi
9851 done
9852   done
9853 IFS=$as_save_IFS
9854 
9855   ;;
9856 esac
9857 fi
9858 TEE=$ac_cv_path_TEE
9859 if test -n "$TEE"; then
9860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9861 $as_echo "$TEE" >&6; }
9862 else
9863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864 $as_echo "no" >&6; }
9865 fi
9866 
9867 
9868   test -n "$TEE" && break
9869 done
9870 
9871     else
9872       # If it succeeded, then it was overridden by the user. We will use it
9873       # for the tool.
9874 
9875       # First remove it from the list of overridden variables, so we can test
9876       # for unknown variables in the end.
9877       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9878 
9879       # Check if the provided tool contains a complete path.
9880       tool_specified="$TEE"
9881       tool_basename="${tool_specified##*/}"
9882       if test "x$tool_basename" = "x$tool_specified"; then
9883         # A command without a complete path is provided, search $PATH.
9884         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9885 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9886         # Extract the first word of "$tool_basename", so it can be a program name with args.
9887 set dummy $tool_basename; ac_word=$2
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9889 $as_echo_n "checking for $ac_word... " >&6; }
9890 if ${ac_cv_path_TEE+:} false; then :
9891   $as_echo_n "(cached) " >&6
9892 else
9893   case $TEE in
9894   [\\/]* | ?:[\\/]*)
9895   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9896   ;;
9897   *)
9898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9899 for as_dir in $PATH
9900 do
9901   IFS=$as_save_IFS
9902   test -z "$as_dir" && as_dir=.
9903     for ac_exec_ext in '' $ac_executable_extensions; do
9904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9905     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9907     break 2
9908   fi
9909 done
9910   done
9911 IFS=$as_save_IFS
9912 
9913   ;;
9914 esac
9915 fi
9916 TEE=$ac_cv_path_TEE
9917 if test -n "$TEE"; then
9918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9919 $as_echo "$TEE" >&6; }
9920 else
9921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922 $as_echo "no" >&6; }
9923 fi
9924 
9925 
9926         if test "x$TEE" = x; then
9927           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9928         fi
9929       else
9930         # Otherwise we believe it is a complete path. Use it as it is.
9931         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9932 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9934 $as_echo_n "checking for TEE... " >&6; }
9935         if test ! -x "$tool_specified"; then
9936           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9937 $as_echo "not found" >&6; }
9938           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9939         fi
9940         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9941 $as_echo "$tool_specified" >&6; }
9942       fi
9943     fi
9944   fi
9945 
9946 
9947 
9948   if test "x$TEE" = x; then
9949     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9950   fi
9951 
9952 
9953 
9954 
9955 
9956   # Publish this variable in the help.
9957 
9958 
9959   if test "x$TOUCH" = x; then
9960     # The variable is not set by user, try to locate tool using the code snippet
9961     for ac_prog in touch
9962 do
9963   # Extract the first word of "$ac_prog", so it can be a program name with args.
9964 set dummy $ac_prog; ac_word=$2
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966 $as_echo_n "checking for $ac_word... " >&6; }
9967 if ${ac_cv_path_TOUCH+:} false; then :
9968   $as_echo_n "(cached) " >&6
9969 else
9970   case $TOUCH in
9971   [\\/]* | ?:[\\/]*)
9972   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9973   ;;
9974   *)
9975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976 for as_dir in $PATH
9977 do
9978   IFS=$as_save_IFS
9979   test -z "$as_dir" && as_dir=.
9980     for ac_exec_ext in '' $ac_executable_extensions; do
9981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9982     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984     break 2
9985   fi
9986 done
9987   done
9988 IFS=$as_save_IFS
9989 
9990   ;;
9991 esac
9992 fi
9993 TOUCH=$ac_cv_path_TOUCH
9994 if test -n "$TOUCH"; then
9995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9996 $as_echo "$TOUCH" >&6; }
9997 else
9998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999 $as_echo "no" >&6; }
10000 fi
10001 
10002 
10003   test -n "$TOUCH" && break
10004 done
10005 
10006   else
10007     # The variable is set, but is it from the command line or the environment?
10008 
10009     # Try to remove the string !TOUCH! from our list.
10010     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10011     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10012       # If it failed, the variable was not from the command line. Ignore it,
10013       # but warn the user (except for BASH, which is always set by the calling BASH).
10014       if test "xTOUCH" != xBASH; then
10015         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10016 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10017       fi
10018       # Try to locate tool using the code snippet
10019       for ac_prog in touch
10020 do
10021   # Extract the first word of "$ac_prog", so it can be a program name with args.
10022 set dummy $ac_prog; ac_word=$2
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10024 $as_echo_n "checking for $ac_word... " >&6; }
10025 if ${ac_cv_path_TOUCH+:} false; then :
10026   $as_echo_n "(cached) " >&6
10027 else
10028   case $TOUCH in
10029   [\\/]* | ?:[\\/]*)
10030   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10031   ;;
10032   *)
10033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10034 for as_dir in $PATH
10035 do
10036   IFS=$as_save_IFS
10037   test -z "$as_dir" && as_dir=.
10038     for ac_exec_ext in '' $ac_executable_extensions; do
10039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10040     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10042     break 2
10043   fi
10044 done
10045   done
10046 IFS=$as_save_IFS
10047 
10048   ;;
10049 esac
10050 fi
10051 TOUCH=$ac_cv_path_TOUCH
10052 if test -n "$TOUCH"; then
10053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10054 $as_echo "$TOUCH" >&6; }
10055 else
10056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057 $as_echo "no" >&6; }
10058 fi
10059 
10060 
10061   test -n "$TOUCH" && break
10062 done
10063 
10064     else
10065       # If it succeeded, then it was overridden by the user. We will use it
10066       # for the tool.
10067 
10068       # First remove it from the list of overridden variables, so we can test
10069       # for unknown variables in the end.
10070       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10071 
10072       # Check if the provided tool contains a complete path.
10073       tool_specified="$TOUCH"
10074       tool_basename="${tool_specified##*/}"
10075       if test "x$tool_basename" = "x$tool_specified"; then
10076         # A command without a complete path is provided, search $PATH.
10077         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10078 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10079         # Extract the first word of "$tool_basename", so it can be a program name with args.
10080 set dummy $tool_basename; ac_word=$2
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10082 $as_echo_n "checking for $ac_word... " >&6; }
10083 if ${ac_cv_path_TOUCH+:} false; then :
10084   $as_echo_n "(cached) " >&6
10085 else
10086   case $TOUCH in
10087   [\\/]* | ?:[\\/]*)
10088   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10089   ;;
10090   *)
10091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10092 for as_dir in $PATH
10093 do
10094   IFS=$as_save_IFS
10095   test -z "$as_dir" && as_dir=.
10096     for ac_exec_ext in '' $ac_executable_extensions; do
10097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10098     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10100     break 2
10101   fi
10102 done
10103   done
10104 IFS=$as_save_IFS
10105 
10106   ;;
10107 esac
10108 fi
10109 TOUCH=$ac_cv_path_TOUCH
10110 if test -n "$TOUCH"; then
10111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10112 $as_echo "$TOUCH" >&6; }
10113 else
10114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115 $as_echo "no" >&6; }
10116 fi
10117 
10118 
10119         if test "x$TOUCH" = x; then
10120           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10121         fi
10122       else
10123         # Otherwise we believe it is a complete path. Use it as it is.
10124         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10125 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10126         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10127 $as_echo_n "checking for TOUCH... " >&6; }
10128         if test ! -x "$tool_specified"; then
10129           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10130 $as_echo "not found" >&6; }
10131           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10132         fi
10133         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10134 $as_echo "$tool_specified" >&6; }
10135       fi
10136     fi
10137   fi
10138 
10139 
10140 
10141   if test "x$TOUCH" = x; then
10142     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10143   fi
10144 
10145 
10146 
10147 
10148 
10149   # Publish this variable in the help.
10150 
10151 
10152   if test "x$TR" = x; then
10153     # The variable is not set by user, try to locate tool using the code snippet
10154     for ac_prog in tr
10155 do
10156   # Extract the first word of "$ac_prog", so it can be a program name with args.
10157 set dummy $ac_prog; ac_word=$2
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159 $as_echo_n "checking for $ac_word... " >&6; }
10160 if ${ac_cv_path_TR+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163   case $TR in
10164   [\\/]* | ?:[\\/]*)
10165   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10166   ;;
10167   *)
10168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169 for as_dir in $PATH
10170 do
10171   IFS=$as_save_IFS
10172   test -z "$as_dir" && as_dir=.
10173     for ac_exec_ext in '' $ac_executable_extensions; do
10174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177     break 2
10178   fi
10179 done
10180   done
10181 IFS=$as_save_IFS
10182 
10183   ;;
10184 esac
10185 fi
10186 TR=$ac_cv_path_TR
10187 if test -n "$TR"; then
10188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10189 $as_echo "$TR" >&6; }
10190 else
10191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192 $as_echo "no" >&6; }
10193 fi
10194 
10195 
10196   test -n "$TR" && break
10197 done
10198 
10199   else
10200     # The variable is set, but is it from the command line or the environment?
10201 
10202     # Try to remove the string !TR! from our list.
10203     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10204     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10205       # If it failed, the variable was not from the command line. Ignore it,
10206       # but warn the user (except for BASH, which is always set by the calling BASH).
10207       if test "xTR" != xBASH; then
10208         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10209 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10210       fi
10211       # Try to locate tool using the code snippet
10212       for ac_prog in tr
10213 do
10214   # Extract the first word of "$ac_prog", so it can be a program name with args.
10215 set dummy $ac_prog; ac_word=$2
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10217 $as_echo_n "checking for $ac_word... " >&6; }
10218 if ${ac_cv_path_TR+:} false; then :
10219   $as_echo_n "(cached) " >&6
10220 else
10221   case $TR in
10222   [\\/]* | ?:[\\/]*)
10223   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10224   ;;
10225   *)
10226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10227 for as_dir in $PATH
10228 do
10229   IFS=$as_save_IFS
10230   test -z "$as_dir" && as_dir=.
10231     for ac_exec_ext in '' $ac_executable_extensions; do
10232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10233     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10235     break 2
10236   fi
10237 done
10238   done
10239 IFS=$as_save_IFS
10240 
10241   ;;
10242 esac
10243 fi
10244 TR=$ac_cv_path_TR
10245 if test -n "$TR"; then
10246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10247 $as_echo "$TR" >&6; }
10248 else
10249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10250 $as_echo "no" >&6; }
10251 fi
10252 
10253 
10254   test -n "$TR" && break
10255 done
10256 
10257     else
10258       # If it succeeded, then it was overridden by the user. We will use it
10259       # for the tool.
10260 
10261       # First remove it from the list of overridden variables, so we can test
10262       # for unknown variables in the end.
10263       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10264 
10265       # Check if the provided tool contains a complete path.
10266       tool_specified="$TR"
10267       tool_basename="${tool_specified##*/}"
10268       if test "x$tool_basename" = "x$tool_specified"; then
10269         # A command without a complete path is provided, search $PATH.
10270         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10271 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10272         # Extract the first word of "$tool_basename", so it can be a program name with args.
10273 set dummy $tool_basename; ac_word=$2
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275 $as_echo_n "checking for $ac_word... " >&6; }
10276 if ${ac_cv_path_TR+:} false; then :
10277   $as_echo_n "(cached) " >&6
10278 else
10279   case $TR in
10280   [\\/]* | ?:[\\/]*)
10281   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10282   ;;
10283   *)
10284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285 for as_dir in $PATH
10286 do
10287   IFS=$as_save_IFS
10288   test -z "$as_dir" && as_dir=.
10289     for ac_exec_ext in '' $ac_executable_extensions; do
10290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10291     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293     break 2
10294   fi
10295 done
10296   done
10297 IFS=$as_save_IFS
10298 
10299   ;;
10300 esac
10301 fi
10302 TR=$ac_cv_path_TR
10303 if test -n "$TR"; then
10304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10305 $as_echo "$TR" >&6; }
10306 else
10307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308 $as_echo "no" >&6; }
10309 fi
10310 
10311 
10312         if test "x$TR" = x; then
10313           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10314         fi
10315       else
10316         # Otherwise we believe it is a complete path. Use it as it is.
10317         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10318 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10319         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10320 $as_echo_n "checking for TR... " >&6; }
10321         if test ! -x "$tool_specified"; then
10322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10323 $as_echo "not found" >&6; }
10324           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10325         fi
10326         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10327 $as_echo "$tool_specified" >&6; }
10328       fi
10329     fi
10330   fi
10331 
10332 
10333 
10334   if test "x$TR" = x; then
10335     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10336   fi
10337 
10338 
10339 
10340 
10341 
10342   # Publish this variable in the help.
10343 
10344 
10345   if test "x$UNAME" = x; then
10346     # The variable is not set by user, try to locate tool using the code snippet
10347     for ac_prog in uname
10348 do
10349   # Extract the first word of "$ac_prog", so it can be a program name with args.
10350 set dummy $ac_prog; ac_word=$2
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10352 $as_echo_n "checking for $ac_word... " >&6; }
10353 if ${ac_cv_path_UNAME+:} false; then :
10354   $as_echo_n "(cached) " >&6
10355 else
10356   case $UNAME in
10357   [\\/]* | ?:[\\/]*)
10358   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10359   ;;
10360   *)
10361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10362 for as_dir in $PATH
10363 do
10364   IFS=$as_save_IFS
10365   test -z "$as_dir" && as_dir=.
10366     for ac_exec_ext in '' $ac_executable_extensions; do
10367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10368     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10370     break 2
10371   fi
10372 done
10373   done
10374 IFS=$as_save_IFS
10375 
10376   ;;
10377 esac
10378 fi
10379 UNAME=$ac_cv_path_UNAME
10380 if test -n "$UNAME"; then
10381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10382 $as_echo "$UNAME" >&6; }
10383 else
10384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385 $as_echo "no" >&6; }
10386 fi
10387 
10388 
10389   test -n "$UNAME" && break
10390 done
10391 
10392   else
10393     # The variable is set, but is it from the command line or the environment?
10394 
10395     # Try to remove the string !UNAME! from our list.
10396     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10397     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10398       # If it failed, the variable was not from the command line. Ignore it,
10399       # but warn the user (except for BASH, which is always set by the calling BASH).
10400       if test "xUNAME" != xBASH; then
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10402 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10403       fi
10404       # Try to locate tool using the code snippet
10405       for ac_prog in uname
10406 do
10407   # Extract the first word of "$ac_prog", so it can be a program name with args.
10408 set dummy $ac_prog; ac_word=$2
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10410 $as_echo_n "checking for $ac_word... " >&6; }
10411 if ${ac_cv_path_UNAME+:} false; then :
10412   $as_echo_n "(cached) " >&6
10413 else
10414   case $UNAME in
10415   [\\/]* | ?:[\\/]*)
10416   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10417   ;;
10418   *)
10419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10420 for as_dir in $PATH
10421 do
10422   IFS=$as_save_IFS
10423   test -z "$as_dir" && as_dir=.
10424     for ac_exec_ext in '' $ac_executable_extensions; do
10425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10426     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10428     break 2
10429   fi
10430 done
10431   done
10432 IFS=$as_save_IFS
10433 
10434   ;;
10435 esac
10436 fi
10437 UNAME=$ac_cv_path_UNAME
10438 if test -n "$UNAME"; then
10439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10440 $as_echo "$UNAME" >&6; }
10441 else
10442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443 $as_echo "no" >&6; }
10444 fi
10445 
10446 
10447   test -n "$UNAME" && break
10448 done
10449 
10450     else
10451       # If it succeeded, then it was overridden by the user. We will use it
10452       # for the tool.
10453 
10454       # First remove it from the list of overridden variables, so we can test
10455       # for unknown variables in the end.
10456       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10457 
10458       # Check if the provided tool contains a complete path.
10459       tool_specified="$UNAME"
10460       tool_basename="${tool_specified##*/}"
10461       if test "x$tool_basename" = "x$tool_specified"; then
10462         # A command without a complete path is provided, search $PATH.
10463         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10464 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10465         # Extract the first word of "$tool_basename", so it can be a program name with args.
10466 set dummy $tool_basename; ac_word=$2
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10468 $as_echo_n "checking for $ac_word... " >&6; }
10469 if ${ac_cv_path_UNAME+:} false; then :
10470   $as_echo_n "(cached) " >&6
10471 else
10472   case $UNAME in
10473   [\\/]* | ?:[\\/]*)
10474   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10475   ;;
10476   *)
10477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10478 for as_dir in $PATH
10479 do
10480   IFS=$as_save_IFS
10481   test -z "$as_dir" && as_dir=.
10482     for ac_exec_ext in '' $ac_executable_extensions; do
10483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10484     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10486     break 2
10487   fi
10488 done
10489   done
10490 IFS=$as_save_IFS
10491 
10492   ;;
10493 esac
10494 fi
10495 UNAME=$ac_cv_path_UNAME
10496 if test -n "$UNAME"; then
10497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10498 $as_echo "$UNAME" >&6; }
10499 else
10500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501 $as_echo "no" >&6; }
10502 fi
10503 
10504 
10505         if test "x$UNAME" = x; then
10506           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10507         fi
10508       else
10509         # Otherwise we believe it is a complete path. Use it as it is.
10510         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10511 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10512         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10513 $as_echo_n "checking for UNAME... " >&6; }
10514         if test ! -x "$tool_specified"; then
10515           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10516 $as_echo "not found" >&6; }
10517           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10518         fi
10519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10520 $as_echo "$tool_specified" >&6; }
10521       fi
10522     fi
10523   fi
10524 
10525 
10526 
10527   if test "x$UNAME" = x; then
10528     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10529   fi
10530 
10531 
10532 
10533 
10534 
10535   # Publish this variable in the help.
10536 
10537 
10538   if test "x$UNIQ" = x; then
10539     # The variable is not set by user, try to locate tool using the code snippet
10540     for ac_prog in uniq
10541 do
10542   # Extract the first word of "$ac_prog", so it can be a program name with args.
10543 set dummy $ac_prog; ac_word=$2
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545 $as_echo_n "checking for $ac_word... " >&6; }
10546 if ${ac_cv_path_UNIQ+:} false; then :
10547   $as_echo_n "(cached) " >&6
10548 else
10549   case $UNIQ in
10550   [\\/]* | ?:[\\/]*)
10551   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10552   ;;
10553   *)
10554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555 for as_dir in $PATH
10556 do
10557   IFS=$as_save_IFS
10558   test -z "$as_dir" && as_dir=.
10559     for ac_exec_ext in '' $ac_executable_extensions; do
10560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563     break 2
10564   fi
10565 done
10566   done
10567 IFS=$as_save_IFS
10568 
10569   ;;
10570 esac
10571 fi
10572 UNIQ=$ac_cv_path_UNIQ
10573 if test -n "$UNIQ"; then
10574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10575 $as_echo "$UNIQ" >&6; }
10576 else
10577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578 $as_echo "no" >&6; }
10579 fi
10580 
10581 
10582   test -n "$UNIQ" && break
10583 done
10584 
10585   else
10586     # The variable is set, but is it from the command line or the environment?
10587 
10588     # Try to remove the string !UNIQ! from our list.
10589     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10590     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10591       # If it failed, the variable was not from the command line. Ignore it,
10592       # but warn the user (except for BASH, which is always set by the calling BASH).
10593       if test "xUNIQ" != xBASH; then
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10595 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10596       fi
10597       # Try to locate tool using the code snippet
10598       for ac_prog in uniq
10599 do
10600   # Extract the first word of "$ac_prog", so it can be a program name with args.
10601 set dummy $ac_prog; ac_word=$2
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603 $as_echo_n "checking for $ac_word... " >&6; }
10604 if ${ac_cv_path_UNIQ+:} false; then :
10605   $as_echo_n "(cached) " >&6
10606 else
10607   case $UNIQ in
10608   [\\/]* | ?:[\\/]*)
10609   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10610   ;;
10611   *)
10612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613 for as_dir in $PATH
10614 do
10615   IFS=$as_save_IFS
10616   test -z "$as_dir" && as_dir=.
10617     for ac_exec_ext in '' $ac_executable_extensions; do
10618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10619     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621     break 2
10622   fi
10623 done
10624   done
10625 IFS=$as_save_IFS
10626 
10627   ;;
10628 esac
10629 fi
10630 UNIQ=$ac_cv_path_UNIQ
10631 if test -n "$UNIQ"; then
10632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10633 $as_echo "$UNIQ" >&6; }
10634 else
10635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636 $as_echo "no" >&6; }
10637 fi
10638 
10639 
10640   test -n "$UNIQ" && break
10641 done
10642 
10643     else
10644       # If it succeeded, then it was overridden by the user. We will use it
10645       # for the tool.
10646 
10647       # First remove it from the list of overridden variables, so we can test
10648       # for unknown variables in the end.
10649       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10650 
10651       # Check if the provided tool contains a complete path.
10652       tool_specified="$UNIQ"
10653       tool_basename="${tool_specified##*/}"
10654       if test "x$tool_basename" = "x$tool_specified"; then
10655         # A command without a complete path is provided, search $PATH.
10656         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10657 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10658         # Extract the first word of "$tool_basename", so it can be a program name with args.
10659 set dummy $tool_basename; ac_word=$2
10660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10661 $as_echo_n "checking for $ac_word... " >&6; }
10662 if ${ac_cv_path_UNIQ+:} false; then :
10663   $as_echo_n "(cached) " >&6
10664 else
10665   case $UNIQ in
10666   [\\/]* | ?:[\\/]*)
10667   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10668   ;;
10669   *)
10670   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10671 for as_dir in $PATH
10672 do
10673   IFS=$as_save_IFS
10674   test -z "$as_dir" && as_dir=.
10675     for ac_exec_ext in '' $ac_executable_extensions; do
10676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10677     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10679     break 2
10680   fi
10681 done
10682   done
10683 IFS=$as_save_IFS
10684 
10685   ;;
10686 esac
10687 fi
10688 UNIQ=$ac_cv_path_UNIQ
10689 if test -n "$UNIQ"; then
10690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10691 $as_echo "$UNIQ" >&6; }
10692 else
10693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10694 $as_echo "no" >&6; }
10695 fi
10696 
10697 
10698         if test "x$UNIQ" = x; then
10699           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10700         fi
10701       else
10702         # Otherwise we believe it is a complete path. Use it as it is.
10703         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10704 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10706 $as_echo_n "checking for UNIQ... " >&6; }
10707         if test ! -x "$tool_specified"; then
10708           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10709 $as_echo "not found" >&6; }
10710           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10711         fi
10712         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10713 $as_echo "$tool_specified" >&6; }
10714       fi
10715     fi
10716   fi
10717 
10718 
10719 
10720   if test "x$UNIQ" = x; then
10721     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10722   fi
10723 
10724 
10725 
10726 
10727 
10728   # Publish this variable in the help.
10729 
10730 
10731   if test "x$WC" = x; then
10732     # The variable is not set by user, try to locate tool using the code snippet
10733     for ac_prog in wc
10734 do
10735   # Extract the first word of "$ac_prog", so it can be a program name with args.
10736 set dummy $ac_prog; ac_word=$2
10737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10738 $as_echo_n "checking for $ac_word... " >&6; }
10739 if ${ac_cv_path_WC+:} false; then :
10740   $as_echo_n "(cached) " >&6
10741 else
10742   case $WC in
10743   [\\/]* | ?:[\\/]*)
10744   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10745   ;;
10746   *)
10747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10748 for as_dir in $PATH
10749 do
10750   IFS=$as_save_IFS
10751   test -z "$as_dir" && as_dir=.
10752     for ac_exec_ext in '' $ac_executable_extensions; do
10753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10754     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10756     break 2
10757   fi
10758 done
10759   done
10760 IFS=$as_save_IFS
10761 
10762   ;;
10763 esac
10764 fi
10765 WC=$ac_cv_path_WC
10766 if test -n "$WC"; then
10767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10768 $as_echo "$WC" >&6; }
10769 else
10770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771 $as_echo "no" >&6; }
10772 fi
10773 
10774 
10775   test -n "$WC" && break
10776 done
10777 
10778   else
10779     # The variable is set, but is it from the command line or the environment?
10780 
10781     # Try to remove the string !WC! from our list.
10782     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10783     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10784       # If it failed, the variable was not from the command line. Ignore it,
10785       # but warn the user (except for BASH, which is always set by the calling BASH).
10786       if test "xWC" != xBASH; then
10787         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10788 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10789       fi
10790       # Try to locate tool using the code snippet
10791       for ac_prog in wc
10792 do
10793   # Extract the first word of "$ac_prog", so it can be a program name with args.
10794 set dummy $ac_prog; ac_word=$2
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10796 $as_echo_n "checking for $ac_word... " >&6; }
10797 if ${ac_cv_path_WC+:} false; then :
10798   $as_echo_n "(cached) " >&6
10799 else
10800   case $WC in
10801   [\\/]* | ?:[\\/]*)
10802   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10803   ;;
10804   *)
10805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10806 for as_dir in $PATH
10807 do
10808   IFS=$as_save_IFS
10809   test -z "$as_dir" && as_dir=.
10810     for ac_exec_ext in '' $ac_executable_extensions; do
10811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10812     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10814     break 2
10815   fi
10816 done
10817   done
10818 IFS=$as_save_IFS
10819 
10820   ;;
10821 esac
10822 fi
10823 WC=$ac_cv_path_WC
10824 if test -n "$WC"; then
10825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10826 $as_echo "$WC" >&6; }
10827 else
10828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10829 $as_echo "no" >&6; }
10830 fi
10831 
10832 
10833   test -n "$WC" && break
10834 done
10835 
10836     else
10837       # If it succeeded, then it was overridden by the user. We will use it
10838       # for the tool.
10839 
10840       # First remove it from the list of overridden variables, so we can test
10841       # for unknown variables in the end.
10842       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10843 
10844       # Check if the provided tool contains a complete path.
10845       tool_specified="$WC"
10846       tool_basename="${tool_specified##*/}"
10847       if test "x$tool_basename" = "x$tool_specified"; then
10848         # A command without a complete path is provided, search $PATH.
10849         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10850 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10851         # Extract the first word of "$tool_basename", so it can be a program name with args.
10852 set dummy $tool_basename; ac_word=$2
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10854 $as_echo_n "checking for $ac_word... " >&6; }
10855 if ${ac_cv_path_WC+:} false; then :
10856   $as_echo_n "(cached) " >&6
10857 else
10858   case $WC in
10859   [\\/]* | ?:[\\/]*)
10860   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10861   ;;
10862   *)
10863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10864 for as_dir in $PATH
10865 do
10866   IFS=$as_save_IFS
10867   test -z "$as_dir" && as_dir=.
10868     for ac_exec_ext in '' $ac_executable_extensions; do
10869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10870     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10872     break 2
10873   fi
10874 done
10875   done
10876 IFS=$as_save_IFS
10877 
10878   ;;
10879 esac
10880 fi
10881 WC=$ac_cv_path_WC
10882 if test -n "$WC"; then
10883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10884 $as_echo "$WC" >&6; }
10885 else
10886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10887 $as_echo "no" >&6; }
10888 fi
10889 
10890 
10891         if test "x$WC" = x; then
10892           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10893         fi
10894       else
10895         # Otherwise we believe it is a complete path. Use it as it is.
10896         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10897 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10898         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10899 $as_echo_n "checking for WC... " >&6; }
10900         if test ! -x "$tool_specified"; then
10901           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10902 $as_echo "not found" >&6; }
10903           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10904         fi
10905         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10906 $as_echo "$tool_specified" >&6; }
10907       fi
10908     fi
10909   fi
10910 
10911 
10912 
10913   if test "x$WC" = x; then
10914     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10915   fi
10916 
10917 
10918 
10919 
10920 
10921   # Publish this variable in the help.
10922 
10923 
10924   if test "x$WHICH" = x; then
10925     # The variable is not set by user, try to locate tool using the code snippet
10926     for ac_prog in which
10927 do
10928   # Extract the first word of "$ac_prog", so it can be a program name with args.
10929 set dummy $ac_prog; ac_word=$2
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10931 $as_echo_n "checking for $ac_word... " >&6; }
10932 if ${ac_cv_path_WHICH+:} false; then :
10933   $as_echo_n "(cached) " >&6
10934 else
10935   case $WHICH in
10936   [\\/]* | ?:[\\/]*)
10937   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10938   ;;
10939   *)
10940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10941 for as_dir in $PATH
10942 do
10943   IFS=$as_save_IFS
10944   test -z "$as_dir" && as_dir=.
10945     for ac_exec_ext in '' $ac_executable_extensions; do
10946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10947     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10949     break 2
10950   fi
10951 done
10952   done
10953 IFS=$as_save_IFS
10954 
10955   ;;
10956 esac
10957 fi
10958 WHICH=$ac_cv_path_WHICH
10959 if test -n "$WHICH"; then
10960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10961 $as_echo "$WHICH" >&6; }
10962 else
10963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964 $as_echo "no" >&6; }
10965 fi
10966 
10967 
10968   test -n "$WHICH" && break
10969 done
10970 
10971   else
10972     # The variable is set, but is it from the command line or the environment?
10973 
10974     # Try to remove the string !WHICH! from our list.
10975     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10976     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10977       # If it failed, the variable was not from the command line. Ignore it,
10978       # but warn the user (except for BASH, which is always set by the calling BASH).
10979       if test "xWHICH" != xBASH; then
10980         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10981 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10982       fi
10983       # Try to locate tool using the code snippet
10984       for ac_prog in which
10985 do
10986   # Extract the first word of "$ac_prog", so it can be a program name with args.
10987 set dummy $ac_prog; ac_word=$2
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989 $as_echo_n "checking for $ac_word... " >&6; }
10990 if ${ac_cv_path_WHICH+:} false; then :
10991   $as_echo_n "(cached) " >&6
10992 else
10993   case $WHICH in
10994   [\\/]* | ?:[\\/]*)
10995   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10996   ;;
10997   *)
10998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10999 for as_dir in $PATH
11000 do
11001   IFS=$as_save_IFS
11002   test -z "$as_dir" && as_dir=.
11003     for ac_exec_ext in '' $ac_executable_extensions; do
11004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11005     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11007     break 2
11008   fi
11009 done
11010   done
11011 IFS=$as_save_IFS
11012 
11013   ;;
11014 esac
11015 fi
11016 WHICH=$ac_cv_path_WHICH
11017 if test -n "$WHICH"; then
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11019 $as_echo "$WHICH" >&6; }
11020 else
11021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022 $as_echo "no" >&6; }
11023 fi
11024 
11025 
11026   test -n "$WHICH" && break
11027 done
11028 
11029     else
11030       # If it succeeded, then it was overridden by the user. We will use it
11031       # for the tool.
11032 
11033       # First remove it from the list of overridden variables, so we can test
11034       # for unknown variables in the end.
11035       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11036 
11037       # Check if the provided tool contains a complete path.
11038       tool_specified="$WHICH"
11039       tool_basename="${tool_specified##*/}"
11040       if test "x$tool_basename" = "x$tool_specified"; then
11041         # A command without a complete path is provided, search $PATH.
11042         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11043 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11044         # Extract the first word of "$tool_basename", so it can be a program name with args.
11045 set dummy $tool_basename; ac_word=$2
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11047 $as_echo_n "checking for $ac_word... " >&6; }
11048 if ${ac_cv_path_WHICH+:} false; then :
11049   $as_echo_n "(cached) " >&6
11050 else
11051   case $WHICH in
11052   [\\/]* | ?:[\\/]*)
11053   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11054   ;;
11055   *)
11056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11057 for as_dir in $PATH
11058 do
11059   IFS=$as_save_IFS
11060   test -z "$as_dir" && as_dir=.
11061     for ac_exec_ext in '' $ac_executable_extensions; do
11062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11063     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11065     break 2
11066   fi
11067 done
11068   done
11069 IFS=$as_save_IFS
11070 
11071   ;;
11072 esac
11073 fi
11074 WHICH=$ac_cv_path_WHICH
11075 if test -n "$WHICH"; then
11076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11077 $as_echo "$WHICH" >&6; }
11078 else
11079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11080 $as_echo "no" >&6; }
11081 fi
11082 
11083 
11084         if test "x$WHICH" = x; then
11085           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11086         fi
11087       else
11088         # Otherwise we believe it is a complete path. Use it as it is.
11089         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11090 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11092 $as_echo_n "checking for WHICH... " >&6; }
11093         if test ! -x "$tool_specified"; then
11094           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11095 $as_echo "not found" >&6; }
11096           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11097         fi
11098         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11099 $as_echo "$tool_specified" >&6; }
11100       fi
11101     fi
11102   fi
11103 
11104 
11105 
11106   if test "x$WHICH" = x; then
11107     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11108   fi
11109 
11110 
11111 
11112 
11113 
11114   # Publish this variable in the help.
11115 
11116 
11117   if test "x$XARGS" = x; then
11118     # The variable is not set by user, try to locate tool using the code snippet
11119     for ac_prog in xargs
11120 do
11121   # Extract the first word of "$ac_prog", so it can be a program name with args.
11122 set dummy $ac_prog; ac_word=$2
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11124 $as_echo_n "checking for $ac_word... " >&6; }
11125 if ${ac_cv_path_XARGS+:} false; then :
11126   $as_echo_n "(cached) " >&6
11127 else
11128   case $XARGS in
11129   [\\/]* | ?:[\\/]*)
11130   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11131   ;;
11132   *)
11133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11134 for as_dir in $PATH
11135 do
11136   IFS=$as_save_IFS
11137   test -z "$as_dir" && as_dir=.
11138     for ac_exec_ext in '' $ac_executable_extensions; do
11139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11140     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11142     break 2
11143   fi
11144 done
11145   done
11146 IFS=$as_save_IFS
11147 
11148   ;;
11149 esac
11150 fi
11151 XARGS=$ac_cv_path_XARGS
11152 if test -n "$XARGS"; then
11153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11154 $as_echo "$XARGS" >&6; }
11155 else
11156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157 $as_echo "no" >&6; }
11158 fi
11159 
11160 
11161   test -n "$XARGS" && break
11162 done
11163 
11164   else
11165     # The variable is set, but is it from the command line or the environment?
11166 
11167     # Try to remove the string !XARGS! from our list.
11168     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11169     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11170       # If it failed, the variable was not from the command line. Ignore it,
11171       # but warn the user (except for BASH, which is always set by the calling BASH).
11172       if test "xXARGS" != xBASH; then
11173         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11174 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11175       fi
11176       # Try to locate tool using the code snippet
11177       for ac_prog in xargs
11178 do
11179   # Extract the first word of "$ac_prog", so it can be a program name with args.
11180 set dummy $ac_prog; ac_word=$2
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11182 $as_echo_n "checking for $ac_word... " >&6; }
11183 if ${ac_cv_path_XARGS+:} false; then :
11184   $as_echo_n "(cached) " >&6
11185 else
11186   case $XARGS in
11187   [\\/]* | ?:[\\/]*)
11188   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11189   ;;
11190   *)
11191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11192 for as_dir in $PATH
11193 do
11194   IFS=$as_save_IFS
11195   test -z "$as_dir" && as_dir=.
11196     for ac_exec_ext in '' $ac_executable_extensions; do
11197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11198     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11200     break 2
11201   fi
11202 done
11203   done
11204 IFS=$as_save_IFS
11205 
11206   ;;
11207 esac
11208 fi
11209 XARGS=$ac_cv_path_XARGS
11210 if test -n "$XARGS"; then
11211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11212 $as_echo "$XARGS" >&6; }
11213 else
11214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11215 $as_echo "no" >&6; }
11216 fi
11217 
11218 
11219   test -n "$XARGS" && break
11220 done
11221 
11222     else
11223       # If it succeeded, then it was overridden by the user. We will use it
11224       # for the tool.
11225 
11226       # First remove it from the list of overridden variables, so we can test
11227       # for unknown variables in the end.
11228       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11229 
11230       # Check if the provided tool contains a complete path.
11231       tool_specified="$XARGS"
11232       tool_basename="${tool_specified##*/}"
11233       if test "x$tool_basename" = "x$tool_specified"; then
11234         # A command without a complete path is provided, search $PATH.
11235         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11236 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11237         # Extract the first word of "$tool_basename", so it can be a program name with args.
11238 set dummy $tool_basename; ac_word=$2
11239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11240 $as_echo_n "checking for $ac_word... " >&6; }
11241 if ${ac_cv_path_XARGS+:} false; then :
11242   $as_echo_n "(cached) " >&6
11243 else
11244   case $XARGS in
11245   [\\/]* | ?:[\\/]*)
11246   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11247   ;;
11248   *)
11249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11250 for as_dir in $PATH
11251 do
11252   IFS=$as_save_IFS
11253   test -z "$as_dir" && as_dir=.
11254     for ac_exec_ext in '' $ac_executable_extensions; do
11255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11256     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11258     break 2
11259   fi
11260 done
11261   done
11262 IFS=$as_save_IFS
11263 
11264   ;;
11265 esac
11266 fi
11267 XARGS=$ac_cv_path_XARGS
11268 if test -n "$XARGS"; then
11269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11270 $as_echo "$XARGS" >&6; }
11271 else
11272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273 $as_echo "no" >&6; }
11274 fi
11275 
11276 
11277         if test "x$XARGS" = x; then
11278           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11279         fi
11280       else
11281         # Otherwise we believe it is a complete path. Use it as it is.
11282         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11283 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11285 $as_echo_n "checking for XARGS... " >&6; }
11286         if test ! -x "$tool_specified"; then
11287           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11288 $as_echo "not found" >&6; }
11289           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11290         fi
11291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11292 $as_echo "$tool_specified" >&6; }
11293       fi
11294     fi
11295   fi
11296 
11297 
11298 
11299   if test "x$XARGS" = x; then
11300     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11301   fi
11302 
11303 
11304 
11305   # Then required tools that require some special treatment.
11306 
11307 
11308   # Publish this variable in the help.
11309 
11310 
11311   if test "x$AWK" = x; then
11312     # The variable is not set by user, try to locate tool using the code snippet
11313     for ac_prog in gawk mawk nawk awk
11314 do
11315   # Extract the first word of "$ac_prog", so it can be a program name with args.
11316 set dummy $ac_prog; ac_word=$2
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318 $as_echo_n "checking for $ac_word... " >&6; }
11319 if ${ac_cv_prog_AWK+:} false; then :
11320   $as_echo_n "(cached) " >&6
11321 else
11322   if test -n "$AWK"; then
11323   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11324 else
11325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11326 for as_dir in $PATH
11327 do
11328   IFS=$as_save_IFS
11329   test -z "$as_dir" && as_dir=.
11330     for ac_exec_ext in '' $ac_executable_extensions; do
11331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11332     ac_cv_prog_AWK="$ac_prog"
11333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11334     break 2
11335   fi
11336 done
11337   done
11338 IFS=$as_save_IFS
11339 
11340 fi
11341 fi
11342 AWK=$ac_cv_prog_AWK
11343 if test -n "$AWK"; then
11344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11345 $as_echo "$AWK" >&6; }
11346 else
11347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11348 $as_echo "no" >&6; }
11349 fi
11350 
11351 
11352   test -n "$AWK" && break
11353 done
11354 
11355   else
11356     # The variable is set, but is it from the command line or the environment?
11357 
11358     # Try to remove the string !AWK! from our list.
11359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11361       # If it failed, the variable was not from the command line. Ignore it,
11362       # but warn the user (except for BASH, which is always set by the calling BASH).
11363       if test "xAWK" != xBASH; then
11364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11365 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11366       fi
11367       # Try to locate tool using the code snippet
11368       for ac_prog in gawk mawk nawk awk
11369 do
11370   # Extract the first word of "$ac_prog", so it can be a program name with args.
11371 set dummy $ac_prog; ac_word=$2
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11373 $as_echo_n "checking for $ac_word... " >&6; }
11374 if ${ac_cv_prog_AWK+:} false; then :
11375   $as_echo_n "(cached) " >&6
11376 else
11377   if test -n "$AWK"; then
11378   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11379 else
11380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381 for as_dir in $PATH
11382 do
11383   IFS=$as_save_IFS
11384   test -z "$as_dir" && as_dir=.
11385     for ac_exec_ext in '' $ac_executable_extensions; do
11386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387     ac_cv_prog_AWK="$ac_prog"
11388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389     break 2
11390   fi
11391 done
11392   done
11393 IFS=$as_save_IFS
11394 
11395 fi
11396 fi
11397 AWK=$ac_cv_prog_AWK
11398 if test -n "$AWK"; then
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11400 $as_echo "$AWK" >&6; }
11401 else
11402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403 $as_echo "no" >&6; }
11404 fi
11405 
11406 
11407   test -n "$AWK" && break
11408 done
11409 
11410     else
11411       # If it succeeded, then it was overridden by the user. We will use it
11412       # for the tool.
11413 
11414       # First remove it from the list of overridden variables, so we can test
11415       # for unknown variables in the end.
11416       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11417 
11418       # Check if the provided tool contains a complete path.
11419       tool_specified="$AWK"
11420       tool_basename="${tool_specified##*/}"
11421       if test "x$tool_basename" = "x$tool_specified"; then
11422         # A command without a complete path is provided, search $PATH.
11423         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11424 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11425         # Extract the first word of "$tool_basename", so it can be a program name with args.
11426 set dummy $tool_basename; ac_word=$2
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428 $as_echo_n "checking for $ac_word... " >&6; }
11429 if ${ac_cv_path_AWK+:} false; then :
11430   $as_echo_n "(cached) " >&6
11431 else
11432   case $AWK in
11433   [\\/]* | ?:[\\/]*)
11434   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11435   ;;
11436   *)
11437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438 for as_dir in $PATH
11439 do
11440   IFS=$as_save_IFS
11441   test -z "$as_dir" && as_dir=.
11442     for ac_exec_ext in '' $ac_executable_extensions; do
11443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446     break 2
11447   fi
11448 done
11449   done
11450 IFS=$as_save_IFS
11451 
11452   ;;
11453 esac
11454 fi
11455 AWK=$ac_cv_path_AWK
11456 if test -n "$AWK"; then
11457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11458 $as_echo "$AWK" >&6; }
11459 else
11460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461 $as_echo "no" >&6; }
11462 fi
11463 
11464 
11465         if test "x$AWK" = x; then
11466           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11467         fi
11468       else
11469         # Otherwise we believe it is a complete path. Use it as it is.
11470         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11471 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11472         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11473 $as_echo_n "checking for AWK... " >&6; }
11474         if test ! -x "$tool_specified"; then
11475           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11476 $as_echo "not found" >&6; }
11477           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11478         fi
11479         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11480 $as_echo "$tool_specified" >&6; }
11481       fi
11482     fi
11483   fi
11484 
11485 
11486   if test "x$AWK" = x; then
11487     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11488   fi
11489 
11490 
11491 
11492 
11493   # Publish this variable in the help.
11494 
11495 
11496   if test "x$GREP" = x; then
11497     # The variable is not set by user, try to locate tool using the code snippet
11498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11499 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11500 if ${ac_cv_path_GREP+:} false; then :
11501   $as_echo_n "(cached) " >&6
11502 else
11503   if test -z "$GREP"; then
11504   ac_path_GREP_found=false
11505   # Loop through the user's path and test for each of PROGNAME-LIST
11506   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11507 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11508 do
11509   IFS=$as_save_IFS
11510   test -z "$as_dir" && as_dir=.
11511     for ac_prog in grep ggrep; do
11512     for ac_exec_ext in '' $ac_executable_extensions; do
11513       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11514       as_fn_executable_p "$ac_path_GREP" || continue
11515 # Check for GNU ac_path_GREP and select it if it is found.
11516   # Check for GNU $ac_path_GREP
11517 case `"$ac_path_GREP" --version 2>&1` in
11518 *GNU*)
11519   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11520 *)
11521   ac_count=0
11522   $as_echo_n 0123456789 >"conftest.in"
11523   while :
11524   do
11525     cat "conftest.in" "conftest.in" >"conftest.tmp"
11526     mv "conftest.tmp" "conftest.in"
11527     cp "conftest.in" "conftest.nl"
11528     $as_echo 'GREP' >> "conftest.nl"
11529     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11530     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11531     as_fn_arith $ac_count + 1 && ac_count=$as_val
11532     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11533       # Best one so far, save it but keep looking for a better one
11534       ac_cv_path_GREP="$ac_path_GREP"
11535       ac_path_GREP_max=$ac_count
11536     fi
11537     # 10*(2^10) chars as input seems more than enough
11538     test $ac_count -gt 10 && break
11539   done
11540   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11541 esac
11542 
11543       $ac_path_GREP_found && break 3
11544     done
11545   done
11546   done
11547 IFS=$as_save_IFS
11548   if test -z "$ac_cv_path_GREP"; then
11549     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11550   fi
11551 else
11552   ac_cv_path_GREP=$GREP
11553 fi
11554 
11555 fi
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11557 $as_echo "$ac_cv_path_GREP" >&6; }
11558  GREP="$ac_cv_path_GREP"
11559 
11560 
11561   else
11562     # The variable is set, but is it from the command line or the environment?
11563 
11564     # Try to remove the string !GREP! from our list.
11565     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11566     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11567       # If it failed, the variable was not from the command line. Ignore it,
11568       # but warn the user (except for BASH, which is always set by the calling BASH).
11569       if test "xGREP" != xBASH; then
11570         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11571 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11572       fi
11573       # Try to locate tool using the code snippet
11574       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11575 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11576 if ${ac_cv_path_GREP+:} false; then :
11577   $as_echo_n "(cached) " >&6
11578 else
11579   if test -z "$GREP"; then
11580   ac_path_GREP_found=false
11581   # Loop through the user's path and test for each of PROGNAME-LIST
11582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11583 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11584 do
11585   IFS=$as_save_IFS
11586   test -z "$as_dir" && as_dir=.
11587     for ac_prog in grep ggrep; do
11588     for ac_exec_ext in '' $ac_executable_extensions; do
11589       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11590       as_fn_executable_p "$ac_path_GREP" || continue
11591 # Check for GNU ac_path_GREP and select it if it is found.
11592   # Check for GNU $ac_path_GREP
11593 case `"$ac_path_GREP" --version 2>&1` in
11594 *GNU*)
11595   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11596 *)
11597   ac_count=0
11598   $as_echo_n 0123456789 >"conftest.in"
11599   while :
11600   do
11601     cat "conftest.in" "conftest.in" >"conftest.tmp"
11602     mv "conftest.tmp" "conftest.in"
11603     cp "conftest.in" "conftest.nl"
11604     $as_echo 'GREP' >> "conftest.nl"
11605     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11606     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11607     as_fn_arith $ac_count + 1 && ac_count=$as_val
11608     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11609       # Best one so far, save it but keep looking for a better one
11610       ac_cv_path_GREP="$ac_path_GREP"
11611       ac_path_GREP_max=$ac_count
11612     fi
11613     # 10*(2^10) chars as input seems more than enough
11614     test $ac_count -gt 10 && break
11615   done
11616   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11617 esac
11618 
11619       $ac_path_GREP_found && break 3
11620     done
11621   done
11622   done
11623 IFS=$as_save_IFS
11624   if test -z "$ac_cv_path_GREP"; then
11625     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11626   fi
11627 else
11628   ac_cv_path_GREP=$GREP
11629 fi
11630 
11631 fi
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11633 $as_echo "$ac_cv_path_GREP" >&6; }
11634  GREP="$ac_cv_path_GREP"
11635 
11636 
11637     else
11638       # If it succeeded, then it was overridden by the user. We will use it
11639       # for the tool.
11640 
11641       # First remove it from the list of overridden variables, so we can test
11642       # for unknown variables in the end.
11643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11644 
11645       # Check if the provided tool contains a complete path.
11646       tool_specified="$GREP"
11647       tool_basename="${tool_specified##*/}"
11648       if test "x$tool_basename" = "x$tool_specified"; then
11649         # A command without a complete path is provided, search $PATH.
11650         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11651 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11652         # Extract the first word of "$tool_basename", so it can be a program name with args.
11653 set dummy $tool_basename; ac_word=$2
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11655 $as_echo_n "checking for $ac_word... " >&6; }
11656 if ${ac_cv_path_GREP+:} false; then :
11657   $as_echo_n "(cached) " >&6
11658 else
11659   case $GREP in
11660   [\\/]* | ?:[\\/]*)
11661   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11662   ;;
11663   *)
11664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11665 for as_dir in $PATH
11666 do
11667   IFS=$as_save_IFS
11668   test -z "$as_dir" && as_dir=.
11669     for ac_exec_ext in '' $ac_executable_extensions; do
11670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11671     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11673     break 2
11674   fi
11675 done
11676   done
11677 IFS=$as_save_IFS
11678 
11679   ;;
11680 esac
11681 fi
11682 GREP=$ac_cv_path_GREP
11683 if test -n "$GREP"; then
11684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11685 $as_echo "$GREP" >&6; }
11686 else
11687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11688 $as_echo "no" >&6; }
11689 fi
11690 
11691 
11692         if test "x$GREP" = x; then
11693           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11694         fi
11695       else
11696         # Otherwise we believe it is a complete path. Use it as it is.
11697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11698 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11700 $as_echo_n "checking for GREP... " >&6; }
11701         if test ! -x "$tool_specified"; then
11702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11703 $as_echo "not found" >&6; }
11704           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11705         fi
11706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11707 $as_echo "$tool_specified" >&6; }
11708       fi
11709     fi
11710   fi
11711 
11712 
11713   if test "x$GREP" = x; then
11714     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11715   fi
11716 
11717 
11718 
11719 
11720   # Publish this variable in the help.
11721 
11722 
11723   if test "x$EGREP" = x; then
11724     # The variable is not set by user, try to locate tool using the code snippet
11725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11726 $as_echo_n "checking for egrep... " >&6; }
11727 if ${ac_cv_path_EGREP+:} false; then :
11728   $as_echo_n "(cached) " >&6
11729 else
11730   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11731    then ac_cv_path_EGREP="$GREP -E"
11732    else
11733      if test -z "$EGREP"; then
11734   ac_path_EGREP_found=false
11735   # Loop through the user's path and test for each of PROGNAME-LIST
11736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11737 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11738 do
11739   IFS=$as_save_IFS
11740   test -z "$as_dir" && as_dir=.
11741     for ac_prog in egrep; do
11742     for ac_exec_ext in '' $ac_executable_extensions; do
11743       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11744       as_fn_executable_p "$ac_path_EGREP" || continue
11745 # Check for GNU ac_path_EGREP and select it if it is found.
11746   # Check for GNU $ac_path_EGREP
11747 case `"$ac_path_EGREP" --version 2>&1` in
11748 *GNU*)
11749   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11750 *)
11751   ac_count=0
11752   $as_echo_n 0123456789 >"conftest.in"
11753   while :
11754   do
11755     cat "conftest.in" "conftest.in" >"conftest.tmp"
11756     mv "conftest.tmp" "conftest.in"
11757     cp "conftest.in" "conftest.nl"
11758     $as_echo 'EGREP' >> "conftest.nl"
11759     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11760     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11761     as_fn_arith $ac_count + 1 && ac_count=$as_val
11762     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11763       # Best one so far, save it but keep looking for a better one
11764       ac_cv_path_EGREP="$ac_path_EGREP"
11765       ac_path_EGREP_max=$ac_count
11766     fi
11767     # 10*(2^10) chars as input seems more than enough
11768     test $ac_count -gt 10 && break
11769   done
11770   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11771 esac
11772 
11773       $ac_path_EGREP_found && break 3
11774     done
11775   done
11776   done
11777 IFS=$as_save_IFS
11778   if test -z "$ac_cv_path_EGREP"; then
11779     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11780   fi
11781 else
11782   ac_cv_path_EGREP=$EGREP
11783 fi
11784 
11785    fi
11786 fi
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11788 $as_echo "$ac_cv_path_EGREP" >&6; }
11789  EGREP="$ac_cv_path_EGREP"
11790 
11791 
11792   else
11793     # The variable is set, but is it from the command line or the environment?
11794 
11795     # Try to remove the string !EGREP! from our list.
11796     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11797     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11798       # If it failed, the variable was not from the command line. Ignore it,
11799       # but warn the user (except for BASH, which is always set by the calling BASH).
11800       if test "xEGREP" != xBASH; then
11801         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11802 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11803       fi
11804       # Try to locate tool using the code snippet
11805       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11806 $as_echo_n "checking for egrep... " >&6; }
11807 if ${ac_cv_path_EGREP+:} false; then :
11808   $as_echo_n "(cached) " >&6
11809 else
11810   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11811    then ac_cv_path_EGREP="$GREP -E"
11812    else
11813      if test -z "$EGREP"; then
11814   ac_path_EGREP_found=false
11815   # Loop through the user's path and test for each of PROGNAME-LIST
11816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11817 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11818 do
11819   IFS=$as_save_IFS
11820   test -z "$as_dir" && as_dir=.
11821     for ac_prog in egrep; do
11822     for ac_exec_ext in '' $ac_executable_extensions; do
11823       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11824       as_fn_executable_p "$ac_path_EGREP" || continue
11825 # Check for GNU ac_path_EGREP and select it if it is found.
11826   # Check for GNU $ac_path_EGREP
11827 case `"$ac_path_EGREP" --version 2>&1` in
11828 *GNU*)
11829   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11830 *)
11831   ac_count=0
11832   $as_echo_n 0123456789 >"conftest.in"
11833   while :
11834   do
11835     cat "conftest.in" "conftest.in" >"conftest.tmp"
11836     mv "conftest.tmp" "conftest.in"
11837     cp "conftest.in" "conftest.nl"
11838     $as_echo 'EGREP' >> "conftest.nl"
11839     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11840     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11841     as_fn_arith $ac_count + 1 && ac_count=$as_val
11842     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11843       # Best one so far, save it but keep looking for a better one
11844       ac_cv_path_EGREP="$ac_path_EGREP"
11845       ac_path_EGREP_max=$ac_count
11846     fi
11847     # 10*(2^10) chars as input seems more than enough
11848     test $ac_count -gt 10 && break
11849   done
11850   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11851 esac
11852 
11853       $ac_path_EGREP_found && break 3
11854     done
11855   done
11856   done
11857 IFS=$as_save_IFS
11858   if test -z "$ac_cv_path_EGREP"; then
11859     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11860   fi
11861 else
11862   ac_cv_path_EGREP=$EGREP
11863 fi
11864 
11865    fi
11866 fi
11867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11868 $as_echo "$ac_cv_path_EGREP" >&6; }
11869  EGREP="$ac_cv_path_EGREP"
11870 
11871 
11872     else
11873       # If it succeeded, then it was overridden by the user. We will use it
11874       # for the tool.
11875 
11876       # First remove it from the list of overridden variables, so we can test
11877       # for unknown variables in the end.
11878       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11879 
11880       # Check if the provided tool contains a complete path.
11881       tool_specified="$EGREP"
11882       tool_basename="${tool_specified##*/}"
11883       if test "x$tool_basename" = "x$tool_specified"; then
11884         # A command without a complete path is provided, search $PATH.
11885         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11886 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11887         # Extract the first word of "$tool_basename", so it can be a program name with args.
11888 set dummy $tool_basename; ac_word=$2
11889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11890 $as_echo_n "checking for $ac_word... " >&6; }
11891 if ${ac_cv_path_EGREP+:} false; then :
11892   $as_echo_n "(cached) " >&6
11893 else
11894   case $EGREP in
11895   [\\/]* | ?:[\\/]*)
11896   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11897   ;;
11898   *)
11899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11900 for as_dir in $PATH
11901 do
11902   IFS=$as_save_IFS
11903   test -z "$as_dir" && as_dir=.
11904     for ac_exec_ext in '' $ac_executable_extensions; do
11905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11906     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11908     break 2
11909   fi
11910 done
11911   done
11912 IFS=$as_save_IFS
11913 
11914   ;;
11915 esac
11916 fi
11917 EGREP=$ac_cv_path_EGREP
11918 if test -n "$EGREP"; then
11919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11920 $as_echo "$EGREP" >&6; }
11921 else
11922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923 $as_echo "no" >&6; }
11924 fi
11925 
11926 
11927         if test "x$EGREP" = x; then
11928           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11929         fi
11930       else
11931         # Otherwise we believe it is a complete path. Use it as it is.
11932         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11933 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11935 $as_echo_n "checking for EGREP... " >&6; }
11936         if test ! -x "$tool_specified"; then
11937           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11938 $as_echo "not found" >&6; }
11939           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11940         fi
11941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11942 $as_echo "$tool_specified" >&6; }
11943       fi
11944     fi
11945   fi
11946 
11947 
11948   if test "x$EGREP" = x; then
11949     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11950   fi
11951 
11952 
11953 
11954 
11955   # Publish this variable in the help.
11956 
11957 
11958   if test "x$FGREP" = x; then
11959     # The variable is not set by user, try to locate tool using the code snippet
11960     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11961 $as_echo_n "checking for fgrep... " >&6; }
11962 if ${ac_cv_path_FGREP+:} false; then :
11963   $as_echo_n "(cached) " >&6
11964 else
11965   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11966    then ac_cv_path_FGREP="$GREP -F"
11967    else
11968      if test -z "$FGREP"; then
11969   ac_path_FGREP_found=false
11970   # Loop through the user's path and test for each of PROGNAME-LIST
11971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11972 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11973 do
11974   IFS=$as_save_IFS
11975   test -z "$as_dir" && as_dir=.
11976     for ac_prog in fgrep; do
11977     for ac_exec_ext in '' $ac_executable_extensions; do
11978       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11979       as_fn_executable_p "$ac_path_FGREP" || continue
11980 # Check for GNU ac_path_FGREP and select it if it is found.
11981   # Check for GNU $ac_path_FGREP
11982 case `"$ac_path_FGREP" --version 2>&1` in
11983 *GNU*)
11984   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11985 *)
11986   ac_count=0
11987   $as_echo_n 0123456789 >"conftest.in"
11988   while :
11989   do
11990     cat "conftest.in" "conftest.in" >"conftest.tmp"
11991     mv "conftest.tmp" "conftest.in"
11992     cp "conftest.in" "conftest.nl"
11993     $as_echo 'FGREP' >> "conftest.nl"
11994     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11995     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11996     as_fn_arith $ac_count + 1 && ac_count=$as_val
11997     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11998       # Best one so far, save it but keep looking for a better one
11999       ac_cv_path_FGREP="$ac_path_FGREP"
12000       ac_path_FGREP_max=$ac_count
12001     fi
12002     # 10*(2^10) chars as input seems more than enough
12003     test $ac_count -gt 10 && break
12004   done
12005   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12006 esac
12007 
12008       $ac_path_FGREP_found && break 3
12009     done
12010   done
12011   done
12012 IFS=$as_save_IFS
12013   if test -z "$ac_cv_path_FGREP"; then
12014     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12015   fi
12016 else
12017   ac_cv_path_FGREP=$FGREP
12018 fi
12019 
12020    fi
12021 fi
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12023 $as_echo "$ac_cv_path_FGREP" >&6; }
12024  FGREP="$ac_cv_path_FGREP"
12025 
12026 
12027   else
12028     # The variable is set, but is it from the command line or the environment?
12029 
12030     # Try to remove the string !FGREP! from our list.
12031     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12032     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12033       # If it failed, the variable was not from the command line. Ignore it,
12034       # but warn the user (except for BASH, which is always set by the calling BASH).
12035       if test "xFGREP" != xBASH; then
12036         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12037 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12038       fi
12039       # Try to locate tool using the code snippet
12040       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12041 $as_echo_n "checking for fgrep... " >&6; }
12042 if ${ac_cv_path_FGREP+:} false; then :
12043   $as_echo_n "(cached) " >&6
12044 else
12045   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12046    then ac_cv_path_FGREP="$GREP -F"
12047    else
12048      if test -z "$FGREP"; then
12049   ac_path_FGREP_found=false
12050   # Loop through the user's path and test for each of PROGNAME-LIST
12051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12052 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12053 do
12054   IFS=$as_save_IFS
12055   test -z "$as_dir" && as_dir=.
12056     for ac_prog in fgrep; do
12057     for ac_exec_ext in '' $ac_executable_extensions; do
12058       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12059       as_fn_executable_p "$ac_path_FGREP" || continue
12060 # Check for GNU ac_path_FGREP and select it if it is found.
12061   # Check for GNU $ac_path_FGREP
12062 case `"$ac_path_FGREP" --version 2>&1` in
12063 *GNU*)
12064   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12065 *)
12066   ac_count=0
12067   $as_echo_n 0123456789 >"conftest.in"
12068   while :
12069   do
12070     cat "conftest.in" "conftest.in" >"conftest.tmp"
12071     mv "conftest.tmp" "conftest.in"
12072     cp "conftest.in" "conftest.nl"
12073     $as_echo 'FGREP' >> "conftest.nl"
12074     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12075     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12076     as_fn_arith $ac_count + 1 && ac_count=$as_val
12077     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12078       # Best one so far, save it but keep looking for a better one
12079       ac_cv_path_FGREP="$ac_path_FGREP"
12080       ac_path_FGREP_max=$ac_count
12081     fi
12082     # 10*(2^10) chars as input seems more than enough
12083     test $ac_count -gt 10 && break
12084   done
12085   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12086 esac
12087 
12088       $ac_path_FGREP_found && break 3
12089     done
12090   done
12091   done
12092 IFS=$as_save_IFS
12093   if test -z "$ac_cv_path_FGREP"; then
12094     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12095   fi
12096 else
12097   ac_cv_path_FGREP=$FGREP
12098 fi
12099 
12100    fi
12101 fi
12102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12103 $as_echo "$ac_cv_path_FGREP" >&6; }
12104  FGREP="$ac_cv_path_FGREP"
12105 
12106 
12107     else
12108       # If it succeeded, then it was overridden by the user. We will use it
12109       # for the tool.
12110 
12111       # First remove it from the list of overridden variables, so we can test
12112       # for unknown variables in the end.
12113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12114 
12115       # Check if the provided tool contains a complete path.
12116       tool_specified="$FGREP"
12117       tool_basename="${tool_specified##*/}"
12118       if test "x$tool_basename" = "x$tool_specified"; then
12119         # A command without a complete path is provided, search $PATH.
12120         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12121 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12122         # Extract the first word of "$tool_basename", so it can be a program name with args.
12123 set dummy $tool_basename; ac_word=$2
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12125 $as_echo_n "checking for $ac_word... " >&6; }
12126 if ${ac_cv_path_FGREP+:} false; then :
12127   $as_echo_n "(cached) " >&6
12128 else
12129   case $FGREP in
12130   [\\/]* | ?:[\\/]*)
12131   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12132   ;;
12133   *)
12134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12135 for as_dir in $PATH
12136 do
12137   IFS=$as_save_IFS
12138   test -z "$as_dir" && as_dir=.
12139     for ac_exec_ext in '' $ac_executable_extensions; do
12140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12141     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12143     break 2
12144   fi
12145 done
12146   done
12147 IFS=$as_save_IFS
12148 
12149   ;;
12150 esac
12151 fi
12152 FGREP=$ac_cv_path_FGREP
12153 if test -n "$FGREP"; then
12154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12155 $as_echo "$FGREP" >&6; }
12156 else
12157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12158 $as_echo "no" >&6; }
12159 fi
12160 
12161 
12162         if test "x$FGREP" = x; then
12163           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12164         fi
12165       else
12166         # Otherwise we believe it is a complete path. Use it as it is.
12167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12168 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12170 $as_echo_n "checking for FGREP... " >&6; }
12171         if test ! -x "$tool_specified"; then
12172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12173 $as_echo "not found" >&6; }
12174           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12175         fi
12176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12177 $as_echo "$tool_specified" >&6; }
12178       fi
12179     fi
12180   fi
12181 
12182 
12183   if test "x$FGREP" = x; then
12184     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12185   fi
12186 
12187 
12188 
12189 
12190   # Publish this variable in the help.
12191 
12192 
12193   if test "x$SED" = x; then
12194     # The variable is not set by user, try to locate tool using the code snippet
12195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12196 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12197 if ${ac_cv_path_SED+:} false; then :
12198   $as_echo_n "(cached) " >&6
12199 else
12200             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12201      for ac_i in 1 2 3 4 5 6 7; do
12202        ac_script="$ac_script$as_nl$ac_script"
12203      done
12204      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12205      { ac_script=; unset ac_script;}
12206      if test -z "$SED"; then
12207   ac_path_SED_found=false
12208   # Loop through the user's path and test for each of PROGNAME-LIST
12209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12210 for as_dir in $PATH
12211 do
12212   IFS=$as_save_IFS
12213   test -z "$as_dir" && as_dir=.
12214     for ac_prog in sed gsed; do
12215     for ac_exec_ext in '' $ac_executable_extensions; do
12216       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12217       as_fn_executable_p "$ac_path_SED" || continue
12218 # Check for GNU ac_path_SED and select it if it is found.
12219   # Check for GNU $ac_path_SED
12220 case `"$ac_path_SED" --version 2>&1` in
12221 *GNU*)
12222   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12223 *)
12224   ac_count=0
12225   $as_echo_n 0123456789 >"conftest.in"
12226   while :
12227   do
12228     cat "conftest.in" "conftest.in" >"conftest.tmp"
12229     mv "conftest.tmp" "conftest.in"
12230     cp "conftest.in" "conftest.nl"
12231     $as_echo '' >> "conftest.nl"
12232     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12233     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12234     as_fn_arith $ac_count + 1 && ac_count=$as_val
12235     if test $ac_count -gt ${ac_path_SED_max-0}; then
12236       # Best one so far, save it but keep looking for a better one
12237       ac_cv_path_SED="$ac_path_SED"
12238       ac_path_SED_max=$ac_count
12239     fi
12240     # 10*(2^10) chars as input seems more than enough
12241     test $ac_count -gt 10 && break
12242   done
12243   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12244 esac
12245 
12246       $ac_path_SED_found && break 3
12247     done
12248   done
12249   done
12250 IFS=$as_save_IFS
12251   if test -z "$ac_cv_path_SED"; then
12252     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12253   fi
12254 else
12255   ac_cv_path_SED=$SED
12256 fi
12257 
12258 fi
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12260 $as_echo "$ac_cv_path_SED" >&6; }
12261  SED="$ac_cv_path_SED"
12262   rm -f conftest.sed
12263 
12264   else
12265     # The variable is set, but is it from the command line or the environment?
12266 
12267     # Try to remove the string !SED! from our list.
12268     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12269     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12270       # If it failed, the variable was not from the command line. Ignore it,
12271       # but warn the user (except for BASH, which is always set by the calling BASH).
12272       if test "xSED" != xBASH; then
12273         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12274 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12275       fi
12276       # Try to locate tool using the code snippet
12277       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12278 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12279 if ${ac_cv_path_SED+:} false; then :
12280   $as_echo_n "(cached) " >&6
12281 else
12282             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12283      for ac_i in 1 2 3 4 5 6 7; do
12284        ac_script="$ac_script$as_nl$ac_script"
12285      done
12286      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12287      { ac_script=; unset ac_script;}
12288      if test -z "$SED"; then
12289   ac_path_SED_found=false
12290   # Loop through the user's path and test for each of PROGNAME-LIST
12291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12292 for as_dir in $PATH
12293 do
12294   IFS=$as_save_IFS
12295   test -z "$as_dir" && as_dir=.
12296     for ac_prog in sed gsed; do
12297     for ac_exec_ext in '' $ac_executable_extensions; do
12298       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12299       as_fn_executable_p "$ac_path_SED" || continue
12300 # Check for GNU ac_path_SED and select it if it is found.
12301   # Check for GNU $ac_path_SED
12302 case `"$ac_path_SED" --version 2>&1` in
12303 *GNU*)
12304   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12305 *)
12306   ac_count=0
12307   $as_echo_n 0123456789 >"conftest.in"
12308   while :
12309   do
12310     cat "conftest.in" "conftest.in" >"conftest.tmp"
12311     mv "conftest.tmp" "conftest.in"
12312     cp "conftest.in" "conftest.nl"
12313     $as_echo '' >> "conftest.nl"
12314     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12315     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12316     as_fn_arith $ac_count + 1 && ac_count=$as_val
12317     if test $ac_count -gt ${ac_path_SED_max-0}; then
12318       # Best one so far, save it but keep looking for a better one
12319       ac_cv_path_SED="$ac_path_SED"
12320       ac_path_SED_max=$ac_count
12321     fi
12322     # 10*(2^10) chars as input seems more than enough
12323     test $ac_count -gt 10 && break
12324   done
12325   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12326 esac
12327 
12328       $ac_path_SED_found && break 3
12329     done
12330   done
12331   done
12332 IFS=$as_save_IFS
12333   if test -z "$ac_cv_path_SED"; then
12334     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12335   fi
12336 else
12337   ac_cv_path_SED=$SED
12338 fi
12339 
12340 fi
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12342 $as_echo "$ac_cv_path_SED" >&6; }
12343  SED="$ac_cv_path_SED"
12344   rm -f conftest.sed
12345 
12346     else
12347       # If it succeeded, then it was overridden by the user. We will use it
12348       # for the tool.
12349 
12350       # First remove it from the list of overridden variables, so we can test
12351       # for unknown variables in the end.
12352       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12353 
12354       # Check if the provided tool contains a complete path.
12355       tool_specified="$SED"
12356       tool_basename="${tool_specified##*/}"
12357       if test "x$tool_basename" = "x$tool_specified"; then
12358         # A command without a complete path is provided, search $PATH.
12359         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12360 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12361         # Extract the first word of "$tool_basename", so it can be a program name with args.
12362 set dummy $tool_basename; ac_word=$2
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12364 $as_echo_n "checking for $ac_word... " >&6; }
12365 if ${ac_cv_path_SED+:} false; then :
12366   $as_echo_n "(cached) " >&6
12367 else
12368   case $SED in
12369   [\\/]* | ?:[\\/]*)
12370   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12371   ;;
12372   *)
12373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12374 for as_dir in $PATH
12375 do
12376   IFS=$as_save_IFS
12377   test -z "$as_dir" && as_dir=.
12378     for ac_exec_ext in '' $ac_executable_extensions; do
12379   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12380     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12381     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12382     break 2
12383   fi
12384 done
12385   done
12386 IFS=$as_save_IFS
12387 
12388   ;;
12389 esac
12390 fi
12391 SED=$ac_cv_path_SED
12392 if test -n "$SED"; then
12393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12394 $as_echo "$SED" >&6; }
12395 else
12396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12397 $as_echo "no" >&6; }
12398 fi
12399 
12400 
12401         if test "x$SED" = x; then
12402           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12403         fi
12404       else
12405         # Otherwise we believe it is a complete path. Use it as it is.
12406         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12407 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12409 $as_echo_n "checking for SED... " >&6; }
12410         if test ! -x "$tool_specified"; then
12411           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12412 $as_echo "not found" >&6; }
12413           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12414         fi
12415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12416 $as_echo "$tool_specified" >&6; }
12417       fi
12418     fi
12419   fi
12420 
12421 
12422   if test "x$SED" = x; then
12423     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12424   fi
12425 
12426 
12427 
12428   # Always force rm.
12429   RM="$RM -f"
12430 
12431   # pwd behaves differently on various platforms and some don't support the -L flag.
12432   # Always use the bash builtin pwd to get uniform behavior.
12433   THEPWDCMD=pwd
12434 
12435   # These are not required on all platforms
12436 
12437 
12438   # Publish this variable in the help.
12439 
12440 
12441   if test "x$CYGPATH" = x; then
12442     # The variable is not set by user, try to locate tool using the code snippet
12443     for ac_prog in cygpath
12444 do
12445   # Extract the first word of "$ac_prog", so it can be a program name with args.
12446 set dummy $ac_prog; ac_word=$2
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12448 $as_echo_n "checking for $ac_word... " >&6; }
12449 if ${ac_cv_path_CYGPATH+:} false; then :
12450   $as_echo_n "(cached) " >&6
12451 else
12452   case $CYGPATH in
12453   [\\/]* | ?:[\\/]*)
12454   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12455   ;;
12456   *)
12457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12458 for as_dir in $PATH
12459 do
12460   IFS=$as_save_IFS
12461   test -z "$as_dir" && as_dir=.
12462     for ac_exec_ext in '' $ac_executable_extensions; do
12463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12464     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12466     break 2
12467   fi
12468 done
12469   done
12470 IFS=$as_save_IFS
12471 
12472   ;;
12473 esac
12474 fi
12475 CYGPATH=$ac_cv_path_CYGPATH
12476 if test -n "$CYGPATH"; then
12477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12478 $as_echo "$CYGPATH" >&6; }
12479 else
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12481 $as_echo "no" >&6; }
12482 fi
12483 
12484 
12485   test -n "$CYGPATH" && break
12486 done
12487 
12488   else
12489     # The variable is set, but is it from the command line or the environment?
12490 
12491     # Try to remove the string !CYGPATH! from our list.
12492     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12493     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12494       # If it failed, the variable was not from the command line. Ignore it,
12495       # but warn the user (except for BASH, which is always set by the calling BASH).
12496       if test "xCYGPATH" != xBASH; then
12497         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12498 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12499       fi
12500       # Try to locate tool using the code snippet
12501       for ac_prog in cygpath
12502 do
12503   # Extract the first word of "$ac_prog", so it can be a program name with args.
12504 set dummy $ac_prog; ac_word=$2
12505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12506 $as_echo_n "checking for $ac_word... " >&6; }
12507 if ${ac_cv_path_CYGPATH+:} false; then :
12508   $as_echo_n "(cached) " >&6
12509 else
12510   case $CYGPATH in
12511   [\\/]* | ?:[\\/]*)
12512   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12513   ;;
12514   *)
12515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12516 for as_dir in $PATH
12517 do
12518   IFS=$as_save_IFS
12519   test -z "$as_dir" && as_dir=.
12520     for ac_exec_ext in '' $ac_executable_extensions; do
12521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12522     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12524     break 2
12525   fi
12526 done
12527   done
12528 IFS=$as_save_IFS
12529 
12530   ;;
12531 esac
12532 fi
12533 CYGPATH=$ac_cv_path_CYGPATH
12534 if test -n "$CYGPATH"; then
12535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12536 $as_echo "$CYGPATH" >&6; }
12537 else
12538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539 $as_echo "no" >&6; }
12540 fi
12541 
12542 
12543   test -n "$CYGPATH" && break
12544 done
12545 
12546     else
12547       # If it succeeded, then it was overridden by the user. We will use it
12548       # for the tool.
12549 
12550       # First remove it from the list of overridden variables, so we can test
12551       # for unknown variables in the end.
12552       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12553 
12554       # Check if the provided tool contains a complete path.
12555       tool_specified="$CYGPATH"
12556       tool_basename="${tool_specified##*/}"
12557       if test "x$tool_basename" = "x$tool_specified"; then
12558         # A command without a complete path is provided, search $PATH.
12559         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12560 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12561         # Extract the first word of "$tool_basename", so it can be a program name with args.
12562 set dummy $tool_basename; ac_word=$2
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12564 $as_echo_n "checking for $ac_word... " >&6; }
12565 if ${ac_cv_path_CYGPATH+:} false; then :
12566   $as_echo_n "(cached) " >&6
12567 else
12568   case $CYGPATH in
12569   [\\/]* | ?:[\\/]*)
12570   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12571   ;;
12572   *)
12573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12574 for as_dir in $PATH
12575 do
12576   IFS=$as_save_IFS
12577   test -z "$as_dir" && as_dir=.
12578     for ac_exec_ext in '' $ac_executable_extensions; do
12579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12580     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12582     break 2
12583   fi
12584 done
12585   done
12586 IFS=$as_save_IFS
12587 
12588   ;;
12589 esac
12590 fi
12591 CYGPATH=$ac_cv_path_CYGPATH
12592 if test -n "$CYGPATH"; then
12593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12594 $as_echo "$CYGPATH" >&6; }
12595 else
12596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12597 $as_echo "no" >&6; }
12598 fi
12599 
12600 
12601         if test "x$CYGPATH" = x; then
12602           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12603         fi
12604       else
12605         # Otherwise we believe it is a complete path. Use it as it is.
12606         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12607 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12608         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12609 $as_echo_n "checking for CYGPATH... " >&6; }
12610         if test ! -x "$tool_specified"; then
12611           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12612 $as_echo "not found" >&6; }
12613           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12614         fi
12615         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12616 $as_echo "$tool_specified" >&6; }
12617       fi
12618     fi
12619   fi
12620 
12621 
12622 
12623 
12624   # Publish this variable in the help.
12625 
12626 
12627   if test "x$READLINK" = x; then
12628     # The variable is not set by user, try to locate tool using the code snippet
12629     for ac_prog in greadlink readlink
12630 do
12631   # Extract the first word of "$ac_prog", so it can be a program name with args.
12632 set dummy $ac_prog; ac_word=$2
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12634 $as_echo_n "checking for $ac_word... " >&6; }
12635 if ${ac_cv_path_READLINK+:} false; then :
12636   $as_echo_n "(cached) " >&6
12637 else
12638   case $READLINK in
12639   [\\/]* | ?:[\\/]*)
12640   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12641   ;;
12642   *)
12643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12644 for as_dir in $PATH
12645 do
12646   IFS=$as_save_IFS
12647   test -z "$as_dir" && as_dir=.
12648     for ac_exec_ext in '' $ac_executable_extensions; do
12649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12650     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12652     break 2
12653   fi
12654 done
12655   done
12656 IFS=$as_save_IFS
12657 
12658   ;;
12659 esac
12660 fi
12661 READLINK=$ac_cv_path_READLINK
12662 if test -n "$READLINK"; then
12663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12664 $as_echo "$READLINK" >&6; }
12665 else
12666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667 $as_echo "no" >&6; }
12668 fi
12669 
12670 
12671   test -n "$READLINK" && break
12672 done
12673 
12674   else
12675     # The variable is set, but is it from the command line or the environment?
12676 
12677     # Try to remove the string !READLINK! from our list.
12678     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12679     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12680       # If it failed, the variable was not from the command line. Ignore it,
12681       # but warn the user (except for BASH, which is always set by the calling BASH).
12682       if test "xREADLINK" != xBASH; then
12683         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12684 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12685       fi
12686       # Try to locate tool using the code snippet
12687       for ac_prog in greadlink readlink
12688 do
12689   # Extract the first word of "$ac_prog", so it can be a program name with args.
12690 set dummy $ac_prog; ac_word=$2
12691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12692 $as_echo_n "checking for $ac_word... " >&6; }
12693 if ${ac_cv_path_READLINK+:} false; then :
12694   $as_echo_n "(cached) " >&6
12695 else
12696   case $READLINK in
12697   [\\/]* | ?:[\\/]*)
12698   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12699   ;;
12700   *)
12701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12702 for as_dir in $PATH
12703 do
12704   IFS=$as_save_IFS
12705   test -z "$as_dir" && as_dir=.
12706     for ac_exec_ext in '' $ac_executable_extensions; do
12707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12708     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12710     break 2
12711   fi
12712 done
12713   done
12714 IFS=$as_save_IFS
12715 
12716   ;;
12717 esac
12718 fi
12719 READLINK=$ac_cv_path_READLINK
12720 if test -n "$READLINK"; then
12721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12722 $as_echo "$READLINK" >&6; }
12723 else
12724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12725 $as_echo "no" >&6; }
12726 fi
12727 
12728 
12729   test -n "$READLINK" && break
12730 done
12731 
12732     else
12733       # If it succeeded, then it was overridden by the user. We will use it
12734       # for the tool.
12735 
12736       # First remove it from the list of overridden variables, so we can test
12737       # for unknown variables in the end.
12738       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12739 
12740       # Check if the provided tool contains a complete path.
12741       tool_specified="$READLINK"
12742       tool_basename="${tool_specified##*/}"
12743       if test "x$tool_basename" = "x$tool_specified"; then
12744         # A command without a complete path is provided, search $PATH.
12745         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12746 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12747         # Extract the first word of "$tool_basename", so it can be a program name with args.
12748 set dummy $tool_basename; ac_word=$2
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12750 $as_echo_n "checking for $ac_word... " >&6; }
12751 if ${ac_cv_path_READLINK+:} false; then :
12752   $as_echo_n "(cached) " >&6
12753 else
12754   case $READLINK in
12755   [\\/]* | ?:[\\/]*)
12756   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12757   ;;
12758   *)
12759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12760 for as_dir in $PATH
12761 do
12762   IFS=$as_save_IFS
12763   test -z "$as_dir" && as_dir=.
12764     for ac_exec_ext in '' $ac_executable_extensions; do
12765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12766     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12768     break 2
12769   fi
12770 done
12771   done
12772 IFS=$as_save_IFS
12773 
12774   ;;
12775 esac
12776 fi
12777 READLINK=$ac_cv_path_READLINK
12778 if test -n "$READLINK"; then
12779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12780 $as_echo "$READLINK" >&6; }
12781 else
12782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12783 $as_echo "no" >&6; }
12784 fi
12785 
12786 
12787         if test "x$READLINK" = x; then
12788           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12789         fi
12790       else
12791         # Otherwise we believe it is a complete path. Use it as it is.
12792         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12793 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12795 $as_echo_n "checking for READLINK... " >&6; }
12796         if test ! -x "$tool_specified"; then
12797           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12798 $as_echo "not found" >&6; }
12799           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12800         fi
12801         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12802 $as_echo "$tool_specified" >&6; }
12803       fi
12804     fi
12805   fi
12806 
12807 
12808 
12809 
12810   # Publish this variable in the help.
12811 
12812 
12813   if test "x$DF" = x; then
12814     # The variable is not set by user, try to locate tool using the code snippet
12815     for ac_prog in df
12816 do
12817   # Extract the first word of "$ac_prog", so it can be a program name with args.
12818 set dummy $ac_prog; ac_word=$2
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12820 $as_echo_n "checking for $ac_word... " >&6; }
12821 if ${ac_cv_path_DF+:} false; then :
12822   $as_echo_n "(cached) " >&6
12823 else
12824   case $DF in
12825   [\\/]* | ?:[\\/]*)
12826   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12827   ;;
12828   *)
12829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12830 for as_dir in $PATH
12831 do
12832   IFS=$as_save_IFS
12833   test -z "$as_dir" && as_dir=.
12834     for ac_exec_ext in '' $ac_executable_extensions; do
12835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12836     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12838     break 2
12839   fi
12840 done
12841   done
12842 IFS=$as_save_IFS
12843 
12844   ;;
12845 esac
12846 fi
12847 DF=$ac_cv_path_DF
12848 if test -n "$DF"; then
12849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12850 $as_echo "$DF" >&6; }
12851 else
12852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12853 $as_echo "no" >&6; }
12854 fi
12855 
12856 
12857   test -n "$DF" && break
12858 done
12859 
12860   else
12861     # The variable is set, but is it from the command line or the environment?
12862 
12863     # Try to remove the string !DF! from our list.
12864     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12865     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12866       # If it failed, the variable was not from the command line. Ignore it,
12867       # but warn the user (except for BASH, which is always set by the calling BASH).
12868       if test "xDF" != xBASH; then
12869         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12870 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12871       fi
12872       # Try to locate tool using the code snippet
12873       for ac_prog in df
12874 do
12875   # Extract the first word of "$ac_prog", so it can be a program name with args.
12876 set dummy $ac_prog; ac_word=$2
12877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12878 $as_echo_n "checking for $ac_word... " >&6; }
12879 if ${ac_cv_path_DF+:} false; then :
12880   $as_echo_n "(cached) " >&6
12881 else
12882   case $DF in
12883   [\\/]* | ?:[\\/]*)
12884   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12885   ;;
12886   *)
12887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12888 for as_dir in $PATH
12889 do
12890   IFS=$as_save_IFS
12891   test -z "$as_dir" && as_dir=.
12892     for ac_exec_ext in '' $ac_executable_extensions; do
12893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12894     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12896     break 2
12897   fi
12898 done
12899   done
12900 IFS=$as_save_IFS
12901 
12902   ;;
12903 esac
12904 fi
12905 DF=$ac_cv_path_DF
12906 if test -n "$DF"; then
12907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12908 $as_echo "$DF" >&6; }
12909 else
12910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12911 $as_echo "no" >&6; }
12912 fi
12913 
12914 
12915   test -n "$DF" && break
12916 done
12917 
12918     else
12919       # If it succeeded, then it was overridden by the user. We will use it
12920       # for the tool.
12921 
12922       # First remove it from the list of overridden variables, so we can test
12923       # for unknown variables in the end.
12924       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12925 
12926       # Check if the provided tool contains a complete path.
12927       tool_specified="$DF"
12928       tool_basename="${tool_specified##*/}"
12929       if test "x$tool_basename" = "x$tool_specified"; then
12930         # A command without a complete path is provided, search $PATH.
12931         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12932 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12933         # Extract the first word of "$tool_basename", so it can be a program name with args.
12934 set dummy $tool_basename; ac_word=$2
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12936 $as_echo_n "checking for $ac_word... " >&6; }
12937 if ${ac_cv_path_DF+:} false; then :
12938   $as_echo_n "(cached) " >&6
12939 else
12940   case $DF in
12941   [\\/]* | ?:[\\/]*)
12942   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12943   ;;
12944   *)
12945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12946 for as_dir in $PATH
12947 do
12948   IFS=$as_save_IFS
12949   test -z "$as_dir" && as_dir=.
12950     for ac_exec_ext in '' $ac_executable_extensions; do
12951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12952     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12954     break 2
12955   fi
12956 done
12957   done
12958 IFS=$as_save_IFS
12959 
12960   ;;
12961 esac
12962 fi
12963 DF=$ac_cv_path_DF
12964 if test -n "$DF"; then
12965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12966 $as_echo "$DF" >&6; }
12967 else
12968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12969 $as_echo "no" >&6; }
12970 fi
12971 
12972 
12973         if test "x$DF" = x; then
12974           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12975         fi
12976       else
12977         # Otherwise we believe it is a complete path. Use it as it is.
12978         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12979 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12980         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12981 $as_echo_n "checking for DF... " >&6; }
12982         if test ! -x "$tool_specified"; then
12983           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12984 $as_echo "not found" >&6; }
12985           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12986         fi
12987         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12988 $as_echo "$tool_specified" >&6; }
12989       fi
12990     fi
12991   fi
12992 
12993 
12994 
12995 
12996   # Publish this variable in the help.
12997 
12998 
12999   if test "x$SETFILE" = x; then
13000     # The variable is not set by user, try to locate tool using the code snippet
13001     for ac_prog in SetFile
13002 do
13003   # Extract the first word of "$ac_prog", so it can be a program name with args.
13004 set dummy $ac_prog; ac_word=$2
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13006 $as_echo_n "checking for $ac_word... " >&6; }
13007 if ${ac_cv_path_SETFILE+:} false; then :
13008   $as_echo_n "(cached) " >&6
13009 else
13010   case $SETFILE in
13011   [\\/]* | ?:[\\/]*)
13012   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13013   ;;
13014   *)
13015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13016 for as_dir in $PATH
13017 do
13018   IFS=$as_save_IFS
13019   test -z "$as_dir" && as_dir=.
13020     for ac_exec_ext in '' $ac_executable_extensions; do
13021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13022     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13024     break 2
13025   fi
13026 done
13027   done
13028 IFS=$as_save_IFS
13029 
13030   ;;
13031 esac
13032 fi
13033 SETFILE=$ac_cv_path_SETFILE
13034 if test -n "$SETFILE"; then
13035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13036 $as_echo "$SETFILE" >&6; }
13037 else
13038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13039 $as_echo "no" >&6; }
13040 fi
13041 
13042 
13043   test -n "$SETFILE" && break
13044 done
13045 
13046   else
13047     # The variable is set, but is it from the command line or the environment?
13048 
13049     # Try to remove the string !SETFILE! from our list.
13050     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13051     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13052       # If it failed, the variable was not from the command line. Ignore it,
13053       # but warn the user (except for BASH, which is always set by the calling BASH).
13054       if test "xSETFILE" != xBASH; then
13055         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13056 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13057       fi
13058       # Try to locate tool using the code snippet
13059       for ac_prog in SetFile
13060 do
13061   # Extract the first word of "$ac_prog", so it can be a program name with args.
13062 set dummy $ac_prog; ac_word=$2
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13064 $as_echo_n "checking for $ac_word... " >&6; }
13065 if ${ac_cv_path_SETFILE+:} false; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068   case $SETFILE in
13069   [\\/]* | ?:[\\/]*)
13070   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13071   ;;
13072   *)
13073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13074 for as_dir in $PATH
13075 do
13076   IFS=$as_save_IFS
13077   test -z "$as_dir" && as_dir=.
13078     for ac_exec_ext in '' $ac_executable_extensions; do
13079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13080     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13082     break 2
13083   fi
13084 done
13085   done
13086 IFS=$as_save_IFS
13087 
13088   ;;
13089 esac
13090 fi
13091 SETFILE=$ac_cv_path_SETFILE
13092 if test -n "$SETFILE"; then
13093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13094 $as_echo "$SETFILE" >&6; }
13095 else
13096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097 $as_echo "no" >&6; }
13098 fi
13099 
13100 
13101   test -n "$SETFILE" && break
13102 done
13103 
13104     else
13105       # If it succeeded, then it was overridden by the user. We will use it
13106       # for the tool.
13107 
13108       # First remove it from the list of overridden variables, so we can test
13109       # for unknown variables in the end.
13110       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13111 
13112       # Check if the provided tool contains a complete path.
13113       tool_specified="$SETFILE"
13114       tool_basename="${tool_specified##*/}"
13115       if test "x$tool_basename" = "x$tool_specified"; then
13116         # A command without a complete path is provided, search $PATH.
13117         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13118 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13119         # Extract the first word of "$tool_basename", so it can be a program name with args.
13120 set dummy $tool_basename; ac_word=$2
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13122 $as_echo_n "checking for $ac_word... " >&6; }
13123 if ${ac_cv_path_SETFILE+:} false; then :
13124   $as_echo_n "(cached) " >&6
13125 else
13126   case $SETFILE in
13127   [\\/]* | ?:[\\/]*)
13128   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13129   ;;
13130   *)
13131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132 for as_dir in $PATH
13133 do
13134   IFS=$as_save_IFS
13135   test -z "$as_dir" && as_dir=.
13136     for ac_exec_ext in '' $ac_executable_extensions; do
13137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140     break 2
13141   fi
13142 done
13143   done
13144 IFS=$as_save_IFS
13145 
13146   ;;
13147 esac
13148 fi
13149 SETFILE=$ac_cv_path_SETFILE
13150 if test -n "$SETFILE"; then
13151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13152 $as_echo "$SETFILE" >&6; }
13153 else
13154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155 $as_echo "no" >&6; }
13156 fi
13157 
13158 
13159         if test "x$SETFILE" = x; then
13160           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13161         fi
13162       else
13163         # Otherwise we believe it is a complete path. Use it as it is.
13164         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13165 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13166         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13167 $as_echo_n "checking for SETFILE... " >&6; }
13168         if test ! -x "$tool_specified"; then
13169           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13170 $as_echo "not found" >&6; }
13171           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13172         fi
13173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13174 $as_echo "$tool_specified" >&6; }
13175       fi
13176     fi
13177   fi
13178 
13179 
13180 
13181 
13182   # Publish this variable in the help.
13183 
13184 
13185   if test "x$CPIO" = x; then
13186     # The variable is not set by user, try to locate tool using the code snippet
13187     for ac_prog in cpio bsdcpio
13188 do
13189   # Extract the first word of "$ac_prog", so it can be a program name with args.
13190 set dummy $ac_prog; ac_word=$2
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13192 $as_echo_n "checking for $ac_word... " >&6; }
13193 if ${ac_cv_path_CPIO+:} false; then :
13194   $as_echo_n "(cached) " >&6
13195 else
13196   case $CPIO in
13197   [\\/]* | ?:[\\/]*)
13198   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13199   ;;
13200   *)
13201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13202 for as_dir in $PATH
13203 do
13204   IFS=$as_save_IFS
13205   test -z "$as_dir" && as_dir=.
13206     for ac_exec_ext in '' $ac_executable_extensions; do
13207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13208     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13210     break 2
13211   fi
13212 done
13213   done
13214 IFS=$as_save_IFS
13215 
13216   ;;
13217 esac
13218 fi
13219 CPIO=$ac_cv_path_CPIO
13220 if test -n "$CPIO"; then
13221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13222 $as_echo "$CPIO" >&6; }
13223 else
13224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13225 $as_echo "no" >&6; }
13226 fi
13227 
13228 
13229   test -n "$CPIO" && break
13230 done
13231 
13232   else
13233     # The variable is set, but is it from the command line or the environment?
13234 
13235     # Try to remove the string !CPIO! from our list.
13236     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13237     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13238       # If it failed, the variable was not from the command line. Ignore it,
13239       # but warn the user (except for BASH, which is always set by the calling BASH).
13240       if test "xCPIO" != xBASH; then
13241         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13242 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13243       fi
13244       # Try to locate tool using the code snippet
13245       for ac_prog in cpio bsdcpio
13246 do
13247   # Extract the first word of "$ac_prog", so it can be a program name with args.
13248 set dummy $ac_prog; ac_word=$2
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13250 $as_echo_n "checking for $ac_word... " >&6; }
13251 if ${ac_cv_path_CPIO+:} false; then :
13252   $as_echo_n "(cached) " >&6
13253 else
13254   case $CPIO in
13255   [\\/]* | ?:[\\/]*)
13256   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13257   ;;
13258   *)
13259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13260 for as_dir in $PATH
13261 do
13262   IFS=$as_save_IFS
13263   test -z "$as_dir" && as_dir=.
13264     for ac_exec_ext in '' $ac_executable_extensions; do
13265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13266     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13268     break 2
13269   fi
13270 done
13271   done
13272 IFS=$as_save_IFS
13273 
13274   ;;
13275 esac
13276 fi
13277 CPIO=$ac_cv_path_CPIO
13278 if test -n "$CPIO"; then
13279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13280 $as_echo "$CPIO" >&6; }
13281 else
13282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13283 $as_echo "no" >&6; }
13284 fi
13285 
13286 
13287   test -n "$CPIO" && break
13288 done
13289 
13290     else
13291       # If it succeeded, then it was overridden by the user. We will use it
13292       # for the tool.
13293 
13294       # First remove it from the list of overridden variables, so we can test
13295       # for unknown variables in the end.
13296       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13297 
13298       # Check if the provided tool contains a complete path.
13299       tool_specified="$CPIO"
13300       tool_basename="${tool_specified##*/}"
13301       if test "x$tool_basename" = "x$tool_specified"; then
13302         # A command without a complete path is provided, search $PATH.
13303         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13304 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13305         # Extract the first word of "$tool_basename", so it can be a program name with args.
13306 set dummy $tool_basename; ac_word=$2
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13308 $as_echo_n "checking for $ac_word... " >&6; }
13309 if ${ac_cv_path_CPIO+:} false; then :
13310   $as_echo_n "(cached) " >&6
13311 else
13312   case $CPIO in
13313   [\\/]* | ?:[\\/]*)
13314   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13315   ;;
13316   *)
13317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13318 for as_dir in $PATH
13319 do
13320   IFS=$as_save_IFS
13321   test -z "$as_dir" && as_dir=.
13322     for ac_exec_ext in '' $ac_executable_extensions; do
13323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13324     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13326     break 2
13327   fi
13328 done
13329   done
13330 IFS=$as_save_IFS
13331 
13332   ;;
13333 esac
13334 fi
13335 CPIO=$ac_cv_path_CPIO
13336 if test -n "$CPIO"; then
13337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13338 $as_echo "$CPIO" >&6; }
13339 else
13340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13341 $as_echo "no" >&6; }
13342 fi
13343 
13344 
13345         if test "x$CPIO" = x; then
13346           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13347         fi
13348       else
13349         # Otherwise we believe it is a complete path. Use it as it is.
13350         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13351 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13353 $as_echo_n "checking for CPIO... " >&6; }
13354         if test ! -x "$tool_specified"; then
13355           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13356 $as_echo "not found" >&6; }
13357           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13358         fi
13359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13360 $as_echo "$tool_specified" >&6; }
13361       fi
13362     fi
13363   fi
13364 
13365 
13366 
13367 
13368 # Now we can determine OpenJDK build and target platforms. This is required to
13369 # have early on.
13370 # Make sure we can run config.sub.
13371 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13372   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13373 
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13375 $as_echo_n "checking build system type... " >&6; }
13376 if ${ac_cv_build+:} false; then :
13377   $as_echo_n "(cached) " >&6
13378 else
13379   ac_build_alias=$build_alias
13380 test "x$ac_build_alias" = x &&
13381   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13382 test "x$ac_build_alias" = x &&
13383   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13384 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13385   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13386 
13387 fi
13388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13389 $as_echo "$ac_cv_build" >&6; }
13390 case $ac_cv_build in
13391 *-*-*) ;;
13392 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13393 esac
13394 build=$ac_cv_build
13395 ac_save_IFS=$IFS; IFS='-'
13396 set x $ac_cv_build
13397 shift
13398 build_cpu=$1
13399 build_vendor=$2
13400 shift; shift
13401 # Remember, the first character of IFS is used to create $*,
13402 # except with old shells:
13403 build_os=$*
13404 IFS=$ac_save_IFS
13405 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13406 
13407 
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13409 $as_echo_n "checking host system type... " >&6; }
13410 if ${ac_cv_host+:} false; then :
13411   $as_echo_n "(cached) " >&6
13412 else
13413   if test "x$host_alias" = x; then
13414   ac_cv_host=$ac_cv_build
13415 else
13416   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13417     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13418 fi
13419 
13420 fi
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13422 $as_echo "$ac_cv_host" >&6; }
13423 case $ac_cv_host in
13424 *-*-*) ;;
13425 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13426 esac
13427 host=$ac_cv_host
13428 ac_save_IFS=$IFS; IFS='-'
13429 set x $ac_cv_host
13430 shift
13431 host_cpu=$1
13432 host_vendor=$2
13433 shift; shift
13434 # Remember, the first character of IFS is used to create $*,
13435 # except with old shells:
13436 host_os=$*
13437 IFS=$ac_save_IFS
13438 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13439 
13440 
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13442 $as_echo_n "checking target system type... " >&6; }
13443 if ${ac_cv_target+:} false; then :
13444   $as_echo_n "(cached) " >&6
13445 else
13446   if test "x$target_alias" = x; then
13447   ac_cv_target=$ac_cv_host
13448 else
13449   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13450     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13451 fi
13452 
13453 fi
13454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13455 $as_echo "$ac_cv_target" >&6; }
13456 case $ac_cv_target in
13457 *-*-*) ;;
13458 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13459 esac
13460 target=$ac_cv_target
13461 ac_save_IFS=$IFS; IFS='-'
13462 set x $ac_cv_target
13463 shift
13464 target_cpu=$1
13465 target_vendor=$2
13466 shift; shift
13467 # Remember, the first character of IFS is used to create $*,
13468 # except with old shells:
13469 target_os=$*
13470 IFS=$ac_save_IFS
13471 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13472 
13473 
13474 # The aliases save the names the user supplied, while $host etc.
13475 # will get canonicalized.
13476 test -n "$target_alias" &&
13477   test "$program_prefix$program_suffix$program_transform_name" = \
13478     NONENONEs,x,x, &&
13479   program_prefix=${target_alias}-
13480 
13481   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13482   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13483   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13484   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13485   # to use the configure naming style.
13486 
13487 
13488 
13489 
13490 
13491   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13492   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13493   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13494   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13495   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13496   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13497 
13498 
13499 
13500   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13501 
13502   case "$build_os" in
13503     *linux*)
13504       VAR_OS=linux
13505       VAR_OS_API=posix
13506       VAR_OS_ENV=linux
13507       ;;
13508     *solaris*)
13509       VAR_OS=solaris
13510       VAR_OS_API=posix
13511       VAR_OS_ENV=solaris
13512       ;;
13513     *darwin*)
13514       VAR_OS=macosx
13515       VAR_OS_API=posix
13516       VAR_OS_ENV=macosx
13517       ;;
13518     *bsd*)
13519       VAR_OS=bsd
13520       VAR_OS_API=posix
13521       VAR_OS_ENV=bsd
13522       ;;
13523     *cygwin*)
13524       VAR_OS=windows
13525       VAR_OS_API=winapi
13526       VAR_OS_ENV=windows.cygwin
13527       ;;
13528     *mingw*)
13529       VAR_OS=windows
13530       VAR_OS_API=winapi
13531       VAR_OS_ENV=windows.msys
13532       ;;
13533     *aix*)
13534       VAR_OS=aix
13535       VAR_OS_API=posix
13536       VAR_OS_ENV=aix
13537       ;;
13538     *)
13539       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13540       ;;
13541   esac
13542 
13543 
13544   # First argument is the cpu name from the trip/quad
13545   case "$build_cpu" in
13546     x86_64)
13547       VAR_CPU=x86_64
13548       VAR_CPU_ARCH=x86
13549       VAR_CPU_BITS=64
13550       VAR_CPU_ENDIAN=little
13551       ;;
13552     i?86)
13553       VAR_CPU=x86
13554       VAR_CPU_ARCH=x86
13555       VAR_CPU_BITS=32
13556       VAR_CPU_ENDIAN=little
13557       ;;
13558     arm*)
13559       VAR_CPU=arm
13560       VAR_CPU_ARCH=arm
13561       VAR_CPU_BITS=32
13562       VAR_CPU_ENDIAN=little
13563       ;;
13564     aarch64)
13565       VAR_CPU=aarch64
13566       VAR_CPU_ARCH=aarch64
13567       VAR_CPU_BITS=64
13568       VAR_CPU_ENDIAN=little
13569       ;;
13570     powerpc)
13571       VAR_CPU=ppc
13572       VAR_CPU_ARCH=ppc
13573       VAR_CPU_BITS=32
13574       VAR_CPU_ENDIAN=big
13575       ;;
13576     powerpc64)
13577       VAR_CPU=ppc64
13578       VAR_CPU_ARCH=ppc
13579       VAR_CPU_BITS=64
13580       VAR_CPU_ENDIAN=big
13581       ;;
13582     powerpc64le)
13583       VAR_CPU=ppc64
13584       VAR_CPU_ARCH=ppc
13585       VAR_CPU_BITS=64
13586       VAR_CPU_ENDIAN=little
13587       ;;
13588     s390)
13589       VAR_CPU=s390
13590       VAR_CPU_ARCH=s390
13591       VAR_CPU_BITS=32
13592       VAR_CPU_ENDIAN=big
13593       ;;
13594     s390x)
13595       VAR_CPU=s390x
13596       VAR_CPU_ARCH=s390
13597       VAR_CPU_BITS=64
13598       VAR_CPU_ENDIAN=big
13599       ;;
13600     sparc)
13601       VAR_CPU=sparc
13602       VAR_CPU_ARCH=sparc
13603       VAR_CPU_BITS=32
13604       VAR_CPU_ENDIAN=big
13605       ;;
13606     sparcv9|sparc64)
13607       VAR_CPU=sparcv9
13608       VAR_CPU_ARCH=sparc
13609       VAR_CPU_BITS=64
13610       VAR_CPU_ENDIAN=big
13611       ;;
13612     *)
13613       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13614       ;;
13615   esac
13616 
13617   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13618   OPENJDK_BUILD_OS="$VAR_OS"
13619   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13620   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13621   OPENJDK_BUILD_CPU="$VAR_CPU"
13622   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13623   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13624   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13625 
13626 
13627 
13628 
13629 
13630 
13631 
13632 
13633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13634 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13636 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13637 
13638   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13639 
13640   case "$host_os" in
13641     *linux*)
13642       VAR_OS=linux
13643       VAR_OS_API=posix
13644       VAR_OS_ENV=linux
13645       ;;
13646     *solaris*)
13647       VAR_OS=solaris
13648       VAR_OS_API=posix
13649       VAR_OS_ENV=solaris
13650       ;;
13651     *darwin*)
13652       VAR_OS=macosx
13653       VAR_OS_API=posix
13654       VAR_OS_ENV=macosx
13655       ;;
13656     *bsd*)
13657       VAR_OS=bsd
13658       VAR_OS_API=posix
13659       VAR_OS_ENV=bsd
13660       ;;
13661     *cygwin*)
13662       VAR_OS=windows
13663       VAR_OS_API=winapi
13664       VAR_OS_ENV=windows.cygwin
13665       ;;
13666     *mingw*)
13667       VAR_OS=windows
13668       VAR_OS_API=winapi
13669       VAR_OS_ENV=windows.msys
13670       ;;
13671     *aix*)
13672       VAR_OS=aix
13673       VAR_OS_API=posix
13674       VAR_OS_ENV=aix
13675       ;;
13676     *)
13677       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13678       ;;
13679   esac
13680 
13681 
13682   # First argument is the cpu name from the trip/quad
13683   case "$host_cpu" in
13684     x86_64)
13685       VAR_CPU=x86_64
13686       VAR_CPU_ARCH=x86
13687       VAR_CPU_BITS=64
13688       VAR_CPU_ENDIAN=little
13689       ;;
13690     i?86)
13691       VAR_CPU=x86
13692       VAR_CPU_ARCH=x86
13693       VAR_CPU_BITS=32
13694       VAR_CPU_ENDIAN=little
13695       ;;
13696     arm*)
13697       VAR_CPU=arm
13698       VAR_CPU_ARCH=arm
13699       VAR_CPU_BITS=32
13700       VAR_CPU_ENDIAN=little
13701       ;;
13702     aarch64)
13703       VAR_CPU=aarch64
13704       VAR_CPU_ARCH=aarch64
13705       VAR_CPU_BITS=64
13706       VAR_CPU_ENDIAN=little
13707       ;;
13708     powerpc)
13709       VAR_CPU=ppc
13710       VAR_CPU_ARCH=ppc
13711       VAR_CPU_BITS=32
13712       VAR_CPU_ENDIAN=big
13713       ;;
13714     powerpc64)
13715       VAR_CPU=ppc64
13716       VAR_CPU_ARCH=ppc
13717       VAR_CPU_BITS=64
13718       VAR_CPU_ENDIAN=big
13719       ;;
13720     powerpc64le)
13721       VAR_CPU=ppc64
13722       VAR_CPU_ARCH=ppc
13723       VAR_CPU_BITS=64
13724       VAR_CPU_ENDIAN=little
13725       ;;
13726     s390)
13727       VAR_CPU=s390
13728       VAR_CPU_ARCH=s390
13729       VAR_CPU_BITS=32
13730       VAR_CPU_ENDIAN=big
13731       ;;
13732     s390x)
13733       VAR_CPU=s390x
13734       VAR_CPU_ARCH=s390
13735       VAR_CPU_BITS=64
13736       VAR_CPU_ENDIAN=big
13737       ;;
13738     sparc)
13739       VAR_CPU=sparc
13740       VAR_CPU_ARCH=sparc
13741       VAR_CPU_BITS=32
13742       VAR_CPU_ENDIAN=big
13743       ;;
13744     sparcv9|sparc64)
13745       VAR_CPU=sparcv9
13746       VAR_CPU_ARCH=sparc
13747       VAR_CPU_BITS=64
13748       VAR_CPU_ENDIAN=big
13749       ;;
13750     *)
13751       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13752       ;;
13753   esac
13754 
13755   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13756   OPENJDK_TARGET_OS="$VAR_OS"
13757   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13758   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13759   OPENJDK_TARGET_CPU="$VAR_CPU"
13760   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13761   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13762   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13763 
13764 
13765 
13766 
13767 
13768 
13769 
13770 
13771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13772 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13774 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13775 
13776 
13777 
13778 # Check whether --with-target-bits was given.
13779 if test "${with_target_bits+set}" = set; then :
13780   withval=$with_target_bits;
13781 fi
13782 
13783 
13784   # We have three types of compiles:
13785   # native  == normal compilation, target system == build system
13786   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13787   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13788   #
13789   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13790     # We're doing a proper cross-compilation
13791     COMPILE_TYPE="cross"
13792   else
13793     COMPILE_TYPE="native"
13794   fi
13795 
13796   if test "x$with_target_bits" != x; then
13797     if test "x$COMPILE_TYPE" = "xcross"; then
13798       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13799     fi
13800 
13801     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13802       # A reduced build is requested
13803       COMPILE_TYPE="reduced"
13804       OPENJDK_TARGET_CPU_BITS=32
13805       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13806         OPENJDK_TARGET_CPU=x86
13807       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13808         OPENJDK_TARGET_CPU=sparc
13809       else
13810         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13811       fi
13812     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13813       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
13814     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13815       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13816 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13817     else
13818       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13819     fi
13820   fi
13821 
13822 
13823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13824 $as_echo_n "checking compilation type... " >&6; }
13825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13826 $as_echo "$COMPILE_TYPE" >&6; }
13827 
13828 
13829   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13830     REQUIRED_OS_NAME=SunOS
13831     REQUIRED_OS_VERSION=5.10
13832   fi
13833   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13834     REQUIRED_OS_NAME=Linux
13835     REQUIRED_OS_VERSION=2.6
13836   fi
13837   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13838     REQUIRED_OS_NAME=Windows
13839     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13840       REQUIRED_OS_VERSION=5.2
13841     else
13842       REQUIRED_OS_VERSION=5.1
13843     fi
13844   fi
13845   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13846     REQUIRED_OS_NAME=Darwin
13847     REQUIRED_OS_VERSION=11.2
13848   fi
13849 
13850 
13851 
13852 
13853 
13854   # Also store the legacy naming of the cpu.
13855   # Ie i586 and amd64 instead of x86 and x86_64
13856   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13857   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13858     OPENJDK_TARGET_CPU_LEGACY="i586"
13859   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13860     # On all platforms except MacOSX replace x86_64 with amd64.
13861     OPENJDK_TARGET_CPU_LEGACY="amd64"
13862   fi
13863 
13864 
13865   # And the second legacy naming of the cpu.
13866   # Ie i386 and amd64 instead of x86 and x86_64.
13867   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13868   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13869     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13870   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13871     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13872   fi
13873 
13874 
13875   # This is the name of the cpu (but using i386 and amd64 instead of
13876   # x86 and x86_64, respectively), preceeded by a /, to be used when
13877   # locating libraries. On macosx, it's empty, though.
13878   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13879   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13880     OPENJDK_TARGET_CPU_LIBDIR=""
13881   fi
13882 
13883 
13884   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13885   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13886   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13887   OPENJDK_TARGET_CPU_ISADIR=""
13888   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13889     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13890       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13891     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13892       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13893     fi
13894   fi
13895 
13896 
13897   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13898   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13899   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13900     # On linux only, we replace x86 with i386.
13901     OPENJDK_TARGET_CPU_OSARCH="i386"
13902   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13903     # On all platforms except macosx, we replace x86_64 with amd64.
13904     OPENJDK_TARGET_CPU_OSARCH="amd64"
13905   fi
13906 
13907 
13908   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13909   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13910     OPENJDK_TARGET_CPU_JLI="i386"
13911   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13912     # On all platforms except macosx, we replace x86_64 with amd64.
13913     OPENJDK_TARGET_CPU_JLI="amd64"
13914   fi
13915   # Now setup the -D flags for building libjli.
13916   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13917   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13918     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13919       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13920     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13921       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13922     fi
13923   fi
13924 
13925 
13926   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13927   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13928     OPENJDK_TARGET_OS_API_DIR="solaris"
13929   fi
13930   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13931     OPENJDK_TARGET_OS_API_DIR="windows"
13932   fi
13933 
13934 
13935   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13936       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13937   else
13938       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13939   fi
13940 
13941 
13942   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13943     A_LP64="LP64:="
13944     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13945     # unpack200.exe
13946     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13947       ADD_LP64="-D_LP64=1"
13948     fi
13949   fi
13950   LP64=$A_LP64
13951 
13952 
13953   if test "x$COMPILE_TYPE" = "xcross"; then
13954     # FIXME: ... or should this include reduced builds..?
13955     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13956   else
13957     DEFINE_CROSS_COMPILE_ARCH=""
13958   fi
13959 
13960 
13961   # ZERO_ARCHDEF is used to enable architecture-specific code
13962   case "${OPENJDK_TARGET_CPU}" in
13963     ppc)     ZERO_ARCHDEF=PPC32 ;;
13964     ppc64)   ZERO_ARCHDEF=PPC64 ;;
13965     s390*)   ZERO_ARCHDEF=S390  ;;
13966     sparc*)  ZERO_ARCHDEF=SPARC ;;
13967     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13968     x86)     ZERO_ARCHDEF=IA32  ;;
13969     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13970   esac
13971 
13972 
13973 
13974 
13975 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13976 
13977   # Save the current directory this script was started from
13978   CURDIR="$PWD"
13979 
13980   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13981     PATH_SEP=";"
13982 
13983   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13984   if test $SRC_ROOT_LENGTH -gt 100; then
13985     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13986   fi
13987 
13988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13989     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13990 $as_echo_n "checking cygwin release... " >&6; }
13991     CYGWIN_VERSION=`$UNAME -r`
13992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13993 $as_echo "$CYGWIN_VERSION" >&6; }
13994     WINDOWS_ENV_VENDOR='cygwin'
13995     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13996 
13997     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13998     if test "x$CYGWIN_VERSION_OLD" != x; then
13999       { $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
14000 $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;}
14001       as_fn_error $? "Cannot continue" "$LINENO" 5
14002     fi
14003     if test "x$CYGPATH" = x; then
14004       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14005     fi
14006     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14007 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14008     # The cmd output ends with Windows line endings (CR/LF)
14009     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
14010     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14011     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14012     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14013 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14014     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14015     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14016     if test "x$test_cygdrive_prefix" = x; then
14017       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14018     fi
14019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14021 $as_echo_n "checking msys release... " >&6; }
14022     MSYS_VERSION=`$UNAME -r`
14023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14024 $as_echo "$MSYS_VERSION" >&6; }
14025 
14026     WINDOWS_ENV_VENDOR='msys'
14027     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14028 
14029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14030 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14031     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14032     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14033 
14034   windows_path="$MSYS_ROOT_PATH"
14035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14036     unix_path=`$CYGPATH -u "$windows_path"`
14037     MSYS_ROOT_PATH="$unix_path"
14038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14040     MSYS_ROOT_PATH="$unix_path"
14041   fi
14042 
14043     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14044 $as_echo "$MSYS_ROOT_PATH" >&6; }
14045     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14046   else
14047     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14048   fi
14049 
14050   # Test if windows or unix (cygwin/msys) find is first in path.
14051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14052 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14053   FIND_BINARY_OUTPUT=`find --version 2>&1`
14054   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14056 $as_echo "unix style" >&6; }
14057   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14058     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14059 $as_echo "Windows" >&6; }
14060     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14061 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14062     { $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
14063 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14064     as_fn_error $? "Cannot continue" "$LINENO" 5
14065   else
14066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14067 $as_echo "unknown" >&6; }
14068     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14069 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14070   fi
14071 
14072   else
14073     PATH_SEP=":"
14074   fi
14075 
14076 
14077   # We get the top-level directory from the supporting wrappers.
14078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14079 $as_echo_n "checking for top-level directory... " >&6; }
14080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14081 $as_echo "$TOPDIR" >&6; }
14082 
14083 
14084   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14085 
14086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14087 
14088   # Input might be given as Windows format, start by converting to
14089   # unix format.
14090   path="$CURDIR"
14091   new_path=`$CYGPATH -u "$path"`
14092 
14093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14096   # "foo.exe" is OK but "foo" is an error.
14097   #
14098   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14099   # It is also a way to make sure we got the proper file name for the real test later on.
14100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14101   if test "x$test_shortpath" = x; then
14102     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14103 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14104     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14105   fi
14106 
14107   # Call helper function which possibly converts this using DOS-style short mode.
14108   # If so, the updated path is stored in $new_path.
14109 
14110   input_path="$new_path"
14111   # Check if we need to convert this using DOS-style short mode. If the path
14112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14113   # take no chances and rewrite it.
14114   # Note: m4 eats our [], so we need to use [ and ] instead.
14115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14116   if test "x$has_forbidden_chars" != x; then
14117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14118     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14119     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14120     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14121       # Going to short mode and back again did indeed matter. Since short mode is
14122       # case insensitive, let's make it lowercase to improve readability.
14123       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14124       # Now convert it back to Unix-style (cygpath)
14125       input_path=`$CYGPATH -u "$shortmode_path"`
14126       new_path="$input_path"
14127     fi
14128   fi
14129 
14130   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14131   if test "x$test_cygdrive_prefix" = x; then
14132     # As a simple fix, exclude /usr/bin since it's not a real path.
14133     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14134       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14135       # a path prefixed by /cygdrive for fixpath to work.
14136       new_path="$CYGWIN_ROOT_PATH$input_path"
14137     fi
14138   fi
14139 
14140 
14141   if test "x$path" != "x$new_path"; then
14142     CURDIR="$new_path"
14143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14144 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14145   fi
14146 
14147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14148 
14149   path="$CURDIR"
14150   has_colon=`$ECHO $path | $GREP ^.:`
14151   new_path="$path"
14152   if test "x$has_colon" = x; then
14153     # Not in mixed or Windows style, start by that.
14154     new_path=`cmd //c echo $path`
14155   fi
14156 
14157 
14158   input_path="$new_path"
14159   # Check if we need to convert this using DOS-style short mode. If the path
14160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14161   # take no chances and rewrite it.
14162   # Note: m4 eats our [], so we need to use [ and ] instead.
14163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14164   if test "x$has_forbidden_chars" != x; then
14165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14166     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14167   fi
14168 
14169 
14170   windows_path="$new_path"
14171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14172     unix_path=`$CYGPATH -u "$windows_path"`
14173     new_path="$unix_path"
14174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14176     new_path="$unix_path"
14177   fi
14178 
14179   if test "x$path" != "x$new_path"; then
14180     CURDIR="$new_path"
14181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14182 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14183   fi
14184 
14185   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14186   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14187 
14188   else
14189     # We're on a posix platform. Hooray! :)
14190     path="$CURDIR"
14191     has_space=`$ECHO "$path" | $GREP " "`
14192     if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
14196     fi
14197 
14198     # Use eval to expand a potential ~
14199     eval path="$path"
14200     if test ! -f "$path" && test ! -d "$path"; then
14201       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14202     fi
14203 
14204     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14205   fi
14206 
14207 
14208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14209 
14210   # Input might be given as Windows format, start by converting to
14211   # unix format.
14212   path="$TOPDIR"
14213   new_path=`$CYGPATH -u "$path"`
14214 
14215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14218   # "foo.exe" is OK but "foo" is an error.
14219   #
14220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14221   # It is also a way to make sure we got the proper file name for the real test later on.
14222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14223   if test "x$test_shortpath" = x; then
14224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14225 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14226     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14227   fi
14228 
14229   # Call helper function which possibly converts this using DOS-style short mode.
14230   # If so, the updated path is stored in $new_path.
14231 
14232   input_path="$new_path"
14233   # Check if we need to convert this using DOS-style short mode. If the path
14234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14235   # take no chances and rewrite it.
14236   # Note: m4 eats our [], so we need to use [ and ] instead.
14237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14238   if test "x$has_forbidden_chars" != x; then
14239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14243       # Going to short mode and back again did indeed matter. Since short mode is
14244       # case insensitive, let's make it lowercase to improve readability.
14245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14246       # Now convert it back to Unix-style (cygpath)
14247       input_path=`$CYGPATH -u "$shortmode_path"`
14248       new_path="$input_path"
14249     fi
14250   fi
14251 
14252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14253   if test "x$test_cygdrive_prefix" = x; then
14254     # As a simple fix, exclude /usr/bin since it's not a real path.
14255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14257       # a path prefixed by /cygdrive for fixpath to work.
14258       new_path="$CYGWIN_ROOT_PATH$input_path"
14259     fi
14260   fi
14261 
14262 
14263   if test "x$path" != "x$new_path"; then
14264     TOPDIR="$new_path"
14265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14266 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14267   fi
14268 
14269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14270 
14271   path="$TOPDIR"
14272   has_colon=`$ECHO $path | $GREP ^.:`
14273   new_path="$path"
14274   if test "x$has_colon" = x; then
14275     # Not in mixed or Windows style, start by that.
14276     new_path=`cmd //c echo $path`
14277   fi
14278 
14279 
14280   input_path="$new_path"
14281   # Check if we need to convert this using DOS-style short mode. If the path
14282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14283   # take no chances and rewrite it.
14284   # Note: m4 eats our [], so we need to use [ and ] instead.
14285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14286   if test "x$has_forbidden_chars" != x; then
14287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14289   fi
14290 
14291 
14292   windows_path="$new_path"
14293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14294     unix_path=`$CYGPATH -u "$windows_path"`
14295     new_path="$unix_path"
14296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14298     new_path="$unix_path"
14299   fi
14300 
14301   if test "x$path" != "x$new_path"; then
14302     TOPDIR="$new_path"
14303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14304 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14305   fi
14306 
14307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14309 
14310   else
14311     # We're on a posix platform. Hooray! :)
14312     path="$TOPDIR"
14313     has_space=`$ECHO "$path" | $GREP " "`
14314     if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
14318     fi
14319 
14320     # Use eval to expand a potential ~
14321     eval path="$path"
14322     if test ! -f "$path" && test ! -d "$path"; then
14323       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14324     fi
14325 
14326     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14327   fi
14328 
14329   # SRC_ROOT is a traditional alias for TOPDIR.
14330   SRC_ROOT=$TOPDIR
14331 
14332   # Locate the directory of this script.
14333   AUTOCONF_DIR=$TOPDIR/common/autoconf
14334 
14335 
14336   # Setup default logging of stdout and stderr to build.log in the output root.
14337   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14338   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14339   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14340 
14341 
14342 
14343 
14344 
14345 # Check if it's a pure open build or if custom sources are to be used.
14346 
14347   # Check whether --enable-openjdk-only was given.
14348 if test "${enable_openjdk_only+set}" = set; then :
14349   enableval=$enable_openjdk_only;
14350 else
14351   enable_openjdk_only="no"
14352 fi
14353 
14354 
14355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14356 $as_echo_n "checking for presence of closed sources... " >&6; }
14357   if test -d "$SRC_ROOT/jdk/src/closed"; then
14358     CLOSED_SOURCE_PRESENT=yes
14359   else
14360     CLOSED_SOURCE_PRESENT=no
14361   fi
14362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14363 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14364 
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14366 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14367   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14369 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14370 
14371   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14372     OPENJDK=true
14373     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14374       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14375 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14376     fi
14377   else
14378     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14379       OPENJDK=true
14380     else
14381       OPENJDK=false
14382     fi
14383   fi
14384 
14385   if test "x$OPENJDK" = "xtrue"; then
14386     SET_OPENJDK="OPENJDK=true"
14387   fi
14388 
14389 
14390 
14391 
14392 # These are needed to be able to create a configuration name (and thus the output directory)
14393 
14394   ###############################################################################
14395   #
14396   # Check which variant of the JDK that we want to build.
14397   # Currently we have:
14398   #    normal:   standard edition
14399   # but the custom make system may add other variants
14400   #
14401   # Effectively the JDK variant gives a name to a specific set of
14402   # modules to compile into the JDK. In the future, these modules
14403   # might even be Jigsaw modules.
14404   #
14405   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14406 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14407 
14408 # Check whether --with-jdk-variant was given.
14409 if test "${with_jdk_variant+set}" = set; then :
14410   withval=$with_jdk_variant;
14411 fi
14412 
14413 
14414   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14415     JDK_VARIANT="normal"
14416   else
14417     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14418   fi
14419 
14420 
14421 
14422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14423 $as_echo "$JDK_VARIANT" >&6; }
14424 
14425 
14426 ###############################################################################
14427 #
14428 # Check which interpreter of the JVM we want to build.
14429 # Currently we have:
14430 #    template: Template interpreter (the default)
14431 #    cpp     : C++ interpreter
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14433 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14434 
14435 # Check whether --with-jvm-interpreter was given.
14436 if test "${with_jvm_interpreter+set}" = set; then :
14437   withval=$with_jvm_interpreter;
14438 fi
14439 
14440 
14441 if test "x$with_jvm_interpreter" = x; then
14442      with_jvm_interpreter="template"
14443 fi
14444 
14445 JVM_INTERPRETER="$with_jvm_interpreter"
14446 
14447 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14448    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14449 fi
14450 
14451 
14452 
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14454 $as_echo "$with_jvm_interpreter" >&6; }
14455 
14456 
14457 
14458   ###############################################################################
14459   #
14460   # Check which variants of the JVM that we want to build.
14461   # Currently we have:
14462   #    server: normal interpreter and a tiered C1/C2 compiler
14463   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14464   #    minimal1: reduced form of client with optional VM services and features stripped out
14465   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14466   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14467   #    zero: no machine code interpreter, no compiler
14468   #    zeroshark: zero interpreter and shark/llvm compiler backend
14469 #    core: interpreter only, no compiler (only works on some platforms)
14470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14471 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14472 
14473 # Check whether --with-jvm-variants was given.
14474 if test "${with_jvm_variants+set}" = set; then :
14475   withval=$with_jvm_variants;
14476 fi
14477 
14478 
14479   if test "x$with_jvm_variants" = x; then
14480     with_jvm_variants="server"
14481   fi
14482 
14483   JVM_VARIANTS=",$with_jvm_variants,"
14484   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,//'`
14485 
14486   if test "x$TEST_VARIANTS" != "x,"; then
14487      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14488   fi
14489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14490 $as_echo "$with_jvm_variants" >&6; }
14491 
14492   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14493   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14494   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14495   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14496   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14497   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14498   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14499 
14500   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14501     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14502       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14503     fi
14504   fi
14505   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14506     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14507       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14508     fi
14509   fi
14510   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14511     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14512       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14513     fi
14514   fi
14515 
14516   # Replace the commas with AND for use in the build directory name.
14517   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14518   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/'`
14519   if test "x$COUNT_VARIANTS" != "x,1"; then
14520     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14521   else
14522     BUILDING_MULTIPLE_JVM_VARIANTS=no
14523   fi
14524 
14525 
14526 
14527 
14528 
14529 
14530 
14531 
14532 
14533 
14534   INCLUDE_SA=true
14535   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14536     INCLUDE_SA=false
14537   fi
14538   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14539     INCLUDE_SA=false
14540   fi
14541   if test "x$VAR_CPU" = xppc64 ; then
14542     INCLUDE_SA=false
14543   fi
14544   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14545     INCLUDE_SA=false
14546   fi
14547 
14548 
14549   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14550     MACOSX_UNIVERSAL="false"
14551   fi
14552 
14553 
14554 
14555 
14556   ###############################################################################
14557   #
14558   # Set the debug level
14559   #    release: no debug information, all optimizations, no asserts.
14560   #    fastdebug: debug information (-g), all optimizations, all asserts
14561   #    slowdebug: debug information (-g), no optimizations, all asserts
14562   #
14563   DEBUG_LEVEL="release"
14564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14565 $as_echo_n "checking which debug level to use... " >&6; }
14566   # Check whether --enable-debug was given.
14567 if test "${enable_debug+set}" = set; then :
14568   enableval=$enable_debug;
14569         ENABLE_DEBUG="${enableval}"
14570         DEBUG_LEVEL="fastdebug"
14571 
14572 else
14573   ENABLE_DEBUG="no"
14574 fi
14575 
14576 
14577 
14578 # Check whether --with-debug-level was given.
14579 if test "${with_debug_level+set}" = set; then :
14580   withval=$with_debug_level;
14581         DEBUG_LEVEL="${withval}"
14582         if test "x$ENABLE_DEBUG" = xyes; then
14583           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14584         fi
14585 
14586 fi
14587 
14588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14589 $as_echo "$DEBUG_LEVEL" >&6; }
14590 
14591   if test "x$DEBUG_LEVEL" != xrelease && \
14592       test "x$DEBUG_LEVEL" != xfastdebug && \
14593       test "x$DEBUG_LEVEL" != xslowdebug; then
14594     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14595   fi
14596 
14597 
14598   ###############################################################################
14599   #
14600   # Setup legacy vars/targets and new vars to deal with different debug levels.
14601   #
14602 
14603   case $DEBUG_LEVEL in
14604     release )
14605       VARIANT="OPT"
14606       FASTDEBUG="false"
14607       DEBUG_CLASSFILES="false"
14608       BUILD_VARIANT_RELEASE=""
14609       HOTSPOT_DEBUG_LEVEL="product"
14610       HOTSPOT_EXPORT="product"
14611       ;;
14612     fastdebug )
14613       VARIANT="DBG"
14614       FASTDEBUG="true"
14615       DEBUG_CLASSFILES="true"
14616       BUILD_VARIANT_RELEASE="-fastdebug"
14617       HOTSPOT_DEBUG_LEVEL="fastdebug"
14618       HOTSPOT_EXPORT="fastdebug"
14619       ;;
14620     slowdebug )
14621       VARIANT="DBG"
14622       FASTDEBUG="false"
14623       DEBUG_CLASSFILES="true"
14624       BUILD_VARIANT_RELEASE="-debug"
14625       HOTSPOT_DEBUG_LEVEL="jvmg"
14626       HOTSPOT_EXPORT="debug"
14627       ;;
14628   esac
14629 
14630   #####
14631   # Generate the legacy makefile targets for hotspot.
14632   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14633   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14634   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14635   # But until then ...
14636   HOTSPOT_TARGET=""
14637 
14638   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14639     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14640   fi
14641 
14642   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14643     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14644   fi
14645 
14646   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14647     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14648   fi
14649 
14650   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14651     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14652   fi
14653 
14654   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14655     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14656   fi
14657 
14658   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14659     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14660   fi
14661 
14662   if test "x$JVM_VARIANT_CORE" = xtrue; then
14663     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14664   fi
14665 
14666   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14667 
14668   # On Macosx universal binaries are produced, but they only contain
14669   # 64 bit intel. This invalidates control of which jvms are built
14670   # from configure, but only server is valid anyway. Fix this
14671   # when hotspot makefiles are rewritten.
14672   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14673     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14674   fi
14675 
14676   #####
14677 
14678 
14679 
14680 
14681 
14682 
14683 
14684 
14685 # With basic setup done, call the custom early hook.
14686 
14687 
14688 # Check if we have devkits, extra paths or sysroot set.
14689 
14690 
14691 # Check whether --with-devkit was given.
14692 if test "${with_devkit+set}" = set; then :
14693   withval=$with_devkit;
14694 
14695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14696 
14697   # Input might be given as Windows format, start by converting to
14698   # unix format.
14699   path="$with_devkit"
14700   new_path=`$CYGPATH -u "$path"`
14701 
14702   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14703   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14704   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14705   # "foo.exe" is OK but "foo" is an error.
14706   #
14707   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14708   # It is also a way to make sure we got the proper file name for the real test later on.
14709   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14710   if test "x$test_shortpath" = x; then
14711     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14712 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14713     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14714   fi
14715 
14716   # Call helper function which possibly converts this using DOS-style short mode.
14717   # If so, the updated path is stored in $new_path.
14718 
14719   input_path="$new_path"
14720   # Check if we need to convert this using DOS-style short mode. If the path
14721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14722   # take no chances and rewrite it.
14723   # Note: m4 eats our [], so we need to use [ and ] instead.
14724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14725   if test "x$has_forbidden_chars" != x; then
14726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14727     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14728     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14729     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14730       # Going to short mode and back again did indeed matter. Since short mode is
14731       # case insensitive, let's make it lowercase to improve readability.
14732       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14733       # Now convert it back to Unix-style (cygpath)
14734       input_path=`$CYGPATH -u "$shortmode_path"`
14735       new_path="$input_path"
14736     fi
14737   fi
14738 
14739   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14740   if test "x$test_cygdrive_prefix" = x; then
14741     # As a simple fix, exclude /usr/bin since it's not a real path.
14742     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14743       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14744       # a path prefixed by /cygdrive for fixpath to work.
14745       new_path="$CYGWIN_ROOT_PATH$input_path"
14746     fi
14747   fi
14748 
14749 
14750   if test "x$path" != "x$new_path"; then
14751     with_devkit="$new_path"
14752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14753 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14754   fi
14755 
14756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14757 
14758   path="$with_devkit"
14759   has_colon=`$ECHO $path | $GREP ^.:`
14760   new_path="$path"
14761   if test "x$has_colon" = x; then
14762     # Not in mixed or Windows style, start by that.
14763     new_path=`cmd //c echo $path`
14764   fi
14765 
14766 
14767   input_path="$new_path"
14768   # Check if we need to convert this using DOS-style short mode. If the path
14769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14770   # take no chances and rewrite it.
14771   # Note: m4 eats our [], so we need to use [ and ] instead.
14772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14773   if test "x$has_forbidden_chars" != x; then
14774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14775     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14776   fi
14777 
14778 
14779   windows_path="$new_path"
14780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14781     unix_path=`$CYGPATH -u "$windows_path"`
14782     new_path="$unix_path"
14783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14785     new_path="$unix_path"
14786   fi
14787 
14788   if test "x$path" != "x$new_path"; then
14789     with_devkit="$new_path"
14790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14791 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14792   fi
14793 
14794   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14795   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14796 
14797   else
14798     # We're on a posix platform. Hooray! :)
14799     path="$with_devkit"
14800     has_space=`$ECHO "$path" | $GREP " "`
14801     if test "x$has_space" != x; then
14802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14803 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14804       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14805     fi
14806 
14807     # Use eval to expand a potential ~
14808     eval path="$path"
14809     if test ! -f "$path" && test ! -d "$path"; then
14810       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14811     fi
14812 
14813     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14814   fi
14815 
14816         DEVKIT_ROOT="$with_devkit"
14817         # Check for a meta data info file in the root of the devkit
14818         if test -f "$DEVKIT_ROOT/devkit.info"; then
14819           . $DEVKIT_ROOT/devkit.info
14820           # This potentially sets the following:
14821           # A descriptive name of the devkit
14822 
14823   if test "x$DEVKIT_NAME" = x; then
14824     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14825   fi
14826 
14827           # Corresponds to --with-extra-path
14828 
14829   if test "x$DEVKIT_EXTRA_PATH" = x; then
14830     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14831   fi
14832 
14833           # Corresponds to --with-toolchain-path
14834 
14835   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14836     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14837   fi
14838 
14839           # Corresponds to --with-sysroot
14840 
14841   if test "x$DEVKIT_SYSROOT" = x; then
14842     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14843   fi
14844 
14845 
14846           # Identifies the Visual Studio version in the devkit
14847 
14848   if test "x$DEVKIT_VS_VERSION" = x; then
14849     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14850   fi
14851 
14852           # The Visual Studio include environment variable
14853 
14854   if test "x$DEVKIT_VS_INCLUDE" = x; then
14855     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14856   fi
14857 
14858           # The Visual Studio lib environment variable
14859 
14860   if test "x$DEVKIT_VS_LIB" = x; then
14861     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14862   fi
14863 
14864           # Corresponds to --with-msvcr-dll
14865 
14866   if test "x$DEVKIT_MSVCR_DLL" = x; then
14867     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14868   fi
14869 
14870           # Corresponds to --with-msvcp-dll
14871 
14872   if test "x$DEVKIT_MSVCP_DLL" = x; then
14873     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14874   fi
14875 
14876         fi
14877 
14878         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14879 $as_echo_n "checking for devkit... " >&6; }
14880         if test "x$DEVKIT_NAME" != x; then
14881           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14882 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14883         else
14884           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14885 $as_echo "$DEVKIT_ROOT" >&6; }
14886         fi
14887 
14888 
14889   if test "x$DEVKIT_EXTRA_PATH" != x; then
14890     if test "x$EXTRA_PATH" = x; then
14891       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14892     else
14893       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14894     fi
14895   fi
14896 
14897 
14898         # Fallback default of just /bin if DEVKIT_PATH is not defined
14899         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14900           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14901         fi
14902 
14903   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14904     if test "x$TOOLCHAIN_PATH" = x; then
14905       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14906     else
14907       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14908     fi
14909   fi
14910 
14911 
14912         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14913         # places for backwards compatiblity.
14914         if test "x$DEVKIT_SYSROOT" != x; then
14915           SYSROOT="$DEVKIT_SYSROOT"
14916         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14917           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14918         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14919           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14920         fi
14921 
14922 
14923 fi
14924 
14925 
14926   # You can force the sysroot if the sysroot encoded into the compiler tools
14927   # is not correct.
14928 
14929 # Check whether --with-sys-root was given.
14930 if test "${with_sys_root+set}" = set; then :
14931   withval=$with_sys_root; SYSROOT=$with_sys_root
14932 
14933 fi
14934 
14935 
14936 
14937 # Check whether --with-sysroot was given.
14938 if test "${with_sysroot+set}" = set; then :
14939   withval=$with_sysroot; SYSROOT=$with_sysroot
14940 
14941 fi
14942 
14943 
14944 
14945 # Check whether --with-tools-dir was given.
14946 if test "${with_tools_dir+set}" = set; then :
14947   withval=$with_tools_dir;
14948   if test "x$with_tools_dir" != x; then
14949     if test "x$TOOLCHAIN_PATH" = x; then
14950       TOOLCHAIN_PATH="$with_tools_dir"
14951     else
14952       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14953     fi
14954   fi
14955 
14956 
14957 fi
14958 
14959 
14960 
14961 # Check whether --with-toolchain-path was given.
14962 if test "${with_toolchain_path+set}" = set; then :
14963   withval=$with_toolchain_path;
14964   if test "x$with_toolchain_path" != x; then
14965     if test "x$TOOLCHAIN_PATH" = x; then
14966       TOOLCHAIN_PATH="$with_toolchain_path"
14967     else
14968       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14969     fi
14970   fi
14971 
14972 
14973 fi
14974 
14975 
14976 
14977 # Check whether --with-extra-path was given.
14978 if test "${with_extra_path+set}" = set; then :
14979   withval=$with_extra_path;
14980   if test "x$with_extra_path" != x; then
14981     if test "x$EXTRA_PATH" = x; then
14982       EXTRA_PATH="$with_extra_path"
14983     else
14984       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14985     fi
14986   fi
14987 
14988 
14989 fi
14990 
14991 
14992   # Prepend the extra path to the global path
14993 
14994   if test "x$EXTRA_PATH" != x; then
14995     if test "x$PATH" = x; then
14996       PATH="$EXTRA_PATH"
14997     else
14998       PATH="$EXTRA_PATH:$PATH"
14999     fi
15000   fi
15001 
15002 
15003   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15004     # Add extra search paths on solaris for utilities like ar and as etc...
15005     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15006   fi
15007 
15008   # Xcode version will be validated later
15009 
15010 # Check whether --with-xcode-path was given.
15011 if test "${with_xcode_path+set}" = set; then :
15012   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
15013 
15014 fi
15015 
15016 
15017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15018 $as_echo_n "checking for sysroot... " >&6; }
15019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15020 $as_echo "$SYSROOT" >&6; }
15021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15022 $as_echo_n "checking for toolchain path... " >&6; }
15023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15024 $as_echo "$TOOLCHAIN_PATH" >&6; }
15025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15026 $as_echo_n "checking for extra path... " >&6; }
15027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15028 $as_echo "$EXTRA_PATH" >&6; }
15029 
15030 
15031 # To properly create a configuration name, we need to have the OpenJDK target
15032 # and options (variants and debug level) parsed.
15033 
15034 
15035 
15036 # Check whether --with-conf-name was given.
15037 if test "${with_conf_name+set}" = set; then :
15038   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15039 fi
15040 
15041 
15042   # Test from where we are running configure, in or outside of src root.
15043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15044 $as_echo_n "checking where to store configuration... " >&6; }
15045   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15046       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15047       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15048     # We are running configure from the src root.
15049     # Create a default ./build/target-variant-debuglevel output root.
15050     if test "x${CONF_NAME}" = x; then
15051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15052 $as_echo "in default location" >&6; }
15053       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15054     else
15055       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15056 $as_echo "in build directory with custom name" >&6; }
15057     fi
15058     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15059     $MKDIR -p "$OUTPUT_ROOT"
15060     if test ! -d "$OUTPUT_ROOT"; then
15061       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15062     fi
15063   else
15064     # We are running configure from outside of the src dir.
15065     # Then use the current directory as output dir!
15066     # If configuration is situated in normal build directory, just use the build
15067     # directory name as configuration name, otherwise use the complete path.
15068     if test "x${CONF_NAME}" = x; then
15069       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15070     fi
15071     OUTPUT_ROOT="$CURDIR"
15072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15073 $as_echo "in current directory" >&6; }
15074 
15075     # WARNING: This might be a bad thing to do. You need to be sure you want to
15076     # have a configuration in this directory. Do some sanity checks!
15077 
15078     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15079       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15080       # other files
15081       files_present=`$LS $OUTPUT_ROOT`
15082       # Configure has already touched config.log and confdefs.h in the current dir when this check
15083       # is performed.
15084       filtered_files=`$ECHO "$files_present" \
15085           | $SED -e 's/config.log//g' \
15086               -e 's/confdefs.h//g' \
15087               -e 's/fixpath.exe//g' \
15088               -e 's/ //g' \
15089           | $TR -d '\n'`
15090       if test "x$filtered_files" != x; then
15091         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15092 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15093         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15094 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15095         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15096 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15097         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15098 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15099         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15100 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15101         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15102 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15103         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15104 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15105         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15106       fi
15107     fi
15108   fi
15109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15110 $as_echo_n "checking what configuration name to use... " >&6; }
15111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15112 $as_echo "$CONF_NAME" >&6; }
15113 
15114 
15115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15116 
15117   # Input might be given as Windows format, start by converting to
15118   # unix format.
15119   path="$OUTPUT_ROOT"
15120   new_path=`$CYGPATH -u "$path"`
15121 
15122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15125   # "foo.exe" is OK but "foo" is an error.
15126   #
15127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15128   # It is also a way to make sure we got the proper file name for the real test later on.
15129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15130   if test "x$test_shortpath" = x; then
15131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15132 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15133     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15134   fi
15135 
15136   # Call helper function which possibly converts this using DOS-style short mode.
15137   # If so, the updated path is stored in $new_path.
15138 
15139   input_path="$new_path"
15140   # Check if we need to convert this using DOS-style short mode. If the path
15141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15142   # take no chances and rewrite it.
15143   # Note: m4 eats our [], so we need to use [ and ] instead.
15144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15145   if test "x$has_forbidden_chars" != x; then
15146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15150       # Going to short mode and back again did indeed matter. Since short mode is
15151       # case insensitive, let's make it lowercase to improve readability.
15152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15153       # Now convert it back to Unix-style (cygpath)
15154       input_path=`$CYGPATH -u "$shortmode_path"`
15155       new_path="$input_path"
15156     fi
15157   fi
15158 
15159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15160   if test "x$test_cygdrive_prefix" = x; then
15161     # As a simple fix, exclude /usr/bin since it's not a real path.
15162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15164       # a path prefixed by /cygdrive for fixpath to work.
15165       new_path="$CYGWIN_ROOT_PATH$input_path"
15166     fi
15167   fi
15168 
15169 
15170   if test "x$path" != "x$new_path"; then
15171     OUTPUT_ROOT="$new_path"
15172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15173 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15174   fi
15175 
15176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15177 
15178   path="$OUTPUT_ROOT"
15179   has_colon=`$ECHO $path | $GREP ^.:`
15180   new_path="$path"
15181   if test "x$has_colon" = x; then
15182     # Not in mixed or Windows style, start by that.
15183     new_path=`cmd //c echo $path`
15184   fi
15185 
15186 
15187   input_path="$new_path"
15188   # Check if we need to convert this using DOS-style short mode. If the path
15189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15190   # take no chances and rewrite it.
15191   # Note: m4 eats our [], so we need to use [ and ] instead.
15192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15193   if test "x$has_forbidden_chars" != x; then
15194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15196   fi
15197 
15198 
15199   windows_path="$new_path"
15200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15201     unix_path=`$CYGPATH -u "$windows_path"`
15202     new_path="$unix_path"
15203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15205     new_path="$unix_path"
15206   fi
15207 
15208   if test "x$path" != "x$new_path"; then
15209     OUTPUT_ROOT="$new_path"
15210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15211 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15212   fi
15213 
15214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15216 
15217   else
15218     # We're on a posix platform. Hooray! :)
15219     path="$OUTPUT_ROOT"
15220     has_space=`$ECHO "$path" | $GREP " "`
15221     if test "x$has_space" != x; then
15222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15223 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15224       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15225     fi
15226 
15227     # Use eval to expand a potential ~
15228     eval path="$path"
15229     if test ! -f "$path" && test ! -d "$path"; then
15230       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15231     fi
15232 
15233     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15234   fi
15235 
15236 
15237   SPEC=$OUTPUT_ROOT/spec.gmk
15238 
15239   CONF_NAME=$CONF_NAME
15240 
15241   OUTPUT_ROOT=$OUTPUT_ROOT
15242 
15243 
15244   # Most of the probed defines are put into config.h
15245   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15246 
15247   # The spec.gmk file contains all variables for the make system.
15248   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15249 
15250   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15251   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15252 
15253   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15254   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15255 
15256   # The compare.sh is used to compare the build output to other builds.
15257   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15258 
15259   # Spec.sh is currently used by compare-objects.sh
15260   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15261 
15262   # The generated Makefile knows where the spec.gmk is and where the source is.
15263   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15264   # which will look for generated configurations
15265   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15266 
15267 
15268 
15269 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15270 
15271   for ac_prog in apt-get yum port pkgutil pkgadd
15272 do
15273   # Extract the first word of "$ac_prog", so it can be a program name with args.
15274 set dummy $ac_prog; ac_word=$2
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15276 $as_echo_n "checking for $ac_word... " >&6; }
15277 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15278   $as_echo_n "(cached) " >&6
15279 else
15280   if test -n "$PKGHANDLER"; then
15281   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15282 else
15283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15284 for as_dir in $PATH
15285 do
15286   IFS=$as_save_IFS
15287   test -z "$as_dir" && as_dir=.
15288     for ac_exec_ext in '' $ac_executable_extensions; do
15289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15290     ac_cv_prog_PKGHANDLER="$ac_prog"
15291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15292     break 2
15293   fi
15294 done
15295   done
15296 IFS=$as_save_IFS
15297 
15298 fi
15299 fi
15300 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15301 if test -n "$PKGHANDLER"; then
15302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15303 $as_echo "$PKGHANDLER" >&6; }
15304 else
15305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15306 $as_echo "no" >&6; }
15307 fi
15308 
15309 
15310   test -n "$PKGHANDLER" && break
15311 done
15312 
15313 
15314 
15315 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15316 
15317 
15318   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15319   if test "x$MAKE" != x; then
15320     # User has supplied a make, test it.
15321     if test ! -f "$MAKE"; then
15322       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15323     fi
15324 
15325   MAKE_CANDIDATE=""$MAKE""
15326   DESCRIPTION="user supplied MAKE=$MAKE"
15327   if test "x$MAKE_CANDIDATE" != x; then
15328     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15329 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15330     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15331     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15332     if test "x$IS_GNU_MAKE" = x; then
15333       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15334 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15335     else
15336       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15337       if test "x$IS_MODERN_MAKE" = x; then
15338         { $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
15339 $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;}
15340       else
15341         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15342           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15343             MAKE_EXPECTED_ENV='cygwin'
15344           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15345             MAKE_EXPECTED_ENV='msys'
15346           else
15347             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15348           fi
15349           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15350           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15351         else
15352           # Not relevant for non-Windows
15353           IS_MAKE_CORRECT_ENV=true
15354         fi
15355         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15356           { $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
15357 $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;}
15358         else
15359           FOUND_MAKE=$MAKE_CANDIDATE
15360 
15361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15362 
15363   # First separate the path from the arguments. This will split at the first
15364   # space.
15365   complete="$FOUND_MAKE"
15366   path="${complete%% *}"
15367   tmp="$complete EOL"
15368   arguments="${tmp#* }"
15369 
15370   # Input might be given as Windows format, start by converting to
15371   # unix format.
15372   new_path=`$CYGPATH -u "$path"`
15373 
15374   # Now try to locate executable using which
15375   new_path=`$WHICH "$new_path" 2> /dev/null`
15376   # bat and cmd files are not always considered executable in cygwin causing which
15377   # to not find them
15378   if test "x$new_path" = x \
15379       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15380       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15381     new_path=`$CYGPATH -u "$path"`
15382   fi
15383   if test "x$new_path" = x; then
15384     # Oops. Which didn't find the executable.
15385     # The splitting of arguments from the executable at a space might have been incorrect,
15386     # since paths with space are more likely in Windows. Give it another try with the whole
15387     # argument.
15388     path="$complete"
15389     arguments="EOL"
15390     new_path=`$CYGPATH -u "$path"`
15391     new_path=`$WHICH "$new_path" 2> /dev/null`
15392     # bat and cmd files are not always considered executable in cygwin causing which
15393     # to not find them
15394     if test "x$new_path" = x \
15395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15397       new_path=`$CYGPATH -u "$path"`
15398     fi
15399     if test "x$new_path" = x; then
15400       # It's still not found. Now this is an unrecoverable error.
15401       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15402 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15403       has_space=`$ECHO "$complete" | $GREP " "`
15404       if test "x$has_space" != x; then
15405         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15406 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15407       fi
15408       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15409     fi
15410   fi
15411 
15412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15415   # "foo.exe" is OK but "foo" is an error.
15416   #
15417   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15418   # It is also a way to make sure we got the proper file name for the real test later on.
15419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15420   if test "x$test_shortpath" = x; then
15421     # Short path failed, file does not exist as specified.
15422     # Try adding .exe or .cmd
15423     if test -f "${new_path}.exe"; then
15424       input_to_shortpath="${new_path}.exe"
15425     elif test -f "${new_path}.cmd"; then
15426       input_to_shortpath="${new_path}.cmd"
15427     else
15428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15429 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15430       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15431 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15432       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15433     fi
15434   else
15435     input_to_shortpath="$new_path"
15436   fi
15437 
15438   # Call helper function which possibly converts this using DOS-style short mode.
15439   # If so, the updated path is stored in $new_path.
15440   new_path="$input_to_shortpath"
15441 
15442   input_path="$input_to_shortpath"
15443   # Check if we need to convert this using DOS-style short mode. If the path
15444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15445   # take no chances and rewrite it.
15446   # Note: m4 eats our [], so we need to use [ and ] instead.
15447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15448   if test "x$has_forbidden_chars" != x; then
15449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15450     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15451     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15452     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15453       # Going to short mode and back again did indeed matter. Since short mode is
15454       # case insensitive, let's make it lowercase to improve readability.
15455       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15456       # Now convert it back to Unix-style (cygpath)
15457       input_path=`$CYGPATH -u "$shortmode_path"`
15458       new_path="$input_path"
15459     fi
15460   fi
15461 
15462   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15463   if test "x$test_cygdrive_prefix" = x; then
15464     # As a simple fix, exclude /usr/bin since it's not a real path.
15465     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15466       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15467       # a path prefixed by /cygdrive for fixpath to work.
15468       new_path="$CYGWIN_ROOT_PATH$input_path"
15469     fi
15470   fi
15471 
15472   # remove trailing .exe if any
15473   new_path="${new_path/%.exe/}"
15474 
15475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476 
15477   # First separate the path from the arguments. This will split at the first
15478   # space.
15479   complete="$FOUND_MAKE"
15480   path="${complete%% *}"
15481   tmp="$complete EOL"
15482   arguments="${tmp#* }"
15483 
15484   # Input might be given as Windows format, start by converting to
15485   # unix format.
15486   new_path="$path"
15487 
15488   windows_path="$new_path"
15489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15490     unix_path=`$CYGPATH -u "$windows_path"`
15491     new_path="$unix_path"
15492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15494     new_path="$unix_path"
15495   fi
15496 
15497 
15498   # Now try to locate executable using which
15499   new_path=`$WHICH "$new_path" 2> /dev/null`
15500 
15501   if test "x$new_path" = x; then
15502     # Oops. Which didn't find the executable.
15503     # The splitting of arguments from the executable at a space might have been incorrect,
15504     # since paths with space are more likely in Windows. Give it another try with the whole
15505     # argument.
15506     path="$complete"
15507     arguments="EOL"
15508     new_path="$path"
15509 
15510   windows_path="$new_path"
15511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15512     unix_path=`$CYGPATH -u "$windows_path"`
15513     new_path="$unix_path"
15514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15516     new_path="$unix_path"
15517   fi
15518 
15519 
15520     new_path=`$WHICH "$new_path" 2> /dev/null`
15521     # bat and cmd files are not always considered executable in MSYS causing which
15522     # to not find them
15523     if test "x$new_path" = x \
15524         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15525         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15526       new_path="$path"
15527 
15528   windows_path="$new_path"
15529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15530     unix_path=`$CYGPATH -u "$windows_path"`
15531     new_path="$unix_path"
15532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15534     new_path="$unix_path"
15535   fi
15536 
15537     fi
15538 
15539     if test "x$new_path" = x; then
15540       # It's still not found. Now this is an unrecoverable error.
15541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15542 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15543       has_space=`$ECHO "$complete" | $GREP " "`
15544       if test "x$has_space" != x; then
15545         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15546 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15547       fi
15548       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15549     fi
15550   fi
15551 
15552   # Now new_path has a complete unix path to the binary
15553   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15554     # Keep paths in /bin as-is, but remove trailing .exe if any
15555     new_path="${new_path/%.exe/}"
15556     # Do not save /bin paths to all_fixpath_prefixes!
15557   else
15558     # Not in mixed or Windows style, start by that.
15559     new_path=`cmd //c echo $new_path`
15560 
15561   input_path="$new_path"
15562   # Check if we need to convert this using DOS-style short mode. If the path
15563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15564   # take no chances and rewrite it.
15565   # Note: m4 eats our [], so we need to use [ and ] instead.
15566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15567   if test "x$has_forbidden_chars" != x; then
15568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15570   fi
15571 
15572     # Output is in $new_path
15573 
15574   windows_path="$new_path"
15575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15576     unix_path=`$CYGPATH -u "$windows_path"`
15577     new_path="$unix_path"
15578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15580     new_path="$unix_path"
15581   fi
15582 
15583     # remove trailing .exe if any
15584     new_path="${new_path/%.exe/}"
15585 
15586     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15587     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15588   fi
15589 
15590   else
15591     # We're on a posix platform. Hooray! :)
15592     # First separate the path from the arguments. This will split at the first
15593     # space.
15594     complete="$FOUND_MAKE"
15595     path="${complete%% *}"
15596     tmp="$complete EOL"
15597     arguments="${tmp#* }"
15598 
15599     # Cannot rely on the command "which" here since it doesn't always work.
15600     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15601     if test -z "$is_absolute_path"; then
15602       # Path to executable is not absolute. Find it.
15603       IFS_save="$IFS"
15604       IFS=:
15605       for p in $PATH; do
15606         if test -f "$p/$path" && test -x "$p/$path"; then
15607           new_path="$p/$path"
15608           break
15609         fi
15610       done
15611       IFS="$IFS_save"
15612     else
15613       # This is an absolute path, we can use it without further modifications.
15614       new_path="$path"
15615     fi
15616 
15617     if test "x$new_path" = x; then
15618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15619 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15620       has_space=`$ECHO "$complete" | $GREP " "`
15621       if test "x$has_space" != x; then
15622         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15623 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15624       fi
15625       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15626     fi
15627   fi
15628 
15629   # Now join together the path and the arguments once again
15630   if test "x$arguments" != xEOL; then
15631     new_complete="$new_path ${arguments% *}"
15632   else
15633     new_complete="$new_path"
15634   fi
15635 
15636   if test "x$complete" != "x$new_complete"; then
15637     FOUND_MAKE="$new_complete"
15638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15639 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15640   fi
15641 
15642         fi
15643       fi
15644     fi
15645   fi
15646 
15647     if test "x$FOUND_MAKE" = x; then
15648       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15649     fi
15650   else
15651     # Try our hardest to locate a correct version of GNU make
15652     for ac_prog in gmake
15653 do
15654   # Extract the first word of "$ac_prog", so it can be a program name with args.
15655 set dummy $ac_prog; ac_word=$2
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15657 $as_echo_n "checking for $ac_word... " >&6; }
15658 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15659   $as_echo_n "(cached) " >&6
15660 else
15661   case $CHECK_GMAKE in
15662   [\\/]* | ?:[\\/]*)
15663   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15664   ;;
15665   *)
15666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15667 for as_dir in $PATH
15668 do
15669   IFS=$as_save_IFS
15670   test -z "$as_dir" && as_dir=.
15671     for ac_exec_ext in '' $ac_executable_extensions; do
15672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15673     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15675     break 2
15676   fi
15677 done
15678   done
15679 IFS=$as_save_IFS
15680 
15681   ;;
15682 esac
15683 fi
15684 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15685 if test -n "$CHECK_GMAKE"; then
15686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15687 $as_echo "$CHECK_GMAKE" >&6; }
15688 else
15689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15690 $as_echo "no" >&6; }
15691 fi
15692 
15693 
15694   test -n "$CHECK_GMAKE" && break
15695 done
15696 
15697 
15698   MAKE_CANDIDATE=""$CHECK_GMAKE""
15699   DESCRIPTION="gmake in PATH"
15700   if test "x$MAKE_CANDIDATE" != x; then
15701     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15702 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15703     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15704     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15705     if test "x$IS_GNU_MAKE" = x; then
15706       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15707 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15708     else
15709       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15710       if test "x$IS_MODERN_MAKE" = x; then
15711         { $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
15712 $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;}
15713       else
15714         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15715           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15716             MAKE_EXPECTED_ENV='cygwin'
15717           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15718             MAKE_EXPECTED_ENV='msys'
15719           else
15720             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15721           fi
15722           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15723           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15724         else
15725           # Not relevant for non-Windows
15726           IS_MAKE_CORRECT_ENV=true
15727         fi
15728         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15729           { $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
15730 $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;}
15731         else
15732           FOUND_MAKE=$MAKE_CANDIDATE
15733 
15734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15735 
15736   # First separate the path from the arguments. This will split at the first
15737   # space.
15738   complete="$FOUND_MAKE"
15739   path="${complete%% *}"
15740   tmp="$complete EOL"
15741   arguments="${tmp#* }"
15742 
15743   # Input might be given as Windows format, start by converting to
15744   # unix format.
15745   new_path=`$CYGPATH -u "$path"`
15746 
15747   # Now try to locate executable using which
15748   new_path=`$WHICH "$new_path" 2> /dev/null`
15749   # bat and cmd files are not always considered executable in cygwin causing which
15750   # to not find them
15751   if test "x$new_path" = x \
15752       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15753       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15754     new_path=`$CYGPATH -u "$path"`
15755   fi
15756   if test "x$new_path" = x; then
15757     # Oops. Which didn't find the executable.
15758     # The splitting of arguments from the executable at a space might have been incorrect,
15759     # since paths with space are more likely in Windows. Give it another try with the whole
15760     # argument.
15761     path="$complete"
15762     arguments="EOL"
15763     new_path=`$CYGPATH -u "$path"`
15764     new_path=`$WHICH "$new_path" 2> /dev/null`
15765     # bat and cmd files are not always considered executable in cygwin causing which
15766     # to not find them
15767     if test "x$new_path" = x \
15768         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15769         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15770       new_path=`$CYGPATH -u "$path"`
15771     fi
15772     if test "x$new_path" = x; then
15773       # It's still not found. Now this is an unrecoverable error.
15774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15775 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15776       has_space=`$ECHO "$complete" | $GREP " "`
15777       if test "x$has_space" != x; then
15778         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15779 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15780       fi
15781       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15782     fi
15783   fi
15784 
15785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15788   # "foo.exe" is OK but "foo" is an error.
15789   #
15790   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15791   # It is also a way to make sure we got the proper file name for the real test later on.
15792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15793   if test "x$test_shortpath" = x; then
15794     # Short path failed, file does not exist as specified.
15795     # Try adding .exe or .cmd
15796     if test -f "${new_path}.exe"; then
15797       input_to_shortpath="${new_path}.exe"
15798     elif test -f "${new_path}.cmd"; then
15799       input_to_shortpath="${new_path}.cmd"
15800     else
15801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15802 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15803       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15804 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15805       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15806     fi
15807   else
15808     input_to_shortpath="$new_path"
15809   fi
15810 
15811   # Call helper function which possibly converts this using DOS-style short mode.
15812   # If so, the updated path is stored in $new_path.
15813   new_path="$input_to_shortpath"
15814 
15815   input_path="$input_to_shortpath"
15816   # Check if we need to convert this using DOS-style short mode. If the path
15817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15818   # take no chances and rewrite it.
15819   # Note: m4 eats our [], so we need to use [ and ] instead.
15820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15821   if test "x$has_forbidden_chars" != x; then
15822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15826       # Going to short mode and back again did indeed matter. Since short mode is
15827       # case insensitive, let's make it lowercase to improve readability.
15828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15829       # Now convert it back to Unix-style (cygpath)
15830       input_path=`$CYGPATH -u "$shortmode_path"`
15831       new_path="$input_path"
15832     fi
15833   fi
15834 
15835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15836   if test "x$test_cygdrive_prefix" = x; then
15837     # As a simple fix, exclude /usr/bin since it's not a real path.
15838     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15840       # a path prefixed by /cygdrive for fixpath to work.
15841       new_path="$CYGWIN_ROOT_PATH$input_path"
15842     fi
15843   fi
15844 
15845   # remove trailing .exe if any
15846   new_path="${new_path/%.exe/}"
15847 
15848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15849 
15850   # First separate the path from the arguments. This will split at the first
15851   # space.
15852   complete="$FOUND_MAKE"
15853   path="${complete%% *}"
15854   tmp="$complete EOL"
15855   arguments="${tmp#* }"
15856 
15857   # Input might be given as Windows format, start by converting to
15858   # unix format.
15859   new_path="$path"
15860 
15861   windows_path="$new_path"
15862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15863     unix_path=`$CYGPATH -u "$windows_path"`
15864     new_path="$unix_path"
15865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15867     new_path="$unix_path"
15868   fi
15869 
15870 
15871   # Now try to locate executable using which
15872   new_path=`$WHICH "$new_path" 2> /dev/null`
15873 
15874   if test "x$new_path" = x; then
15875     # Oops. Which didn't find the executable.
15876     # The splitting of arguments from the executable at a space might have been incorrect,
15877     # since paths with space are more likely in Windows. Give it another try with the whole
15878     # argument.
15879     path="$complete"
15880     arguments="EOL"
15881     new_path="$path"
15882 
15883   windows_path="$new_path"
15884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15885     unix_path=`$CYGPATH -u "$windows_path"`
15886     new_path="$unix_path"
15887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15889     new_path="$unix_path"
15890   fi
15891 
15892 
15893     new_path=`$WHICH "$new_path" 2> /dev/null`
15894     # bat and cmd files are not always considered executable in MSYS causing which
15895     # to not find them
15896     if test "x$new_path" = x \
15897         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15898         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15899       new_path="$path"
15900 
15901   windows_path="$new_path"
15902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15903     unix_path=`$CYGPATH -u "$windows_path"`
15904     new_path="$unix_path"
15905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15907     new_path="$unix_path"
15908   fi
15909 
15910     fi
15911 
15912     if test "x$new_path" = x; then
15913       # It's still not found. Now this is an unrecoverable error.
15914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15915 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15916       has_space=`$ECHO "$complete" | $GREP " "`
15917       if test "x$has_space" != x; then
15918         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15919 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15920       fi
15921       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15922     fi
15923   fi
15924 
15925   # Now new_path has a complete unix path to the binary
15926   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15927     # Keep paths in /bin as-is, but remove trailing .exe if any
15928     new_path="${new_path/%.exe/}"
15929     # Do not save /bin paths to all_fixpath_prefixes!
15930   else
15931     # Not in mixed or Windows style, start by that.
15932     new_path=`cmd //c echo $new_path`
15933 
15934   input_path="$new_path"
15935   # Check if we need to convert this using DOS-style short mode. If the path
15936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15937   # take no chances and rewrite it.
15938   # Note: m4 eats our [], so we need to use [ and ] instead.
15939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15940   if test "x$has_forbidden_chars" != x; then
15941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15942     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15943   fi
15944 
15945     # Output is in $new_path
15946 
15947   windows_path="$new_path"
15948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15949     unix_path=`$CYGPATH -u "$windows_path"`
15950     new_path="$unix_path"
15951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15953     new_path="$unix_path"
15954   fi
15955 
15956     # remove trailing .exe if any
15957     new_path="${new_path/%.exe/}"
15958 
15959     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15960     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15961   fi
15962 
15963   else
15964     # We're on a posix platform. Hooray! :)
15965     # First separate the path from the arguments. This will split at the first
15966     # space.
15967     complete="$FOUND_MAKE"
15968     path="${complete%% *}"
15969     tmp="$complete EOL"
15970     arguments="${tmp#* }"
15971 
15972     # Cannot rely on the command "which" here since it doesn't always work.
15973     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15974     if test -z "$is_absolute_path"; then
15975       # Path to executable is not absolute. Find it.
15976       IFS_save="$IFS"
15977       IFS=:
15978       for p in $PATH; do
15979         if test -f "$p/$path" && test -x "$p/$path"; then
15980           new_path="$p/$path"
15981           break
15982         fi
15983       done
15984       IFS="$IFS_save"
15985     else
15986       # This is an absolute path, we can use it without further modifications.
15987       new_path="$path"
15988     fi
15989 
15990     if test "x$new_path" = x; then
15991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15992 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15993       has_space=`$ECHO "$complete" | $GREP " "`
15994       if test "x$has_space" != x; then
15995         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15996 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15997       fi
15998       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15999     fi
16000   fi
16001 
16002   # Now join together the path and the arguments once again
16003   if test "x$arguments" != xEOL; then
16004     new_complete="$new_path ${arguments% *}"
16005   else
16006     new_complete="$new_path"
16007   fi
16008 
16009   if test "x$complete" != "x$new_complete"; then
16010     FOUND_MAKE="$new_complete"
16011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16012 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16013   fi
16014 
16015         fi
16016       fi
16017     fi
16018   fi
16019 
16020 
16021     if test "x$FOUND_MAKE" = x; then
16022       for ac_prog in make
16023 do
16024   # Extract the first word of "$ac_prog", so it can be a program name with args.
16025 set dummy $ac_prog; ac_word=$2
16026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16027 $as_echo_n "checking for $ac_word... " >&6; }
16028 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16029   $as_echo_n "(cached) " >&6
16030 else
16031   case $CHECK_MAKE in
16032   [\\/]* | ?:[\\/]*)
16033   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16034   ;;
16035   *)
16036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16037 for as_dir in $PATH
16038 do
16039   IFS=$as_save_IFS
16040   test -z "$as_dir" && as_dir=.
16041     for ac_exec_ext in '' $ac_executable_extensions; do
16042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16043     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16045     break 2
16046   fi
16047 done
16048   done
16049 IFS=$as_save_IFS
16050 
16051   ;;
16052 esac
16053 fi
16054 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16055 if test -n "$CHECK_MAKE"; then
16056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16057 $as_echo "$CHECK_MAKE" >&6; }
16058 else
16059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16060 $as_echo "no" >&6; }
16061 fi
16062 
16063 
16064   test -n "$CHECK_MAKE" && break
16065 done
16066 
16067 
16068   MAKE_CANDIDATE=""$CHECK_MAKE""
16069   DESCRIPTION="make in PATH"
16070   if test "x$MAKE_CANDIDATE" != x; then
16071     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16072 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16073     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16074     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16075     if test "x$IS_GNU_MAKE" = x; then
16076       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16077 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16078     else
16079       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16080       if test "x$IS_MODERN_MAKE" = x; then
16081         { $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
16082 $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;}
16083       else
16084         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16085           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16086             MAKE_EXPECTED_ENV='cygwin'
16087           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16088             MAKE_EXPECTED_ENV='msys'
16089           else
16090             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16091           fi
16092           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16093           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16094         else
16095           # Not relevant for non-Windows
16096           IS_MAKE_CORRECT_ENV=true
16097         fi
16098         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16099           { $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
16100 $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;}
16101         else
16102           FOUND_MAKE=$MAKE_CANDIDATE
16103 
16104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16105 
16106   # First separate the path from the arguments. This will split at the first
16107   # space.
16108   complete="$FOUND_MAKE"
16109   path="${complete%% *}"
16110   tmp="$complete EOL"
16111   arguments="${tmp#* }"
16112 
16113   # Input might be given as Windows format, start by converting to
16114   # unix format.
16115   new_path=`$CYGPATH -u "$path"`
16116 
16117   # Now try to locate executable using which
16118   new_path=`$WHICH "$new_path" 2> /dev/null`
16119   # bat and cmd files are not always considered executable in cygwin causing which
16120   # to not find them
16121   if test "x$new_path" = x \
16122       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16123       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16124     new_path=`$CYGPATH -u "$path"`
16125   fi
16126   if test "x$new_path" = x; then
16127     # Oops. Which didn't find the executable.
16128     # The splitting of arguments from the executable at a space might have been incorrect,
16129     # since paths with space are more likely in Windows. Give it another try with the whole
16130     # argument.
16131     path="$complete"
16132     arguments="EOL"
16133     new_path=`$CYGPATH -u "$path"`
16134     new_path=`$WHICH "$new_path" 2> /dev/null`
16135     # bat and cmd files are not always considered executable in cygwin causing which
16136     # to not find them
16137     if test "x$new_path" = x \
16138         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16139         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16140       new_path=`$CYGPATH -u "$path"`
16141     fi
16142     if test "x$new_path" = x; then
16143       # It's still not found. Now this is an unrecoverable error.
16144       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16145 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16146       has_space=`$ECHO "$complete" | $GREP " "`
16147       if test "x$has_space" != x; then
16148         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16149 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16150       fi
16151       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16152     fi
16153   fi
16154 
16155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16158   # "foo.exe" is OK but "foo" is an error.
16159   #
16160   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16161   # It is also a way to make sure we got the proper file name for the real test later on.
16162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16163   if test "x$test_shortpath" = x; then
16164     # Short path failed, file does not exist as specified.
16165     # Try adding .exe or .cmd
16166     if test -f "${new_path}.exe"; then
16167       input_to_shortpath="${new_path}.exe"
16168     elif test -f "${new_path}.cmd"; then
16169       input_to_shortpath="${new_path}.cmd"
16170     else
16171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16172 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16173       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16174 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16175       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16176     fi
16177   else
16178     input_to_shortpath="$new_path"
16179   fi
16180 
16181   # Call helper function which possibly converts this using DOS-style short mode.
16182   # If so, the updated path is stored in $new_path.
16183   new_path="$input_to_shortpath"
16184 
16185   input_path="$input_to_shortpath"
16186   # Check if we need to convert this using DOS-style short mode. If the path
16187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16188   # take no chances and rewrite it.
16189   # Note: m4 eats our [], so we need to use [ and ] instead.
16190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16191   if test "x$has_forbidden_chars" != x; then
16192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16193     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16194     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16195     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16196       # Going to short mode and back again did indeed matter. Since short mode is
16197       # case insensitive, let's make it lowercase to improve readability.
16198       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16199       # Now convert it back to Unix-style (cygpath)
16200       input_path=`$CYGPATH -u "$shortmode_path"`
16201       new_path="$input_path"
16202     fi
16203   fi
16204 
16205   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16206   if test "x$test_cygdrive_prefix" = x; then
16207     # As a simple fix, exclude /usr/bin since it's not a real path.
16208     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16209       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16210       # a path prefixed by /cygdrive for fixpath to work.
16211       new_path="$CYGWIN_ROOT_PATH$input_path"
16212     fi
16213   fi
16214 
16215   # remove trailing .exe if any
16216   new_path="${new_path/%.exe/}"
16217 
16218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16219 
16220   # First separate the path from the arguments. This will split at the first
16221   # space.
16222   complete="$FOUND_MAKE"
16223   path="${complete%% *}"
16224   tmp="$complete EOL"
16225   arguments="${tmp#* }"
16226 
16227   # Input might be given as Windows format, start by converting to
16228   # unix format.
16229   new_path="$path"
16230 
16231   windows_path="$new_path"
16232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16233     unix_path=`$CYGPATH -u "$windows_path"`
16234     new_path="$unix_path"
16235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16237     new_path="$unix_path"
16238   fi
16239 
16240 
16241   # Now try to locate executable using which
16242   new_path=`$WHICH "$new_path" 2> /dev/null`
16243 
16244   if test "x$new_path" = x; then
16245     # Oops. Which didn't find the executable.
16246     # The splitting of arguments from the executable at a space might have been incorrect,
16247     # since paths with space are more likely in Windows. Give it another try with the whole
16248     # argument.
16249     path="$complete"
16250     arguments="EOL"
16251     new_path="$path"
16252 
16253   windows_path="$new_path"
16254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16255     unix_path=`$CYGPATH -u "$windows_path"`
16256     new_path="$unix_path"
16257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16259     new_path="$unix_path"
16260   fi
16261 
16262 
16263     new_path=`$WHICH "$new_path" 2> /dev/null`
16264     # bat and cmd files are not always considered executable in MSYS causing which
16265     # to not find them
16266     if test "x$new_path" = x \
16267         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16268         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16269       new_path="$path"
16270 
16271   windows_path="$new_path"
16272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16273     unix_path=`$CYGPATH -u "$windows_path"`
16274     new_path="$unix_path"
16275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16277     new_path="$unix_path"
16278   fi
16279 
16280     fi
16281 
16282     if test "x$new_path" = x; then
16283       # It's still not found. Now this is an unrecoverable error.
16284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16285 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16286       has_space=`$ECHO "$complete" | $GREP " "`
16287       if test "x$has_space" != x; then
16288         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16289 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16290       fi
16291       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16292     fi
16293   fi
16294 
16295   # Now new_path has a complete unix path to the binary
16296   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16297     # Keep paths in /bin as-is, but remove trailing .exe if any
16298     new_path="${new_path/%.exe/}"
16299     # Do not save /bin paths to all_fixpath_prefixes!
16300   else
16301     # Not in mixed or Windows style, start by that.
16302     new_path=`cmd //c echo $new_path`
16303 
16304   input_path="$new_path"
16305   # Check if we need to convert this using DOS-style short mode. If the path
16306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16307   # take no chances and rewrite it.
16308   # Note: m4 eats our [], so we need to use [ and ] instead.
16309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16310   if test "x$has_forbidden_chars" != x; then
16311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16313   fi
16314 
16315     # Output is in $new_path
16316 
16317   windows_path="$new_path"
16318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319     unix_path=`$CYGPATH -u "$windows_path"`
16320     new_path="$unix_path"
16321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16323     new_path="$unix_path"
16324   fi
16325 
16326     # remove trailing .exe if any
16327     new_path="${new_path/%.exe/}"
16328 
16329     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16330     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16331   fi
16332 
16333   else
16334     # We're on a posix platform. Hooray! :)
16335     # First separate the path from the arguments. This will split at the first
16336     # space.
16337     complete="$FOUND_MAKE"
16338     path="${complete%% *}"
16339     tmp="$complete EOL"
16340     arguments="${tmp#* }"
16341 
16342     # Cannot rely on the command "which" here since it doesn't always work.
16343     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16344     if test -z "$is_absolute_path"; then
16345       # Path to executable is not absolute. Find it.
16346       IFS_save="$IFS"
16347       IFS=:
16348       for p in $PATH; do
16349         if test -f "$p/$path" && test -x "$p/$path"; then
16350           new_path="$p/$path"
16351           break
16352         fi
16353       done
16354       IFS="$IFS_save"
16355     else
16356       # This is an absolute path, we can use it without further modifications.
16357       new_path="$path"
16358     fi
16359 
16360     if test "x$new_path" = x; then
16361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16362 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16363       has_space=`$ECHO "$complete" | $GREP " "`
16364       if test "x$has_space" != x; then
16365         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16366 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16367       fi
16368       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16369     fi
16370   fi
16371 
16372   # Now join together the path and the arguments once again
16373   if test "x$arguments" != xEOL; then
16374     new_complete="$new_path ${arguments% *}"
16375   else
16376     new_complete="$new_path"
16377   fi
16378 
16379   if test "x$complete" != "x$new_complete"; then
16380     FOUND_MAKE="$new_complete"
16381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16382 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16383   fi
16384 
16385         fi
16386       fi
16387     fi
16388   fi
16389 
16390     fi
16391 
16392     if test "x$FOUND_MAKE" = x; then
16393       if test "x$TOOLCHAIN_PATH" != x; then
16394         # We have a toolchain path, check that as well before giving up.
16395         OLD_PATH=$PATH
16396         PATH=$TOOLCHAIN_PATH:$PATH
16397         for ac_prog in gmake
16398 do
16399   # Extract the first word of "$ac_prog", so it can be a program name with args.
16400 set dummy $ac_prog; ac_word=$2
16401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16402 $as_echo_n "checking for $ac_word... " >&6; }
16403 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16404   $as_echo_n "(cached) " >&6
16405 else
16406   case $CHECK_TOOLSDIR_GMAKE in
16407   [\\/]* | ?:[\\/]*)
16408   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16409   ;;
16410   *)
16411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16412 for as_dir in $PATH
16413 do
16414   IFS=$as_save_IFS
16415   test -z "$as_dir" && as_dir=.
16416     for ac_exec_ext in '' $ac_executable_extensions; do
16417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16418     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16420     break 2
16421   fi
16422 done
16423   done
16424 IFS=$as_save_IFS
16425 
16426   ;;
16427 esac
16428 fi
16429 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16430 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16432 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16433 else
16434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16435 $as_echo "no" >&6; }
16436 fi
16437 
16438 
16439   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16440 done
16441 
16442 
16443   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16444   DESCRIPTION="gmake in tools-dir"
16445   if test "x$MAKE_CANDIDATE" != x; then
16446     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16447 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16448     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16449     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16450     if test "x$IS_GNU_MAKE" = x; then
16451       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16452 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16453     else
16454       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16455       if test "x$IS_MODERN_MAKE" = x; then
16456         { $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
16457 $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;}
16458       else
16459         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16460           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16461             MAKE_EXPECTED_ENV='cygwin'
16462           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16463             MAKE_EXPECTED_ENV='msys'
16464           else
16465             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16466           fi
16467           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16468           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16469         else
16470           # Not relevant for non-Windows
16471           IS_MAKE_CORRECT_ENV=true
16472         fi
16473         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16474           { $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
16475 $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;}
16476         else
16477           FOUND_MAKE=$MAKE_CANDIDATE
16478 
16479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480 
16481   # First separate the path from the arguments. This will split at the first
16482   # space.
16483   complete="$FOUND_MAKE"
16484   path="${complete%% *}"
16485   tmp="$complete EOL"
16486   arguments="${tmp#* }"
16487 
16488   # Input might be given as Windows format, start by converting to
16489   # unix format.
16490   new_path=`$CYGPATH -u "$path"`
16491 
16492   # Now try to locate executable using which
16493   new_path=`$WHICH "$new_path" 2> /dev/null`
16494   # bat and cmd files are not always considered executable in cygwin causing which
16495   # to not find them
16496   if test "x$new_path" = x \
16497       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16498       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16499     new_path=`$CYGPATH -u "$path"`
16500   fi
16501   if test "x$new_path" = x; then
16502     # Oops. Which didn't find the executable.
16503     # The splitting of arguments from the executable at a space might have been incorrect,
16504     # since paths with space are more likely in Windows. Give it another try with the whole
16505     # argument.
16506     path="$complete"
16507     arguments="EOL"
16508     new_path=`$CYGPATH -u "$path"`
16509     new_path=`$WHICH "$new_path" 2> /dev/null`
16510     # bat and cmd files are not always considered executable in cygwin causing which
16511     # to not find them
16512     if test "x$new_path" = x \
16513         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16514         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16515       new_path=`$CYGPATH -u "$path"`
16516     fi
16517     if test "x$new_path" = x; then
16518       # It's still not found. Now this is an unrecoverable error.
16519       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16520 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16521       has_space=`$ECHO "$complete" | $GREP " "`
16522       if test "x$has_space" != x; then
16523         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16524 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16525       fi
16526       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16527     fi
16528   fi
16529 
16530   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16531   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16532   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16533   # "foo.exe" is OK but "foo" is an error.
16534   #
16535   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16536   # It is also a way to make sure we got the proper file name for the real test later on.
16537   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16538   if test "x$test_shortpath" = x; then
16539     # Short path failed, file does not exist as specified.
16540     # Try adding .exe or .cmd
16541     if test -f "${new_path}.exe"; then
16542       input_to_shortpath="${new_path}.exe"
16543     elif test -f "${new_path}.cmd"; then
16544       input_to_shortpath="${new_path}.cmd"
16545     else
16546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16547 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16548       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16549 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16550       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16551     fi
16552   else
16553     input_to_shortpath="$new_path"
16554   fi
16555 
16556   # Call helper function which possibly converts this using DOS-style short mode.
16557   # If so, the updated path is stored in $new_path.
16558   new_path="$input_to_shortpath"
16559 
16560   input_path="$input_to_shortpath"
16561   # Check if we need to convert this using DOS-style short mode. If the path
16562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16563   # take no chances and rewrite it.
16564   # Note: m4 eats our [], so we need to use [ and ] instead.
16565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16566   if test "x$has_forbidden_chars" != x; then
16567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16568     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16569     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16570     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16571       # Going to short mode and back again did indeed matter. Since short mode is
16572       # case insensitive, let's make it lowercase to improve readability.
16573       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16574       # Now convert it back to Unix-style (cygpath)
16575       input_path=`$CYGPATH -u "$shortmode_path"`
16576       new_path="$input_path"
16577     fi
16578   fi
16579 
16580   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16581   if test "x$test_cygdrive_prefix" = x; then
16582     # As a simple fix, exclude /usr/bin since it's not a real path.
16583     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16584       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16585       # a path prefixed by /cygdrive for fixpath to work.
16586       new_path="$CYGWIN_ROOT_PATH$input_path"
16587     fi
16588   fi
16589 
16590   # remove trailing .exe if any
16591   new_path="${new_path/%.exe/}"
16592 
16593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16594 
16595   # First separate the path from the arguments. This will split at the first
16596   # space.
16597   complete="$FOUND_MAKE"
16598   path="${complete%% *}"
16599   tmp="$complete EOL"
16600   arguments="${tmp#* }"
16601 
16602   # Input might be given as Windows format, start by converting to
16603   # unix format.
16604   new_path="$path"
16605 
16606   windows_path="$new_path"
16607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16608     unix_path=`$CYGPATH -u "$windows_path"`
16609     new_path="$unix_path"
16610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16611     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16612     new_path="$unix_path"
16613   fi
16614 
16615 
16616   # Now try to locate executable using which
16617   new_path=`$WHICH "$new_path" 2> /dev/null`
16618 
16619   if test "x$new_path" = x; then
16620     # Oops. Which didn't find the executable.
16621     # The splitting of arguments from the executable at a space might have been incorrect,
16622     # since paths with space are more likely in Windows. Give it another try with the whole
16623     # argument.
16624     path="$complete"
16625     arguments="EOL"
16626     new_path="$path"
16627 
16628   windows_path="$new_path"
16629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16630     unix_path=`$CYGPATH -u "$windows_path"`
16631     new_path="$unix_path"
16632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16633     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16634     new_path="$unix_path"
16635   fi
16636 
16637 
16638     new_path=`$WHICH "$new_path" 2> /dev/null`
16639     # bat and cmd files are not always considered executable in MSYS causing which
16640     # to not find them
16641     if test "x$new_path" = x \
16642         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16643         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16644       new_path="$path"
16645 
16646   windows_path="$new_path"
16647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16648     unix_path=`$CYGPATH -u "$windows_path"`
16649     new_path="$unix_path"
16650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16652     new_path="$unix_path"
16653   fi
16654 
16655     fi
16656 
16657     if test "x$new_path" = x; then
16658       # It's still not found. Now this is an unrecoverable error.
16659       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16660 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16661       has_space=`$ECHO "$complete" | $GREP " "`
16662       if test "x$has_space" != x; then
16663         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16664 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16665       fi
16666       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16667     fi
16668   fi
16669 
16670   # Now new_path has a complete unix path to the binary
16671   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16672     # Keep paths in /bin as-is, but remove trailing .exe if any
16673     new_path="${new_path/%.exe/}"
16674     # Do not save /bin paths to all_fixpath_prefixes!
16675   else
16676     # Not in mixed or Windows style, start by that.
16677     new_path=`cmd //c echo $new_path`
16678 
16679   input_path="$new_path"
16680   # Check if we need to convert this using DOS-style short mode. If the path
16681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16682   # take no chances and rewrite it.
16683   # Note: m4 eats our [], so we need to use [ and ] instead.
16684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16685   if test "x$has_forbidden_chars" != x; then
16686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16687     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16688   fi
16689 
16690     # Output is in $new_path
16691 
16692   windows_path="$new_path"
16693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16694     unix_path=`$CYGPATH -u "$windows_path"`
16695     new_path="$unix_path"
16696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16698     new_path="$unix_path"
16699   fi
16700 
16701     # remove trailing .exe if any
16702     new_path="${new_path/%.exe/}"
16703 
16704     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16705     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16706   fi
16707 
16708   else
16709     # We're on a posix platform. Hooray! :)
16710     # First separate the path from the arguments. This will split at the first
16711     # space.
16712     complete="$FOUND_MAKE"
16713     path="${complete%% *}"
16714     tmp="$complete EOL"
16715     arguments="${tmp#* }"
16716 
16717     # Cannot rely on the command "which" here since it doesn't always work.
16718     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16719     if test -z "$is_absolute_path"; then
16720       # Path to executable is not absolute. Find it.
16721       IFS_save="$IFS"
16722       IFS=:
16723       for p in $PATH; do
16724         if test -f "$p/$path" && test -x "$p/$path"; then
16725           new_path="$p/$path"
16726           break
16727         fi
16728       done
16729       IFS="$IFS_save"
16730     else
16731       # This is an absolute path, we can use it without further modifications.
16732       new_path="$path"
16733     fi
16734 
16735     if test "x$new_path" = x; then
16736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16737 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16738       has_space=`$ECHO "$complete" | $GREP " "`
16739       if test "x$has_space" != x; then
16740         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16741 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16742       fi
16743       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16744     fi
16745   fi
16746 
16747   # Now join together the path and the arguments once again
16748   if test "x$arguments" != xEOL; then
16749     new_complete="$new_path ${arguments% *}"
16750   else
16751     new_complete="$new_path"
16752   fi
16753 
16754   if test "x$complete" != "x$new_complete"; then
16755     FOUND_MAKE="$new_complete"
16756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16757 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16758   fi
16759 
16760         fi
16761       fi
16762     fi
16763   fi
16764 
16765         if test "x$FOUND_MAKE" = x; then
16766           for ac_prog in make
16767 do
16768   # Extract the first word of "$ac_prog", so it can be a program name with args.
16769 set dummy $ac_prog; ac_word=$2
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16771 $as_echo_n "checking for $ac_word... " >&6; }
16772 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16773   $as_echo_n "(cached) " >&6
16774 else
16775   case $CHECK_TOOLSDIR_MAKE in
16776   [\\/]* | ?:[\\/]*)
16777   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16778   ;;
16779   *)
16780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16781 for as_dir in $PATH
16782 do
16783   IFS=$as_save_IFS
16784   test -z "$as_dir" && as_dir=.
16785     for ac_exec_ext in '' $ac_executable_extensions; do
16786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16787     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16789     break 2
16790   fi
16791 done
16792   done
16793 IFS=$as_save_IFS
16794 
16795   ;;
16796 esac
16797 fi
16798 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16799 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16801 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16802 else
16803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16804 $as_echo "no" >&6; }
16805 fi
16806 
16807 
16808   test -n "$CHECK_TOOLSDIR_MAKE" && break
16809 done
16810 
16811 
16812   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16813   DESCRIPTION="make in tools-dir"
16814   if test "x$MAKE_CANDIDATE" != x; then
16815     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16816 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16817     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16818     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16819     if test "x$IS_GNU_MAKE" = x; then
16820       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16821 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16822     else
16823       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16824       if test "x$IS_MODERN_MAKE" = x; then
16825         { $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
16826 $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;}
16827       else
16828         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16829           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830             MAKE_EXPECTED_ENV='cygwin'
16831           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16832             MAKE_EXPECTED_ENV='msys'
16833           else
16834             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16835           fi
16836           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16837           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16838         else
16839           # Not relevant for non-Windows
16840           IS_MAKE_CORRECT_ENV=true
16841         fi
16842         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16843           { $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
16844 $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;}
16845         else
16846           FOUND_MAKE=$MAKE_CANDIDATE
16847 
16848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16849 
16850   # First separate the path from the arguments. This will split at the first
16851   # space.
16852   complete="$FOUND_MAKE"
16853   path="${complete%% *}"
16854   tmp="$complete EOL"
16855   arguments="${tmp#* }"
16856 
16857   # Input might be given as Windows format, start by converting to
16858   # unix format.
16859   new_path=`$CYGPATH -u "$path"`
16860 
16861   # Now try to locate executable using which
16862   new_path=`$WHICH "$new_path" 2> /dev/null`
16863   # bat and cmd files are not always considered executable in cygwin causing which
16864   # to not find them
16865   if test "x$new_path" = x \
16866       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16867       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16868     new_path=`$CYGPATH -u "$path"`
16869   fi
16870   if test "x$new_path" = x; then
16871     # Oops. Which didn't find the executable.
16872     # The splitting of arguments from the executable at a space might have been incorrect,
16873     # since paths with space are more likely in Windows. Give it another try with the whole
16874     # argument.
16875     path="$complete"
16876     arguments="EOL"
16877     new_path=`$CYGPATH -u "$path"`
16878     new_path=`$WHICH "$new_path" 2> /dev/null`
16879     # bat and cmd files are not always considered executable in cygwin causing which
16880     # to not find them
16881     if test "x$new_path" = x \
16882         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16883         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16884       new_path=`$CYGPATH -u "$path"`
16885     fi
16886     if test "x$new_path" = x; then
16887       # It's still not found. Now this is an unrecoverable error.
16888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16889 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16890       has_space=`$ECHO "$complete" | $GREP " "`
16891       if test "x$has_space" != x; then
16892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16894       fi
16895       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16896     fi
16897   fi
16898 
16899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16902   # "foo.exe" is OK but "foo" is an error.
16903   #
16904   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16905   # It is also a way to make sure we got the proper file name for the real test later on.
16906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16907   if test "x$test_shortpath" = x; then
16908     # Short path failed, file does not exist as specified.
16909     # Try adding .exe or .cmd
16910     if test -f "${new_path}.exe"; then
16911       input_to_shortpath="${new_path}.exe"
16912     elif test -f "${new_path}.cmd"; then
16913       input_to_shortpath="${new_path}.cmd"
16914     else
16915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16916 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16917       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16918 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16919       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16920     fi
16921   else
16922     input_to_shortpath="$new_path"
16923   fi
16924 
16925   # Call helper function which possibly converts this using DOS-style short mode.
16926   # If so, the updated path is stored in $new_path.
16927   new_path="$input_to_shortpath"
16928 
16929   input_path="$input_to_shortpath"
16930   # Check if we need to convert this using DOS-style short mode. If the path
16931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16932   # take no chances and rewrite it.
16933   # Note: m4 eats our [], so we need to use [ and ] instead.
16934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16935   if test "x$has_forbidden_chars" != x; then
16936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16940       # Going to short mode and back again did indeed matter. Since short mode is
16941       # case insensitive, let's make it lowercase to improve readability.
16942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16943       # Now convert it back to Unix-style (cygpath)
16944       input_path=`$CYGPATH -u "$shortmode_path"`
16945       new_path="$input_path"
16946     fi
16947   fi
16948 
16949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16950   if test "x$test_cygdrive_prefix" = x; then
16951     # As a simple fix, exclude /usr/bin since it's not a real path.
16952     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16954       # a path prefixed by /cygdrive for fixpath to work.
16955       new_path="$CYGWIN_ROOT_PATH$input_path"
16956     fi
16957   fi
16958 
16959   # remove trailing .exe if any
16960   new_path="${new_path/%.exe/}"
16961 
16962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963 
16964   # First separate the path from the arguments. This will split at the first
16965   # space.
16966   complete="$FOUND_MAKE"
16967   path="${complete%% *}"
16968   tmp="$complete EOL"
16969   arguments="${tmp#* }"
16970 
16971   # Input might be given as Windows format, start by converting to
16972   # unix format.
16973   new_path="$path"
16974 
16975   windows_path="$new_path"
16976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16977     unix_path=`$CYGPATH -u "$windows_path"`
16978     new_path="$unix_path"
16979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16981     new_path="$unix_path"
16982   fi
16983 
16984 
16985   # Now try to locate executable using which
16986   new_path=`$WHICH "$new_path" 2> /dev/null`
16987 
16988   if test "x$new_path" = x; then
16989     # Oops. Which didn't find the executable.
16990     # The splitting of arguments from the executable at a space might have been incorrect,
16991     # since paths with space are more likely in Windows. Give it another try with the whole
16992     # argument.
16993     path="$complete"
16994     arguments="EOL"
16995     new_path="$path"
16996 
16997   windows_path="$new_path"
16998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16999     unix_path=`$CYGPATH -u "$windows_path"`
17000     new_path="$unix_path"
17001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17003     new_path="$unix_path"
17004   fi
17005 
17006 
17007     new_path=`$WHICH "$new_path" 2> /dev/null`
17008     # bat and cmd files are not always considered executable in MSYS causing which
17009     # to not find them
17010     if test "x$new_path" = x \
17011         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17012         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17013       new_path="$path"
17014 
17015   windows_path="$new_path"
17016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17017     unix_path=`$CYGPATH -u "$windows_path"`
17018     new_path="$unix_path"
17019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17021     new_path="$unix_path"
17022   fi
17023 
17024     fi
17025 
17026     if test "x$new_path" = x; then
17027       # It's still not found. Now this is an unrecoverable error.
17028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17029 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17030       has_space=`$ECHO "$complete" | $GREP " "`
17031       if test "x$has_space" != x; then
17032         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17033 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17034       fi
17035       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17036     fi
17037   fi
17038 
17039   # Now new_path has a complete unix path to the binary
17040   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17041     # Keep paths in /bin as-is, but remove trailing .exe if any
17042     new_path="${new_path/%.exe/}"
17043     # Do not save /bin paths to all_fixpath_prefixes!
17044   else
17045     # Not in mixed or Windows style, start by that.
17046     new_path=`cmd //c echo $new_path`
17047 
17048   input_path="$new_path"
17049   # Check if we need to convert this using DOS-style short mode. If the path
17050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17051   # take no chances and rewrite it.
17052   # Note: m4 eats our [], so we need to use [ and ] instead.
17053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17054   if test "x$has_forbidden_chars" != x; then
17055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17057   fi
17058 
17059     # Output is in $new_path
17060 
17061   windows_path="$new_path"
17062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17063     unix_path=`$CYGPATH -u "$windows_path"`
17064     new_path="$unix_path"
17065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17067     new_path="$unix_path"
17068   fi
17069 
17070     # remove trailing .exe if any
17071     new_path="${new_path/%.exe/}"
17072 
17073     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17074     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17075   fi
17076 
17077   else
17078     # We're on a posix platform. Hooray! :)
17079     # First separate the path from the arguments. This will split at the first
17080     # space.
17081     complete="$FOUND_MAKE"
17082     path="${complete%% *}"
17083     tmp="$complete EOL"
17084     arguments="${tmp#* }"
17085 
17086     # Cannot rely on the command "which" here since it doesn't always work.
17087     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17088     if test -z "$is_absolute_path"; then
17089       # Path to executable is not absolute. Find it.
17090       IFS_save="$IFS"
17091       IFS=:
17092       for p in $PATH; do
17093         if test -f "$p/$path" && test -x "$p/$path"; then
17094           new_path="$p/$path"
17095           break
17096         fi
17097       done
17098       IFS="$IFS_save"
17099     else
17100       # This is an absolute path, we can use it without further modifications.
17101       new_path="$path"
17102     fi
17103 
17104     if test "x$new_path" = x; then
17105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17106 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17107       has_space=`$ECHO "$complete" | $GREP " "`
17108       if test "x$has_space" != x; then
17109         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17110 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17111       fi
17112       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17113     fi
17114   fi
17115 
17116   # Now join together the path and the arguments once again
17117   if test "x$arguments" != xEOL; then
17118     new_complete="$new_path ${arguments% *}"
17119   else
17120     new_complete="$new_path"
17121   fi
17122 
17123   if test "x$complete" != "x$new_complete"; then
17124     FOUND_MAKE="$new_complete"
17125     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17126 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17127   fi
17128 
17129         fi
17130       fi
17131     fi
17132   fi
17133 
17134         fi
17135         PATH=$OLD_PATH
17136       fi
17137     fi
17138 
17139     if test "x$FOUND_MAKE" = x; then
17140       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
17141     fi
17142   fi
17143 
17144   MAKE=$FOUND_MAKE
17145 
17146   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17147 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17148 
17149 
17150 
17151   # Test if find supports -delete
17152   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17153 $as_echo_n "checking if find supports -delete... " >&6; }
17154   FIND_DELETE="-delete"
17155 
17156   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17157 
17158   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17159 
17160   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17161   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17162     # No, it does not.
17163     rm $DELETEDIR/TestIfFindSupportsDelete
17164     FIND_DELETE="-exec rm \{\} \+"
17165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17166 $as_echo "no" >&6; }
17167   else
17168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17169 $as_echo "yes" >&6; }
17170   fi
17171   rmdir $DELETEDIR
17172 
17173 
17174 
17175   # These tools might not be installed by default,
17176   # need hint on how to install them.
17177 
17178 
17179 
17180   # Publish this variable in the help.
17181 
17182 
17183   if test "x$UNZIP" = x; then
17184     # The variable is not set by user, try to locate tool using the code snippet
17185     for ac_prog in unzip
17186 do
17187   # Extract the first word of "$ac_prog", so it can be a program name with args.
17188 set dummy $ac_prog; ac_word=$2
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17190 $as_echo_n "checking for $ac_word... " >&6; }
17191 if ${ac_cv_path_UNZIP+:} false; then :
17192   $as_echo_n "(cached) " >&6
17193 else
17194   case $UNZIP in
17195   [\\/]* | ?:[\\/]*)
17196   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17197   ;;
17198   *)
17199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17200 for as_dir in $PATH
17201 do
17202   IFS=$as_save_IFS
17203   test -z "$as_dir" && as_dir=.
17204     for ac_exec_ext in '' $ac_executable_extensions; do
17205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17206     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17208     break 2
17209   fi
17210 done
17211   done
17212 IFS=$as_save_IFS
17213 
17214   ;;
17215 esac
17216 fi
17217 UNZIP=$ac_cv_path_UNZIP
17218 if test -n "$UNZIP"; then
17219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17220 $as_echo "$UNZIP" >&6; }
17221 else
17222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17223 $as_echo "no" >&6; }
17224 fi
17225 
17226 
17227   test -n "$UNZIP" && break
17228 done
17229 
17230   else
17231     # The variable is set, but is it from the command line or the environment?
17232 
17233     # Try to remove the string !UNZIP! from our list.
17234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17236       # If it failed, the variable was not from the command line. Ignore it,
17237       # but warn the user (except for BASH, which is always set by the calling BASH).
17238       if test "xUNZIP" != xBASH; then
17239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17240 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17241       fi
17242       # Try to locate tool using the code snippet
17243       for ac_prog in unzip
17244 do
17245   # Extract the first word of "$ac_prog", so it can be a program name with args.
17246 set dummy $ac_prog; ac_word=$2
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17248 $as_echo_n "checking for $ac_word... " >&6; }
17249 if ${ac_cv_path_UNZIP+:} false; then :
17250   $as_echo_n "(cached) " >&6
17251 else
17252   case $UNZIP in
17253   [\\/]* | ?:[\\/]*)
17254   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17255   ;;
17256   *)
17257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17258 for as_dir in $PATH
17259 do
17260   IFS=$as_save_IFS
17261   test -z "$as_dir" && as_dir=.
17262     for ac_exec_ext in '' $ac_executable_extensions; do
17263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17264     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17266     break 2
17267   fi
17268 done
17269   done
17270 IFS=$as_save_IFS
17271 
17272   ;;
17273 esac
17274 fi
17275 UNZIP=$ac_cv_path_UNZIP
17276 if test -n "$UNZIP"; then
17277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17278 $as_echo "$UNZIP" >&6; }
17279 else
17280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17281 $as_echo "no" >&6; }
17282 fi
17283 
17284 
17285   test -n "$UNZIP" && break
17286 done
17287 
17288     else
17289       # If it succeeded, then it was overridden by the user. We will use it
17290       # for the tool.
17291 
17292       # First remove it from the list of overridden variables, so we can test
17293       # for unknown variables in the end.
17294       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17295 
17296       # Check if the provided tool contains a complete path.
17297       tool_specified="$UNZIP"
17298       tool_basename="${tool_specified##*/}"
17299       if test "x$tool_basename" = "x$tool_specified"; then
17300         # A command without a complete path is provided, search $PATH.
17301         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17302 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17303         # Extract the first word of "$tool_basename", so it can be a program name with args.
17304 set dummy $tool_basename; ac_word=$2
17305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17306 $as_echo_n "checking for $ac_word... " >&6; }
17307 if ${ac_cv_path_UNZIP+:} false; then :
17308   $as_echo_n "(cached) " >&6
17309 else
17310   case $UNZIP in
17311   [\\/]* | ?:[\\/]*)
17312   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17313   ;;
17314   *)
17315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17316 for as_dir in $PATH
17317 do
17318   IFS=$as_save_IFS
17319   test -z "$as_dir" && as_dir=.
17320     for ac_exec_ext in '' $ac_executable_extensions; do
17321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17322     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17324     break 2
17325   fi
17326 done
17327   done
17328 IFS=$as_save_IFS
17329 
17330   ;;
17331 esac
17332 fi
17333 UNZIP=$ac_cv_path_UNZIP
17334 if test -n "$UNZIP"; then
17335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17336 $as_echo "$UNZIP" >&6; }
17337 else
17338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17339 $as_echo "no" >&6; }
17340 fi
17341 
17342 
17343         if test "x$UNZIP" = x; then
17344           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17345         fi
17346       else
17347         # Otherwise we believe it is a complete path. Use it as it is.
17348         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17349 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17351 $as_echo_n "checking for UNZIP... " >&6; }
17352         if test ! -x "$tool_specified"; then
17353           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17354 $as_echo "not found" >&6; }
17355           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17356         fi
17357         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17358 $as_echo "$tool_specified" >&6; }
17359       fi
17360     fi
17361   fi
17362 
17363 
17364 
17365   if test "x$UNZIP" = x; then
17366     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17367   fi
17368 
17369 
17370 
17371 
17372 
17373   # Publish this variable in the help.
17374 
17375 
17376   if test "x$ZIP" = x; then
17377     # The variable is not set by user, try to locate tool using the code snippet
17378     for ac_prog in zip
17379 do
17380   # Extract the first word of "$ac_prog", so it can be a program name with args.
17381 set dummy $ac_prog; ac_word=$2
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17383 $as_echo_n "checking for $ac_word... " >&6; }
17384 if ${ac_cv_path_ZIP+:} false; then :
17385   $as_echo_n "(cached) " >&6
17386 else
17387   case $ZIP in
17388   [\\/]* | ?:[\\/]*)
17389   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17390   ;;
17391   *)
17392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17393 for as_dir in $PATH
17394 do
17395   IFS=$as_save_IFS
17396   test -z "$as_dir" && as_dir=.
17397     for ac_exec_ext in '' $ac_executable_extensions; do
17398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17399     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17401     break 2
17402   fi
17403 done
17404   done
17405 IFS=$as_save_IFS
17406 
17407   ;;
17408 esac
17409 fi
17410 ZIP=$ac_cv_path_ZIP
17411 if test -n "$ZIP"; then
17412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17413 $as_echo "$ZIP" >&6; }
17414 else
17415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17416 $as_echo "no" >&6; }
17417 fi
17418 
17419 
17420   test -n "$ZIP" && break
17421 done
17422 
17423   else
17424     # The variable is set, but is it from the command line or the environment?
17425 
17426     # Try to remove the string !ZIP! from our list.
17427     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17428     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17429       # If it failed, the variable was not from the command line. Ignore it,
17430       # but warn the user (except for BASH, which is always set by the calling BASH).
17431       if test "xZIP" != xBASH; then
17432         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17433 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17434       fi
17435       # Try to locate tool using the code snippet
17436       for ac_prog in zip
17437 do
17438   # Extract the first word of "$ac_prog", so it can be a program name with args.
17439 set dummy $ac_prog; ac_word=$2
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17441 $as_echo_n "checking for $ac_word... " >&6; }
17442 if ${ac_cv_path_ZIP+:} false; then :
17443   $as_echo_n "(cached) " >&6
17444 else
17445   case $ZIP in
17446   [\\/]* | ?:[\\/]*)
17447   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17448   ;;
17449   *)
17450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17451 for as_dir in $PATH
17452 do
17453   IFS=$as_save_IFS
17454   test -z "$as_dir" && as_dir=.
17455     for ac_exec_ext in '' $ac_executable_extensions; do
17456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17457     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17459     break 2
17460   fi
17461 done
17462   done
17463 IFS=$as_save_IFS
17464 
17465   ;;
17466 esac
17467 fi
17468 ZIP=$ac_cv_path_ZIP
17469 if test -n "$ZIP"; then
17470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17471 $as_echo "$ZIP" >&6; }
17472 else
17473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474 $as_echo "no" >&6; }
17475 fi
17476 
17477 
17478   test -n "$ZIP" && break
17479 done
17480 
17481     else
17482       # If it succeeded, then it was overridden by the user. We will use it
17483       # for the tool.
17484 
17485       # First remove it from the list of overridden variables, so we can test
17486       # for unknown variables in the end.
17487       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17488 
17489       # Check if the provided tool contains a complete path.
17490       tool_specified="$ZIP"
17491       tool_basename="${tool_specified##*/}"
17492       if test "x$tool_basename" = "x$tool_specified"; then
17493         # A command without a complete path is provided, search $PATH.
17494         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17495 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17496         # Extract the first word of "$tool_basename", so it can be a program name with args.
17497 set dummy $tool_basename; ac_word=$2
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17499 $as_echo_n "checking for $ac_word... " >&6; }
17500 if ${ac_cv_path_ZIP+:} false; then :
17501   $as_echo_n "(cached) " >&6
17502 else
17503   case $ZIP in
17504   [\\/]* | ?:[\\/]*)
17505   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17506   ;;
17507   *)
17508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17509 for as_dir in $PATH
17510 do
17511   IFS=$as_save_IFS
17512   test -z "$as_dir" && as_dir=.
17513     for ac_exec_ext in '' $ac_executable_extensions; do
17514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17515     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17517     break 2
17518   fi
17519 done
17520   done
17521 IFS=$as_save_IFS
17522 
17523   ;;
17524 esac
17525 fi
17526 ZIP=$ac_cv_path_ZIP
17527 if test -n "$ZIP"; then
17528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17529 $as_echo "$ZIP" >&6; }
17530 else
17531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17532 $as_echo "no" >&6; }
17533 fi
17534 
17535 
17536         if test "x$ZIP" = x; then
17537           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17538         fi
17539       else
17540         # Otherwise we believe it is a complete path. Use it as it is.
17541         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17542 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17544 $as_echo_n "checking for ZIP... " >&6; }
17545         if test ! -x "$tool_specified"; then
17546           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17547 $as_echo "not found" >&6; }
17548           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17549         fi
17550         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17551 $as_echo "$tool_specified" >&6; }
17552       fi
17553     fi
17554   fi
17555 
17556 
17557 
17558   if test "x$ZIP" = x; then
17559     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17560   fi
17561 
17562 
17563 
17564   # Non-required basic tools
17565 
17566 
17567 
17568   # Publish this variable in the help.
17569 
17570 
17571   if test "x$LDD" = x; then
17572     # The variable is not set by user, try to locate tool using the code snippet
17573     for ac_prog in ldd
17574 do
17575   # Extract the first word of "$ac_prog", so it can be a program name with args.
17576 set dummy $ac_prog; ac_word=$2
17577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17578 $as_echo_n "checking for $ac_word... " >&6; }
17579 if ${ac_cv_path_LDD+:} false; then :
17580   $as_echo_n "(cached) " >&6
17581 else
17582   case $LDD in
17583   [\\/]* | ?:[\\/]*)
17584   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17585   ;;
17586   *)
17587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17588 for as_dir in $PATH
17589 do
17590   IFS=$as_save_IFS
17591   test -z "$as_dir" && as_dir=.
17592     for ac_exec_ext in '' $ac_executable_extensions; do
17593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17594     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17596     break 2
17597   fi
17598 done
17599   done
17600 IFS=$as_save_IFS
17601 
17602   ;;
17603 esac
17604 fi
17605 LDD=$ac_cv_path_LDD
17606 if test -n "$LDD"; then
17607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17608 $as_echo "$LDD" >&6; }
17609 else
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17611 $as_echo "no" >&6; }
17612 fi
17613 
17614 
17615   test -n "$LDD" && break
17616 done
17617 
17618   else
17619     # The variable is set, but is it from the command line or the environment?
17620 
17621     # Try to remove the string !LDD! from our list.
17622     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17623     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17624       # If it failed, the variable was not from the command line. Ignore it,
17625       # but warn the user (except for BASH, which is always set by the calling BASH).
17626       if test "xLDD" != xBASH; then
17627         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17628 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17629       fi
17630       # Try to locate tool using the code snippet
17631       for ac_prog in ldd
17632 do
17633   # Extract the first word of "$ac_prog", so it can be a program name with args.
17634 set dummy $ac_prog; ac_word=$2
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17636 $as_echo_n "checking for $ac_word... " >&6; }
17637 if ${ac_cv_path_LDD+:} false; then :
17638   $as_echo_n "(cached) " >&6
17639 else
17640   case $LDD in
17641   [\\/]* | ?:[\\/]*)
17642   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17643   ;;
17644   *)
17645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17646 for as_dir in $PATH
17647 do
17648   IFS=$as_save_IFS
17649   test -z "$as_dir" && as_dir=.
17650     for ac_exec_ext in '' $ac_executable_extensions; do
17651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17652     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17654     break 2
17655   fi
17656 done
17657   done
17658 IFS=$as_save_IFS
17659 
17660   ;;
17661 esac
17662 fi
17663 LDD=$ac_cv_path_LDD
17664 if test -n "$LDD"; then
17665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17666 $as_echo "$LDD" >&6; }
17667 else
17668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17669 $as_echo "no" >&6; }
17670 fi
17671 
17672 
17673   test -n "$LDD" && break
17674 done
17675 
17676     else
17677       # If it succeeded, then it was overridden by the user. We will use it
17678       # for the tool.
17679 
17680       # First remove it from the list of overridden variables, so we can test
17681       # for unknown variables in the end.
17682       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17683 
17684       # Check if the provided tool contains a complete path.
17685       tool_specified="$LDD"
17686       tool_basename="${tool_specified##*/}"
17687       if test "x$tool_basename" = "x$tool_specified"; then
17688         # A command without a complete path is provided, search $PATH.
17689         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17690 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17691         # Extract the first word of "$tool_basename", so it can be a program name with args.
17692 set dummy $tool_basename; ac_word=$2
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17694 $as_echo_n "checking for $ac_word... " >&6; }
17695 if ${ac_cv_path_LDD+:} false; then :
17696   $as_echo_n "(cached) " >&6
17697 else
17698   case $LDD in
17699   [\\/]* | ?:[\\/]*)
17700   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17701   ;;
17702   *)
17703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17704 for as_dir in $PATH
17705 do
17706   IFS=$as_save_IFS
17707   test -z "$as_dir" && as_dir=.
17708     for ac_exec_ext in '' $ac_executable_extensions; do
17709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17710     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17712     break 2
17713   fi
17714 done
17715   done
17716 IFS=$as_save_IFS
17717 
17718   ;;
17719 esac
17720 fi
17721 LDD=$ac_cv_path_LDD
17722 if test -n "$LDD"; then
17723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17724 $as_echo "$LDD" >&6; }
17725 else
17726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17727 $as_echo "no" >&6; }
17728 fi
17729 
17730 
17731         if test "x$LDD" = x; then
17732           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17733         fi
17734       else
17735         # Otherwise we believe it is a complete path. Use it as it is.
17736         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17737 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17738         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17739 $as_echo_n "checking for LDD... " >&6; }
17740         if test ! -x "$tool_specified"; then
17741           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17742 $as_echo "not found" >&6; }
17743           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17744         fi
17745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17746 $as_echo "$tool_specified" >&6; }
17747       fi
17748     fi
17749   fi
17750 
17751 
17752   if test "x$LDD" = "x"; then
17753     # List shared lib dependencies is used for
17754     # debug output and checking for forbidden dependencies.
17755     # We can build without it.
17756     LDD="true"
17757   fi
17758 
17759 
17760   # Publish this variable in the help.
17761 
17762 
17763   if test "x$READELF" = x; then
17764     # The variable is not set by user, try to locate tool using the code snippet
17765     for ac_prog in readelf greadelf
17766 do
17767   # Extract the first word of "$ac_prog", so it can be a program name with args.
17768 set dummy $ac_prog; ac_word=$2
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17770 $as_echo_n "checking for $ac_word... " >&6; }
17771 if ${ac_cv_path_READELF+:} false; then :
17772   $as_echo_n "(cached) " >&6
17773 else
17774   case $READELF in
17775   [\\/]* | ?:[\\/]*)
17776   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17777   ;;
17778   *)
17779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17780 for as_dir in $PATH
17781 do
17782   IFS=$as_save_IFS
17783   test -z "$as_dir" && as_dir=.
17784     for ac_exec_ext in '' $ac_executable_extensions; do
17785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17786     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17788     break 2
17789   fi
17790 done
17791   done
17792 IFS=$as_save_IFS
17793 
17794   ;;
17795 esac
17796 fi
17797 READELF=$ac_cv_path_READELF
17798 if test -n "$READELF"; then
17799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17800 $as_echo "$READELF" >&6; }
17801 else
17802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803 $as_echo "no" >&6; }
17804 fi
17805 
17806 
17807   test -n "$READELF" && break
17808 done
17809 
17810   else
17811     # The variable is set, but is it from the command line or the environment?
17812 
17813     # Try to remove the string !READELF! from our list.
17814     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17815     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17816       # If it failed, the variable was not from the command line. Ignore it,
17817       # but warn the user (except for BASH, which is always set by the calling BASH).
17818       if test "xREADELF" != xBASH; then
17819         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17820 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17821       fi
17822       # Try to locate tool using the code snippet
17823       for ac_prog in readelf greadelf
17824 do
17825   # Extract the first word of "$ac_prog", so it can be a program name with args.
17826 set dummy $ac_prog; ac_word=$2
17827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17828 $as_echo_n "checking for $ac_word... " >&6; }
17829 if ${ac_cv_path_READELF+:} false; then :
17830   $as_echo_n "(cached) " >&6
17831 else
17832   case $READELF in
17833   [\\/]* | ?:[\\/]*)
17834   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17835   ;;
17836   *)
17837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17838 for as_dir in $PATH
17839 do
17840   IFS=$as_save_IFS
17841   test -z "$as_dir" && as_dir=.
17842     for ac_exec_ext in '' $ac_executable_extensions; do
17843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17844     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17846     break 2
17847   fi
17848 done
17849   done
17850 IFS=$as_save_IFS
17851 
17852   ;;
17853 esac
17854 fi
17855 READELF=$ac_cv_path_READELF
17856 if test -n "$READELF"; then
17857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17858 $as_echo "$READELF" >&6; }
17859 else
17860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17861 $as_echo "no" >&6; }
17862 fi
17863 
17864 
17865   test -n "$READELF" && break
17866 done
17867 
17868     else
17869       # If it succeeded, then it was overridden by the user. We will use it
17870       # for the tool.
17871 
17872       # First remove it from the list of overridden variables, so we can test
17873       # for unknown variables in the end.
17874       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17875 
17876       # Check if the provided tool contains a complete path.
17877       tool_specified="$READELF"
17878       tool_basename="${tool_specified##*/}"
17879       if test "x$tool_basename" = "x$tool_specified"; then
17880         # A command without a complete path is provided, search $PATH.
17881         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17882 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17883         # Extract the first word of "$tool_basename", so it can be a program name with args.
17884 set dummy $tool_basename; ac_word=$2
17885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17886 $as_echo_n "checking for $ac_word... " >&6; }
17887 if ${ac_cv_path_READELF+:} false; then :
17888   $as_echo_n "(cached) " >&6
17889 else
17890   case $READELF in
17891   [\\/]* | ?:[\\/]*)
17892   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17893   ;;
17894   *)
17895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17896 for as_dir in $PATH
17897 do
17898   IFS=$as_save_IFS
17899   test -z "$as_dir" && as_dir=.
17900     for ac_exec_ext in '' $ac_executable_extensions; do
17901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17902     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17904     break 2
17905   fi
17906 done
17907   done
17908 IFS=$as_save_IFS
17909 
17910   ;;
17911 esac
17912 fi
17913 READELF=$ac_cv_path_READELF
17914 if test -n "$READELF"; then
17915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17916 $as_echo "$READELF" >&6; }
17917 else
17918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17919 $as_echo "no" >&6; }
17920 fi
17921 
17922 
17923         if test "x$READELF" = x; then
17924           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17925         fi
17926       else
17927         # Otherwise we believe it is a complete path. Use it as it is.
17928         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17929 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17931 $as_echo_n "checking for READELF... " >&6; }
17932         if test ! -x "$tool_specified"; then
17933           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17934 $as_echo "not found" >&6; }
17935           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17936         fi
17937         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17938 $as_echo "$tool_specified" >&6; }
17939       fi
17940     fi
17941   fi
17942 
17943 
17944 
17945 
17946   # Publish this variable in the help.
17947 
17948 
17949   if test "x$HG" = x; then
17950     # The variable is not set by user, try to locate tool using the code snippet
17951     for ac_prog in hg
17952 do
17953   # Extract the first word of "$ac_prog", so it can be a program name with args.
17954 set dummy $ac_prog; ac_word=$2
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956 $as_echo_n "checking for $ac_word... " >&6; }
17957 if ${ac_cv_path_HG+:} false; then :
17958   $as_echo_n "(cached) " >&6
17959 else
17960   case $HG in
17961   [\\/]* | ?:[\\/]*)
17962   ac_cv_path_HG="$HG" # Let the user override the test with a path.
17963   ;;
17964   *)
17965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966 for as_dir in $PATH
17967 do
17968   IFS=$as_save_IFS
17969   test -z "$as_dir" && as_dir=.
17970     for ac_exec_ext in '' $ac_executable_extensions; do
17971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974     break 2
17975   fi
17976 done
17977   done
17978 IFS=$as_save_IFS
17979 
17980   ;;
17981 esac
17982 fi
17983 HG=$ac_cv_path_HG
17984 if test -n "$HG"; then
17985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17986 $as_echo "$HG" >&6; }
17987 else
17988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989 $as_echo "no" >&6; }
17990 fi
17991 
17992 
17993   test -n "$HG" && break
17994 done
17995 
17996   else
17997     # The variable is set, but is it from the command line or the environment?
17998 
17999     # Try to remove the string !HG! from our list.
18000     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18001     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18002       # If it failed, the variable was not from the command line. Ignore it,
18003       # but warn the user (except for BASH, which is always set by the calling BASH).
18004       if test "xHG" != xBASH; then
18005         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18006 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18007       fi
18008       # Try to locate tool using the code snippet
18009       for ac_prog in hg
18010 do
18011   # Extract the first word of "$ac_prog", so it can be a program name with args.
18012 set dummy $ac_prog; ac_word=$2
18013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014 $as_echo_n "checking for $ac_word... " >&6; }
18015 if ${ac_cv_path_HG+:} false; then :
18016   $as_echo_n "(cached) " >&6
18017 else
18018   case $HG in
18019   [\\/]* | ?:[\\/]*)
18020   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18021   ;;
18022   *)
18023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024 for as_dir in $PATH
18025 do
18026   IFS=$as_save_IFS
18027   test -z "$as_dir" && as_dir=.
18028     for ac_exec_ext in '' $ac_executable_extensions; do
18029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032     break 2
18033   fi
18034 done
18035   done
18036 IFS=$as_save_IFS
18037 
18038   ;;
18039 esac
18040 fi
18041 HG=$ac_cv_path_HG
18042 if test -n "$HG"; then
18043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18044 $as_echo "$HG" >&6; }
18045 else
18046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047 $as_echo "no" >&6; }
18048 fi
18049 
18050 
18051   test -n "$HG" && break
18052 done
18053 
18054     else
18055       # If it succeeded, then it was overridden by the user. We will use it
18056       # for the tool.
18057 
18058       # First remove it from the list of overridden variables, so we can test
18059       # for unknown variables in the end.
18060       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18061 
18062       # Check if the provided tool contains a complete path.
18063       tool_specified="$HG"
18064       tool_basename="${tool_specified##*/}"
18065       if test "x$tool_basename" = "x$tool_specified"; then
18066         # A command without a complete path is provided, search $PATH.
18067         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18068 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18069         # Extract the first word of "$tool_basename", so it can be a program name with args.
18070 set dummy $tool_basename; ac_word=$2
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072 $as_echo_n "checking for $ac_word... " >&6; }
18073 if ${ac_cv_path_HG+:} false; then :
18074   $as_echo_n "(cached) " >&6
18075 else
18076   case $HG in
18077   [\\/]* | ?:[\\/]*)
18078   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18079   ;;
18080   *)
18081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082 for as_dir in $PATH
18083 do
18084   IFS=$as_save_IFS
18085   test -z "$as_dir" && as_dir=.
18086     for ac_exec_ext in '' $ac_executable_extensions; do
18087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18088     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090     break 2
18091   fi
18092 done
18093   done
18094 IFS=$as_save_IFS
18095 
18096   ;;
18097 esac
18098 fi
18099 HG=$ac_cv_path_HG
18100 if test -n "$HG"; then
18101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18102 $as_echo "$HG" >&6; }
18103 else
18104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105 $as_echo "no" >&6; }
18106 fi
18107 
18108 
18109         if test "x$HG" = x; then
18110           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18111         fi
18112       else
18113         # Otherwise we believe it is a complete path. Use it as it is.
18114         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18115 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18117 $as_echo_n "checking for HG... " >&6; }
18118         if test ! -x "$tool_specified"; then
18119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18120 $as_echo "not found" >&6; }
18121           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18122         fi
18123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18124 $as_echo "$tool_specified" >&6; }
18125       fi
18126     fi
18127   fi
18128 
18129 
18130 
18131 
18132   # Publish this variable in the help.
18133 
18134 
18135   if test "x$STAT" = x; then
18136     # The variable is not set by user, try to locate tool using the code snippet
18137     for ac_prog in stat
18138 do
18139   # Extract the first word of "$ac_prog", so it can be a program name with args.
18140 set dummy $ac_prog; ac_word=$2
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142 $as_echo_n "checking for $ac_word... " >&6; }
18143 if ${ac_cv_path_STAT+:} false; then :
18144   $as_echo_n "(cached) " >&6
18145 else
18146   case $STAT in
18147   [\\/]* | ?:[\\/]*)
18148   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18149   ;;
18150   *)
18151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152 for as_dir in $PATH
18153 do
18154   IFS=$as_save_IFS
18155   test -z "$as_dir" && as_dir=.
18156     for ac_exec_ext in '' $ac_executable_extensions; do
18157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160     break 2
18161   fi
18162 done
18163   done
18164 IFS=$as_save_IFS
18165 
18166   ;;
18167 esac
18168 fi
18169 STAT=$ac_cv_path_STAT
18170 if test -n "$STAT"; then
18171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18172 $as_echo "$STAT" >&6; }
18173 else
18174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175 $as_echo "no" >&6; }
18176 fi
18177 
18178 
18179   test -n "$STAT" && break
18180 done
18181 
18182   else
18183     # The variable is set, but is it from the command line or the environment?
18184 
18185     # Try to remove the string !STAT! from our list.
18186     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18187     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18188       # If it failed, the variable was not from the command line. Ignore it,
18189       # but warn the user (except for BASH, which is always set by the calling BASH).
18190       if test "xSTAT" != xBASH; then
18191         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18192 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18193       fi
18194       # Try to locate tool using the code snippet
18195       for ac_prog in stat
18196 do
18197   # Extract the first word of "$ac_prog", so it can be a program name with args.
18198 set dummy $ac_prog; ac_word=$2
18199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18200 $as_echo_n "checking for $ac_word... " >&6; }
18201 if ${ac_cv_path_STAT+:} false; then :
18202   $as_echo_n "(cached) " >&6
18203 else
18204   case $STAT in
18205   [\\/]* | ?:[\\/]*)
18206   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18207   ;;
18208   *)
18209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210 for as_dir in $PATH
18211 do
18212   IFS=$as_save_IFS
18213   test -z "$as_dir" && as_dir=.
18214     for ac_exec_ext in '' $ac_executable_extensions; do
18215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18216     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18218     break 2
18219   fi
18220 done
18221   done
18222 IFS=$as_save_IFS
18223 
18224   ;;
18225 esac
18226 fi
18227 STAT=$ac_cv_path_STAT
18228 if test -n "$STAT"; then
18229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18230 $as_echo "$STAT" >&6; }
18231 else
18232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18233 $as_echo "no" >&6; }
18234 fi
18235 
18236 
18237   test -n "$STAT" && break
18238 done
18239 
18240     else
18241       # If it succeeded, then it was overridden by the user. We will use it
18242       # for the tool.
18243 
18244       # First remove it from the list of overridden variables, so we can test
18245       # for unknown variables in the end.
18246       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18247 
18248       # Check if the provided tool contains a complete path.
18249       tool_specified="$STAT"
18250       tool_basename="${tool_specified##*/}"
18251       if test "x$tool_basename" = "x$tool_specified"; then
18252         # A command without a complete path is provided, search $PATH.
18253         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18254 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18255         # Extract the first word of "$tool_basename", so it can be a program name with args.
18256 set dummy $tool_basename; ac_word=$2
18257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18258 $as_echo_n "checking for $ac_word... " >&6; }
18259 if ${ac_cv_path_STAT+:} false; then :
18260   $as_echo_n "(cached) " >&6
18261 else
18262   case $STAT in
18263   [\\/]* | ?:[\\/]*)
18264   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18265   ;;
18266   *)
18267   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18268 for as_dir in $PATH
18269 do
18270   IFS=$as_save_IFS
18271   test -z "$as_dir" && as_dir=.
18272     for ac_exec_ext in '' $ac_executable_extensions; do
18273   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18274     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18275     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18276     break 2
18277   fi
18278 done
18279   done
18280 IFS=$as_save_IFS
18281 
18282   ;;
18283 esac
18284 fi
18285 STAT=$ac_cv_path_STAT
18286 if test -n "$STAT"; then
18287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18288 $as_echo "$STAT" >&6; }
18289 else
18290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18291 $as_echo "no" >&6; }
18292 fi
18293 
18294 
18295         if test "x$STAT" = x; then
18296           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18297         fi
18298       else
18299         # Otherwise we believe it is a complete path. Use it as it is.
18300         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18301 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18302         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18303 $as_echo_n "checking for STAT... " >&6; }
18304         if test ! -x "$tool_specified"; then
18305           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18306 $as_echo "not found" >&6; }
18307           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18308         fi
18309         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18310 $as_echo "$tool_specified" >&6; }
18311       fi
18312     fi
18313   fi
18314 
18315 
18316 
18317 
18318   # Publish this variable in the help.
18319 
18320 
18321   if test "x$TIME" = x; then
18322     # The variable is not set by user, try to locate tool using the code snippet
18323     for ac_prog in time
18324 do
18325   # Extract the first word of "$ac_prog", so it can be a program name with args.
18326 set dummy $ac_prog; ac_word=$2
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328 $as_echo_n "checking for $ac_word... " >&6; }
18329 if ${ac_cv_path_TIME+:} false; then :
18330   $as_echo_n "(cached) " >&6
18331 else
18332   case $TIME in
18333   [\\/]* | ?:[\\/]*)
18334   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18335   ;;
18336   *)
18337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18338 for as_dir in $PATH
18339 do
18340   IFS=$as_save_IFS
18341   test -z "$as_dir" && as_dir=.
18342     for ac_exec_ext in '' $ac_executable_extensions; do
18343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18344     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18346     break 2
18347   fi
18348 done
18349   done
18350 IFS=$as_save_IFS
18351 
18352   ;;
18353 esac
18354 fi
18355 TIME=$ac_cv_path_TIME
18356 if test -n "$TIME"; then
18357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18358 $as_echo "$TIME" >&6; }
18359 else
18360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361 $as_echo "no" >&6; }
18362 fi
18363 
18364 
18365   test -n "$TIME" && break
18366 done
18367 
18368   else
18369     # The variable is set, but is it from the command line or the environment?
18370 
18371     # Try to remove the string !TIME! from our list.
18372     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18373     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18374       # If it failed, the variable was not from the command line. Ignore it,
18375       # but warn the user (except for BASH, which is always set by the calling BASH).
18376       if test "xTIME" != xBASH; then
18377         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18378 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18379       fi
18380       # Try to locate tool using the code snippet
18381       for ac_prog in time
18382 do
18383   # Extract the first word of "$ac_prog", so it can be a program name with args.
18384 set dummy $ac_prog; ac_word=$2
18385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386 $as_echo_n "checking for $ac_word... " >&6; }
18387 if ${ac_cv_path_TIME+:} false; then :
18388   $as_echo_n "(cached) " >&6
18389 else
18390   case $TIME in
18391   [\\/]* | ?:[\\/]*)
18392   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18393   ;;
18394   *)
18395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396 for as_dir in $PATH
18397 do
18398   IFS=$as_save_IFS
18399   test -z "$as_dir" && as_dir=.
18400     for ac_exec_ext in '' $ac_executable_extensions; do
18401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404     break 2
18405   fi
18406 done
18407   done
18408 IFS=$as_save_IFS
18409 
18410   ;;
18411 esac
18412 fi
18413 TIME=$ac_cv_path_TIME
18414 if test -n "$TIME"; then
18415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18416 $as_echo "$TIME" >&6; }
18417 else
18418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419 $as_echo "no" >&6; }
18420 fi
18421 
18422 
18423   test -n "$TIME" && break
18424 done
18425 
18426     else
18427       # If it succeeded, then it was overridden by the user. We will use it
18428       # for the tool.
18429 
18430       # First remove it from the list of overridden variables, so we can test
18431       # for unknown variables in the end.
18432       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18433 
18434       # Check if the provided tool contains a complete path.
18435       tool_specified="$TIME"
18436       tool_basename="${tool_specified##*/}"
18437       if test "x$tool_basename" = "x$tool_specified"; then
18438         # A command without a complete path is provided, search $PATH.
18439         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18440 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18441         # Extract the first word of "$tool_basename", so it can be a program name with args.
18442 set dummy $tool_basename; ac_word=$2
18443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18444 $as_echo_n "checking for $ac_word... " >&6; }
18445 if ${ac_cv_path_TIME+:} false; then :
18446   $as_echo_n "(cached) " >&6
18447 else
18448   case $TIME in
18449   [\\/]* | ?:[\\/]*)
18450   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18451   ;;
18452   *)
18453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18454 for as_dir in $PATH
18455 do
18456   IFS=$as_save_IFS
18457   test -z "$as_dir" && as_dir=.
18458     for ac_exec_ext in '' $ac_executable_extensions; do
18459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18460     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18462     break 2
18463   fi
18464 done
18465   done
18466 IFS=$as_save_IFS
18467 
18468   ;;
18469 esac
18470 fi
18471 TIME=$ac_cv_path_TIME
18472 if test -n "$TIME"; then
18473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18474 $as_echo "$TIME" >&6; }
18475 else
18476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18477 $as_echo "no" >&6; }
18478 fi
18479 
18480 
18481         if test "x$TIME" = x; then
18482           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18483         fi
18484       else
18485         # Otherwise we believe it is a complete path. Use it as it is.
18486         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18487 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18488         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18489 $as_echo_n "checking for TIME... " >&6; }
18490         if test ! -x "$tool_specified"; then
18491           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18492 $as_echo "not found" >&6; }
18493           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18494         fi
18495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18496 $as_echo "$tool_specified" >&6; }
18497       fi
18498     fi
18499   fi
18500 
18501 
18502   # Check if it's GNU time
18503   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18504   if test "x$IS_GNU_TIME" != x; then
18505     IS_GNU_TIME=yes
18506   else
18507     IS_GNU_TIME=no
18508   fi
18509 
18510 
18511   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18512 
18513 
18514 
18515   # Publish this variable in the help.
18516 
18517 
18518   if test "x$COMM" = x; then
18519     # The variable is not set by user, try to locate tool using the code snippet
18520     for ac_prog in comm
18521 do
18522   # Extract the first word of "$ac_prog", so it can be a program name with args.
18523 set dummy $ac_prog; ac_word=$2
18524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18525 $as_echo_n "checking for $ac_word... " >&6; }
18526 if ${ac_cv_path_COMM+:} false; then :
18527   $as_echo_n "(cached) " >&6
18528 else
18529   case $COMM in
18530   [\\/]* | ?:[\\/]*)
18531   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18532   ;;
18533   *)
18534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18535 for as_dir in $PATH
18536 do
18537   IFS=$as_save_IFS
18538   test -z "$as_dir" && as_dir=.
18539     for ac_exec_ext in '' $ac_executable_extensions; do
18540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18541     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18543     break 2
18544   fi
18545 done
18546   done
18547 IFS=$as_save_IFS
18548 
18549   ;;
18550 esac
18551 fi
18552 COMM=$ac_cv_path_COMM
18553 if test -n "$COMM"; then
18554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18555 $as_echo "$COMM" >&6; }
18556 else
18557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18558 $as_echo "no" >&6; }
18559 fi
18560 
18561 
18562   test -n "$COMM" && break
18563 done
18564 
18565   else
18566     # The variable is set, but is it from the command line or the environment?
18567 
18568     # Try to remove the string !COMM! from our list.
18569     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18570     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18571       # If it failed, the variable was not from the command line. Ignore it,
18572       # but warn the user (except for BASH, which is always set by the calling BASH).
18573       if test "xCOMM" != xBASH; then
18574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18575 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18576       fi
18577       # Try to locate tool using the code snippet
18578       for ac_prog in comm
18579 do
18580   # Extract the first word of "$ac_prog", so it can be a program name with args.
18581 set dummy $ac_prog; ac_word=$2
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18583 $as_echo_n "checking for $ac_word... " >&6; }
18584 if ${ac_cv_path_COMM+:} false; then :
18585   $as_echo_n "(cached) " >&6
18586 else
18587   case $COMM in
18588   [\\/]* | ?:[\\/]*)
18589   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18590   ;;
18591   *)
18592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18593 for as_dir in $PATH
18594 do
18595   IFS=$as_save_IFS
18596   test -z "$as_dir" && as_dir=.
18597     for ac_exec_ext in '' $ac_executable_extensions; do
18598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18599     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18601     break 2
18602   fi
18603 done
18604   done
18605 IFS=$as_save_IFS
18606 
18607   ;;
18608 esac
18609 fi
18610 COMM=$ac_cv_path_COMM
18611 if test -n "$COMM"; then
18612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18613 $as_echo "$COMM" >&6; }
18614 else
18615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18616 $as_echo "no" >&6; }
18617 fi
18618 
18619 
18620   test -n "$COMM" && break
18621 done
18622 
18623     else
18624       # If it succeeded, then it was overridden by the user. We will use it
18625       # for the tool.
18626 
18627       # First remove it from the list of overridden variables, so we can test
18628       # for unknown variables in the end.
18629       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18630 
18631       # Check if the provided tool contains a complete path.
18632       tool_specified="$COMM"
18633       tool_basename="${tool_specified##*/}"
18634       if test "x$tool_basename" = "x$tool_specified"; then
18635         # A command without a complete path is provided, search $PATH.
18636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18637 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18638         # Extract the first word of "$tool_basename", so it can be a program name with args.
18639 set dummy $tool_basename; ac_word=$2
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18641 $as_echo_n "checking for $ac_word... " >&6; }
18642 if ${ac_cv_path_COMM+:} false; then :
18643   $as_echo_n "(cached) " >&6
18644 else
18645   case $COMM in
18646   [\\/]* | ?:[\\/]*)
18647   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18648   ;;
18649   *)
18650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18651 for as_dir in $PATH
18652 do
18653   IFS=$as_save_IFS
18654   test -z "$as_dir" && as_dir=.
18655     for ac_exec_ext in '' $ac_executable_extensions; do
18656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18657     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18659     break 2
18660   fi
18661 done
18662   done
18663 IFS=$as_save_IFS
18664 
18665   ;;
18666 esac
18667 fi
18668 COMM=$ac_cv_path_COMM
18669 if test -n "$COMM"; then
18670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18671 $as_echo "$COMM" >&6; }
18672 else
18673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18674 $as_echo "no" >&6; }
18675 fi
18676 
18677 
18678         if test "x$COMM" = x; then
18679           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18680         fi
18681       else
18682         # Otherwise we believe it is a complete path. Use it as it is.
18683         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18684 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18685         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18686 $as_echo_n "checking for COMM... " >&6; }
18687         if test ! -x "$tool_specified"; then
18688           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18689 $as_echo "not found" >&6; }
18690           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18691         fi
18692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18693 $as_echo "$tool_specified" >&6; }
18694       fi
18695     fi
18696   fi
18697 
18698 
18699 
18700   if test "x$COMM" = x; then
18701     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18702   fi
18703 
18704 
18705   fi
18706 
18707   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18708 
18709 
18710 
18711   # Publish this variable in the help.
18712 
18713 
18714   if test "x$DSYMUTIL" = x; then
18715     # The variable is not set by user, try to locate tool using the code snippet
18716     for ac_prog in dsymutil
18717 do
18718   # Extract the first word of "$ac_prog", so it can be a program name with args.
18719 set dummy $ac_prog; ac_word=$2
18720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18721 $as_echo_n "checking for $ac_word... " >&6; }
18722 if ${ac_cv_path_DSYMUTIL+:} false; then :
18723   $as_echo_n "(cached) " >&6
18724 else
18725   case $DSYMUTIL in
18726   [\\/]* | ?:[\\/]*)
18727   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18728   ;;
18729   *)
18730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18731 for as_dir in $PATH
18732 do
18733   IFS=$as_save_IFS
18734   test -z "$as_dir" && as_dir=.
18735     for ac_exec_ext in '' $ac_executable_extensions; do
18736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18737     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18739     break 2
18740   fi
18741 done
18742   done
18743 IFS=$as_save_IFS
18744 
18745   ;;
18746 esac
18747 fi
18748 DSYMUTIL=$ac_cv_path_DSYMUTIL
18749 if test -n "$DSYMUTIL"; then
18750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18751 $as_echo "$DSYMUTIL" >&6; }
18752 else
18753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18754 $as_echo "no" >&6; }
18755 fi
18756 
18757 
18758   test -n "$DSYMUTIL" && break
18759 done
18760 
18761   else
18762     # The variable is set, but is it from the command line or the environment?
18763 
18764     # Try to remove the string !DSYMUTIL! from our list.
18765     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18766     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18767       # If it failed, the variable was not from the command line. Ignore it,
18768       # but warn the user (except for BASH, which is always set by the calling BASH).
18769       if test "xDSYMUTIL" != xBASH; then
18770         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18771 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18772       fi
18773       # Try to locate tool using the code snippet
18774       for ac_prog in dsymutil
18775 do
18776   # Extract the first word of "$ac_prog", so it can be a program name with args.
18777 set dummy $ac_prog; ac_word=$2
18778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18779 $as_echo_n "checking for $ac_word... " >&6; }
18780 if ${ac_cv_path_DSYMUTIL+:} false; then :
18781   $as_echo_n "(cached) " >&6
18782 else
18783   case $DSYMUTIL in
18784   [\\/]* | ?:[\\/]*)
18785   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18786   ;;
18787   *)
18788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18789 for as_dir in $PATH
18790 do
18791   IFS=$as_save_IFS
18792   test -z "$as_dir" && as_dir=.
18793     for ac_exec_ext in '' $ac_executable_extensions; do
18794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18795     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18797     break 2
18798   fi
18799 done
18800   done
18801 IFS=$as_save_IFS
18802 
18803   ;;
18804 esac
18805 fi
18806 DSYMUTIL=$ac_cv_path_DSYMUTIL
18807 if test -n "$DSYMUTIL"; then
18808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18809 $as_echo "$DSYMUTIL" >&6; }
18810 else
18811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18812 $as_echo "no" >&6; }
18813 fi
18814 
18815 
18816   test -n "$DSYMUTIL" && break
18817 done
18818 
18819     else
18820       # If it succeeded, then it was overridden by the user. We will use it
18821       # for the tool.
18822 
18823       # First remove it from the list of overridden variables, so we can test
18824       # for unknown variables in the end.
18825       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18826 
18827       # Check if the provided tool contains a complete path.
18828       tool_specified="$DSYMUTIL"
18829       tool_basename="${tool_specified##*/}"
18830       if test "x$tool_basename" = "x$tool_specified"; then
18831         # A command without a complete path is provided, search $PATH.
18832         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18833 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18834         # Extract the first word of "$tool_basename", so it can be a program name with args.
18835 set dummy $tool_basename; ac_word=$2
18836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18837 $as_echo_n "checking for $ac_word... " >&6; }
18838 if ${ac_cv_path_DSYMUTIL+:} false; then :
18839   $as_echo_n "(cached) " >&6
18840 else
18841   case $DSYMUTIL in
18842   [\\/]* | ?:[\\/]*)
18843   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18844   ;;
18845   *)
18846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18847 for as_dir in $PATH
18848 do
18849   IFS=$as_save_IFS
18850   test -z "$as_dir" && as_dir=.
18851     for ac_exec_ext in '' $ac_executable_extensions; do
18852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18853     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18855     break 2
18856   fi
18857 done
18858   done
18859 IFS=$as_save_IFS
18860 
18861   ;;
18862 esac
18863 fi
18864 DSYMUTIL=$ac_cv_path_DSYMUTIL
18865 if test -n "$DSYMUTIL"; then
18866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18867 $as_echo "$DSYMUTIL" >&6; }
18868 else
18869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18870 $as_echo "no" >&6; }
18871 fi
18872 
18873 
18874         if test "x$DSYMUTIL" = x; then
18875           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18876         fi
18877       else
18878         # Otherwise we believe it is a complete path. Use it as it is.
18879         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18880 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18881         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18882 $as_echo_n "checking for DSYMUTIL... " >&6; }
18883         if test ! -x "$tool_specified"; then
18884           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18885 $as_echo "not found" >&6; }
18886           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18887         fi
18888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18889 $as_echo "$tool_specified" >&6; }
18890       fi
18891     fi
18892   fi
18893 
18894 
18895 
18896   if test "x$DSYMUTIL" = x; then
18897     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18898   fi
18899 
18900 
18901 
18902 
18903 
18904   # Publish this variable in the help.
18905 
18906 
18907   if test "x$XATTR" = x; then
18908     # The variable is not set by user, try to locate tool using the code snippet
18909     for ac_prog in xattr
18910 do
18911   # Extract the first word of "$ac_prog", so it can be a program name with args.
18912 set dummy $ac_prog; ac_word=$2
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18914 $as_echo_n "checking for $ac_word... " >&6; }
18915 if ${ac_cv_path_XATTR+:} false; then :
18916   $as_echo_n "(cached) " >&6
18917 else
18918   case $XATTR in
18919   [\\/]* | ?:[\\/]*)
18920   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18921   ;;
18922   *)
18923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18924 for as_dir in $PATH
18925 do
18926   IFS=$as_save_IFS
18927   test -z "$as_dir" && as_dir=.
18928     for ac_exec_ext in '' $ac_executable_extensions; do
18929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18930     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18932     break 2
18933   fi
18934 done
18935   done
18936 IFS=$as_save_IFS
18937 
18938   ;;
18939 esac
18940 fi
18941 XATTR=$ac_cv_path_XATTR
18942 if test -n "$XATTR"; then
18943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18944 $as_echo "$XATTR" >&6; }
18945 else
18946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18947 $as_echo "no" >&6; }
18948 fi
18949 
18950 
18951   test -n "$XATTR" && break
18952 done
18953 
18954   else
18955     # The variable is set, but is it from the command line or the environment?
18956 
18957     # Try to remove the string !XATTR! from our list.
18958     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18959     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18960       # If it failed, the variable was not from the command line. Ignore it,
18961       # but warn the user (except for BASH, which is always set by the calling BASH).
18962       if test "xXATTR" != xBASH; then
18963         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18964 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18965       fi
18966       # Try to locate tool using the code snippet
18967       for ac_prog in xattr
18968 do
18969   # Extract the first word of "$ac_prog", so it can be a program name with args.
18970 set dummy $ac_prog; ac_word=$2
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18972 $as_echo_n "checking for $ac_word... " >&6; }
18973 if ${ac_cv_path_XATTR+:} false; then :
18974   $as_echo_n "(cached) " >&6
18975 else
18976   case $XATTR in
18977   [\\/]* | ?:[\\/]*)
18978   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18979   ;;
18980   *)
18981   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18982 for as_dir in $PATH
18983 do
18984   IFS=$as_save_IFS
18985   test -z "$as_dir" && as_dir=.
18986     for ac_exec_ext in '' $ac_executable_extensions; do
18987   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18988     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18989     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18990     break 2
18991   fi
18992 done
18993   done
18994 IFS=$as_save_IFS
18995 
18996   ;;
18997 esac
18998 fi
18999 XATTR=$ac_cv_path_XATTR
19000 if test -n "$XATTR"; then
19001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19002 $as_echo "$XATTR" >&6; }
19003 else
19004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19005 $as_echo "no" >&6; }
19006 fi
19007 
19008 
19009   test -n "$XATTR" && break
19010 done
19011 
19012     else
19013       # If it succeeded, then it was overridden by the user. We will use it
19014       # for the tool.
19015 
19016       # First remove it from the list of overridden variables, so we can test
19017       # for unknown variables in the end.
19018       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19019 
19020       # Check if the provided tool contains a complete path.
19021       tool_specified="$XATTR"
19022       tool_basename="${tool_specified##*/}"
19023       if test "x$tool_basename" = "x$tool_specified"; then
19024         # A command without a complete path is provided, search $PATH.
19025         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19026 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19027         # Extract the first word of "$tool_basename", so it can be a program name with args.
19028 set dummy $tool_basename; ac_word=$2
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19030 $as_echo_n "checking for $ac_word... " >&6; }
19031 if ${ac_cv_path_XATTR+:} false; then :
19032   $as_echo_n "(cached) " >&6
19033 else
19034   case $XATTR in
19035   [\\/]* | ?:[\\/]*)
19036   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19037   ;;
19038   *)
19039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19040 for as_dir in $PATH
19041 do
19042   IFS=$as_save_IFS
19043   test -z "$as_dir" && as_dir=.
19044     for ac_exec_ext in '' $ac_executable_extensions; do
19045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19046     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19048     break 2
19049   fi
19050 done
19051   done
19052 IFS=$as_save_IFS
19053 
19054   ;;
19055 esac
19056 fi
19057 XATTR=$ac_cv_path_XATTR
19058 if test -n "$XATTR"; then
19059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19060 $as_echo "$XATTR" >&6; }
19061 else
19062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19063 $as_echo "no" >&6; }
19064 fi
19065 
19066 
19067         if test "x$XATTR" = x; then
19068           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19069         fi
19070       else
19071         # Otherwise we believe it is a complete path. Use it as it is.
19072         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19073 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19075 $as_echo_n "checking for XATTR... " >&6; }
19076         if test ! -x "$tool_specified"; then
19077           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19078 $as_echo "not found" >&6; }
19079           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19080         fi
19081         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19082 $as_echo "$tool_specified" >&6; }
19083       fi
19084     fi
19085   fi
19086 
19087 
19088 
19089   if test "x$XATTR" = x; then
19090     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19091   fi
19092 
19093 
19094 
19095 
19096   # Publish this variable in the help.
19097 
19098 
19099   if test "x$CODESIGN" = x; then
19100     # The variable is not set by user, try to locate tool using the code snippet
19101     for ac_prog in codesign
19102 do
19103   # Extract the first word of "$ac_prog", so it can be a program name with args.
19104 set dummy $ac_prog; ac_word=$2
19105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19106 $as_echo_n "checking for $ac_word... " >&6; }
19107 if ${ac_cv_path_CODESIGN+:} false; then :
19108   $as_echo_n "(cached) " >&6
19109 else
19110   case $CODESIGN in
19111   [\\/]* | ?:[\\/]*)
19112   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19113   ;;
19114   *)
19115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19116 for as_dir in $PATH
19117 do
19118   IFS=$as_save_IFS
19119   test -z "$as_dir" && as_dir=.
19120     for ac_exec_ext in '' $ac_executable_extensions; do
19121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19122     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19124     break 2
19125   fi
19126 done
19127   done
19128 IFS=$as_save_IFS
19129 
19130   ;;
19131 esac
19132 fi
19133 CODESIGN=$ac_cv_path_CODESIGN
19134 if test -n "$CODESIGN"; then
19135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19136 $as_echo "$CODESIGN" >&6; }
19137 else
19138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139 $as_echo "no" >&6; }
19140 fi
19141 
19142 
19143   test -n "$CODESIGN" && break
19144 done
19145 
19146   else
19147     # The variable is set, but is it from the command line or the environment?
19148 
19149     # Try to remove the string !CODESIGN! from our list.
19150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19152       # If it failed, the variable was not from the command line. Ignore it,
19153       # but warn the user (except for BASH, which is always set by the calling BASH).
19154       if test "xCODESIGN" != xBASH; then
19155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19156 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19157       fi
19158       # Try to locate tool using the code snippet
19159       for ac_prog in codesign
19160 do
19161   # Extract the first word of "$ac_prog", so it can be a program name with args.
19162 set dummy $ac_prog; ac_word=$2
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19164 $as_echo_n "checking for $ac_word... " >&6; }
19165 if ${ac_cv_path_CODESIGN+:} false; then :
19166   $as_echo_n "(cached) " >&6
19167 else
19168   case $CODESIGN in
19169   [\\/]* | ?:[\\/]*)
19170   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19171   ;;
19172   *)
19173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19174 for as_dir in $PATH
19175 do
19176   IFS=$as_save_IFS
19177   test -z "$as_dir" && as_dir=.
19178     for ac_exec_ext in '' $ac_executable_extensions; do
19179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19180     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19182     break 2
19183   fi
19184 done
19185   done
19186 IFS=$as_save_IFS
19187 
19188   ;;
19189 esac
19190 fi
19191 CODESIGN=$ac_cv_path_CODESIGN
19192 if test -n "$CODESIGN"; then
19193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19194 $as_echo "$CODESIGN" >&6; }
19195 else
19196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19197 $as_echo "no" >&6; }
19198 fi
19199 
19200 
19201   test -n "$CODESIGN" && break
19202 done
19203 
19204     else
19205       # If it succeeded, then it was overridden by the user. We will use it
19206       # for the tool.
19207 
19208       # First remove it from the list of overridden variables, so we can test
19209       # for unknown variables in the end.
19210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19211 
19212       # Check if the provided tool contains a complete path.
19213       tool_specified="$CODESIGN"
19214       tool_basename="${tool_specified##*/}"
19215       if test "x$tool_basename" = "x$tool_specified"; then
19216         # A command without a complete path is provided, search $PATH.
19217         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19218 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19219         # Extract the first word of "$tool_basename", so it can be a program name with args.
19220 set dummy $tool_basename; ac_word=$2
19221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19222 $as_echo_n "checking for $ac_word... " >&6; }
19223 if ${ac_cv_path_CODESIGN+:} false; then :
19224   $as_echo_n "(cached) " >&6
19225 else
19226   case $CODESIGN in
19227   [\\/]* | ?:[\\/]*)
19228   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19229   ;;
19230   *)
19231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19232 for as_dir in $PATH
19233 do
19234   IFS=$as_save_IFS
19235   test -z "$as_dir" && as_dir=.
19236     for ac_exec_ext in '' $ac_executable_extensions; do
19237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19238     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19240     break 2
19241   fi
19242 done
19243   done
19244 IFS=$as_save_IFS
19245 
19246   ;;
19247 esac
19248 fi
19249 CODESIGN=$ac_cv_path_CODESIGN
19250 if test -n "$CODESIGN"; then
19251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19252 $as_echo "$CODESIGN" >&6; }
19253 else
19254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19255 $as_echo "no" >&6; }
19256 fi
19257 
19258 
19259         if test "x$CODESIGN" = x; then
19260           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19261         fi
19262       else
19263         # Otherwise we believe it is a complete path. Use it as it is.
19264         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19265 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19267 $as_echo_n "checking for CODESIGN... " >&6; }
19268         if test ! -x "$tool_specified"; then
19269           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19270 $as_echo "not found" >&6; }
19271           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19272         fi
19273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19274 $as_echo "$tool_specified" >&6; }
19275       fi
19276     fi
19277   fi
19278 
19279 
19280     if test "x$CODESIGN" != "x"; then
19281       # Verify that the openjdk_codesign certificate is present
19282       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19283 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19284       rm -f codesign-testfile
19285       touch codesign-testfile
19286       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19287       rm -f codesign-testfile
19288       if test "x$CODESIGN" = x; then
19289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19290 $as_echo "no" >&6; }
19291       else
19292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19293 $as_echo "yes" >&6; }
19294       fi
19295     fi
19296   fi
19297 
19298 
19299 # Check if pkg-config is available.
19300 
19301 
19302 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19303         if test -n "$ac_tool_prefix"; then
19304   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19305 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19307 $as_echo_n "checking for $ac_word... " >&6; }
19308 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19309   $as_echo_n "(cached) " >&6
19310 else
19311   case $PKG_CONFIG in
19312   [\\/]* | ?:[\\/]*)
19313   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19314   ;;
19315   *)
19316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19317 for as_dir in $PATH
19318 do
19319   IFS=$as_save_IFS
19320   test -z "$as_dir" && as_dir=.
19321     for ac_exec_ext in '' $ac_executable_extensions; do
19322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19323     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19325     break 2
19326   fi
19327 done
19328   done
19329 IFS=$as_save_IFS
19330 
19331   ;;
19332 esac
19333 fi
19334 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19335 if test -n "$PKG_CONFIG"; then
19336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19337 $as_echo "$PKG_CONFIG" >&6; }
19338 else
19339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19340 $as_echo "no" >&6; }
19341 fi
19342 
19343 
19344 fi
19345 if test -z "$ac_cv_path_PKG_CONFIG"; then
19346   ac_pt_PKG_CONFIG=$PKG_CONFIG
19347   # Extract the first word of "pkg-config", so it can be a program name with args.
19348 set dummy pkg-config; ac_word=$2
19349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350 $as_echo_n "checking for $ac_word... " >&6; }
19351 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19352   $as_echo_n "(cached) " >&6
19353 else
19354   case $ac_pt_PKG_CONFIG in
19355   [\\/]* | ?:[\\/]*)
19356   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19357   ;;
19358   *)
19359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19360 for as_dir in $PATH
19361 do
19362   IFS=$as_save_IFS
19363   test -z "$as_dir" && as_dir=.
19364     for ac_exec_ext in '' $ac_executable_extensions; do
19365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19366     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19368     break 2
19369   fi
19370 done
19371   done
19372 IFS=$as_save_IFS
19373 
19374   ;;
19375 esac
19376 fi
19377 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19378 if test -n "$ac_pt_PKG_CONFIG"; then
19379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19380 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19381 else
19382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19383 $as_echo "no" >&6; }
19384 fi
19385 
19386   if test "x$ac_pt_PKG_CONFIG" = x; then
19387     PKG_CONFIG=""
19388   else
19389     case $cross_compiling:$ac_tool_warned in
19390 yes:)
19391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19393 ac_tool_warned=yes ;;
19394 esac
19395     PKG_CONFIG=$ac_pt_PKG_CONFIG
19396   fi
19397 else
19398   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19399 fi
19400 
19401 fi
19402 if test -n "$PKG_CONFIG"; then
19403         _pkg_min_version=0.9.0
19404         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19405 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19406         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19407                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19408 $as_echo "yes" >&6; }
19409         else
19410                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19411 $as_echo "no" >&6; }
19412                 PKG_CONFIG=""
19413         fi
19414 
19415 fi
19416 
19417 # After basic tools have been setup, we can check build os specific details.
19418 
19419   ###############################################################################
19420 
19421   # Note that this is the build platform OS version!
19422 
19423   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19424   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19425   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19426   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19427 
19428 
19429 
19430 
19431 
19432 # Setup builddeps, for automatic downloading of tools we need.
19433 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19434 # boot-jdk setup, but we need to have basic tools setup first.
19435 
19436 
19437 # Check whether --with-builddeps-conf was given.
19438 if test "${with_builddeps_conf+set}" = set; then :
19439   withval=$with_builddeps_conf;
19440 fi
19441 
19442 
19443 
19444 # Check whether --with-builddeps-server was given.
19445 if test "${with_builddeps_server+set}" = set; then :
19446   withval=$with_builddeps_server;
19447 fi
19448 
19449 
19450 
19451 # Check whether --with-builddeps-dir was given.
19452 if test "${with_builddeps_dir+set}" = set; then :
19453   withval=$with_builddeps_dir;
19454 else
19455   with_builddeps_dir=/localhome/builddeps
19456 fi
19457 
19458 
19459 
19460 # Check whether --with-builddeps-group was given.
19461 if test "${with_builddeps_group+set}" = set; then :
19462   withval=$with_builddeps_group;
19463 fi
19464 
19465 
19466 
19467 
19468   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19469     if test "x$with_builddeps_conf" != x; then
19470       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19471 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19472       builddepsfile=$with_builddeps_conf
19473       if test -s $builddepsfile; then
19474         . $builddepsfile
19475         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19476 $as_echo "loaded!" >&6; }
19477       else
19478         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19479       fi
19480     else
19481       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19482 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19483       builddepsfile=`mktemp`
19484       touch $builddepsfile
19485       # Put all found confs into a single file.
19486       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19487       # Source the file to acquire the variables
19488       if test -s $builddepsfile; then
19489         . $builddepsfile
19490         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19491 $as_echo "found at least one!" >&6; }
19492       else
19493         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19494       fi
19495     fi
19496     # Create build and target names that use _ instead of "-" and ".".
19497     # This is necessary to use them in variable names.
19498     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19499     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19500     # Extract rewrite information for build and target
19501     eval rewritten_build=\${REWRITE_${build_var}}
19502     if test "x$rewritten_build" = x; then
19503       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19504       echo Build stays the same $rewritten_build
19505     else
19506       echo Rewriting build for builddeps into $rewritten_build
19507     fi
19508     eval rewritten_target=\${REWRITE_${target_var}}
19509     if test "x$rewritten_target" = x; then
19510       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19511       echo Target stays the same $rewritten_target
19512     else
19513       echo Rewriting target for builddeps into $rewritten_target
19514     fi
19515     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19516     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19517   fi
19518   for ac_prog in 7z unzip
19519 do
19520   # Extract the first word of "$ac_prog", so it can be a program name with args.
19521 set dummy $ac_prog; ac_word=$2
19522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19523 $as_echo_n "checking for $ac_word... " >&6; }
19524 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19525   $as_echo_n "(cached) " >&6
19526 else
19527   if test -n "$BDEPS_UNZIP"; then
19528   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19529 else
19530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19531 for as_dir in $PATH
19532 do
19533   IFS=$as_save_IFS
19534   test -z "$as_dir" && as_dir=.
19535     for ac_exec_ext in '' $ac_executable_extensions; do
19536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19537     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19539     break 2
19540   fi
19541 done
19542   done
19543 IFS=$as_save_IFS
19544 
19545 fi
19546 fi
19547 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19548 if test -n "$BDEPS_UNZIP"; then
19549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19550 $as_echo "$BDEPS_UNZIP" >&6; }
19551 else
19552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19553 $as_echo "no" >&6; }
19554 fi
19555 
19556 
19557   test -n "$BDEPS_UNZIP" && break
19558 done
19559 
19560   if test "x$BDEPS_UNZIP" = x7z; then
19561     BDEPS_UNZIP="7z x"
19562   fi
19563 
19564   for ac_prog in wget lftp ftp
19565 do
19566   # Extract the first word of "$ac_prog", so it can be a program name with args.
19567 set dummy $ac_prog; ac_word=$2
19568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19569 $as_echo_n "checking for $ac_word... " >&6; }
19570 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19571   $as_echo_n "(cached) " >&6
19572 else
19573   if test -n "$BDEPS_FTP"; then
19574   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19575 else
19576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19577 for as_dir in $PATH
19578 do
19579   IFS=$as_save_IFS
19580   test -z "$as_dir" && as_dir=.
19581     for ac_exec_ext in '' $ac_executable_extensions; do
19582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19583     ac_cv_prog_BDEPS_FTP="$ac_prog"
19584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19585     break 2
19586   fi
19587 done
19588   done
19589 IFS=$as_save_IFS
19590 
19591 fi
19592 fi
19593 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19594 if test -n "$BDEPS_FTP"; then
19595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19596 $as_echo "$BDEPS_FTP" >&6; }
19597 else
19598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19599 $as_echo "no" >&6; }
19600 fi
19601 
19602 
19603   test -n "$BDEPS_FTP" && break
19604 done
19605 
19606 
19607 
19608 ###############################################################################
19609 #
19610 # Determine OpenJDK variants, options and version numbers.
19611 #
19612 ###############################################################################
19613 
19614 # We need build & target for this.
19615 
19616 
19617   ###############################################################################
19618   #
19619   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19620   # We always build headless support.
19621   #
19622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19623 $as_echo_n "checking headful support... " >&6; }
19624   # Check whether --enable-headful was given.
19625 if test "${enable_headful+set}" = set; then :
19626   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19627 else
19628   SUPPORT_HEADFUL=yes
19629 fi
19630 
19631 
19632   SUPPORT_HEADLESS=yes
19633   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19634 
19635   if test "x$SUPPORT_HEADFUL" = xyes; then
19636     # We are building both headful and headless.
19637     headful_msg="include support for both headful and headless"
19638   fi
19639 
19640   if test "x$SUPPORT_HEADFUL" = xno; then
19641     # Thus we are building headless only.
19642     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19643     headful_msg="headless only"
19644   fi
19645 
19646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19647 $as_echo "$headful_msg" >&6; }
19648 
19649 
19650 
19651 
19652 
19653   # Control wether Hotspot runs Queens test after build.
19654   # Check whether --enable-hotspot-test-in-build was given.
19655 if test "${enable_hotspot_test_in_build+set}" = set; then :
19656   enableval=$enable_hotspot_test_in_build;
19657 else
19658   enable_hotspot_test_in_build=no
19659 fi
19660 
19661   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19662     TEST_IN_BUILD=true
19663   else
19664     TEST_IN_BUILD=false
19665   fi
19666 
19667 
19668   ###############################################################################
19669   #
19670   # Choose cacerts source file
19671   #
19672 
19673 # Check whether --with-cacerts-file was given.
19674 if test "${with_cacerts_file+set}" = set; then :
19675   withval=$with_cacerts_file;
19676 fi
19677 
19678   if test "x$with_cacerts_file" != x; then
19679     CACERTS_FILE=$with_cacerts_file
19680   else
19681     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19682   fi
19683 
19684 
19685   ###############################################################################
19686   #
19687   # Enable or disable unlimited crypto
19688   #
19689   # Check whether --enable-unlimited-crypto was given.
19690 if test "${enable_unlimited_crypto+set}" = set; then :
19691   enableval=$enable_unlimited_crypto;
19692 else
19693   enable_unlimited_crypto=no
19694 fi
19695 
19696   if test "x$enable_unlimited_crypto" = "xyes"; then
19697     UNLIMITED_CRYPTO=true
19698   else
19699     UNLIMITED_CRYPTO=false
19700   fi
19701 
19702 
19703   ###############################################################################
19704   #
19705   # Enable or disable the elliptic curve crypto implementation
19706   #
19707 
19708 
19709   ###############################################################################
19710   #
19711   # Compress jars
19712   #
19713   COMPRESS_JARS=false
19714 
19715 
19716 
19717 
19718   # Source the version numbers
19719   . $AUTOCONF_DIR/version-numbers
19720 
19721   # Get the settings from parameters
19722 
19723 # Check whether --with-milestone was given.
19724 if test "${with_milestone+set}" = set; then :
19725   withval=$with_milestone;
19726 fi
19727 
19728   if test "x$with_milestone" = xyes; then
19729     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19730   elif test "x$with_milestone" != x; then
19731     MILESTONE="$with_milestone"
19732   fi
19733   if test "x$MILESTONE" = x; then
19734     MILESTONE=internal
19735   fi
19736 
19737 
19738 # Check whether --with-update-version was given.
19739 if test "${with_update_version+set}" = set; then :
19740   withval=$with_update_version;
19741 fi
19742 
19743   if test "x$with_update_version" = xyes; then
19744     as_fn_error $? "Update version must have a value" "$LINENO" 5
19745   elif test "x$with_update_version" != x; then
19746     JDK_UPDATE_VERSION="$with_update_version"
19747     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19748     # to a bug in expr (which reduces it to just X). To work around this, we
19749     # always add a 0 to one digit update versions.
19750     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19751       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19752     fi
19753   fi
19754 
19755 
19756 # Check whether --with-user-release-suffix was given.
19757 if test "${with_user_release_suffix+set}" = set; then :
19758   withval=$with_user_release_suffix;
19759 fi
19760 
19761   if test "x$with_user_release_suffix" = xyes; then
19762     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19763   elif test "x$with_user_release_suffix" != x; then
19764     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19765   fi
19766 
19767 
19768 # Check whether --with-build-number was given.
19769 if test "${with_build_number+set}" = set; then :
19770   withval=$with_build_number;
19771 fi
19772 
19773   if test "x$with_build_number" = xyes; then
19774     as_fn_error $? "Build number must have a value" "$LINENO" 5
19775   elif test "x$with_build_number" != x; then
19776     JDK_BUILD_NUMBER="$with_build_number"
19777   fi
19778   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19779   if test "x$JDK_BUILD_NUMBER" = x; then
19780     JDK_BUILD_NUMBER=b00
19781     if test "x$USER_RELEASE_SUFFIX" = x; then
19782       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19783       # Avoid [:alnum:] since it depends on the locale.
19784       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19785       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19786     fi
19787   fi
19788 
19789   # Now set the JDK version, milestone, build number etc.
19790 
19791 
19792 
19793 
19794 
19795 
19796 
19797 
19798 
19799 
19800 
19801 
19802 
19803 
19804 
19805 
19806 # Check whether --with-copyright-year was given.
19807 if test "${with_copyright_year+set}" = set; then :
19808   withval=$with_copyright_year;
19809 fi
19810 
19811   if test "x$with_copyright_year" = xyes; then
19812     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
19813   elif test "x$with_copyright_year" != x; then
19814     COPYRIGHT_YEAR="$with_copyright_year"
19815   else
19816     COPYRIGHT_YEAR=`date +'%Y'`
19817   fi
19818 
19819 
19820   if test "x$JDK_UPDATE_VERSION" != x; then
19821     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19822   else
19823     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19824   fi
19825 
19826 
19827   # The cooked update version used to encode trailing letters in the update
19828   # version into a trailing number. That is no longer needed, but need to
19829   # keep the format in 8u for compatibility.
19830   COOKED_JDK_UPDATE_VERSION="${JDK_UPDATE_VERSION}0"
19831 
19832 
19833   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19834 
19835 
19836 
19837 ###############################################################################
19838 #
19839 # Setup BootJDK, used to bootstrap the build.
19840 #
19841 ###############################################################################
19842 
19843 
19844   BOOT_JDK_FOUND=no
19845 
19846 # Check whether --with-boot-jdk was given.
19847 if test "${with_boot_jdk+set}" = set; then :
19848   withval=$with_boot_jdk;
19849 fi
19850 
19851 
19852   # We look for the Boot JDK through various means, going from more certain to
19853   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19854   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19855   # must check if this is indeed valid; otherwise we'll continue looking.
19856 
19857   # Test: Is bootjdk explicitely set by command line arguments?
19858 
19859   if test "x$BOOT_JDK_FOUND" = xno; then
19860     # Now execute the test
19861 
19862   if test "x$with_boot_jdk" != x; then
19863     BOOT_JDK=$with_boot_jdk
19864     BOOT_JDK_FOUND=maybe
19865     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19866 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19867   fi
19868 
19869 
19870     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19871     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19872       # Do we have a bin/java?
19873       if test ! -x "$BOOT_JDK/bin/java"; then
19874         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19876         BOOT_JDK_FOUND=no
19877       else
19878         # Do we have a bin/javac?
19879         if test ! -x "$BOOT_JDK/bin/javac"; then
19880           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19882           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19883 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19884           BOOT_JDK_FOUND=no
19885         else
19886           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19887           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19888             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19890             BOOT_JDK_FOUND=no
19891           else
19892             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19893             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19894 
19895             # Extra M4 quote needed to protect [] in grep expression.
19896             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
19897             if test "x$FOUND_VERSION_78" = x; then
19898               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19899 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19900               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
19901 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
19902               BOOT_JDK_FOUND=no
19903             else
19904               # We're done! :-)
19905               BOOT_JDK_FOUND=yes
19906 
19907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19908 
19909   # Input might be given as Windows format, start by converting to
19910   # unix format.
19911   path="$BOOT_JDK"
19912   new_path=`$CYGPATH -u "$path"`
19913 
19914   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19915   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19916   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19917   # "foo.exe" is OK but "foo" is an error.
19918   #
19919   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19920   # It is also a way to make sure we got the proper file name for the real test later on.
19921   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19922   if test "x$test_shortpath" = x; then
19923     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19924 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19925     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19926   fi
19927 
19928   # Call helper function which possibly converts this using DOS-style short mode.
19929   # If so, the updated path is stored in $new_path.
19930 
19931   input_path="$new_path"
19932   # Check if we need to convert this using DOS-style short mode. If the path
19933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19934   # take no chances and rewrite it.
19935   # Note: m4 eats our [], so we need to use [ and ] instead.
19936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19937   if test "x$has_forbidden_chars" != x; then
19938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19942       # Going to short mode and back again did indeed matter. Since short mode is
19943       # case insensitive, let's make it lowercase to improve readability.
19944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19945       # Now convert it back to Unix-style (cygpath)
19946       input_path=`$CYGPATH -u "$shortmode_path"`
19947       new_path="$input_path"
19948     fi
19949   fi
19950 
19951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19952   if test "x$test_cygdrive_prefix" = x; then
19953     # As a simple fix, exclude /usr/bin since it's not a real path.
19954     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19956       # a path prefixed by /cygdrive for fixpath to work.
19957       new_path="$CYGWIN_ROOT_PATH$input_path"
19958     fi
19959   fi
19960 
19961 
19962   if test "x$path" != "x$new_path"; then
19963     BOOT_JDK="$new_path"
19964     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19965 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19966   fi
19967 
19968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19969 
19970   path="$BOOT_JDK"
19971   has_colon=`$ECHO $path | $GREP ^.:`
19972   new_path="$path"
19973   if test "x$has_colon" = x; then
19974     # Not in mixed or Windows style, start by that.
19975     new_path=`cmd //c echo $path`
19976   fi
19977 
19978 
19979   input_path="$new_path"
19980   # Check if we need to convert this using DOS-style short mode. If the path
19981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19982   # take no chances and rewrite it.
19983   # Note: m4 eats our [], so we need to use [ and ] instead.
19984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19985   if test "x$has_forbidden_chars" != x; then
19986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19987     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19988   fi
19989 
19990 
19991   windows_path="$new_path"
19992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19993     unix_path=`$CYGPATH -u "$windows_path"`
19994     new_path="$unix_path"
19995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19997     new_path="$unix_path"
19998   fi
19999 
20000   if test "x$path" != "x$new_path"; then
20001     BOOT_JDK="$new_path"
20002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20003 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20004   fi
20005 
20006   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20007   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20008 
20009   else
20010     # We're on a posix platform. Hooray! :)
20011     path="$BOOT_JDK"
20012     has_space=`$ECHO "$path" | $GREP " "`
20013     if test "x$has_space" != x; then
20014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20015 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20016       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20017     fi
20018 
20019     # Use eval to expand a potential ~
20020     eval path="$path"
20021     if test ! -f "$path" && test ! -d "$path"; then
20022       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20023     fi
20024 
20025     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20026   fi
20027 
20028               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20029 $as_echo_n "checking for Boot JDK... " >&6; }
20030               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20031 $as_echo "$BOOT_JDK" >&6; }
20032               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20033 $as_echo_n "checking Boot JDK version... " >&6; }
20034               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20035               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20036 $as_echo "$BOOT_JDK_VERSION" >&6; }
20037             fi # end check jdk version
20038           fi # end check rt.jar
20039         fi # end check javac
20040       fi # end check java
20041     fi # end check boot jdk found
20042   fi
20043 
20044   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20045     # Having specified an argument which is incorrect will produce an instant failure;
20046     # we should not go on looking
20047     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20048   fi
20049 
20050   # Test: Is bootjdk available from builddeps?
20051 
20052   if test "x$BOOT_JDK_FOUND" = xno; then
20053     # Now execute the test
20054 
20055 
20056 
20057   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20058     # Source the builddeps file again, to make sure it uses the latest variables!
20059     . $builddepsfile
20060     # Look for a target and build machine specific resource!
20061     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20062     if test "x$resource" = x; then
20063       # Ok, lets instead look for a target specific resource
20064       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20065     fi
20066     if test "x$resource" = x; then
20067       # Ok, lets instead look for a build specific resource
20068       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20069     fi
20070     if test "x$resource" = x; then
20071       # Ok, lets instead look for a generic resource
20072       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20073       resource=${builddep_bootjdk}
20074     fi
20075     if test "x$resource" != x; then
20076       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20077 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20078       # If the resource in the builddeps.conf file is an existing directory,
20079       # for example /java/linux/cups
20080       if test -d ${resource}; then
20081         depdir=${resource}
20082       else
20083 
20084   # bootjdk is for example mymodule
20085   # $resource is for example libs/general/libmymod_1_2_3.zip
20086   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20087   # $with_builddeps_dir is for example /localhome/builddeps
20088   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20089   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20090   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20091   filename=`basename $resource`
20092   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20093   filebase=${filename%%.*}
20094   extension=${filename#*.}
20095   installdir=$with_builddeps_dir/$filebase
20096   if test ! -f $installdir/$filename.unpacked; then
20097     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20098 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20099     if test ! -d $installdir; then
20100       mkdir -p $installdir
20101     fi
20102     if test ! -d $installdir; then
20103       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20104     fi
20105     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20106     touch $tmpfile
20107     if test ! -f $tmpfile; then
20108       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20109     fi
20110 
20111   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20112   # $tmpfile is the local file name for the downloaded file.
20113   VALID_TOOL=no
20114   if test "x$BDEPS_FTP" = xwget; then
20115     VALID_TOOL=yes
20116     wget -O $tmpfile $with_builddeps_server/$resource
20117   fi
20118   if test "x$BDEPS_FTP" = xlftp; then
20119     VALID_TOOL=yes
20120     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20121   fi
20122   if test "x$BDEPS_FTP" = xftp; then
20123     VALID_TOOL=yes
20124     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20125     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20126     FTPUSERPWD=${FTPSERVER%%@*}
20127     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20128       FTPUSER=${userpwd%%:*}
20129       FTPPWD=${userpwd#*@}
20130       FTPSERVER=${FTPSERVER#*@}
20131     else
20132       FTPUSER=ftp
20133       FTPPWD=ftp
20134     fi
20135     # the "pass" command does not work on some
20136     # ftp clients (read ftp.exe) but if it works,
20137     # passive mode is better!
20138     ( \
20139         echo "user $FTPUSER $FTPPWD"        ; \
20140         echo "pass"                         ; \
20141         echo "bin"                          ; \
20142         echo "get $FTPPATH $tmpfile"              ; \
20143     ) | ftp -in $FTPSERVER
20144   fi
20145   if test "x$VALID_TOOL" != xyes; then
20146     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20147   fi
20148 
20149     mv $tmpfile $installdir/$filename
20150     if test ! -s $installdir/$filename; then
20151       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20152     fi
20153     case "$extension" in
20154       zip)  echo "Unzipping $installdir/$filename..."
20155         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20156         ;;
20157       tar.gz) echo "Untaring $installdir/$filename..."
20158         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20159         ;;
20160       tgz) echo "Untaring $installdir/$filename..."
20161         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20162         ;;
20163       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20164         ;;
20165     esac
20166   fi
20167   if test -f $installdir/$filename.unpacked; then
20168     depdir=$installdir
20169   fi
20170 
20171       fi
20172       # Source the builddeps file again, because in the previous command, the depdir
20173       # was updated to point at the current build dependency install directory.
20174       . $builddepsfile
20175       # Now extract variables from the builddeps.conf files.
20176       theroot=${builddep_bootjdk_ROOT}
20177       thecflags=${builddep_bootjdk_CFLAGS}
20178       thelibs=${builddep_bootjdk_LIBS}
20179       if test "x$depdir" = x; then
20180         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20181       fi
20182       BOOT_JDK=$depdir
20183       if test "x$theroot" != x; then
20184         BOOT_JDK="$theroot"
20185       fi
20186       if test "x$thecflags" != x; then
20187         BOOT_JDK_CFLAGS="$thecflags"
20188       fi
20189       if test "x$thelibs" != x; then
20190         BOOT_JDK_LIBS="$thelibs"
20191       fi
20192       BOOT_JDK_FOUND=maybe
20193       else BOOT_JDK_FOUND=no
20194 
20195     fi
20196     else BOOT_JDK_FOUND=no
20197 
20198   fi
20199 
20200 
20201 
20202     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20203     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20204       # Do we have a bin/java?
20205       if test ! -x "$BOOT_JDK/bin/java"; then
20206         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20208         BOOT_JDK_FOUND=no
20209       else
20210         # Do we have a bin/javac?
20211         if test ! -x "$BOOT_JDK/bin/javac"; then
20212           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20213 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20214           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20215 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20216           BOOT_JDK_FOUND=no
20217         else
20218           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20219           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20220             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20222             BOOT_JDK_FOUND=no
20223           else
20224             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20225             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20226 
20227             # Extra M4 quote needed to protect [] in grep expression.
20228             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20229             if test "x$FOUND_VERSION_78" = x; then
20230               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20231 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20232               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20233 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20234               BOOT_JDK_FOUND=no
20235             else
20236               # We're done! :-)
20237               BOOT_JDK_FOUND=yes
20238 
20239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20240 
20241   # Input might be given as Windows format, start by converting to
20242   # unix format.
20243   path="$BOOT_JDK"
20244   new_path=`$CYGPATH -u "$path"`
20245 
20246   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20247   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20248   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20249   # "foo.exe" is OK but "foo" is an error.
20250   #
20251   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20252   # It is also a way to make sure we got the proper file name for the real test later on.
20253   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20254   if test "x$test_shortpath" = x; then
20255     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20256 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20257     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20258   fi
20259 
20260   # Call helper function which possibly converts this using DOS-style short mode.
20261   # If so, the updated path is stored in $new_path.
20262 
20263   input_path="$new_path"
20264   # Check if we need to convert this using DOS-style short mode. If the path
20265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20266   # take no chances and rewrite it.
20267   # Note: m4 eats our [], so we need to use [ and ] instead.
20268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20269   if test "x$has_forbidden_chars" != x; then
20270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20271     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20272     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20273     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20274       # Going to short mode and back again did indeed matter. Since short mode is
20275       # case insensitive, let's make it lowercase to improve readability.
20276       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20277       # Now convert it back to Unix-style (cygpath)
20278       input_path=`$CYGPATH -u "$shortmode_path"`
20279       new_path="$input_path"
20280     fi
20281   fi
20282 
20283   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20284   if test "x$test_cygdrive_prefix" = x; then
20285     # As a simple fix, exclude /usr/bin since it's not a real path.
20286     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20287       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20288       # a path prefixed by /cygdrive for fixpath to work.
20289       new_path="$CYGWIN_ROOT_PATH$input_path"
20290     fi
20291   fi
20292 
20293 
20294   if test "x$path" != "x$new_path"; then
20295     BOOT_JDK="$new_path"
20296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20297 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20298   fi
20299 
20300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20301 
20302   path="$BOOT_JDK"
20303   has_colon=`$ECHO $path | $GREP ^.:`
20304   new_path="$path"
20305   if test "x$has_colon" = x; then
20306     # Not in mixed or Windows style, start by that.
20307     new_path=`cmd //c echo $path`
20308   fi
20309 
20310 
20311   input_path="$new_path"
20312   # Check if we need to convert this using DOS-style short mode. If the path
20313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20314   # take no chances and rewrite it.
20315   # Note: m4 eats our [], so we need to use [ and ] instead.
20316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20317   if test "x$has_forbidden_chars" != x; then
20318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20319     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20320   fi
20321 
20322 
20323   windows_path="$new_path"
20324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325     unix_path=`$CYGPATH -u "$windows_path"`
20326     new_path="$unix_path"
20327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20329     new_path="$unix_path"
20330   fi
20331 
20332   if test "x$path" != "x$new_path"; then
20333     BOOT_JDK="$new_path"
20334     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20335 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20336   fi
20337 
20338   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20339   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20340 
20341   else
20342     # We're on a posix platform. Hooray! :)
20343     path="$BOOT_JDK"
20344     has_space=`$ECHO "$path" | $GREP " "`
20345     if test "x$has_space" != x; then
20346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20347 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20348       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20349     fi
20350 
20351     # Use eval to expand a potential ~
20352     eval path="$path"
20353     if test ! -f "$path" && test ! -d "$path"; then
20354       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20355     fi
20356 
20357     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20358   fi
20359 
20360               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20361 $as_echo_n "checking for Boot JDK... " >&6; }
20362               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20363 $as_echo "$BOOT_JDK" >&6; }
20364               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20365 $as_echo_n "checking Boot JDK version... " >&6; }
20366               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20367               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20368 $as_echo "$BOOT_JDK_VERSION" >&6; }
20369             fi # end check jdk version
20370           fi # end check rt.jar
20371         fi # end check javac
20372       fi # end check java
20373     fi # end check boot jdk found
20374   fi
20375 
20376 
20377   # Test: Is $JAVA_HOME set?
20378 
20379   if test "x$BOOT_JDK_FOUND" = xno; then
20380     # Now execute the test
20381 
20382   if test "x$JAVA_HOME" != x; then
20383     JAVA_HOME_PROCESSED="$JAVA_HOME"
20384 
20385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20386 
20387   # Input might be given as Windows format, start by converting to
20388   # unix format.
20389   path="$JAVA_HOME_PROCESSED"
20390   new_path=`$CYGPATH -u "$path"`
20391 
20392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20395   # "foo.exe" is OK but "foo" is an error.
20396   #
20397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20398   # It is also a way to make sure we got the proper file name for the real test later on.
20399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20400   if test "x$test_shortpath" = x; then
20401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20402 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20403     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
20404   fi
20405 
20406   # Call helper function which possibly converts this using DOS-style short mode.
20407   # If so, the updated path is stored in $new_path.
20408 
20409   input_path="$new_path"
20410   # Check if we need to convert this using DOS-style short mode. If the path
20411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20412   # take no chances and rewrite it.
20413   # Note: m4 eats our [], so we need to use [ and ] instead.
20414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20415   if test "x$has_forbidden_chars" != x; then
20416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20420       # Going to short mode and back again did indeed matter. Since short mode is
20421       # case insensitive, let's make it lowercase to improve readability.
20422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20423       # Now convert it back to Unix-style (cygpath)
20424       input_path=`$CYGPATH -u "$shortmode_path"`
20425       new_path="$input_path"
20426     fi
20427   fi
20428 
20429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20430   if test "x$test_cygdrive_prefix" = x; then
20431     # As a simple fix, exclude /usr/bin since it's not a real path.
20432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20434       # a path prefixed by /cygdrive for fixpath to work.
20435       new_path="$CYGWIN_ROOT_PATH$input_path"
20436     fi
20437   fi
20438 
20439 
20440   if test "x$path" != "x$new_path"; then
20441     JAVA_HOME_PROCESSED="$new_path"
20442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20443 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20444   fi
20445 
20446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20447 
20448   path="$JAVA_HOME_PROCESSED"
20449   has_colon=`$ECHO $path | $GREP ^.:`
20450   new_path="$path"
20451   if test "x$has_colon" = x; then
20452     # Not in mixed or Windows style, start by that.
20453     new_path=`cmd //c echo $path`
20454   fi
20455 
20456 
20457   input_path="$new_path"
20458   # Check if we need to convert this using DOS-style short mode. If the path
20459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20460   # take no chances and rewrite it.
20461   # Note: m4 eats our [], so we need to use [ and ] instead.
20462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20463   if test "x$has_forbidden_chars" != x; then
20464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20466   fi
20467 
20468 
20469   windows_path="$new_path"
20470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20471     unix_path=`$CYGPATH -u "$windows_path"`
20472     new_path="$unix_path"
20473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20475     new_path="$unix_path"
20476   fi
20477 
20478   if test "x$path" != "x$new_path"; then
20479     JAVA_HOME_PROCESSED="$new_path"
20480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
20481 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
20482   fi
20483 
20484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20486 
20487   else
20488     # We're on a posix platform. Hooray! :)
20489     path="$JAVA_HOME_PROCESSED"
20490     has_space=`$ECHO "$path" | $GREP " "`
20491     if test "x$has_space" != x; then
20492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
20493 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
20494       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20495     fi
20496 
20497     # Use eval to expand a potential ~
20498     eval path="$path"
20499     if test ! -f "$path" && test ! -d "$path"; then
20500       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
20501     fi
20502 
20503     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
20504   fi
20505 
20506     if test ! -d "$JAVA_HOME_PROCESSED"; then
20507       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
20508 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
20509     else
20510       # Aha, the user has set a JAVA_HOME
20511       # let us use that as the Boot JDK.
20512       BOOT_JDK="$JAVA_HOME_PROCESSED"
20513       BOOT_JDK_FOUND=maybe
20514       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
20515 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
20516     fi
20517   fi
20518 
20519 
20520     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20521     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20522       # Do we have a bin/java?
20523       if test ! -x "$BOOT_JDK/bin/java"; then
20524         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20525 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20526         BOOT_JDK_FOUND=no
20527       else
20528         # Do we have a bin/javac?
20529         if test ! -x "$BOOT_JDK/bin/javac"; then
20530           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20532           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20533 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20534           BOOT_JDK_FOUND=no
20535         else
20536           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20537           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20538             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20540             BOOT_JDK_FOUND=no
20541           else
20542             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20543             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20544 
20545             # Extra M4 quote needed to protect [] in grep expression.
20546             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20547             if test "x$FOUND_VERSION_78" = x; then
20548               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20550               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20551 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20552               BOOT_JDK_FOUND=no
20553             else
20554               # We're done! :-)
20555               BOOT_JDK_FOUND=yes
20556 
20557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20558 
20559   # Input might be given as Windows format, start by converting to
20560   # unix format.
20561   path="$BOOT_JDK"
20562   new_path=`$CYGPATH -u "$path"`
20563 
20564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20567   # "foo.exe" is OK but "foo" is an error.
20568   #
20569   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20570   # It is also a way to make sure we got the proper file name for the real test later on.
20571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20572   if test "x$test_shortpath" = x; then
20573     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20574 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20575     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20576   fi
20577 
20578   # Call helper function which possibly converts this using DOS-style short mode.
20579   # If so, the updated path is stored in $new_path.
20580 
20581   input_path="$new_path"
20582   # Check if we need to convert this using DOS-style short mode. If the path
20583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20584   # take no chances and rewrite it.
20585   # Note: m4 eats our [], so we need to use [ and ] instead.
20586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20587   if test "x$has_forbidden_chars" != x; then
20588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20592       # Going to short mode and back again did indeed matter. Since short mode is
20593       # case insensitive, let's make it lowercase to improve readability.
20594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20595       # Now convert it back to Unix-style (cygpath)
20596       input_path=`$CYGPATH -u "$shortmode_path"`
20597       new_path="$input_path"
20598     fi
20599   fi
20600 
20601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20602   if test "x$test_cygdrive_prefix" = x; then
20603     # As a simple fix, exclude /usr/bin since it's not a real path.
20604     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20606       # a path prefixed by /cygdrive for fixpath to work.
20607       new_path="$CYGWIN_ROOT_PATH$input_path"
20608     fi
20609   fi
20610 
20611 
20612   if test "x$path" != "x$new_path"; then
20613     BOOT_JDK="$new_path"
20614     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20615 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20616   fi
20617 
20618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20619 
20620   path="$BOOT_JDK"
20621   has_colon=`$ECHO $path | $GREP ^.:`
20622   new_path="$path"
20623   if test "x$has_colon" = x; then
20624     # Not in mixed or Windows style, start by that.
20625     new_path=`cmd //c echo $path`
20626   fi
20627 
20628 
20629   input_path="$new_path"
20630   # Check if we need to convert this using DOS-style short mode. If the path
20631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20632   # take no chances and rewrite it.
20633   # Note: m4 eats our [], so we need to use [ and ] instead.
20634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20635   if test "x$has_forbidden_chars" != x; then
20636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20638   fi
20639 
20640 
20641   windows_path="$new_path"
20642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20643     unix_path=`$CYGPATH -u "$windows_path"`
20644     new_path="$unix_path"
20645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20647     new_path="$unix_path"
20648   fi
20649 
20650   if test "x$path" != "x$new_path"; then
20651     BOOT_JDK="$new_path"
20652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20653 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20654   fi
20655 
20656   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20657   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20658 
20659   else
20660     # We're on a posix platform. Hooray! :)
20661     path="$BOOT_JDK"
20662     has_space=`$ECHO "$path" | $GREP " "`
20663     if test "x$has_space" != x; then
20664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20666       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20667     fi
20668 
20669     # Use eval to expand a potential ~
20670     eval path="$path"
20671     if test ! -f "$path" && test ! -d "$path"; then
20672       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20673     fi
20674 
20675     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20676   fi
20677 
20678               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20679 $as_echo_n "checking for Boot JDK... " >&6; }
20680               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20681 $as_echo "$BOOT_JDK" >&6; }
20682               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20683 $as_echo_n "checking Boot JDK version... " >&6; }
20684               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20685               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20686 $as_echo "$BOOT_JDK_VERSION" >&6; }
20687             fi # end check jdk version
20688           fi # end check rt.jar
20689         fi # end check javac
20690       fi # end check java
20691     fi # end check boot jdk found
20692   fi
20693 
20694 
20695   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
20696 
20697   if test "x$BOOT_JDK_FOUND" = xno; then
20698     # Now execute the test
20699 
20700   if test -x /usr/libexec/java_home; then
20701     BOOT_JDK=`/usr/libexec/java_home`
20702     BOOT_JDK_FOUND=maybe
20703     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
20704 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
20705   fi
20706 
20707 
20708     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20709     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20710       # Do we have a bin/java?
20711       if test ! -x "$BOOT_JDK/bin/java"; then
20712         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20713 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20714         BOOT_JDK_FOUND=no
20715       else
20716         # Do we have a bin/javac?
20717         if test ! -x "$BOOT_JDK/bin/javac"; then
20718           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20720           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20721 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20722           BOOT_JDK_FOUND=no
20723         else
20724           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20725           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20726             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20728             BOOT_JDK_FOUND=no
20729           else
20730             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20731             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20732 
20733             # Extra M4 quote needed to protect [] in grep expression.
20734             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
20735             if test "x$FOUND_VERSION_78" = x; then
20736               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20738               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
20739 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
20740               BOOT_JDK_FOUND=no
20741             else
20742               # We're done! :-)
20743               BOOT_JDK_FOUND=yes
20744 
20745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20746 
20747   # Input might be given as Windows format, start by converting to
20748   # unix format.
20749   path="$BOOT_JDK"
20750   new_path=`$CYGPATH -u "$path"`
20751 
20752   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20753   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20754   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20755   # "foo.exe" is OK but "foo" is an error.
20756   #
20757   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20758   # It is also a way to make sure we got the proper file name for the real test later on.
20759   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20760   if test "x$test_shortpath" = x; then
20761     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20762 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20763     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20764   fi
20765 
20766   # Call helper function which possibly converts this using DOS-style short mode.
20767   # If so, the updated path is stored in $new_path.
20768 
20769   input_path="$new_path"
20770   # Check if we need to convert this using DOS-style short mode. If the path
20771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20772   # take no chances and rewrite it.
20773   # Note: m4 eats our [], so we need to use [ and ] instead.
20774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20775   if test "x$has_forbidden_chars" != x; then
20776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20780       # Going to short mode and back again did indeed matter. Since short mode is
20781       # case insensitive, let's make it lowercase to improve readability.
20782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20783       # Now convert it back to Unix-style (cygpath)
20784       input_path=`$CYGPATH -u "$shortmode_path"`
20785       new_path="$input_path"
20786     fi
20787   fi
20788 
20789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20790   if test "x$test_cygdrive_prefix" = x; then
20791     # As a simple fix, exclude /usr/bin since it's not a real path.
20792     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20794       # a path prefixed by /cygdrive for fixpath to work.
20795       new_path="$CYGWIN_ROOT_PATH$input_path"
20796     fi
20797   fi
20798 
20799 
20800   if test "x$path" != "x$new_path"; then
20801     BOOT_JDK="$new_path"
20802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20804   fi
20805 
20806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20807 
20808   path="$BOOT_JDK"
20809   has_colon=`$ECHO $path | $GREP ^.:`
20810   new_path="$path"
20811   if test "x$has_colon" = x; then
20812     # Not in mixed or Windows style, start by that.
20813     new_path=`cmd //c echo $path`
20814   fi
20815 
20816 
20817   input_path="$new_path"
20818   # Check if we need to convert this using DOS-style short mode. If the path
20819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20820   # take no chances and rewrite it.
20821   # Note: m4 eats our [], so we need to use [ and ] instead.
20822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20823   if test "x$has_forbidden_chars" != x; then
20824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20825     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20826   fi
20827 
20828 
20829   windows_path="$new_path"
20830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20831     unix_path=`$CYGPATH -u "$windows_path"`
20832     new_path="$unix_path"
20833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20835     new_path="$unix_path"
20836   fi
20837 
20838   if test "x$path" != "x$new_path"; then
20839     BOOT_JDK="$new_path"
20840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20842   fi
20843 
20844   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20845   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20846 
20847   else
20848     # We're on a posix platform. Hooray! :)
20849     path="$BOOT_JDK"
20850     has_space=`$ECHO "$path" | $GREP " "`
20851     if test "x$has_space" != x; then
20852       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20853 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20854       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20855     fi
20856 
20857     # Use eval to expand a potential ~
20858     eval path="$path"
20859     if test ! -f "$path" && test ! -d "$path"; then
20860       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20861     fi
20862 
20863     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20864   fi
20865 
20866               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20867 $as_echo_n "checking for Boot JDK... " >&6; }
20868               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20869 $as_echo "$BOOT_JDK" >&6; }
20870               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20871 $as_echo_n "checking Boot JDK version... " >&6; }
20872               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20874 $as_echo "$BOOT_JDK_VERSION" >&6; }
20875             fi # end check jdk version
20876           fi # end check rt.jar
20877         fi # end check javac
20878       fi # end check java
20879     fi # end check boot jdk found
20880   fi
20881 
20882 
20883   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
20884 
20885   if test "x$BOOT_JDK_FOUND" = xno; then
20886     # Now execute the test
20887 
20888   # Extract the first word of "javac", so it can be a program name with args.
20889 set dummy javac; ac_word=$2
20890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20891 $as_echo_n "checking for $ac_word... " >&6; }
20892 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
20893   $as_echo_n "(cached) " >&6
20894 else
20895   case $JAVAC_CHECK in
20896   [\\/]* | ?:[\\/]*)
20897   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
20898   ;;
20899   *)
20900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20901 for as_dir in $PATH
20902 do
20903   IFS=$as_save_IFS
20904   test -z "$as_dir" && as_dir=.
20905     for ac_exec_ext in '' $ac_executable_extensions; do
20906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20907     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
20908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20909     break 2
20910   fi
20911 done
20912   done
20913 IFS=$as_save_IFS
20914 
20915   ;;
20916 esac
20917 fi
20918 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
20919 if test -n "$JAVAC_CHECK"; then
20920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
20921 $as_echo "$JAVAC_CHECK" >&6; }
20922 else
20923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20924 $as_echo "no" >&6; }
20925 fi
20926 
20927 
20928   # Extract the first word of "java", so it can be a program name with args.
20929 set dummy java; ac_word=$2
20930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20931 $as_echo_n "checking for $ac_word... " >&6; }
20932 if ${ac_cv_path_JAVA_CHECK+:} false; then :
20933   $as_echo_n "(cached) " >&6
20934 else
20935   case $JAVA_CHECK in
20936   [\\/]* | ?:[\\/]*)
20937   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
20938   ;;
20939   *)
20940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20941 for as_dir in $PATH
20942 do
20943   IFS=$as_save_IFS
20944   test -z "$as_dir" && as_dir=.
20945     for ac_exec_ext in '' $ac_executable_extensions; do
20946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20947     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
20948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20949     break 2
20950   fi
20951 done
20952   done
20953 IFS=$as_save_IFS
20954 
20955   ;;
20956 esac
20957 fi
20958 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
20959 if test -n "$JAVA_CHECK"; then
20960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
20961 $as_echo "$JAVA_CHECK" >&6; }
20962 else
20963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20964 $as_echo "no" >&6; }
20965 fi
20966 
20967 
20968   BINARY="$JAVAC_CHECK"
20969   if test "x$JAVAC_CHECK" = x; then
20970     BINARY="$JAVA_CHECK"
20971   fi
20972   if test "x$BINARY" != x; then
20973     # So there is a java(c) binary, it might be part of a JDK.
20974     # Lets find the JDK/JRE directory by following symbolic links.
20975     # Linux/GNU systems often have links from /usr/bin/java to
20976     # /etc/alternatives/java to the real JDK binary.
20977 
20978   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20979     # Follow a chain of symbolic links. Use readlink
20980     # where it exists, else fall back to horribly
20981     # complicated shell code.
20982     if test "x$READLINK_TESTED" != yes; then
20983       # On MacOSX there is a readlink tool with a different
20984       # purpose than the GNU readlink tool. Check the found readlink.
20985       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20986       if test "x$ISGNU" = x; then
20987         # A readlink that we do not know how to use.
20988         # Are there other non-GNU readlinks out there?
20989         READLINK_TESTED=yes
20990         READLINK=
20991       fi
20992     fi
20993 
20994     if test "x$READLINK" != x; then
20995       BINARY=`$READLINK -f $BINARY`
20996     else
20997       # Save the current directory for restoring afterwards
20998       STARTDIR=$PWD
20999       COUNTER=0
21000       sym_link_dir=`$DIRNAME $BINARY`
21001       sym_link_file=`$BASENAME $BINARY`
21002       cd $sym_link_dir
21003       # Use -P flag to resolve symlinks in directories.
21004       cd `$THEPWDCMD -P`
21005       sym_link_dir=`$THEPWDCMD -P`
21006       # Resolve file symlinks
21007       while test $COUNTER -lt 20; do
21008         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21009         if test "x$ISLINK" == x; then
21010           # This is not a symbolic link! We are done!
21011           break
21012         fi
21013         # Again resolve directory symlinks since the target of the just found
21014         # link could be in a different directory
21015         cd `$DIRNAME $ISLINK`
21016         sym_link_dir=`$THEPWDCMD -P`
21017         sym_link_file=`$BASENAME $ISLINK`
21018         let COUNTER=COUNTER+1
21019       done
21020       cd $STARTDIR
21021       BINARY=$sym_link_dir/$sym_link_file
21022     fi
21023   fi
21024 
21025     BOOT_JDK=`dirname "$BINARY"`
21026     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21027     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21028       # Looks like we found ourselves an JDK
21029       BOOT_JDK_FOUND=maybe
21030       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21031 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21032     fi
21033   fi
21034 
21035 
21036     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21037     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21038       # Do we have a bin/java?
21039       if test ! -x "$BOOT_JDK/bin/java"; then
21040         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21041 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21042         BOOT_JDK_FOUND=no
21043       else
21044         # Do we have a bin/javac?
21045         if test ! -x "$BOOT_JDK/bin/javac"; then
21046           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21048           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21049 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21050           BOOT_JDK_FOUND=no
21051         else
21052           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21053           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21054             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21056             BOOT_JDK_FOUND=no
21057           else
21058             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21059             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21060 
21061             # Extra M4 quote needed to protect [] in grep expression.
21062             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21063             if test "x$FOUND_VERSION_78" = x; then
21064               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21066               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21067 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21068               BOOT_JDK_FOUND=no
21069             else
21070               # We're done! :-)
21071               BOOT_JDK_FOUND=yes
21072 
21073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21074 
21075   # Input might be given as Windows format, start by converting to
21076   # unix format.
21077   path="$BOOT_JDK"
21078   new_path=`$CYGPATH -u "$path"`
21079 
21080   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21081   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21082   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21083   # "foo.exe" is OK but "foo" is an error.
21084   #
21085   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21086   # It is also a way to make sure we got the proper file name for the real test later on.
21087   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21088   if test "x$test_shortpath" = x; then
21089     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21091     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21092   fi
21093 
21094   # Call helper function which possibly converts this using DOS-style short mode.
21095   # If so, the updated path is stored in $new_path.
21096 
21097   input_path="$new_path"
21098   # Check if we need to convert this using DOS-style short mode. If the path
21099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100   # take no chances and rewrite it.
21101   # Note: m4 eats our [], so we need to use [ and ] instead.
21102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21103   if test "x$has_forbidden_chars" != x; then
21104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21106     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21107     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21108       # Going to short mode and back again did indeed matter. Since short mode is
21109       # case insensitive, let's make it lowercase to improve readability.
21110       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111       # Now convert it back to Unix-style (cygpath)
21112       input_path=`$CYGPATH -u "$shortmode_path"`
21113       new_path="$input_path"
21114     fi
21115   fi
21116 
21117   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21118   if test "x$test_cygdrive_prefix" = x; then
21119     # As a simple fix, exclude /usr/bin since it's not a real path.
21120     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21121       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21122       # a path prefixed by /cygdrive for fixpath to work.
21123       new_path="$CYGWIN_ROOT_PATH$input_path"
21124     fi
21125   fi
21126 
21127 
21128   if test "x$path" != "x$new_path"; then
21129     BOOT_JDK="$new_path"
21130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21132   fi
21133 
21134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21135 
21136   path="$BOOT_JDK"
21137   has_colon=`$ECHO $path | $GREP ^.:`
21138   new_path="$path"
21139   if test "x$has_colon" = x; then
21140     # Not in mixed or Windows style, start by that.
21141     new_path=`cmd //c echo $path`
21142   fi
21143 
21144 
21145   input_path="$new_path"
21146   # Check if we need to convert this using DOS-style short mode. If the path
21147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21148   # take no chances and rewrite it.
21149   # Note: m4 eats our [], so we need to use [ and ] instead.
21150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21151   if test "x$has_forbidden_chars" != x; then
21152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21154   fi
21155 
21156 
21157   windows_path="$new_path"
21158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21159     unix_path=`$CYGPATH -u "$windows_path"`
21160     new_path="$unix_path"
21161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21163     new_path="$unix_path"
21164   fi
21165 
21166   if test "x$path" != "x$new_path"; then
21167     BOOT_JDK="$new_path"
21168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21170   fi
21171 
21172   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21173   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21174 
21175   else
21176     # We're on a posix platform. Hooray! :)
21177     path="$BOOT_JDK"
21178     has_space=`$ECHO "$path" | $GREP " "`
21179     if test "x$has_space" != x; then
21180       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21181 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21182       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21183     fi
21184 
21185     # Use eval to expand a potential ~
21186     eval path="$path"
21187     if test ! -f "$path" && test ! -d "$path"; then
21188       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21189     fi
21190 
21191     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21192   fi
21193 
21194               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21195 $as_echo_n "checking for Boot JDK... " >&6; }
21196               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21197 $as_echo "$BOOT_JDK" >&6; }
21198               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21199 $as_echo_n "checking Boot JDK version... " >&6; }
21200               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21201               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21202 $as_echo "$BOOT_JDK_VERSION" >&6; }
21203             fi # end check jdk version
21204           fi # end check rt.jar
21205         fi # end check javac
21206       fi # end check java
21207     fi # end check boot jdk found
21208   fi
21209 
21210 
21211   # Test: Is there a JDK installed in default, well-known locations?
21212 
21213   if test "x$BOOT_JDK_FOUND" = xno; then
21214     # Now execute the test
21215 
21216   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21217 
21218   if test "x$BOOT_JDK_FOUND" = xno; then
21219     # Now execute the test
21220 
21221   if test "x$ProgramW6432" != x; then
21222     VIRTUAL_DIR="$ProgramW6432/Java"
21223 
21224   windows_path="$VIRTUAL_DIR"
21225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21226     unix_path=`$CYGPATH -u "$windows_path"`
21227     VIRTUAL_DIR="$unix_path"
21228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21230     VIRTUAL_DIR="$unix_path"
21231   fi
21232 
21233 
21234   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21235   BOOT_JDK_SUFFIX=""
21236   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21237   if test "x$ALL_JDKS_FOUND" != x; then
21238     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21239 
21240   if test "x$BOOT_JDK_FOUND" = xno; then
21241     # Now execute the test
21242 
21243         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21244         if test -d "$BOOT_JDK"; then
21245           BOOT_JDK_FOUND=maybe
21246           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21247 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21248         fi
21249 
21250 
21251     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21252     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21253       # Do we have a bin/java?
21254       if test ! -x "$BOOT_JDK/bin/java"; then
21255         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21257         BOOT_JDK_FOUND=no
21258       else
21259         # Do we have a bin/javac?
21260         if test ! -x "$BOOT_JDK/bin/javac"; then
21261           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21263           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21264 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21265           BOOT_JDK_FOUND=no
21266         else
21267           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21268           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21271             BOOT_JDK_FOUND=no
21272           else
21273             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21274             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21275 
21276             # Extra M4 quote needed to protect [] in grep expression.
21277             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21278             if test "x$FOUND_VERSION_78" = x; then
21279               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21281               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21282 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21283               BOOT_JDK_FOUND=no
21284             else
21285               # We're done! :-)
21286               BOOT_JDK_FOUND=yes
21287 
21288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21289 
21290   # Input might be given as Windows format, start by converting to
21291   # unix format.
21292   path="$BOOT_JDK"
21293   new_path=`$CYGPATH -u "$path"`
21294 
21295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21298   # "foo.exe" is OK but "foo" is an error.
21299   #
21300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21301   # It is also a way to make sure we got the proper file name for the real test later on.
21302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21303   if test "x$test_shortpath" = x; then
21304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21306     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21307   fi
21308 
21309   # Call helper function which possibly converts this using DOS-style short mode.
21310   # If so, the updated path is stored in $new_path.
21311 
21312   input_path="$new_path"
21313   # Check if we need to convert this using DOS-style short mode. If the path
21314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21315   # take no chances and rewrite it.
21316   # Note: m4 eats our [], so we need to use [ and ] instead.
21317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21318   if test "x$has_forbidden_chars" != x; then
21319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21323       # Going to short mode and back again did indeed matter. Since short mode is
21324       # case insensitive, let's make it lowercase to improve readability.
21325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21326       # Now convert it back to Unix-style (cygpath)
21327       input_path=`$CYGPATH -u "$shortmode_path"`
21328       new_path="$input_path"
21329     fi
21330   fi
21331 
21332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21333   if test "x$test_cygdrive_prefix" = x; then
21334     # As a simple fix, exclude /usr/bin since it's not a real path.
21335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21337       # a path prefixed by /cygdrive for fixpath to work.
21338       new_path="$CYGWIN_ROOT_PATH$input_path"
21339     fi
21340   fi
21341 
21342 
21343   if test "x$path" != "x$new_path"; then
21344     BOOT_JDK="$new_path"
21345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21347   fi
21348 
21349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21350 
21351   path="$BOOT_JDK"
21352   has_colon=`$ECHO $path | $GREP ^.:`
21353   new_path="$path"
21354   if test "x$has_colon" = x; then
21355     # Not in mixed or Windows style, start by that.
21356     new_path=`cmd //c echo $path`
21357   fi
21358 
21359 
21360   input_path="$new_path"
21361   # Check if we need to convert this using DOS-style short mode. If the path
21362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21363   # take no chances and rewrite it.
21364   # Note: m4 eats our [], so we need to use [ and ] instead.
21365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21366   if test "x$has_forbidden_chars" != x; then
21367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21369   fi
21370 
21371 
21372   windows_path="$new_path"
21373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21374     unix_path=`$CYGPATH -u "$windows_path"`
21375     new_path="$unix_path"
21376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21378     new_path="$unix_path"
21379   fi
21380 
21381   if test "x$path" != "x$new_path"; then
21382     BOOT_JDK="$new_path"
21383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21385   fi
21386 
21387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21389 
21390   else
21391     # We're on a posix platform. Hooray! :)
21392     path="$BOOT_JDK"
21393     has_space=`$ECHO "$path" | $GREP " "`
21394     if test "x$has_space" != x; then
21395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21398     fi
21399 
21400     # Use eval to expand a potential ~
21401     eval path="$path"
21402     if test ! -f "$path" && test ! -d "$path"; then
21403       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21404     fi
21405 
21406     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21407   fi
21408 
21409               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21410 $as_echo_n "checking for Boot JDK... " >&6; }
21411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21412 $as_echo "$BOOT_JDK" >&6; }
21413               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21414 $as_echo_n "checking Boot JDK version... " >&6; }
21415               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21416               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21417 $as_echo "$BOOT_JDK_VERSION" >&6; }
21418             fi # end check jdk version
21419           fi # end check rt.jar
21420         fi # end check javac
21421       fi # end check java
21422     fi # end check boot jdk found
21423   fi
21424 
21425     done
21426   fi
21427 
21428   fi
21429 
21430 
21431     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21432     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21433       # Do we have a bin/java?
21434       if test ! -x "$BOOT_JDK/bin/java"; then
21435         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21437         BOOT_JDK_FOUND=no
21438       else
21439         # Do we have a bin/javac?
21440         if test ! -x "$BOOT_JDK/bin/javac"; then
21441           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21442 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21443           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21444 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21445           BOOT_JDK_FOUND=no
21446         else
21447           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21448           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21449             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21450 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21451             BOOT_JDK_FOUND=no
21452           else
21453             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21454             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21455 
21456             # Extra M4 quote needed to protect [] in grep expression.
21457             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21458             if test "x$FOUND_VERSION_78" = x; then
21459               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21460 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21461               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21462 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21463               BOOT_JDK_FOUND=no
21464             else
21465               # We're done! :-)
21466               BOOT_JDK_FOUND=yes
21467 
21468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21469 
21470   # Input might be given as Windows format, start by converting to
21471   # unix format.
21472   path="$BOOT_JDK"
21473   new_path=`$CYGPATH -u "$path"`
21474 
21475   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21476   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21477   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21478   # "foo.exe" is OK but "foo" is an error.
21479   #
21480   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21481   # It is also a way to make sure we got the proper file name for the real test later on.
21482   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21483   if test "x$test_shortpath" = x; then
21484     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21485 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21486     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21487   fi
21488 
21489   # Call helper function which possibly converts this using DOS-style short mode.
21490   # If so, the updated path is stored in $new_path.
21491 
21492   input_path="$new_path"
21493   # Check if we need to convert this using DOS-style short mode. If the path
21494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21495   # take no chances and rewrite it.
21496   # Note: m4 eats our [], so we need to use [ and ] instead.
21497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21498   if test "x$has_forbidden_chars" != x; then
21499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21500     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21501     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21502     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21503       # Going to short mode and back again did indeed matter. Since short mode is
21504       # case insensitive, let's make it lowercase to improve readability.
21505       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21506       # Now convert it back to Unix-style (cygpath)
21507       input_path=`$CYGPATH -u "$shortmode_path"`
21508       new_path="$input_path"
21509     fi
21510   fi
21511 
21512   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21513   if test "x$test_cygdrive_prefix" = x; then
21514     # As a simple fix, exclude /usr/bin since it's not a real path.
21515     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21516       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21517       # a path prefixed by /cygdrive for fixpath to work.
21518       new_path="$CYGWIN_ROOT_PATH$input_path"
21519     fi
21520   fi
21521 
21522 
21523   if test "x$path" != "x$new_path"; then
21524     BOOT_JDK="$new_path"
21525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21526 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21527   fi
21528 
21529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21530 
21531   path="$BOOT_JDK"
21532   has_colon=`$ECHO $path | $GREP ^.:`
21533   new_path="$path"
21534   if test "x$has_colon" = x; then
21535     # Not in mixed or Windows style, start by that.
21536     new_path=`cmd //c echo $path`
21537   fi
21538 
21539 
21540   input_path="$new_path"
21541   # Check if we need to convert this using DOS-style short mode. If the path
21542   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21543   # take no chances and rewrite it.
21544   # Note: m4 eats our [], so we need to use [ and ] instead.
21545   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21546   if test "x$has_forbidden_chars" != x; then
21547     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21548     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21549   fi
21550 
21551 
21552   windows_path="$new_path"
21553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21554     unix_path=`$CYGPATH -u "$windows_path"`
21555     new_path="$unix_path"
21556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21557     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21558     new_path="$unix_path"
21559   fi
21560 
21561   if test "x$path" != "x$new_path"; then
21562     BOOT_JDK="$new_path"
21563     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21564 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21565   fi
21566 
21567   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21568   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21569 
21570   else
21571     # We're on a posix platform. Hooray! :)
21572     path="$BOOT_JDK"
21573     has_space=`$ECHO "$path" | $GREP " "`
21574     if test "x$has_space" != x; then
21575       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21576 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21577       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21578     fi
21579 
21580     # Use eval to expand a potential ~
21581     eval path="$path"
21582     if test ! -f "$path" && test ! -d "$path"; then
21583       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21584     fi
21585 
21586     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21587   fi
21588 
21589               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21590 $as_echo_n "checking for Boot JDK... " >&6; }
21591               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21592 $as_echo "$BOOT_JDK" >&6; }
21593               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21594 $as_echo_n "checking Boot JDK version... " >&6; }
21595               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21596               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21597 $as_echo "$BOOT_JDK_VERSION" >&6; }
21598             fi # end check jdk version
21599           fi # end check rt.jar
21600         fi # end check javac
21601       fi # end check java
21602     fi # end check boot jdk found
21603   fi
21604 
21605 
21606   if test "x$BOOT_JDK_FOUND" = xno; then
21607     # Now execute the test
21608 
21609   if test "x$PROGRAMW6432" != x; then
21610     VIRTUAL_DIR="$PROGRAMW6432/Java"
21611 
21612   windows_path="$VIRTUAL_DIR"
21613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21614     unix_path=`$CYGPATH -u "$windows_path"`
21615     VIRTUAL_DIR="$unix_path"
21616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21618     VIRTUAL_DIR="$unix_path"
21619   fi
21620 
21621 
21622   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21623   BOOT_JDK_SUFFIX=""
21624   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21625   if test "x$ALL_JDKS_FOUND" != x; then
21626     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21627 
21628   if test "x$BOOT_JDK_FOUND" = xno; then
21629     # Now execute the test
21630 
21631         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21632         if test -d "$BOOT_JDK"; then
21633           BOOT_JDK_FOUND=maybe
21634           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21635 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21636         fi
21637 
21638 
21639     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21640     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21641       # Do we have a bin/java?
21642       if test ! -x "$BOOT_JDK/bin/java"; then
21643         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21645         BOOT_JDK_FOUND=no
21646       else
21647         # Do we have a bin/javac?
21648         if test ! -x "$BOOT_JDK/bin/javac"; then
21649           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21651           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21652 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21653           BOOT_JDK_FOUND=no
21654         else
21655           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21656           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21657             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21659             BOOT_JDK_FOUND=no
21660           else
21661             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21662             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21663 
21664             # Extra M4 quote needed to protect [] in grep expression.
21665             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21666             if test "x$FOUND_VERSION_78" = x; then
21667               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21669               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21670 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21671               BOOT_JDK_FOUND=no
21672             else
21673               # We're done! :-)
21674               BOOT_JDK_FOUND=yes
21675 
21676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21677 
21678   # Input might be given as Windows format, start by converting to
21679   # unix format.
21680   path="$BOOT_JDK"
21681   new_path=`$CYGPATH -u "$path"`
21682 
21683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21686   # "foo.exe" is OK but "foo" is an error.
21687   #
21688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21689   # It is also a way to make sure we got the proper file name for the real test later on.
21690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21691   if test "x$test_shortpath" = x; then
21692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21693 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21694     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21695   fi
21696 
21697   # Call helper function which possibly converts this using DOS-style short mode.
21698   # If so, the updated path is stored in $new_path.
21699 
21700   input_path="$new_path"
21701   # Check if we need to convert this using DOS-style short mode. If the path
21702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21703   # take no chances and rewrite it.
21704   # Note: m4 eats our [], so we need to use [ and ] instead.
21705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21706   if test "x$has_forbidden_chars" != x; then
21707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21711       # Going to short mode and back again did indeed matter. Since short mode is
21712       # case insensitive, let's make it lowercase to improve readability.
21713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21714       # Now convert it back to Unix-style (cygpath)
21715       input_path=`$CYGPATH -u "$shortmode_path"`
21716       new_path="$input_path"
21717     fi
21718   fi
21719 
21720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21721   if test "x$test_cygdrive_prefix" = x; then
21722     # As a simple fix, exclude /usr/bin since it's not a real path.
21723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21725       # a path prefixed by /cygdrive for fixpath to work.
21726       new_path="$CYGWIN_ROOT_PATH$input_path"
21727     fi
21728   fi
21729 
21730 
21731   if test "x$path" != "x$new_path"; then
21732     BOOT_JDK="$new_path"
21733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21734 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21735   fi
21736 
21737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21738 
21739   path="$BOOT_JDK"
21740   has_colon=`$ECHO $path | $GREP ^.:`
21741   new_path="$path"
21742   if test "x$has_colon" = x; then
21743     # Not in mixed or Windows style, start by that.
21744     new_path=`cmd //c echo $path`
21745   fi
21746 
21747 
21748   input_path="$new_path"
21749   # Check if we need to convert this using DOS-style short mode. If the path
21750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21751   # take no chances and rewrite it.
21752   # Note: m4 eats our [], so we need to use [ and ] instead.
21753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21754   if test "x$has_forbidden_chars" != x; then
21755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21757   fi
21758 
21759 
21760   windows_path="$new_path"
21761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21762     unix_path=`$CYGPATH -u "$windows_path"`
21763     new_path="$unix_path"
21764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21766     new_path="$unix_path"
21767   fi
21768 
21769   if test "x$path" != "x$new_path"; then
21770     BOOT_JDK="$new_path"
21771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21773   fi
21774 
21775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21777 
21778   else
21779     # We're on a posix platform. Hooray! :)
21780     path="$BOOT_JDK"
21781     has_space=`$ECHO "$path" | $GREP " "`
21782     if test "x$has_space" != x; then
21783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21784 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21785       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21786     fi
21787 
21788     # Use eval to expand a potential ~
21789     eval path="$path"
21790     if test ! -f "$path" && test ! -d "$path"; then
21791       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21792     fi
21793 
21794     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21795   fi
21796 
21797               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21798 $as_echo_n "checking for Boot JDK... " >&6; }
21799               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21800 $as_echo "$BOOT_JDK" >&6; }
21801               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21802 $as_echo_n "checking Boot JDK version... " >&6; }
21803               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21804               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21805 $as_echo "$BOOT_JDK_VERSION" >&6; }
21806             fi # end check jdk version
21807           fi # end check rt.jar
21808         fi # end check javac
21809       fi # end check java
21810     fi # end check boot jdk found
21811   fi
21812 
21813     done
21814   fi
21815 
21816   fi
21817 
21818 
21819     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21820     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21821       # Do we have a bin/java?
21822       if test ! -x "$BOOT_JDK/bin/java"; then
21823         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21825         BOOT_JDK_FOUND=no
21826       else
21827         # Do we have a bin/javac?
21828         if test ! -x "$BOOT_JDK/bin/javac"; then
21829           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21830 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21831           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21832 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21833           BOOT_JDK_FOUND=no
21834         else
21835           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21836           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21837             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21838 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21839             BOOT_JDK_FOUND=no
21840           else
21841             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21842             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21843 
21844             # Extra M4 quote needed to protect [] in grep expression.
21845             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
21846             if test "x$FOUND_VERSION_78" = x; then
21847               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21848 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21849               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
21850 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
21851               BOOT_JDK_FOUND=no
21852             else
21853               # We're done! :-)
21854               BOOT_JDK_FOUND=yes
21855 
21856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21857 
21858   # Input might be given as Windows format, start by converting to
21859   # unix format.
21860   path="$BOOT_JDK"
21861   new_path=`$CYGPATH -u "$path"`
21862 
21863   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21864   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21865   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21866   # "foo.exe" is OK but "foo" is an error.
21867   #
21868   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21869   # It is also a way to make sure we got the proper file name for the real test later on.
21870   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21871   if test "x$test_shortpath" = x; then
21872     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21873 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21874     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21875   fi
21876 
21877   # Call helper function which possibly converts this using DOS-style short mode.
21878   # If so, the updated path is stored in $new_path.
21879 
21880   input_path="$new_path"
21881   # Check if we need to convert this using DOS-style short mode. If the path
21882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21883   # take no chances and rewrite it.
21884   # Note: m4 eats our [], so we need to use [ and ] instead.
21885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21886   if test "x$has_forbidden_chars" != x; then
21887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21891       # Going to short mode and back again did indeed matter. Since short mode is
21892       # case insensitive, let's make it lowercase to improve readability.
21893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21894       # Now convert it back to Unix-style (cygpath)
21895       input_path=`$CYGPATH -u "$shortmode_path"`
21896       new_path="$input_path"
21897     fi
21898   fi
21899 
21900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21901   if test "x$test_cygdrive_prefix" = x; then
21902     # As a simple fix, exclude /usr/bin since it's not a real path.
21903     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21905       # a path prefixed by /cygdrive for fixpath to work.
21906       new_path="$CYGWIN_ROOT_PATH$input_path"
21907     fi
21908   fi
21909 
21910 
21911   if test "x$path" != "x$new_path"; then
21912     BOOT_JDK="$new_path"
21913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21914 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21915   fi
21916 
21917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21918 
21919   path="$BOOT_JDK"
21920   has_colon=`$ECHO $path | $GREP ^.:`
21921   new_path="$path"
21922   if test "x$has_colon" = x; then
21923     # Not in mixed or Windows style, start by that.
21924     new_path=`cmd //c echo $path`
21925   fi
21926 
21927 
21928   input_path="$new_path"
21929   # Check if we need to convert this using DOS-style short mode. If the path
21930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21931   # take no chances and rewrite it.
21932   # Note: m4 eats our [], so we need to use [ and ] instead.
21933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21934   if test "x$has_forbidden_chars" != x; then
21935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21937   fi
21938 
21939 
21940   windows_path="$new_path"
21941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21942     unix_path=`$CYGPATH -u "$windows_path"`
21943     new_path="$unix_path"
21944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21946     new_path="$unix_path"
21947   fi
21948 
21949   if test "x$path" != "x$new_path"; then
21950     BOOT_JDK="$new_path"
21951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21952 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21953   fi
21954 
21955   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21956   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21957 
21958   else
21959     # We're on a posix platform. Hooray! :)
21960     path="$BOOT_JDK"
21961     has_space=`$ECHO "$path" | $GREP " "`
21962     if test "x$has_space" != x; then
21963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21964 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21965       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21966     fi
21967 
21968     # Use eval to expand a potential ~
21969     eval path="$path"
21970     if test ! -f "$path" && test ! -d "$path"; then
21971       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21972     fi
21973 
21974     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21975   fi
21976 
21977               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21978 $as_echo_n "checking for Boot JDK... " >&6; }
21979               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21980 $as_echo "$BOOT_JDK" >&6; }
21981               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21982 $as_echo_n "checking Boot JDK version... " >&6; }
21983               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21984               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21985 $as_echo "$BOOT_JDK_VERSION" >&6; }
21986             fi # end check jdk version
21987           fi # end check rt.jar
21988         fi # end check javac
21989       fi # end check java
21990     fi # end check boot jdk found
21991   fi
21992 
21993 
21994   if test "x$BOOT_JDK_FOUND" = xno; then
21995     # Now execute the test
21996 
21997   if test "x$PROGRAMFILES" != x; then
21998     VIRTUAL_DIR="$PROGRAMFILES/Java"
21999 
22000   windows_path="$VIRTUAL_DIR"
22001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22002     unix_path=`$CYGPATH -u "$windows_path"`
22003     VIRTUAL_DIR="$unix_path"
22004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22006     VIRTUAL_DIR="$unix_path"
22007   fi
22008 
22009 
22010   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22011   BOOT_JDK_SUFFIX=""
22012   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22013   if test "x$ALL_JDKS_FOUND" != x; then
22014     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22015 
22016   if test "x$BOOT_JDK_FOUND" = xno; then
22017     # Now execute the test
22018 
22019         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22020         if test -d "$BOOT_JDK"; then
22021           BOOT_JDK_FOUND=maybe
22022           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22023 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22024         fi
22025 
22026 
22027     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22028     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22029       # Do we have a bin/java?
22030       if test ! -x "$BOOT_JDK/bin/java"; then
22031         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22033         BOOT_JDK_FOUND=no
22034       else
22035         # Do we have a bin/javac?
22036         if test ! -x "$BOOT_JDK/bin/javac"; then
22037           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22038 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22039           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22040 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22041           BOOT_JDK_FOUND=no
22042         else
22043           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22044           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22045             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22047             BOOT_JDK_FOUND=no
22048           else
22049             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22050             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22051 
22052             # Extra M4 quote needed to protect [] in grep expression.
22053             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22054             if test "x$FOUND_VERSION_78" = x; then
22055               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22057               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22058 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22059               BOOT_JDK_FOUND=no
22060             else
22061               # We're done! :-)
22062               BOOT_JDK_FOUND=yes
22063 
22064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22065 
22066   # Input might be given as Windows format, start by converting to
22067   # unix format.
22068   path="$BOOT_JDK"
22069   new_path=`$CYGPATH -u "$path"`
22070 
22071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22074   # "foo.exe" is OK but "foo" is an error.
22075   #
22076   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22077   # It is also a way to make sure we got the proper file name for the real test later on.
22078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22079   if test "x$test_shortpath" = x; then
22080     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22081 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22082     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22083   fi
22084 
22085   # Call helper function which possibly converts this using DOS-style short mode.
22086   # If so, the updated path is stored in $new_path.
22087 
22088   input_path="$new_path"
22089   # Check if we need to convert this using DOS-style short mode. If the path
22090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22091   # take no chances and rewrite it.
22092   # Note: m4 eats our [], so we need to use [ and ] instead.
22093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22094   if test "x$has_forbidden_chars" != x; then
22095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22099       # Going to short mode and back again did indeed matter. Since short mode is
22100       # case insensitive, let's make it lowercase to improve readability.
22101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22102       # Now convert it back to Unix-style (cygpath)
22103       input_path=`$CYGPATH -u "$shortmode_path"`
22104       new_path="$input_path"
22105     fi
22106   fi
22107 
22108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22109   if test "x$test_cygdrive_prefix" = x; then
22110     # As a simple fix, exclude /usr/bin since it's not a real path.
22111     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22113       # a path prefixed by /cygdrive for fixpath to work.
22114       new_path="$CYGWIN_ROOT_PATH$input_path"
22115     fi
22116   fi
22117 
22118 
22119   if test "x$path" != "x$new_path"; then
22120     BOOT_JDK="$new_path"
22121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22122 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22123   fi
22124 
22125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22126 
22127   path="$BOOT_JDK"
22128   has_colon=`$ECHO $path | $GREP ^.:`
22129   new_path="$path"
22130   if test "x$has_colon" = x; then
22131     # Not in mixed or Windows style, start by that.
22132     new_path=`cmd //c echo $path`
22133   fi
22134 
22135 
22136   input_path="$new_path"
22137   # Check if we need to convert this using DOS-style short mode. If the path
22138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22139   # take no chances and rewrite it.
22140   # Note: m4 eats our [], so we need to use [ and ] instead.
22141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22142   if test "x$has_forbidden_chars" != x; then
22143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22144     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22145   fi
22146 
22147 
22148   windows_path="$new_path"
22149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22150     unix_path=`$CYGPATH -u "$windows_path"`
22151     new_path="$unix_path"
22152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22154     new_path="$unix_path"
22155   fi
22156 
22157   if test "x$path" != "x$new_path"; then
22158     BOOT_JDK="$new_path"
22159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22160 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22161   fi
22162 
22163   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22164   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22165 
22166   else
22167     # We're on a posix platform. Hooray! :)
22168     path="$BOOT_JDK"
22169     has_space=`$ECHO "$path" | $GREP " "`
22170     if test "x$has_space" != x; then
22171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22173       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22174     fi
22175 
22176     # Use eval to expand a potential ~
22177     eval path="$path"
22178     if test ! -f "$path" && test ! -d "$path"; then
22179       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22180     fi
22181 
22182     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22183   fi
22184 
22185               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22186 $as_echo_n "checking for Boot JDK... " >&6; }
22187               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22188 $as_echo "$BOOT_JDK" >&6; }
22189               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22190 $as_echo_n "checking Boot JDK version... " >&6; }
22191               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22192               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22193 $as_echo "$BOOT_JDK_VERSION" >&6; }
22194             fi # end check jdk version
22195           fi # end check rt.jar
22196         fi # end check javac
22197       fi # end check java
22198     fi # end check boot jdk found
22199   fi
22200 
22201     done
22202   fi
22203 
22204   fi
22205 
22206 
22207     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22208     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22209       # Do we have a bin/java?
22210       if test ! -x "$BOOT_JDK/bin/java"; then
22211         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22212 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22213         BOOT_JDK_FOUND=no
22214       else
22215         # Do we have a bin/javac?
22216         if test ! -x "$BOOT_JDK/bin/javac"; then
22217           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22219           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22220 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22221           BOOT_JDK_FOUND=no
22222         else
22223           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22224           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22225             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22227             BOOT_JDK_FOUND=no
22228           else
22229             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22230             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22231 
22232             # Extra M4 quote needed to protect [] in grep expression.
22233             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22234             if test "x$FOUND_VERSION_78" = x; then
22235               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22237               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22238 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22239               BOOT_JDK_FOUND=no
22240             else
22241               # We're done! :-)
22242               BOOT_JDK_FOUND=yes
22243 
22244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22245 
22246   # Input might be given as Windows format, start by converting to
22247   # unix format.
22248   path="$BOOT_JDK"
22249   new_path=`$CYGPATH -u "$path"`
22250 
22251   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22252   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22253   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22254   # "foo.exe" is OK but "foo" is an error.
22255   #
22256   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22257   # It is also a way to make sure we got the proper file name for the real test later on.
22258   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22259   if test "x$test_shortpath" = x; then
22260     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22261 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22262     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22263   fi
22264 
22265   # Call helper function which possibly converts this using DOS-style short mode.
22266   # If so, the updated path is stored in $new_path.
22267 
22268   input_path="$new_path"
22269   # Check if we need to convert this using DOS-style short mode. If the path
22270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22271   # take no chances and rewrite it.
22272   # Note: m4 eats our [], so we need to use [ and ] instead.
22273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22274   if test "x$has_forbidden_chars" != x; then
22275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22279       # Going to short mode and back again did indeed matter. Since short mode is
22280       # case insensitive, let's make it lowercase to improve readability.
22281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22282       # Now convert it back to Unix-style (cygpath)
22283       input_path=`$CYGPATH -u "$shortmode_path"`
22284       new_path="$input_path"
22285     fi
22286   fi
22287 
22288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22289   if test "x$test_cygdrive_prefix" = x; then
22290     # As a simple fix, exclude /usr/bin since it's not a real path.
22291     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22293       # a path prefixed by /cygdrive for fixpath to work.
22294       new_path="$CYGWIN_ROOT_PATH$input_path"
22295     fi
22296   fi
22297 
22298 
22299   if test "x$path" != "x$new_path"; then
22300     BOOT_JDK="$new_path"
22301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22302 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22303   fi
22304 
22305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22306 
22307   path="$BOOT_JDK"
22308   has_colon=`$ECHO $path | $GREP ^.:`
22309   new_path="$path"
22310   if test "x$has_colon" = x; then
22311     # Not in mixed or Windows style, start by that.
22312     new_path=`cmd //c echo $path`
22313   fi
22314 
22315 
22316   input_path="$new_path"
22317   # Check if we need to convert this using DOS-style short mode. If the path
22318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22319   # take no chances and rewrite it.
22320   # Note: m4 eats our [], so we need to use [ and ] instead.
22321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22322   if test "x$has_forbidden_chars" != x; then
22323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22325   fi
22326 
22327 
22328   windows_path="$new_path"
22329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22330     unix_path=`$CYGPATH -u "$windows_path"`
22331     new_path="$unix_path"
22332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22334     new_path="$unix_path"
22335   fi
22336 
22337   if test "x$path" != "x$new_path"; then
22338     BOOT_JDK="$new_path"
22339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22341   fi
22342 
22343   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22344   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22345 
22346   else
22347     # We're on a posix platform. Hooray! :)
22348     path="$BOOT_JDK"
22349     has_space=`$ECHO "$path" | $GREP " "`
22350     if test "x$has_space" != x; then
22351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22352 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22353       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22354     fi
22355 
22356     # Use eval to expand a potential ~
22357     eval path="$path"
22358     if test ! -f "$path" && test ! -d "$path"; then
22359       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22360     fi
22361 
22362     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22363   fi
22364 
22365               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22366 $as_echo_n "checking for Boot JDK... " >&6; }
22367               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22368 $as_echo "$BOOT_JDK" >&6; }
22369               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22370 $as_echo_n "checking Boot JDK version... " >&6; }
22371               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22372               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22373 $as_echo "$BOOT_JDK_VERSION" >&6; }
22374             fi # end check jdk version
22375           fi # end check rt.jar
22376         fi # end check javac
22377       fi # end check java
22378     fi # end check boot jdk found
22379   fi
22380 
22381 
22382   if test "x$BOOT_JDK_FOUND" = xno; then
22383     # Now execute the test
22384 
22385   if test "x$ProgramFiles" != x; then
22386     VIRTUAL_DIR="$ProgramFiles/Java"
22387 
22388   windows_path="$VIRTUAL_DIR"
22389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22390     unix_path=`$CYGPATH -u "$windows_path"`
22391     VIRTUAL_DIR="$unix_path"
22392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22394     VIRTUAL_DIR="$unix_path"
22395   fi
22396 
22397 
22398   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22399   BOOT_JDK_SUFFIX=""
22400   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22401   if test "x$ALL_JDKS_FOUND" != x; then
22402     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22403 
22404   if test "x$BOOT_JDK_FOUND" = xno; then
22405     # Now execute the test
22406 
22407         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22408         if test -d "$BOOT_JDK"; then
22409           BOOT_JDK_FOUND=maybe
22410           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22411 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22412         fi
22413 
22414 
22415     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22416     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22417       # Do we have a bin/java?
22418       if test ! -x "$BOOT_JDK/bin/java"; then
22419         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22421         BOOT_JDK_FOUND=no
22422       else
22423         # Do we have a bin/javac?
22424         if test ! -x "$BOOT_JDK/bin/javac"; then
22425           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22427           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22429           BOOT_JDK_FOUND=no
22430         else
22431           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22432           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22433             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22435             BOOT_JDK_FOUND=no
22436           else
22437             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22438             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22439 
22440             # Extra M4 quote needed to protect [] in grep expression.
22441             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22442             if test "x$FOUND_VERSION_78" = x; then
22443               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22445               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22446 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22447               BOOT_JDK_FOUND=no
22448             else
22449               # We're done! :-)
22450               BOOT_JDK_FOUND=yes
22451 
22452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22453 
22454   # Input might be given as Windows format, start by converting to
22455   # unix format.
22456   path="$BOOT_JDK"
22457   new_path=`$CYGPATH -u "$path"`
22458 
22459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22462   # "foo.exe" is OK but "foo" is an error.
22463   #
22464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22465   # It is also a way to make sure we got the proper file name for the real test later on.
22466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22467   if test "x$test_shortpath" = x; then
22468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22471   fi
22472 
22473   # Call helper function which possibly converts this using DOS-style short mode.
22474   # If so, the updated path is stored in $new_path.
22475 
22476   input_path="$new_path"
22477   # Check if we need to convert this using DOS-style short mode. If the path
22478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22479   # take no chances and rewrite it.
22480   # Note: m4 eats our [], so we need to use [ and ] instead.
22481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22482   if test "x$has_forbidden_chars" != x; then
22483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22487       # Going to short mode and back again did indeed matter. Since short mode is
22488       # case insensitive, let's make it lowercase to improve readability.
22489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22490       # Now convert it back to Unix-style (cygpath)
22491       input_path=`$CYGPATH -u "$shortmode_path"`
22492       new_path="$input_path"
22493     fi
22494   fi
22495 
22496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22497   if test "x$test_cygdrive_prefix" = x; then
22498     # As a simple fix, exclude /usr/bin since it's not a real path.
22499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22501       # a path prefixed by /cygdrive for fixpath to work.
22502       new_path="$CYGWIN_ROOT_PATH$input_path"
22503     fi
22504   fi
22505 
22506 
22507   if test "x$path" != "x$new_path"; then
22508     BOOT_JDK="$new_path"
22509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22511   fi
22512 
22513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22514 
22515   path="$BOOT_JDK"
22516   has_colon=`$ECHO $path | $GREP ^.:`
22517   new_path="$path"
22518   if test "x$has_colon" = x; then
22519     # Not in mixed or Windows style, start by that.
22520     new_path=`cmd //c echo $path`
22521   fi
22522 
22523 
22524   input_path="$new_path"
22525   # Check if we need to convert this using DOS-style short mode. If the path
22526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22527   # take no chances and rewrite it.
22528   # Note: m4 eats our [], so we need to use [ and ] instead.
22529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22530   if test "x$has_forbidden_chars" != x; then
22531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22533   fi
22534 
22535 
22536   windows_path="$new_path"
22537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22538     unix_path=`$CYGPATH -u "$windows_path"`
22539     new_path="$unix_path"
22540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22542     new_path="$unix_path"
22543   fi
22544 
22545   if test "x$path" != "x$new_path"; then
22546     BOOT_JDK="$new_path"
22547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22549   fi
22550 
22551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22553 
22554   else
22555     # We're on a posix platform. Hooray! :)
22556     path="$BOOT_JDK"
22557     has_space=`$ECHO "$path" | $GREP " "`
22558     if test "x$has_space" != x; then
22559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22561       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22562     fi
22563 
22564     # Use eval to expand a potential ~
22565     eval path="$path"
22566     if test ! -f "$path" && test ! -d "$path"; then
22567       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22568     fi
22569 
22570     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22571   fi
22572 
22573               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22574 $as_echo_n "checking for Boot JDK... " >&6; }
22575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22576 $as_echo "$BOOT_JDK" >&6; }
22577               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22578 $as_echo_n "checking Boot JDK version... " >&6; }
22579               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22581 $as_echo "$BOOT_JDK_VERSION" >&6; }
22582             fi # end check jdk version
22583           fi # end check rt.jar
22584         fi # end check javac
22585       fi # end check java
22586     fi # end check boot jdk found
22587   fi
22588 
22589     done
22590   fi
22591 
22592   fi
22593 
22594 
22595     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22596     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22597       # Do we have a bin/java?
22598       if test ! -x "$BOOT_JDK/bin/java"; then
22599         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22600 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22601         BOOT_JDK_FOUND=no
22602       else
22603         # Do we have a bin/javac?
22604         if test ! -x "$BOOT_JDK/bin/javac"; then
22605           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22606 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22607           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22608 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22609           BOOT_JDK_FOUND=no
22610         else
22611           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22612           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22613             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22615             BOOT_JDK_FOUND=no
22616           else
22617             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22618             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22619 
22620             # Extra M4 quote needed to protect [] in grep expression.
22621             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22622             if test "x$FOUND_VERSION_78" = x; then
22623               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22625               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22626 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22627               BOOT_JDK_FOUND=no
22628             else
22629               # We're done! :-)
22630               BOOT_JDK_FOUND=yes
22631 
22632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22633 
22634   # Input might be given as Windows format, start by converting to
22635   # unix format.
22636   path="$BOOT_JDK"
22637   new_path=`$CYGPATH -u "$path"`
22638 
22639   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22640   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22641   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22642   # "foo.exe" is OK but "foo" is an error.
22643   #
22644   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22645   # It is also a way to make sure we got the proper file name for the real test later on.
22646   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22647   if test "x$test_shortpath" = x; then
22648     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22649 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22650     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22651   fi
22652 
22653   # Call helper function which possibly converts this using DOS-style short mode.
22654   # If so, the updated path is stored in $new_path.
22655 
22656   input_path="$new_path"
22657   # Check if we need to convert this using DOS-style short mode. If the path
22658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22659   # take no chances and rewrite it.
22660   # Note: m4 eats our [], so we need to use [ and ] instead.
22661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22662   if test "x$has_forbidden_chars" != x; then
22663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22664     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22665     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22666     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22667       # Going to short mode and back again did indeed matter. Since short mode is
22668       # case insensitive, let's make it lowercase to improve readability.
22669       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22670       # Now convert it back to Unix-style (cygpath)
22671       input_path=`$CYGPATH -u "$shortmode_path"`
22672       new_path="$input_path"
22673     fi
22674   fi
22675 
22676   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22677   if test "x$test_cygdrive_prefix" = x; then
22678     # As a simple fix, exclude /usr/bin since it's not a real path.
22679     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22680       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22681       # a path prefixed by /cygdrive for fixpath to work.
22682       new_path="$CYGWIN_ROOT_PATH$input_path"
22683     fi
22684   fi
22685 
22686 
22687   if test "x$path" != "x$new_path"; then
22688     BOOT_JDK="$new_path"
22689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22690 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22691   fi
22692 
22693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694 
22695   path="$BOOT_JDK"
22696   has_colon=`$ECHO $path | $GREP ^.:`
22697   new_path="$path"
22698   if test "x$has_colon" = x; then
22699     # Not in mixed or Windows style, start by that.
22700     new_path=`cmd //c echo $path`
22701   fi
22702 
22703 
22704   input_path="$new_path"
22705   # Check if we need to convert this using DOS-style short mode. If the path
22706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22707   # take no chances and rewrite it.
22708   # Note: m4 eats our [], so we need to use [ and ] instead.
22709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22710   if test "x$has_forbidden_chars" != x; then
22711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22712     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22713   fi
22714 
22715 
22716   windows_path="$new_path"
22717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22718     unix_path=`$CYGPATH -u "$windows_path"`
22719     new_path="$unix_path"
22720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22722     new_path="$unix_path"
22723   fi
22724 
22725   if test "x$path" != "x$new_path"; then
22726     BOOT_JDK="$new_path"
22727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22728 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22729   fi
22730 
22731   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22732   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22733 
22734   else
22735     # We're on a posix platform. Hooray! :)
22736     path="$BOOT_JDK"
22737     has_space=`$ECHO "$path" | $GREP " "`
22738     if test "x$has_space" != x; then
22739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22740 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22741       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22742     fi
22743 
22744     # Use eval to expand a potential ~
22745     eval path="$path"
22746     if test ! -f "$path" && test ! -d "$path"; then
22747       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22748     fi
22749 
22750     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22751   fi
22752 
22753               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22754 $as_echo_n "checking for Boot JDK... " >&6; }
22755               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22756 $as_echo "$BOOT_JDK" >&6; }
22757               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22758 $as_echo_n "checking Boot JDK version... " >&6; }
22759               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22760               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22761 $as_echo "$BOOT_JDK_VERSION" >&6; }
22762             fi # end check jdk version
22763           fi # end check rt.jar
22764         fi # end check javac
22765       fi # end check java
22766     fi # end check boot jdk found
22767   fi
22768 
22769 
22770   if test "x$BOOT_JDK_FOUND" = xno; then
22771     # Now execute the test
22772 
22773   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
22774   BOOT_JDK_SUFFIX=""
22775   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22776   if test "x$ALL_JDKS_FOUND" != x; then
22777     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22778 
22779   if test "x$BOOT_JDK_FOUND" = xno; then
22780     # Now execute the test
22781 
22782         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22783         if test -d "$BOOT_JDK"; then
22784           BOOT_JDK_FOUND=maybe
22785           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22786 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22787         fi
22788 
22789 
22790     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22791     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22792       # Do we have a bin/java?
22793       if test ! -x "$BOOT_JDK/bin/java"; then
22794         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22796         BOOT_JDK_FOUND=no
22797       else
22798         # Do we have a bin/javac?
22799         if test ! -x "$BOOT_JDK/bin/javac"; then
22800           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22802           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22803 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22804           BOOT_JDK_FOUND=no
22805         else
22806           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22807           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22808             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22810             BOOT_JDK_FOUND=no
22811           else
22812             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22814 
22815             # Extra M4 quote needed to protect [] in grep expression.
22816             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22817             if test "x$FOUND_VERSION_78" = x; then
22818               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22820               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22821 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
22822               BOOT_JDK_FOUND=no
22823             else
22824               # We're done! :-)
22825               BOOT_JDK_FOUND=yes
22826 
22827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22828 
22829   # Input might be given as Windows format, start by converting to
22830   # unix format.
22831   path="$BOOT_JDK"
22832   new_path=`$CYGPATH -u "$path"`
22833 
22834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22837   # "foo.exe" is OK but "foo" is an error.
22838   #
22839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22840   # It is also a way to make sure we got the proper file name for the real test later on.
22841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22842   if test "x$test_shortpath" = x; then
22843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22846   fi
22847 
22848   # Call helper function which possibly converts this using DOS-style short mode.
22849   # If so, the updated path is stored in $new_path.
22850 
22851   input_path="$new_path"
22852   # Check if we need to convert this using DOS-style short mode. If the path
22853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22854   # take no chances and rewrite it.
22855   # Note: m4 eats our [], so we need to use [ and ] instead.
22856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22857   if test "x$has_forbidden_chars" != x; then
22858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22862       # Going to short mode and back again did indeed matter. Since short mode is
22863       # case insensitive, let's make it lowercase to improve readability.
22864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22865       # Now convert it back to Unix-style (cygpath)
22866       input_path=`$CYGPATH -u "$shortmode_path"`
22867       new_path="$input_path"
22868     fi
22869   fi
22870 
22871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22872   if test "x$test_cygdrive_prefix" = x; then
22873     # As a simple fix, exclude /usr/bin since it's not a real path.
22874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22876       # a path prefixed by /cygdrive for fixpath to work.
22877       new_path="$CYGWIN_ROOT_PATH$input_path"
22878     fi
22879   fi
22880 
22881 
22882   if test "x$path" != "x$new_path"; then
22883     BOOT_JDK="$new_path"
22884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22886   fi
22887 
22888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22889 
22890   path="$BOOT_JDK"
22891   has_colon=`$ECHO $path | $GREP ^.:`
22892   new_path="$path"
22893   if test "x$has_colon" = x; then
22894     # Not in mixed or Windows style, start by that.
22895     new_path=`cmd //c echo $path`
22896   fi
22897 
22898 
22899   input_path="$new_path"
22900   # Check if we need to convert this using DOS-style short mode. If the path
22901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22902   # take no chances and rewrite it.
22903   # Note: m4 eats our [], so we need to use [ and ] instead.
22904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22905   if test "x$has_forbidden_chars" != x; then
22906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22908   fi
22909 
22910 
22911   windows_path="$new_path"
22912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22913     unix_path=`$CYGPATH -u "$windows_path"`
22914     new_path="$unix_path"
22915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22917     new_path="$unix_path"
22918   fi
22919 
22920   if test "x$path" != "x$new_path"; then
22921     BOOT_JDK="$new_path"
22922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22924   fi
22925 
22926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22928 
22929   else
22930     # We're on a posix platform. Hooray! :)
22931     path="$BOOT_JDK"
22932     has_space=`$ECHO "$path" | $GREP " "`
22933     if test "x$has_space" != x; then
22934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22937     fi
22938 
22939     # Use eval to expand a potential ~
22940     eval path="$path"
22941     if test ! -f "$path" && test ! -d "$path"; then
22942       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22943     fi
22944 
22945     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22946   fi
22947 
22948               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22949 $as_echo_n "checking for Boot JDK... " >&6; }
22950               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22951 $as_echo "$BOOT_JDK" >&6; }
22952               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22953 $as_echo_n "checking Boot JDK version... " >&6; }
22954               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22956 $as_echo "$BOOT_JDK_VERSION" >&6; }
22957             fi # end check jdk version
22958           fi # end check rt.jar
22959         fi # end check javac
22960       fi # end check java
22961     fi # end check boot jdk found
22962   fi
22963 
22964     done
22965   fi
22966 
22967 
22968     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22969     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22970       # Do we have a bin/java?
22971       if test ! -x "$BOOT_JDK/bin/java"; then
22972         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22974         BOOT_JDK_FOUND=no
22975       else
22976         # Do we have a bin/javac?
22977         if test ! -x "$BOOT_JDK/bin/javac"; then
22978           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22979 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22980           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22981 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22982           BOOT_JDK_FOUND=no
22983         else
22984           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22985           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22986             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22988             BOOT_JDK_FOUND=no
22989           else
22990             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22991             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22992 
22993             # Extra M4 quote needed to protect [] in grep expression.
22994             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
22995             if test "x$FOUND_VERSION_78" = x; then
22996               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22997 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22998               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
22999 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23000               BOOT_JDK_FOUND=no
23001             else
23002               # We're done! :-)
23003               BOOT_JDK_FOUND=yes
23004 
23005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23006 
23007   # Input might be given as Windows format, start by converting to
23008   # unix format.
23009   path="$BOOT_JDK"
23010   new_path=`$CYGPATH -u "$path"`
23011 
23012   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23013   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23014   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23015   # "foo.exe" is OK but "foo" is an error.
23016   #
23017   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23018   # It is also a way to make sure we got the proper file name for the real test later on.
23019   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23020   if test "x$test_shortpath" = x; then
23021     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23022 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23023     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23024   fi
23025 
23026   # Call helper function which possibly converts this using DOS-style short mode.
23027   # If so, the updated path is stored in $new_path.
23028 
23029   input_path="$new_path"
23030   # Check if we need to convert this using DOS-style short mode. If the path
23031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23032   # take no chances and rewrite it.
23033   # Note: m4 eats our [], so we need to use [ and ] instead.
23034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23035   if test "x$has_forbidden_chars" != x; then
23036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23037     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23038     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23039     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23040       # Going to short mode and back again did indeed matter. Since short mode is
23041       # case insensitive, let's make it lowercase to improve readability.
23042       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23043       # Now convert it back to Unix-style (cygpath)
23044       input_path=`$CYGPATH -u "$shortmode_path"`
23045       new_path="$input_path"
23046     fi
23047   fi
23048 
23049   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23050   if test "x$test_cygdrive_prefix" = x; then
23051     # As a simple fix, exclude /usr/bin since it's not a real path.
23052     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23053       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23054       # a path prefixed by /cygdrive for fixpath to work.
23055       new_path="$CYGWIN_ROOT_PATH$input_path"
23056     fi
23057   fi
23058 
23059 
23060   if test "x$path" != "x$new_path"; then
23061     BOOT_JDK="$new_path"
23062     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23063 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23064   fi
23065 
23066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23067 
23068   path="$BOOT_JDK"
23069   has_colon=`$ECHO $path | $GREP ^.:`
23070   new_path="$path"
23071   if test "x$has_colon" = x; then
23072     # Not in mixed or Windows style, start by that.
23073     new_path=`cmd //c echo $path`
23074   fi
23075 
23076 
23077   input_path="$new_path"
23078   # Check if we need to convert this using DOS-style short mode. If the path
23079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23080   # take no chances and rewrite it.
23081   # Note: m4 eats our [], so we need to use [ and ] instead.
23082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23083   if test "x$has_forbidden_chars" != x; then
23084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23085     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23086   fi
23087 
23088 
23089   windows_path="$new_path"
23090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23091     unix_path=`$CYGPATH -u "$windows_path"`
23092     new_path="$unix_path"
23093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23095     new_path="$unix_path"
23096   fi
23097 
23098   if test "x$path" != "x$new_path"; then
23099     BOOT_JDK="$new_path"
23100     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23101 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23102   fi
23103 
23104   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23105   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23106 
23107   else
23108     # We're on a posix platform. Hooray! :)
23109     path="$BOOT_JDK"
23110     has_space=`$ECHO "$path" | $GREP " "`
23111     if test "x$has_space" != x; then
23112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23113 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23114       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23115     fi
23116 
23117     # Use eval to expand a potential ~
23118     eval path="$path"
23119     if test ! -f "$path" && test ! -d "$path"; then
23120       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23121     fi
23122 
23123     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23124   fi
23125 
23126               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23127 $as_echo_n "checking for Boot JDK... " >&6; }
23128               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23129 $as_echo "$BOOT_JDK" >&6; }
23130               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23131 $as_echo_n "checking Boot JDK version... " >&6; }
23132               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23133               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23134 $as_echo "$BOOT_JDK_VERSION" >&6; }
23135             fi # end check jdk version
23136           fi # end check rt.jar
23137         fi # end check javac
23138       fi # end check java
23139     fi # end check boot jdk found
23140   fi
23141 
23142   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23143 
23144   if test "x$BOOT_JDK_FOUND" = xno; then
23145     # Now execute the test
23146 
23147   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23148   BOOT_JDK_SUFFIX="/Contents/Home"
23149   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23150   if test "x$ALL_JDKS_FOUND" != x; then
23151     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23152 
23153   if test "x$BOOT_JDK_FOUND" = xno; then
23154     # Now execute the test
23155 
23156         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23157         if test -d "$BOOT_JDK"; then
23158           BOOT_JDK_FOUND=maybe
23159           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23160 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23161         fi
23162 
23163 
23164     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23165     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23166       # Do we have a bin/java?
23167       if test ! -x "$BOOT_JDK/bin/java"; then
23168         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23169 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23170         BOOT_JDK_FOUND=no
23171       else
23172         # Do we have a bin/javac?
23173         if test ! -x "$BOOT_JDK/bin/javac"; then
23174           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23175 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23176           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23177 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23178           BOOT_JDK_FOUND=no
23179         else
23180           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23181           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23182             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23184             BOOT_JDK_FOUND=no
23185           else
23186             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23187             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23188 
23189             # Extra M4 quote needed to protect [] in grep expression.
23190             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23191             if test "x$FOUND_VERSION_78" = x; then
23192               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23194               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23195 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23196               BOOT_JDK_FOUND=no
23197             else
23198               # We're done! :-)
23199               BOOT_JDK_FOUND=yes
23200 
23201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23202 
23203   # Input might be given as Windows format, start by converting to
23204   # unix format.
23205   path="$BOOT_JDK"
23206   new_path=`$CYGPATH -u "$path"`
23207 
23208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23211   # "foo.exe" is OK but "foo" is an error.
23212   #
23213   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23214   # It is also a way to make sure we got the proper file name for the real test later on.
23215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23216   if test "x$test_shortpath" = x; then
23217     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23219     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23220   fi
23221 
23222   # Call helper function which possibly converts this using DOS-style short mode.
23223   # If so, the updated path is stored in $new_path.
23224 
23225   input_path="$new_path"
23226   # Check if we need to convert this using DOS-style short mode. If the path
23227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23228   # take no chances and rewrite it.
23229   # Note: m4 eats our [], so we need to use [ and ] instead.
23230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23231   if test "x$has_forbidden_chars" != x; then
23232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23233     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23234     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23235     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23236       # Going to short mode and back again did indeed matter. Since short mode is
23237       # case insensitive, let's make it lowercase to improve readability.
23238       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23239       # Now convert it back to Unix-style (cygpath)
23240       input_path=`$CYGPATH -u "$shortmode_path"`
23241       new_path="$input_path"
23242     fi
23243   fi
23244 
23245   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23246   if test "x$test_cygdrive_prefix" = x; then
23247     # As a simple fix, exclude /usr/bin since it's not a real path.
23248     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23249       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23250       # a path prefixed by /cygdrive for fixpath to work.
23251       new_path="$CYGWIN_ROOT_PATH$input_path"
23252     fi
23253   fi
23254 
23255 
23256   if test "x$path" != "x$new_path"; then
23257     BOOT_JDK="$new_path"
23258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23260   fi
23261 
23262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23263 
23264   path="$BOOT_JDK"
23265   has_colon=`$ECHO $path | $GREP ^.:`
23266   new_path="$path"
23267   if test "x$has_colon" = x; then
23268     # Not in mixed or Windows style, start by that.
23269     new_path=`cmd //c echo $path`
23270   fi
23271 
23272 
23273   input_path="$new_path"
23274   # Check if we need to convert this using DOS-style short mode. If the path
23275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23276   # take no chances and rewrite it.
23277   # Note: m4 eats our [], so we need to use [ and ] instead.
23278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23279   if test "x$has_forbidden_chars" != x; then
23280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23282   fi
23283 
23284 
23285   windows_path="$new_path"
23286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23287     unix_path=`$CYGPATH -u "$windows_path"`
23288     new_path="$unix_path"
23289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23291     new_path="$unix_path"
23292   fi
23293 
23294   if test "x$path" != "x$new_path"; then
23295     BOOT_JDK="$new_path"
23296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23297 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23298   fi
23299 
23300   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23301   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23302 
23303   else
23304     # We're on a posix platform. Hooray! :)
23305     path="$BOOT_JDK"
23306     has_space=`$ECHO "$path" | $GREP " "`
23307     if test "x$has_space" != x; then
23308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23309 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23310       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23311     fi
23312 
23313     # Use eval to expand a potential ~
23314     eval path="$path"
23315     if test ! -f "$path" && test ! -d "$path"; then
23316       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23317     fi
23318 
23319     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23320   fi
23321 
23322               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23323 $as_echo_n "checking for Boot JDK... " >&6; }
23324               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23325 $as_echo "$BOOT_JDK" >&6; }
23326               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23327 $as_echo_n "checking Boot JDK version... " >&6; }
23328               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23329               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23330 $as_echo "$BOOT_JDK_VERSION" >&6; }
23331             fi # end check jdk version
23332           fi # end check rt.jar
23333         fi # end check javac
23334       fi # end check java
23335     fi # end check boot jdk found
23336   fi
23337 
23338     done
23339   fi
23340 
23341 
23342     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23343     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23344       # Do we have a bin/java?
23345       if test ! -x "$BOOT_JDK/bin/java"; then
23346         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23347 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23348         BOOT_JDK_FOUND=no
23349       else
23350         # Do we have a bin/javac?
23351         if test ! -x "$BOOT_JDK/bin/javac"; then
23352           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23354           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23355 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23356           BOOT_JDK_FOUND=no
23357         else
23358           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23359           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23360             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23362             BOOT_JDK_FOUND=no
23363           else
23364             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23365             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23366 
23367             # Extra M4 quote needed to protect [] in grep expression.
23368             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23369             if test "x$FOUND_VERSION_78" = x; then
23370               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23372               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23373 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23374               BOOT_JDK_FOUND=no
23375             else
23376               # We're done! :-)
23377               BOOT_JDK_FOUND=yes
23378 
23379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23380 
23381   # Input might be given as Windows format, start by converting to
23382   # unix format.
23383   path="$BOOT_JDK"
23384   new_path=`$CYGPATH -u "$path"`
23385 
23386   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23387   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23388   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23389   # "foo.exe" is OK but "foo" is an error.
23390   #
23391   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23392   # It is also a way to make sure we got the proper file name for the real test later on.
23393   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23394   if test "x$test_shortpath" = x; then
23395     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23397     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23398   fi
23399 
23400   # Call helper function which possibly converts this using DOS-style short mode.
23401   # If so, the updated path is stored in $new_path.
23402 
23403   input_path="$new_path"
23404   # Check if we need to convert this using DOS-style short mode. If the path
23405   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23406   # take no chances and rewrite it.
23407   # Note: m4 eats our [], so we need to use [ and ] instead.
23408   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23409   if test "x$has_forbidden_chars" != x; then
23410     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23411     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23412     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23413     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23414       # Going to short mode and back again did indeed matter. Since short mode is
23415       # case insensitive, let's make it lowercase to improve readability.
23416       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23417       # Now convert it back to Unix-style (cygpath)
23418       input_path=`$CYGPATH -u "$shortmode_path"`
23419       new_path="$input_path"
23420     fi
23421   fi
23422 
23423   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23424   if test "x$test_cygdrive_prefix" = x; then
23425     # As a simple fix, exclude /usr/bin since it's not a real path.
23426     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23427       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23428       # a path prefixed by /cygdrive for fixpath to work.
23429       new_path="$CYGWIN_ROOT_PATH$input_path"
23430     fi
23431   fi
23432 
23433 
23434   if test "x$path" != "x$new_path"; then
23435     BOOT_JDK="$new_path"
23436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23437 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23438   fi
23439 
23440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23441 
23442   path="$BOOT_JDK"
23443   has_colon=`$ECHO $path | $GREP ^.:`
23444   new_path="$path"
23445   if test "x$has_colon" = x; then
23446     # Not in mixed or Windows style, start by that.
23447     new_path=`cmd //c echo $path`
23448   fi
23449 
23450 
23451   input_path="$new_path"
23452   # Check if we need to convert this using DOS-style short mode. If the path
23453   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23454   # take no chances and rewrite it.
23455   # Note: m4 eats our [], so we need to use [ and ] instead.
23456   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23457   if test "x$has_forbidden_chars" != x; then
23458     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23459     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23460   fi
23461 
23462 
23463   windows_path="$new_path"
23464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23465     unix_path=`$CYGPATH -u "$windows_path"`
23466     new_path="$unix_path"
23467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23469     new_path="$unix_path"
23470   fi
23471 
23472   if test "x$path" != "x$new_path"; then
23473     BOOT_JDK="$new_path"
23474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23475 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23476   fi
23477 
23478   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23479   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23480 
23481   else
23482     # We're on a posix platform. Hooray! :)
23483     path="$BOOT_JDK"
23484     has_space=`$ECHO "$path" | $GREP " "`
23485     if test "x$has_space" != x; then
23486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23488       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23489     fi
23490 
23491     # Use eval to expand a potential ~
23492     eval path="$path"
23493     if test ! -f "$path" && test ! -d "$path"; then
23494       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23495     fi
23496 
23497     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23498   fi
23499 
23500               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23501 $as_echo_n "checking for Boot JDK... " >&6; }
23502               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23503 $as_echo "$BOOT_JDK" >&6; }
23504               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23505 $as_echo_n "checking Boot JDK version... " >&6; }
23506               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23507               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23508 $as_echo "$BOOT_JDK_VERSION" >&6; }
23509             fi # end check jdk version
23510           fi # end check rt.jar
23511         fi # end check javac
23512       fi # end check java
23513     fi # end check boot jdk found
23514   fi
23515 
23516 
23517   if test "x$BOOT_JDK_FOUND" = xno; then
23518     # Now execute the test
23519 
23520   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23521   BOOT_JDK_SUFFIX="/Contents/Home"
23522   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23523   if test "x$ALL_JDKS_FOUND" != x; then
23524     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23525 
23526   if test "x$BOOT_JDK_FOUND" = xno; then
23527     # Now execute the test
23528 
23529         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23530         if test -d "$BOOT_JDK"; then
23531           BOOT_JDK_FOUND=maybe
23532           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23533 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23534         fi
23535 
23536 
23537     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23538     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23539       # Do we have a bin/java?
23540       if test ! -x "$BOOT_JDK/bin/java"; then
23541         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23543         BOOT_JDK_FOUND=no
23544       else
23545         # Do we have a bin/javac?
23546         if test ! -x "$BOOT_JDK/bin/javac"; then
23547           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23549           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23550 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23551           BOOT_JDK_FOUND=no
23552         else
23553           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23554           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23555             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23556 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23557             BOOT_JDK_FOUND=no
23558           else
23559             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23560             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23561 
23562             # Extra M4 quote needed to protect [] in grep expression.
23563             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23564             if test "x$FOUND_VERSION_78" = x; then
23565               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23567               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23568 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23569               BOOT_JDK_FOUND=no
23570             else
23571               # We're done! :-)
23572               BOOT_JDK_FOUND=yes
23573 
23574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23575 
23576   # Input might be given as Windows format, start by converting to
23577   # unix format.
23578   path="$BOOT_JDK"
23579   new_path=`$CYGPATH -u "$path"`
23580 
23581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23584   # "foo.exe" is OK but "foo" is an error.
23585   #
23586   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23587   # It is also a way to make sure we got the proper file name for the real test later on.
23588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23589   if test "x$test_shortpath" = x; then
23590     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23592     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23593   fi
23594 
23595   # Call helper function which possibly converts this using DOS-style short mode.
23596   # If so, the updated path is stored in $new_path.
23597 
23598   input_path="$new_path"
23599   # Check if we need to convert this using DOS-style short mode. If the path
23600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23601   # take no chances and rewrite it.
23602   # Note: m4 eats our [], so we need to use [ and ] instead.
23603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23604   if test "x$has_forbidden_chars" != x; then
23605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23609       # Going to short mode and back again did indeed matter. Since short mode is
23610       # case insensitive, let's make it lowercase to improve readability.
23611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23612       # Now convert it back to Unix-style (cygpath)
23613       input_path=`$CYGPATH -u "$shortmode_path"`
23614       new_path="$input_path"
23615     fi
23616   fi
23617 
23618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23619   if test "x$test_cygdrive_prefix" = x; then
23620     # As a simple fix, exclude /usr/bin since it's not a real path.
23621     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23623       # a path prefixed by /cygdrive for fixpath to work.
23624       new_path="$CYGWIN_ROOT_PATH$input_path"
23625     fi
23626   fi
23627 
23628 
23629   if test "x$path" != "x$new_path"; then
23630     BOOT_JDK="$new_path"
23631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23632 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23633   fi
23634 
23635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23636 
23637   path="$BOOT_JDK"
23638   has_colon=`$ECHO $path | $GREP ^.:`
23639   new_path="$path"
23640   if test "x$has_colon" = x; then
23641     # Not in mixed or Windows style, start by that.
23642     new_path=`cmd //c echo $path`
23643   fi
23644 
23645 
23646   input_path="$new_path"
23647   # Check if we need to convert this using DOS-style short mode. If the path
23648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23649   # take no chances and rewrite it.
23650   # Note: m4 eats our [], so we need to use [ and ] instead.
23651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23652   if test "x$has_forbidden_chars" != x; then
23653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655   fi
23656 
23657 
23658   windows_path="$new_path"
23659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23660     unix_path=`$CYGPATH -u "$windows_path"`
23661     new_path="$unix_path"
23662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23664     new_path="$unix_path"
23665   fi
23666 
23667   if test "x$path" != "x$new_path"; then
23668     BOOT_JDK="$new_path"
23669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23670 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23671   fi
23672 
23673   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23674   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23675 
23676   else
23677     # We're on a posix platform. Hooray! :)
23678     path="$BOOT_JDK"
23679     has_space=`$ECHO "$path" | $GREP " "`
23680     if test "x$has_space" != x; then
23681       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23682 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23683       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23684     fi
23685 
23686     # Use eval to expand a potential ~
23687     eval path="$path"
23688     if test ! -f "$path" && test ! -d "$path"; then
23689       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23690     fi
23691 
23692     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23693   fi
23694 
23695               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23696 $as_echo_n "checking for Boot JDK... " >&6; }
23697               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23698 $as_echo "$BOOT_JDK" >&6; }
23699               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23700 $as_echo_n "checking Boot JDK version... " >&6; }
23701               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23702               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23703 $as_echo "$BOOT_JDK_VERSION" >&6; }
23704             fi # end check jdk version
23705           fi # end check rt.jar
23706         fi # end check javac
23707       fi # end check java
23708     fi # end check boot jdk found
23709   fi
23710 
23711     done
23712   fi
23713 
23714 
23715     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23716     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23717       # Do we have a bin/java?
23718       if test ! -x "$BOOT_JDK/bin/java"; then
23719         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23720 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23721         BOOT_JDK_FOUND=no
23722       else
23723         # Do we have a bin/javac?
23724         if test ! -x "$BOOT_JDK/bin/javac"; then
23725           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23727           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23728 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23729           BOOT_JDK_FOUND=no
23730         else
23731           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23732           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23733             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23735             BOOT_JDK_FOUND=no
23736           else
23737             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23738             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23739 
23740             # Extra M4 quote needed to protect [] in grep expression.
23741             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23742             if test "x$FOUND_VERSION_78" = x; then
23743               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23745               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23746 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23747               BOOT_JDK_FOUND=no
23748             else
23749               # We're done! :-)
23750               BOOT_JDK_FOUND=yes
23751 
23752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23753 
23754   # Input might be given as Windows format, start by converting to
23755   # unix format.
23756   path="$BOOT_JDK"
23757   new_path=`$CYGPATH -u "$path"`
23758 
23759   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23760   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23761   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23762   # "foo.exe" is OK but "foo" is an error.
23763   #
23764   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23765   # It is also a way to make sure we got the proper file name for the real test later on.
23766   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23767   if test "x$test_shortpath" = x; then
23768     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23769 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23770     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23771   fi
23772 
23773   # Call helper function which possibly converts this using DOS-style short mode.
23774   # If so, the updated path is stored in $new_path.
23775 
23776   input_path="$new_path"
23777   # Check if we need to convert this using DOS-style short mode. If the path
23778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23779   # take no chances and rewrite it.
23780   # Note: m4 eats our [], so we need to use [ and ] instead.
23781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23782   if test "x$has_forbidden_chars" != x; then
23783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23784     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23785     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23786     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23787       # Going to short mode and back again did indeed matter. Since short mode is
23788       # case insensitive, let's make it lowercase to improve readability.
23789       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23790       # Now convert it back to Unix-style (cygpath)
23791       input_path=`$CYGPATH -u "$shortmode_path"`
23792       new_path="$input_path"
23793     fi
23794   fi
23795 
23796   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23797   if test "x$test_cygdrive_prefix" = x; then
23798     # As a simple fix, exclude /usr/bin since it's not a real path.
23799     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23800       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23801       # a path prefixed by /cygdrive for fixpath to work.
23802       new_path="$CYGWIN_ROOT_PATH$input_path"
23803     fi
23804   fi
23805 
23806 
23807   if test "x$path" != "x$new_path"; then
23808     BOOT_JDK="$new_path"
23809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23811   fi
23812 
23813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23814 
23815   path="$BOOT_JDK"
23816   has_colon=`$ECHO $path | $GREP ^.:`
23817   new_path="$path"
23818   if test "x$has_colon" = x; then
23819     # Not in mixed or Windows style, start by that.
23820     new_path=`cmd //c echo $path`
23821   fi
23822 
23823 
23824   input_path="$new_path"
23825   # Check if we need to convert this using DOS-style short mode. If the path
23826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23827   # take no chances and rewrite it.
23828   # Note: m4 eats our [], so we need to use [ and ] instead.
23829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23830   if test "x$has_forbidden_chars" != x; then
23831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23832     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833   fi
23834 
23835 
23836   windows_path="$new_path"
23837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838     unix_path=`$CYGPATH -u "$windows_path"`
23839     new_path="$unix_path"
23840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23842     new_path="$unix_path"
23843   fi
23844 
23845   if test "x$path" != "x$new_path"; then
23846     BOOT_JDK="$new_path"
23847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23848 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23849   fi
23850 
23851   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23852   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23853 
23854   else
23855     # We're on a posix platform. Hooray! :)
23856     path="$BOOT_JDK"
23857     has_space=`$ECHO "$path" | $GREP " "`
23858     if test "x$has_space" != x; then
23859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23861       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23862     fi
23863 
23864     # Use eval to expand a potential ~
23865     eval path="$path"
23866     if test ! -f "$path" && test ! -d "$path"; then
23867       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23868     fi
23869 
23870     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23871   fi
23872 
23873               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23874 $as_echo_n "checking for Boot JDK... " >&6; }
23875               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23876 $as_echo "$BOOT_JDK" >&6; }
23877               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23878 $as_echo_n "checking Boot JDK version... " >&6; }
23879               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23880               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23881 $as_echo "$BOOT_JDK_VERSION" >&6; }
23882             fi # end check jdk version
23883           fi # end check rt.jar
23884         fi # end check javac
23885       fi # end check java
23886     fi # end check boot jdk found
23887   fi
23888 
23889   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
23890 
23891   if test "x$BOOT_JDK_FOUND" = xno; then
23892     # Now execute the test
23893 
23894   BOOT_JDK_PREFIX="/usr/lib/jvm"
23895   BOOT_JDK_SUFFIX=""
23896   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23897   if test "x$ALL_JDKS_FOUND" != x; then
23898     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23899 
23900   if test "x$BOOT_JDK_FOUND" = xno; then
23901     # Now execute the test
23902 
23903         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23904         if test -d "$BOOT_JDK"; then
23905           BOOT_JDK_FOUND=maybe
23906           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23907 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23908         fi
23909 
23910 
23911     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23912     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23913       # Do we have a bin/java?
23914       if test ! -x "$BOOT_JDK/bin/java"; then
23915         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23917         BOOT_JDK_FOUND=no
23918       else
23919         # Do we have a bin/javac?
23920         if test ! -x "$BOOT_JDK/bin/javac"; then
23921           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23923           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23924 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23925           BOOT_JDK_FOUND=no
23926         else
23927           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23928           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23929             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23930 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23931             BOOT_JDK_FOUND=no
23932           else
23933             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23934             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23935 
23936             # Extra M4 quote needed to protect [] in grep expression.
23937             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
23938             if test "x$FOUND_VERSION_78" = x; then
23939               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23941               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
23942 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
23943               BOOT_JDK_FOUND=no
23944             else
23945               # We're done! :-)
23946               BOOT_JDK_FOUND=yes
23947 
23948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23949 
23950   # Input might be given as Windows format, start by converting to
23951   # unix format.
23952   path="$BOOT_JDK"
23953   new_path=`$CYGPATH -u "$path"`
23954 
23955   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23956   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23957   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23958   # "foo.exe" is OK but "foo" is an error.
23959   #
23960   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23961   # It is also a way to make sure we got the proper file name for the real test later on.
23962   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23963   if test "x$test_shortpath" = x; then
23964     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23965 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23966     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23967   fi
23968 
23969   # Call helper function which possibly converts this using DOS-style short mode.
23970   # If so, the updated path is stored in $new_path.
23971 
23972   input_path="$new_path"
23973   # Check if we need to convert this using DOS-style short mode. If the path
23974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23975   # take no chances and rewrite it.
23976   # Note: m4 eats our [], so we need to use [ and ] instead.
23977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23978   if test "x$has_forbidden_chars" != x; then
23979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23980     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23981     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23982     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23983       # Going to short mode and back again did indeed matter. Since short mode is
23984       # case insensitive, let's make it lowercase to improve readability.
23985       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23986       # Now convert it back to Unix-style (cygpath)
23987       input_path=`$CYGPATH -u "$shortmode_path"`
23988       new_path="$input_path"
23989     fi
23990   fi
23991 
23992   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23993   if test "x$test_cygdrive_prefix" = x; then
23994     # As a simple fix, exclude /usr/bin since it's not a real path.
23995     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23996       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23997       # a path prefixed by /cygdrive for fixpath to work.
23998       new_path="$CYGWIN_ROOT_PATH$input_path"
23999     fi
24000   fi
24001 
24002 
24003   if test "x$path" != "x$new_path"; then
24004     BOOT_JDK="$new_path"
24005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24006 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24007   fi
24008 
24009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24010 
24011   path="$BOOT_JDK"
24012   has_colon=`$ECHO $path | $GREP ^.:`
24013   new_path="$path"
24014   if test "x$has_colon" = x; then
24015     # Not in mixed or Windows style, start by that.
24016     new_path=`cmd //c echo $path`
24017   fi
24018 
24019 
24020   input_path="$new_path"
24021   # Check if we need to convert this using DOS-style short mode. If the path
24022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24023   # take no chances and rewrite it.
24024   # Note: m4 eats our [], so we need to use [ and ] instead.
24025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24026   if test "x$has_forbidden_chars" != x; then
24027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029   fi
24030 
24031 
24032   windows_path="$new_path"
24033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24034     unix_path=`$CYGPATH -u "$windows_path"`
24035     new_path="$unix_path"
24036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24038     new_path="$unix_path"
24039   fi
24040 
24041   if test "x$path" != "x$new_path"; then
24042     BOOT_JDK="$new_path"
24043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045   fi
24046 
24047   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24048   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24049 
24050   else
24051     # We're on a posix platform. Hooray! :)
24052     path="$BOOT_JDK"
24053     has_space=`$ECHO "$path" | $GREP " "`
24054     if test "x$has_space" != x; then
24055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24056 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24057       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24058     fi
24059 
24060     # Use eval to expand a potential ~
24061     eval path="$path"
24062     if test ! -f "$path" && test ! -d "$path"; then
24063       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24064     fi
24065 
24066     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24067   fi
24068 
24069               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24070 $as_echo_n "checking for Boot JDK... " >&6; }
24071               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24072 $as_echo "$BOOT_JDK" >&6; }
24073               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24074 $as_echo_n "checking Boot JDK version... " >&6; }
24075               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24076               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24077 $as_echo "$BOOT_JDK_VERSION" >&6; }
24078             fi # end check jdk version
24079           fi # end check rt.jar
24080         fi # end check javac
24081       fi # end check java
24082     fi # end check boot jdk found
24083   fi
24084 
24085     done
24086   fi
24087 
24088 
24089     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24090     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24091       # Do we have a bin/java?
24092       if test ! -x "$BOOT_JDK/bin/java"; then
24093         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24094 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24095         BOOT_JDK_FOUND=no
24096       else
24097         # Do we have a bin/javac?
24098         if test ! -x "$BOOT_JDK/bin/javac"; then
24099           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24101           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24102 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24103           BOOT_JDK_FOUND=no
24104         else
24105           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24106           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24107             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24108 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24109             BOOT_JDK_FOUND=no
24110           else
24111             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24112             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24113 
24114             # Extra M4 quote needed to protect [] in grep expression.
24115             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24116             if test "x$FOUND_VERSION_78" = x; then
24117               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24118 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24119               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24120 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24121               BOOT_JDK_FOUND=no
24122             else
24123               # We're done! :-)
24124               BOOT_JDK_FOUND=yes
24125 
24126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24127 
24128   # Input might be given as Windows format, start by converting to
24129   # unix format.
24130   path="$BOOT_JDK"
24131   new_path=`$CYGPATH -u "$path"`
24132 
24133   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24134   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24135   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24136   # "foo.exe" is OK but "foo" is an error.
24137   #
24138   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24139   # It is also a way to make sure we got the proper file name for the real test later on.
24140   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24141   if test "x$test_shortpath" = x; then
24142     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24143 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24144     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24145   fi
24146 
24147   # Call helper function which possibly converts this using DOS-style short mode.
24148   # If so, the updated path is stored in $new_path.
24149 
24150   input_path="$new_path"
24151   # Check if we need to convert this using DOS-style short mode. If the path
24152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24153   # take no chances and rewrite it.
24154   # Note: m4 eats our [], so we need to use [ and ] instead.
24155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24156   if test "x$has_forbidden_chars" != x; then
24157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24158     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24159     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24160     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24161       # Going to short mode and back again did indeed matter. Since short mode is
24162       # case insensitive, let's make it lowercase to improve readability.
24163       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24164       # Now convert it back to Unix-style (cygpath)
24165       input_path=`$CYGPATH -u "$shortmode_path"`
24166       new_path="$input_path"
24167     fi
24168   fi
24169 
24170   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24171   if test "x$test_cygdrive_prefix" = x; then
24172     # As a simple fix, exclude /usr/bin since it's not a real path.
24173     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24174       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24175       # a path prefixed by /cygdrive for fixpath to work.
24176       new_path="$CYGWIN_ROOT_PATH$input_path"
24177     fi
24178   fi
24179 
24180 
24181   if test "x$path" != "x$new_path"; then
24182     BOOT_JDK="$new_path"
24183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24185   fi
24186 
24187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188 
24189   path="$BOOT_JDK"
24190   has_colon=`$ECHO $path | $GREP ^.:`
24191   new_path="$path"
24192   if test "x$has_colon" = x; then
24193     # Not in mixed or Windows style, start by that.
24194     new_path=`cmd //c echo $path`
24195   fi
24196 
24197 
24198   input_path="$new_path"
24199   # Check if we need to convert this using DOS-style short mode. If the path
24200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24201   # take no chances and rewrite it.
24202   # Note: m4 eats our [], so we need to use [ and ] instead.
24203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24204   if test "x$has_forbidden_chars" != x; then
24205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24206     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24207   fi
24208 
24209 
24210   windows_path="$new_path"
24211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24212     unix_path=`$CYGPATH -u "$windows_path"`
24213     new_path="$unix_path"
24214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24216     new_path="$unix_path"
24217   fi
24218 
24219   if test "x$path" != "x$new_path"; then
24220     BOOT_JDK="$new_path"
24221     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24222 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24223   fi
24224 
24225   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24226   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24227 
24228   else
24229     # We're on a posix platform. Hooray! :)
24230     path="$BOOT_JDK"
24231     has_space=`$ECHO "$path" | $GREP " "`
24232     if test "x$has_space" != x; then
24233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24234 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24235       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24236     fi
24237 
24238     # Use eval to expand a potential ~
24239     eval path="$path"
24240     if test ! -f "$path" && test ! -d "$path"; then
24241       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24242     fi
24243 
24244     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24245   fi
24246 
24247               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24248 $as_echo_n "checking for Boot JDK... " >&6; }
24249               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24250 $as_echo "$BOOT_JDK" >&6; }
24251               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24252 $as_echo_n "checking Boot JDK version... " >&6; }
24253               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24254               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24255 $as_echo "$BOOT_JDK_VERSION" >&6; }
24256             fi # end check jdk version
24257           fi # end check rt.jar
24258         fi # end check javac
24259       fi # end check java
24260     fi # end check boot jdk found
24261   fi
24262 
24263   fi
24264 
24265 
24266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24268       # Do we have a bin/java?
24269       if test ! -x "$BOOT_JDK/bin/java"; then
24270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24272         BOOT_JDK_FOUND=no
24273       else
24274         # Do we have a bin/javac?
24275         if test ! -x "$BOOT_JDK/bin/javac"; then
24276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24280           BOOT_JDK_FOUND=no
24281         else
24282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24286             BOOT_JDK_FOUND=no
24287           else
24288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24290 
24291             # Extra M4 quote needed to protect [] in grep expression.
24292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
24293             if test "x$FOUND_VERSION_78" = x; then
24294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
24297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
24298               BOOT_JDK_FOUND=no
24299             else
24300               # We're done! :-)
24301               BOOT_JDK_FOUND=yes
24302 
24303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24304 
24305   # Input might be given as Windows format, start by converting to
24306   # unix format.
24307   path="$BOOT_JDK"
24308   new_path=`$CYGPATH -u "$path"`
24309 
24310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24313   # "foo.exe" is OK but "foo" is an error.
24314   #
24315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24316   # It is also a way to make sure we got the proper file name for the real test later on.
24317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24318   if test "x$test_shortpath" = x; then
24319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24322   fi
24323 
24324   # Call helper function which possibly converts this using DOS-style short mode.
24325   # If so, the updated path is stored in $new_path.
24326 
24327   input_path="$new_path"
24328   # Check if we need to convert this using DOS-style short mode. If the path
24329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24330   # take no chances and rewrite it.
24331   # Note: m4 eats our [], so we need to use [ and ] instead.
24332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24333   if test "x$has_forbidden_chars" != x; then
24334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24338       # Going to short mode and back again did indeed matter. Since short mode is
24339       # case insensitive, let's make it lowercase to improve readability.
24340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24341       # Now convert it back to Unix-style (cygpath)
24342       input_path=`$CYGPATH -u "$shortmode_path"`
24343       new_path="$input_path"
24344     fi
24345   fi
24346 
24347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24348   if test "x$test_cygdrive_prefix" = x; then
24349     # As a simple fix, exclude /usr/bin since it's not a real path.
24350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24352       # a path prefixed by /cygdrive for fixpath to work.
24353       new_path="$CYGWIN_ROOT_PATH$input_path"
24354     fi
24355   fi
24356 
24357 
24358   if test "x$path" != "x$new_path"; then
24359     BOOT_JDK="$new_path"
24360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24362   fi
24363 
24364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24365 
24366   path="$BOOT_JDK"
24367   has_colon=`$ECHO $path | $GREP ^.:`
24368   new_path="$path"
24369   if test "x$has_colon" = x; then
24370     # Not in mixed or Windows style, start by that.
24371     new_path=`cmd //c echo $path`
24372   fi
24373 
24374 
24375   input_path="$new_path"
24376   # Check if we need to convert this using DOS-style short mode. If the path
24377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24378   # take no chances and rewrite it.
24379   # Note: m4 eats our [], so we need to use [ and ] instead.
24380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24381   if test "x$has_forbidden_chars" != x; then
24382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24384   fi
24385 
24386 
24387   windows_path="$new_path"
24388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24389     unix_path=`$CYGPATH -u "$windows_path"`
24390     new_path="$unix_path"
24391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24393     new_path="$unix_path"
24394   fi
24395 
24396   if test "x$path" != "x$new_path"; then
24397     BOOT_JDK="$new_path"
24398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24400   fi
24401 
24402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24404 
24405   else
24406     # We're on a posix platform. Hooray! :)
24407     path="$BOOT_JDK"
24408     has_space=`$ECHO "$path" | $GREP " "`
24409     if test "x$has_space" != x; then
24410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24412       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24413     fi
24414 
24415     # Use eval to expand a potential ~
24416     eval path="$path"
24417     if test ! -f "$path" && test ! -d "$path"; then
24418       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24419     fi
24420 
24421     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24422   fi
24423 
24424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24425 $as_echo_n "checking for Boot JDK... " >&6; }
24426               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24427 $as_echo "$BOOT_JDK" >&6; }
24428               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24429 $as_echo_n "checking Boot JDK version... " >&6; }
24430               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24431               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24432 $as_echo "$BOOT_JDK_VERSION" >&6; }
24433             fi # end check jdk version
24434           fi # end check rt.jar
24435         fi # end check javac
24436       fi # end check java
24437     fi # end check boot jdk found
24438   fi
24439 
24440 
24441   # If we haven't found anything yet, we've truly lost. Give up.
24442   if test "x$BOOT_JDK_FOUND" = xno; then
24443 
24444   # Print a helpful message on how to acquire the necessary build dependency.
24445   # openjdk is the help tag: freetype, cups, pulse, alsa etc
24446   MISSING_DEPENDENCY=openjdk
24447 
24448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24449     cygwin_help $MISSING_DEPENDENCY
24450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24451     msys_help $MISSING_DEPENDENCY
24452   else
24453     PKGHANDLER_COMMAND=
24454 
24455     case $PKGHANDLER in
24456       apt-get)
24457         apt_help     $MISSING_DEPENDENCY ;;
24458       yum)
24459         yum_help     $MISSING_DEPENDENCY ;;
24460       port)
24461         port_help    $MISSING_DEPENDENCY ;;
24462       pkgutil)
24463         pkgutil_help $MISSING_DEPENDENCY ;;
24464       pkgadd)
24465         pkgadd_help  $MISSING_DEPENDENCY ;;
24466     esac
24467 
24468     if test "x$PKGHANDLER_COMMAND" != x; then
24469       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24470     fi
24471   fi
24472 
24473     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24474 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24475     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24476 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24477     as_fn_error $? "Cannot continue" "$LINENO" 5
24478   fi
24479 
24480   # Setup proper paths for what we found
24481   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24482   if test ! -f "$BOOT_RTJAR"; then
24483     # On MacOSX it is called classes.jar
24484     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24485     if test -f "$BOOT_RTJAR"; then
24486       # Remove the ..
24487       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24488     fi
24489   fi
24490   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24491   BOOT_JDK="$BOOT_JDK"
24492 
24493 
24494 
24495 
24496   # Setup tools from the Boot JDK.
24497 
24498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24499 $as_echo_n "checking for java in Boot JDK... " >&6; }
24500   JAVA=$BOOT_JDK/bin/java
24501   if test ! -x $JAVA; then
24502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24503 $as_echo "not found" >&6; }
24504     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24505 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24506     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24507   fi
24508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24509 $as_echo "ok" >&6; }
24510 
24511 
24512   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
24513 $as_echo_n "checking for javac in Boot JDK... " >&6; }
24514   JAVAC=$BOOT_JDK/bin/javac
24515   if test ! -x $JAVAC; then
24516     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24517 $as_echo "not found" >&6; }
24518     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24519 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24520     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
24521   fi
24522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24523 $as_echo "ok" >&6; }
24524 
24525 
24526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
24527 $as_echo_n "checking for javah in Boot JDK... " >&6; }
24528   JAVAH=$BOOT_JDK/bin/javah
24529   if test ! -x $JAVAH; then
24530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24531 $as_echo "not found" >&6; }
24532     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24533 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24534     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
24535   fi
24536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24537 $as_echo "ok" >&6; }
24538 
24539 
24540   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
24541 $as_echo_n "checking for javap in Boot JDK... " >&6; }
24542   JAVAP=$BOOT_JDK/bin/javap
24543   if test ! -x $JAVAP; then
24544     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24545 $as_echo "not found" >&6; }
24546     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24547 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24548     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
24549   fi
24550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24551 $as_echo "ok" >&6; }
24552 
24553 
24554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
24555 $as_echo_n "checking for jar in Boot JDK... " >&6; }
24556   JAR=$BOOT_JDK/bin/jar
24557   if test ! -x $JAR; then
24558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24559 $as_echo "not found" >&6; }
24560     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24561 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24562     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
24563   fi
24564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24565 $as_echo "ok" >&6; }
24566 
24567 
24568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
24569 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
24570   RMIC=$BOOT_JDK/bin/rmic
24571   if test ! -x $RMIC; then
24572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24573 $as_echo "not found" >&6; }
24574     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24575 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24576     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
24577   fi
24578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24579 $as_echo "ok" >&6; }
24580 
24581 
24582   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
24583 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
24584   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
24585   if test ! -x $NATIVE2ASCII; then
24586     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24587 $as_echo "not found" >&6; }
24588     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24589 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24590     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
24591   fi
24592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24593 $as_echo "ok" >&6; }
24594 
24595 
24596   # Finally, set some other options...
24597 
24598   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
24599   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
24600 
24601 
24602 
24603   # Check if the boot jdk is 32 or 64 bit
24604   if "$JAVA" -d64 -version > /dev/null 2>&1; then
24605     BOOT_JDK_BITS="64"
24606   else
24607     BOOT_JDK_BITS="32"
24608   fi
24609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
24610 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
24611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
24612 $as_echo "$BOOT_JDK_BITS" >&6; }
24613 
24614 
24615 
24616   ##############################################################################
24617   #
24618   # Specify options for anything that is run with the Boot JDK.
24619   #
24620 
24621 # Check whether --with-boot-jdk-jvmargs was given.
24622 if test "${with_boot_jdk_jvmargs+set}" = set; then :
24623   withval=$with_boot_jdk_jvmargs;
24624 fi
24625 
24626 
24627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
24628 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
24629 
24630   # Disable special log output when a debug build is used as Boot JDK...
24631 
24632   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
24633   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
24634   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
24635   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24636   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24637   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24638     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
24639     JVM_ARG_OK=true
24640   else
24641     $ECHO "Arg failed:" >&5
24642     $ECHO "$OUTPUT" >&5
24643     JVM_ARG_OK=false
24644   fi
24645 
24646 
24647   # Apply user provided options.
24648 
24649   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
24650   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
24651   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
24652   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24653   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24654   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24655     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
24656     JVM_ARG_OK=true
24657   else
24658     $ECHO "Arg failed:" >&5
24659     $ECHO "$OUTPUT" >&5
24660     JVM_ARG_OK=false
24661   fi
24662 
24663 
24664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
24665 $as_echo "$boot_jdk_jvmargs" >&6; }
24666 
24667   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
24668   JAVA_FLAGS=$boot_jdk_jvmargs
24669 
24670 
24671 
24672   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
24673 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
24674 
24675   # Starting amount of heap memory.
24676 
24677   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
24678   $ECHO "Command: $JAVA -Xms64M -version" >&5
24679   OUTPUT=`$JAVA -Xms64M -version 2>&1`
24680   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24681   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24682   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24683     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
24684     JVM_ARG_OK=true
24685   else
24686     $ECHO "Arg failed:" >&5
24687     $ECHO "$OUTPUT" >&5
24688     JVM_ARG_OK=false
24689   fi
24690 
24691 
24692   # Maximum amount of heap memory.
24693   # Maximum stack size.
24694   if test "x$BOOT_JDK_BITS" = x32; then
24695     JVM_MAX_HEAP=768M
24696     STACK_SIZE=768
24697   else
24698     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
24699     # pointers are used. Apparently, we need to increase the heap and stack
24700     # space for the jvm. More specifically, when running javac to build huge
24701     # jdk batch
24702     JVM_MAX_HEAP=1600M
24703     STACK_SIZE=1536
24704   fi
24705 
24706   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
24707   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
24708   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
24709   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24710   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24711   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24712     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
24713     JVM_ARG_OK=true
24714   else
24715     $ECHO "Arg failed:" >&5
24716     $ECHO "$OUTPUT" >&5
24717     JVM_ARG_OK=false
24718   fi
24719 
24720 
24721   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
24722   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
24723   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
24724   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24725   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24726   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24727     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
24728     JVM_ARG_OK=true
24729   else
24730     $ECHO "Arg failed:" >&5
24731     $ECHO "$OUTPUT" >&5
24732     JVM_ARG_OK=false
24733   fi
24734 
24735 
24736   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
24737   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
24738   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
24739   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24740   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24741   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24742     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
24743     JVM_ARG_OK=true
24744   else
24745     $ECHO "Arg failed:" >&5
24746     $ECHO "$OUTPUT" >&5
24747     JVM_ARG_OK=false
24748   fi
24749 
24750 
24751   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
24752   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
24753   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
24754   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24755   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24756   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24757     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
24758     JVM_ARG_OK=true
24759   else
24760     $ECHO "Arg failed:" >&5
24761     $ECHO "$OUTPUT" >&5
24762     JVM_ARG_OK=false
24763   fi
24764 
24765 
24766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
24767 $as_echo "$boot_jdk_jvmargs_big" >&6; }
24768 
24769   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
24770 
24771 
24772 
24773   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
24774 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
24775 
24776   # Use serial gc for small short lived tools if possible
24777 
24778   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
24779   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
24780   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
24781   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24782   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24783   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24784     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
24785     JVM_ARG_OK=true
24786   else
24787     $ECHO "Arg failed:" >&5
24788     $ECHO "$OUTPUT" >&5
24789     JVM_ARG_OK=false
24790   fi
24791 
24792 
24793   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
24794   $ECHO "Command: $JAVA -Xms32M -version" >&5
24795   OUTPUT=`$JAVA -Xms32M -version 2>&1`
24796   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24797   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24798   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24799     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
24800     JVM_ARG_OK=true
24801   else
24802     $ECHO "Arg failed:" >&5
24803     $ECHO "$OUTPUT" >&5
24804     JVM_ARG_OK=false
24805   fi
24806 
24807 
24808   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
24809   $ECHO "Command: $JAVA -Xmx512M -version" >&5
24810   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
24811   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
24812   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
24813   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
24814     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
24815     JVM_ARG_OK=true
24816   else
24817     $ECHO "Arg failed:" >&5
24818     $ECHO "$OUTPUT" >&5
24819     JVM_ARG_OK=false
24820   fi
24821 
24822 
24823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
24824 $as_echo "$boot_jdk_jvmargs_small" >&6; }
24825 
24826   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
24827 
24828 
24829 
24830 ###############################################################################
24831 #
24832 # Configure the sources to use. We can add or override individual directories.
24833 #
24834 ###############################################################################
24835 
24836 
24837   # Where are the sources. Any of these can be overridden
24838   # using --with-override-corba and the likes.
24839   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
24840   CORBA_TOPDIR="$SRC_ROOT/corba"
24841   JAXP_TOPDIR="$SRC_ROOT/jaxp"
24842   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
24843   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
24844   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
24845   JDK_TOPDIR="$SRC_ROOT/jdk"
24846 
24847 
24848 
24849 
24850 
24851 
24852 
24853 
24854 
24855 
24856   ###############################################################################
24857   #
24858   # Pickup additional source for a component from outside of the source root
24859   # or override source for a component.
24860   #
24861 
24862 # Check whether --with-add-source-root was given.
24863 if test "${with_add_source_root+set}" = set; then :
24864   withval=$with_add_source_root;
24865 fi
24866 
24867 
24868 
24869 # Check whether --with-override-source-root was given.
24870 if test "${with_override_source_root+set}" = set; then :
24871   withval=$with_override_source_root;
24872 fi
24873 
24874 
24875 
24876 # Check whether --with-adds-and-overrides was given.
24877 if test "${with_adds_and_overrides+set}" = set; then :
24878   withval=$with_adds_and_overrides;
24879 fi
24880 
24881 
24882   if test "x$with_adds_and_overrides" != x; then
24883     with_add_source_root="$with_adds_and_overrides/adds"
24884     with_override_source_root="$with_adds_and_overrides/overrides"
24885   fi
24886 
24887   if test "x$with_add_source_root" != x; then
24888     if ! test -d $with_add_source_root; then
24889       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
24890     fi
24891     CURDIR="$PWD"
24892     cd "$with_add_source_root"
24893     ADD_SRC_ROOT="`pwd`"
24894     cd "$CURDIR"
24895     # Verify that the addon source root does not have any root makefiles.
24896     # If it does, then it is usually an error, prevent this.
24897     if test -f $with_add_source_root/langtools/make/Makefile; then
24898       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
24899     fi
24900     if test -f $with_add_source_root/corba/make/Makefile; then
24901       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
24902     fi
24903     if test -f $with_add_source_root/jaxp/make/Makefile; then
24904       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
24905     fi
24906     if test -f $with_add_source_root/jaxws/make/Makefile; then
24907       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
24908     fi
24909     if test -f $with_add_source_root/hotspot/make/Makefile; then
24910       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
24911     fi
24912     if test -f $with_add_source_root/nashorn/make/Makefile; then
24913       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
24914     fi
24915     if test -f $with_add_source_root/jdk/make/Makefile; then
24916       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
24917     fi
24918   fi
24919 
24920 
24921   if test "x$with_override_source_root" != x; then
24922     if ! test -d $with_override_source_root; then
24923       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
24924     fi
24925     CURDIR="$PWD"
24926     cd "$with_override_source_root"
24927     OVERRIDE_SRC_ROOT="`pwd`"
24928     cd "$CURDIR"
24929     if test -f $with_override_source_root/langtools/make/Makefile; then
24930       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
24931     fi
24932     if test -f $with_override_source_root/corba/make/Makefile; then
24933       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
24934     fi
24935     if test -f $with_override_source_root/jaxp/make/Makefile; then
24936       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
24937     fi
24938     if test -f $with_override_source_root/jaxws/make/Makefile; then
24939       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
24940     fi
24941     if test -f $with_override_source_root/hotspot/make/Makefile; then
24942       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
24943     fi
24944     if test -f $with_override_source_root/nashorn/make/Makefile; then
24945       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
24946     fi
24947     if test -f $with_override_source_root/jdk/make/Makefile; then
24948       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
24949     fi
24950   fi
24951 
24952 
24953   ###############################################################################
24954   #
24955   # Override a repo completely, this is used for example when you have 3 small
24956   # development sandboxes of the langtools sources and want to avoid having 3 full
24957   # OpenJDK sources checked out on disk.
24958   #
24959   # Assuming that the 3 langtools sandboxes are located here:
24960   # /home/fredrik/sandbox1/langtools
24961   # /home/fredrik/sandbox2/langtools
24962   # /home/fredrik/sandbox3/langtools
24963   #
24964   # From the source root you create build subdirs manually:
24965   #     mkdir -p build1 build2 build3
24966   # in each build directory run:
24967   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
24968   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
24969   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
24970   #
24971 
24972 
24973 # Check whether --with-override-langtools was given.
24974 if test "${with_override_langtools+set}" = set; then :
24975   withval=$with_override_langtools;
24976 fi
24977 
24978 
24979 
24980 # Check whether --with-override-corba was given.
24981 if test "${with_override_corba+set}" = set; then :
24982   withval=$with_override_corba;
24983 fi
24984 
24985 
24986 
24987 # Check whether --with-override-jaxp was given.
24988 if test "${with_override_jaxp+set}" = set; then :
24989   withval=$with_override_jaxp;
24990 fi
24991 
24992 
24993 
24994 # Check whether --with-override-jaxws was given.
24995 if test "${with_override_jaxws+set}" = set; then :
24996   withval=$with_override_jaxws;
24997 fi
24998 
24999 
25000 
25001 # Check whether --with-override-hotspot was given.
25002 if test "${with_override_hotspot+set}" = set; then :
25003   withval=$with_override_hotspot;
25004 fi
25005 
25006 
25007 
25008 # Check whether --with-override-nashorn was given.
25009 if test "${with_override_nashorn+set}" = set; then :
25010   withval=$with_override_nashorn;
25011 fi
25012 
25013 
25014 
25015 # Check whether --with-override-jdk was given.
25016 if test "${with_override_jdk+set}" = set; then :
25017   withval=$with_override_jdk;
25018 fi
25019 
25020 
25021   if test "x$with_override_langtools" != x; then
25022     CURDIR="$PWD"
25023     cd "$with_override_langtools"
25024     LANGTOOLS_TOPDIR="`pwd`"
25025     cd "$CURDIR"
25026     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25027       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25028     fi
25029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25030 $as_echo_n "checking if langtools should be overridden... " >&6; }
25031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25032 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25033   fi
25034   if test "x$with_override_corba" != x; then
25035     CURDIR="$PWD"
25036     cd "$with_override_corba"
25037     CORBA_TOPDIR="`pwd`"
25038     cd "$CURDIR"
25039     if ! test -f $CORBA_TOPDIR/make/Makefile; then
25040       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
25041     fi
25042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
25043 $as_echo_n "checking if corba should be overridden... " >&6; }
25044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
25045 $as_echo "yes with $CORBA_TOPDIR" >&6; }
25046   fi
25047   if test "x$with_override_jaxp" != x; then
25048     CURDIR="$PWD"
25049     cd "$with_override_jaxp"
25050     JAXP_TOPDIR="`pwd`"
25051     cd "$CURDIR"
25052     if ! test -f $JAXP_TOPDIR/make/Makefile; then
25053       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
25054     fi
25055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
25056 $as_echo_n "checking if jaxp should be overridden... " >&6; }
25057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
25058 $as_echo "yes with $JAXP_TOPDIR" >&6; }
25059   fi
25060   if test "x$with_override_jaxws" != x; then
25061     CURDIR="$PWD"
25062     cd "$with_override_jaxws"
25063     JAXWS_TOPDIR="`pwd`"
25064     cd "$CURDIR"
25065     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
25066       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
25067     fi
25068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
25069 $as_echo_n "checking if jaxws should be overridden... " >&6; }
25070     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
25071 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
25072   fi
25073   if test "x$with_override_hotspot" != x; then
25074     CURDIR="$PWD"
25075     cd "$with_override_hotspot"
25076     HOTSPOT_TOPDIR="`pwd`"
25077     cd "$CURDIR"
25078     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
25079       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
25080     fi
25081     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
25082 $as_echo_n "checking if hotspot should be overridden... " >&6; }
25083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
25084 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
25085   fi
25086   if test "x$with_override_nashorn" != x; then
25087     CURDIR="$PWD"
25088     cd "$with_override_nashorn"
25089     NASHORN_TOPDIR="`pwd`"
25090     cd "$CURDIR"
25091     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
25092       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
25093     fi
25094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
25095 $as_echo_n "checking if nashorn should be overridden... " >&6; }
25096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
25097 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
25098   fi
25099   if test "x$with_override_jdk" != x; then
25100     CURDIR="$PWD"
25101     cd "$with_override_jdk"
25102     JDK_TOPDIR="`pwd`"
25103     cd "$CURDIR"
25104     if ! test -f $JDK_TOPDIR/make/Makefile; then
25105       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
25106     fi
25107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
25108 $as_echo_n "checking if JDK should be overridden... " >&6; }
25109     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
25110 $as_echo "yes with $JDK_TOPDIR" >&6; }
25111   fi
25112 
25113 
25114   BUILD_OUTPUT="$OUTPUT_ROOT"
25115 
25116 
25117   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
25118   BUILD_HOTSPOT=true
25119 
25120 
25121 
25122 # Check whether --with-import-hotspot was given.
25123 if test "${with_import_hotspot+set}" = set; then :
25124   withval=$with_import_hotspot;
25125 fi
25126 
25127   if test "x$with_import_hotspot" != x; then
25128     CURDIR="$PWD"
25129     cd "$with_import_hotspot"
25130     HOTSPOT_DIST="`pwd`"
25131     cd "$CURDIR"
25132     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
25133       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
25134     fi
25135     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
25136 $as_echo_n "checking if hotspot should be imported... " >&6; }
25137     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
25138 $as_echo "yes from $HOTSPOT_DIST" >&6; }
25139     BUILD_HOTSPOT=false
25140   fi
25141 
25142   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
25143 
25144 
25145 ###############################################################################
25146 #
25147 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
25148 # native code.
25149 #
25150 ###############################################################################
25151 
25152 # First determine the toolchain type (compiler family)
25153 
25154 
25155 # Check whether --with-toolchain-type was given.
25156 if test "${with_toolchain_type+set}" = set; then :
25157   withval=$with_toolchain_type;
25158 fi
25159 
25160 
25161   # Use indirect variable referencing
25162   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
25163   VALID_TOOLCHAINS=${!toolchain_var_name}
25164   # First toolchain type in the list is the default
25165   DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
25166 
25167   if test "x$with_toolchain_type" = xlist; then
25168     # List all toolchains
25169     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
25170 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
25171     for toolchain in $VALID_TOOLCHAINS; do
25172       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
25173       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25174       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
25175     done
25176 
25177     exit 0
25178   elif test "x$with_toolchain_type" != x; then
25179     # User override; check that it is valid
25180     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
25181       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
25182 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
25183       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
25184 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
25185       as_fn_error $? "Cannot continue." "$LINENO" 5
25186     fi
25187     TOOLCHAIN_TYPE=$with_toolchain_type
25188   else
25189     # No flag given, use default
25190     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
25191   fi
25192 
25193 
25194   TOOLCHAIN_CC_BINARY_clang="clang"
25195   TOOLCHAIN_CC_BINARY_gcc="gcc"
25196   TOOLCHAIN_CC_BINARY_microsoft="cl"
25197   TOOLCHAIN_CC_BINARY_solstudio="cc"
25198   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
25199 
25200   TOOLCHAIN_CXX_BINARY_clang="clang++"
25201   TOOLCHAIN_CXX_BINARY_gcc="g++"
25202   TOOLCHAIN_CXX_BINARY_microsoft="cl"
25203   TOOLCHAIN_CXX_BINARY_solstudio="CC"
25204   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
25205 
25206   # Use indirect variable referencing
25207   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
25208   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
25209   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
25210   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
25211   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
25212   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
25213 
25214 
25215   # Define filename patterns
25216   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25217     LIBRARY_PREFIX=
25218     SHARED_LIBRARY_SUFFIX='.dll'
25219     STATIC_LIBRARY_SUFFIX='.lib'
25220     SHARED_LIBRARY='$1.dll'
25221     STATIC_LIBRARY='$1.lib'
25222     OBJ_SUFFIX='.obj'
25223     EXE_SUFFIX='.exe'
25224   else
25225     LIBRARY_PREFIX=lib
25226     SHARED_LIBRARY_SUFFIX='.so'
25227     STATIC_LIBRARY_SUFFIX='.a'
25228     SHARED_LIBRARY='lib$1.so'
25229     STATIC_LIBRARY='lib$1.a'
25230     OBJ_SUFFIX='.o'
25231     EXE_SUFFIX=''
25232     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25233       SHARED_LIBRARY='lib$1.dylib'
25234       SHARED_LIBRARY_SUFFIX='.dylib'
25235     fi
25236   fi
25237 
25238 
25239 
25240 
25241 
25242 
25243 
25244 
25245 
25246 
25247   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
25248     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
25249 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
25250   else
25251     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
25252 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
25253   fi
25254 
25255 
25256 # Then detect the actual binaries needed
25257 
25258   # FIXME: Is this needed?
25259   ac_ext=cpp
25260 ac_cpp='$CXXCPP $CPPFLAGS'
25261 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25262 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25263 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25264 
25265 
25266   # Store the CFLAGS etal passed to the configure script.
25267   ORG_CFLAGS="$CFLAGS"
25268   ORG_CXXFLAGS="$CXXFLAGS"
25269   ORG_OBJCFLAGS="$OBJCFLAGS"
25270 
25271   # autoconf magic only relies on PATH, so update it if tools dir is specified
25272   OLD_PATH="$PATH"
25273 
25274   # On Windows, we need to detect the visual studio installation first.
25275   # This will change the PATH, but we need to keep that new PATH even
25276   # after toolchain detection is done, since the compiler (on x86) uses
25277   # it for DLL resolution in runtime.
25278   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
25279       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
25280 
25281   # Store path to cygwin link.exe to help excluding it when searching for
25282   # VS linker. This must be done before changing the PATH when looking for VS.
25283   # Extract the first word of "link", so it can be a program name with args.
25284 set dummy link; ac_word=$2
25285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25286 $as_echo_n "checking for $ac_word... " >&6; }
25287 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
25288   $as_echo_n "(cached) " >&6
25289 else
25290   case $CYGWIN_LINK in
25291   [\\/]* | ?:[\\/]*)
25292   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
25293   ;;
25294   *)
25295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25296 for as_dir in $PATH
25297 do
25298   IFS=$as_save_IFS
25299   test -z "$as_dir" && as_dir=.
25300     for ac_exec_ext in '' $ac_executable_extensions; do
25301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25302     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
25303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25304     break 2
25305   fi
25306 done
25307   done
25308 IFS=$as_save_IFS
25309 
25310   ;;
25311 esac
25312 fi
25313 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
25314 if test -n "$CYGWIN_LINK"; then
25315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
25316 $as_echo "$CYGWIN_LINK" >&6; }
25317 else
25318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25319 $as_echo "no" >&6; }
25320 fi
25321 
25322 
25323   if test "x$CYGWIN_LINK" != x; then
25324     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
25325 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
25326     "$CYGWIN_LINK" --version > /dev/null
25327     if test $? -eq 0 ; then
25328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25329 $as_echo "yes" >&6; }
25330     else
25331       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25332 $as_echo "no" >&6; }
25333       # This might be the VS linker. Don't exclude it later on.
25334       CYGWIN_LINK=""
25335     fi
25336   fi
25337 
25338   # First-hand choice is to locate and run the vsvars bat file.
25339 
25340 
25341 # Check whether --with-toolchain-version was given.
25342 if test "${with_toolchain_version+set}" = set; then :
25343   withval=$with_toolchain_version;
25344 fi
25345 
25346 
25347   if test "x$with_toolchain_version" = xlist; then
25348     # List all toolchains
25349     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
25350 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
25351     for version in $VALID_VS_VERSIONS; do
25352       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
25353       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
25354     done
25355 
25356     exit 0
25357   elif test "x$DEVKIT_VS_VERSION" != x; then
25358     VS_VERSION=$DEVKIT_VS_VERSION
25359     TOOLCHAIN_VERSION=$VS_VERSION
25360     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25361     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25362     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25363     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25364     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25365     VS_PATH="$TOOLCHAIN_PATH:$PATH"
25366 
25367     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
25368     # can still be exported as INCLUDE for compiler invocations without
25369     # SYSROOT_CFLAGS
25370     OLDIFS="$IFS"
25371     IFS=";"
25372     for i in $DEVKIT_VS_INCLUDE; do
25373       ipath=$i
25374 
25375   unix_path="$ipath"
25376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25377     windows_path=`$CYGPATH -m "$unix_path"`
25378     ipath="$windows_path"
25379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25380     windows_path=`cmd //c echo $unix_path`
25381     ipath="$windows_path"
25382   fi
25383 
25384       VS_INCLUDE="$VS_INCLUDE;$ipath"
25385     done
25386     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
25387     # as LIB for compiler invocations without SYSROOT_LDFLAGS
25388     for i in $DEVKIT_VS_LIB; do
25389       libpath=$i
25390 
25391   unix_path="$libpath"
25392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25393     windows_path=`$CYGPATH -m "$unix_path"`
25394     libpath="$windows_path"
25395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396     windows_path=`cmd //c echo $unix_path`
25397     libpath="$windows_path"
25398   fi
25399 
25400       VS_LIB="$VS_LIB;$libpath"
25401     done
25402     IFS="$OLDIFS"
25403 
25404     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
25405 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
25406 
25407   elif test "x$with_toolchain_version" != x; then
25408     # User override; check that it is valid
25409     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
25410       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
25411 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
25412       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
25413 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
25414       as_fn_error $? "Cannot continue." "$LINENO" 5
25415     fi
25416     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
25417   else
25418     # No flag given, use default
25419     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
25420   fi
25421 
25422   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
25423 
25424   VS_VERSION="$VS_VERSION"
25425   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
25426   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
25427   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
25428   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
25429 
25430   # When using --with-tools-dir, assume it points to the correct and default
25431   # version of Visual Studio or that --with-toolchain-version was also set.
25432   if test "x$with_tools_dir" != x; then
25433 
25434   if test "x$VS_ENV_CMD" = x; then
25435     VS_VERSION="${VS_VERSION}"
25436     VS_BASE="$with_tools_dir/../.."
25437     METHOD="--with-tools-dir"
25438 
25439     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25440       VCVARSFILE="vc/bin/vcvars32.bat"
25441     else
25442       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25443     fi
25444 
25445 
25446   windows_path="$VS_BASE"
25447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25448     unix_path=`$CYGPATH -u "$windows_path"`
25449     VS_BASE="$unix_path"
25450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25452     VS_BASE="$unix_path"
25453   fi
25454 
25455     if test -d "$VS_BASE"; then
25456       if test -f "$VS_BASE/$VCVARSFILE"; then
25457         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25458 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25459         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25460         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25461         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25462         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25463       else
25464         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25465 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25466         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25467 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25468       fi
25469     fi
25470   fi
25471 
25472 
25473   if test "x$VS_ENV_CMD" = x; then
25474     VS_VERSION="${VS_VERSION}"
25475     VS_BASE="$with_tools_dir/../../.."
25476     METHOD="--with-tools-dir"
25477 
25478     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25479       VCVARSFILE="vc/bin/vcvars32.bat"
25480     else
25481       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25482     fi
25483 
25484 
25485   windows_path="$VS_BASE"
25486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487     unix_path=`$CYGPATH -u "$windows_path"`
25488     VS_BASE="$unix_path"
25489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491     VS_BASE="$unix_path"
25492   fi
25493 
25494     if test -d "$VS_BASE"; then
25495       if test -f "$VS_BASE/$VCVARSFILE"; then
25496         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25497 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25498         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25499         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25500         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25501         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25502       else
25503         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25504 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25505         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25506 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25507       fi
25508     fi
25509   fi
25510 
25511     if test "x$VS_ENV_CMD" = x; then
25512       # Having specified an argument which is incorrect will produce an instant failure;
25513       # we should not go on looking
25514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
25515 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
25516       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
25517 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
25518       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
25519 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
25520       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
25521     fi
25522   fi
25523 
25524   VS_ENV_CMD=""
25525   VS_ENV_ARGS=""
25526 
25527   if test "x$VS_COMNTOOLS" != x; then
25528 
25529   if test "x$VS_ENV_CMD" = x; then
25530     VS_VERSION="${VS_VERSION}"
25531     VS_BASE="$VS_COMNTOOLS/../.."
25532     METHOD="$VS_COMNTOOLS_VAR variable"
25533 
25534     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25535       VCVARSFILE="vc/bin/vcvars32.bat"
25536     else
25537       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25538     fi
25539 
25540 
25541   windows_path="$VS_BASE"
25542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25543     unix_path=`$CYGPATH -u "$windows_path"`
25544     VS_BASE="$unix_path"
25545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25547     VS_BASE="$unix_path"
25548   fi
25549 
25550     if test -d "$VS_BASE"; then
25551       if test -f "$VS_BASE/$VCVARSFILE"; then
25552         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25553 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25554         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25555         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25556         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25557         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25558       else
25559         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25560 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25561         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25562 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25563       fi
25564     fi
25565   fi
25566 
25567   fi
25568   if test "x$PROGRAMFILES" != x; then
25569 
25570   if test "x$VS_ENV_CMD" = x; then
25571     VS_VERSION="${VS_VERSION}"
25572     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
25573     METHOD="well-known name"
25574 
25575     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25576       VCVARSFILE="vc/bin/vcvars32.bat"
25577     else
25578       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25579     fi
25580 
25581 
25582   windows_path="$VS_BASE"
25583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25584     unix_path=`$CYGPATH -u "$windows_path"`
25585     VS_BASE="$unix_path"
25586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25588     VS_BASE="$unix_path"
25589   fi
25590 
25591     if test -d "$VS_BASE"; then
25592       if test -f "$VS_BASE/$VCVARSFILE"; then
25593         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25594 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25595         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25596         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25597         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25598         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25599       else
25600         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25601 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25602         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25603 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25604       fi
25605     fi
25606   fi
25607 
25608   fi
25609   # Work around the insanely named ProgramFiles(x86) env variable
25610   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
25611   if test "x$PROGRAMFILES_X86" != x; then
25612 
25613   if test "x$VS_ENV_CMD" = x; then
25614     VS_VERSION="${VS_VERSION}"
25615     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
25616     METHOD="well-known name"
25617 
25618     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25619       VCVARSFILE="vc/bin/vcvars32.bat"
25620     else
25621       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25622     fi
25623 
25624 
25625   windows_path="$VS_BASE"
25626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25627     unix_path=`$CYGPATH -u "$windows_path"`
25628     VS_BASE="$unix_path"
25629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25631     VS_BASE="$unix_path"
25632   fi
25633 
25634     if test -d "$VS_BASE"; then
25635       if test -f "$VS_BASE/$VCVARSFILE"; then
25636         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25637 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25638         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25639         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25640         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25641         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25642       else
25643         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25644 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25645         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25646 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25647       fi
25648     fi
25649   fi
25650 
25651   fi
25652 
25653   if test "x$VS_ENV_CMD" = x; then
25654     VS_VERSION="${VS_VERSION}"
25655     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
25656     METHOD="well-known name"
25657 
25658     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25659       VCVARSFILE="vc/bin/vcvars32.bat"
25660     else
25661       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25662     fi
25663 
25664 
25665   windows_path="$VS_BASE"
25666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25667     unix_path=`$CYGPATH -u "$windows_path"`
25668     VS_BASE="$unix_path"
25669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25671     VS_BASE="$unix_path"
25672   fi
25673 
25674     if test -d "$VS_BASE"; then
25675       if test -f "$VS_BASE/$VCVARSFILE"; then
25676         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25677 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25678         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25679         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25680         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25681         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25682       else
25683         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25684 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25685         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25686 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25687       fi
25688     fi
25689   fi
25690 
25691 
25692   if test "x$VS_ENV_CMD" = x; then
25693     VS_VERSION="${VS_VERSION}"
25694     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
25695     METHOD="well-known name"
25696 
25697     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25698       VCVARSFILE="vc/bin/vcvars32.bat"
25699     else
25700       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
25701     fi
25702 
25703 
25704   windows_path="$VS_BASE"
25705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25706     unix_path=`$CYGPATH -u "$windows_path"`
25707     VS_BASE="$unix_path"
25708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25710     VS_BASE="$unix_path"
25711   fi
25712 
25713     if test -d "$VS_BASE"; then
25714       if test -f "$VS_BASE/$VCVARSFILE"; then
25715         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25716 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25717         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
25718         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25719         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
25720         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
25721       else
25722         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
25723 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
25724         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
25725 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
25726       fi
25727     fi
25728   fi
25729 
25730 
25731   if test "x$SDK_INSTALL_DIR" != x; then
25732     if test "x$ProgramW6432" != x; then
25733 
25734   if test "x$VS_ENV_CMD" = x; then
25735     VS_VERSION="${VS_VERSION}"
25736     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
25737     METHOD="well-known name"
25738 
25739   windows_path="$WIN_SDK_BASE"
25740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25741     unix_path=`$CYGPATH -u "$windows_path"`
25742     WIN_SDK_BASE="$unix_path"
25743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25745     WIN_SDK_BASE="$unix_path"
25746   fi
25747 
25748     if test -d "$WIN_SDK_BASE"; then
25749       # There have been cases of partial or broken SDK installations. A missing
25750       # lib dir is not going to work.
25751       if test ! -d "$WIN_SDK_BASE/lib"; then
25752         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25753 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25754         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25755 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25756       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25757         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25758 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25759         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25760         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25761           VS_ENV_ARGS="/x86"
25762         else
25763           VS_ENV_ARGS="/x64"
25764         fi
25765         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25766         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25767         # TODO: improve detection for other versions of SDK
25768         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25769       else
25770         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25771 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25772         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25773 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25774       fi
25775     fi
25776   fi
25777 
25778     fi
25779     if test "x$PROGRAMW6432" != x; then
25780 
25781   if test "x$VS_ENV_CMD" = x; then
25782     VS_VERSION="${VS_VERSION}"
25783     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
25784     METHOD="well-known name"
25785 
25786   windows_path="$WIN_SDK_BASE"
25787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25788     unix_path=`$CYGPATH -u "$windows_path"`
25789     WIN_SDK_BASE="$unix_path"
25790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25792     WIN_SDK_BASE="$unix_path"
25793   fi
25794 
25795     if test -d "$WIN_SDK_BASE"; then
25796       # There have been cases of partial or broken SDK installations. A missing
25797       # lib dir is not going to work.
25798       if test ! -d "$WIN_SDK_BASE/lib"; then
25799         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25800 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25801         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25802 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25803       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25804         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25805 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25806         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25807         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25808           VS_ENV_ARGS="/x86"
25809         else
25810           VS_ENV_ARGS="/x64"
25811         fi
25812         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25813         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25814         # TODO: improve detection for other versions of SDK
25815         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25816       else
25817         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25818 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25819         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25820 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25821       fi
25822     fi
25823   fi
25824 
25825     fi
25826     if test "x$PROGRAMFILES" != x; then
25827 
25828   if test "x$VS_ENV_CMD" = x; then
25829     VS_VERSION="${VS_VERSION}"
25830     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
25831     METHOD="well-known name"
25832 
25833   windows_path="$WIN_SDK_BASE"
25834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25835     unix_path=`$CYGPATH -u "$windows_path"`
25836     WIN_SDK_BASE="$unix_path"
25837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25839     WIN_SDK_BASE="$unix_path"
25840   fi
25841 
25842     if test -d "$WIN_SDK_BASE"; then
25843       # There have been cases of partial or broken SDK installations. A missing
25844       # lib dir is not going to work.
25845       if test ! -d "$WIN_SDK_BASE/lib"; then
25846         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25847 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25848         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25849 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25850       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25851         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25852 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25853         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25854         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25855           VS_ENV_ARGS="/x86"
25856         else
25857           VS_ENV_ARGS="/x64"
25858         fi
25859         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25860         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25861         # TODO: improve detection for other versions of SDK
25862         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25863       else
25864         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25865 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25866         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25867 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25868       fi
25869     fi
25870   fi
25871 
25872     fi
25873 
25874   if test "x$VS_ENV_CMD" = x; then
25875     VS_VERSION="${VS_VERSION}"
25876     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
25877     METHOD="well-known name"
25878 
25879   windows_path="$WIN_SDK_BASE"
25880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25881     unix_path=`$CYGPATH -u "$windows_path"`
25882     WIN_SDK_BASE="$unix_path"
25883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25885     WIN_SDK_BASE="$unix_path"
25886   fi
25887 
25888     if test -d "$WIN_SDK_BASE"; then
25889       # There have been cases of partial or broken SDK installations. A missing
25890       # lib dir is not going to work.
25891       if test ! -d "$WIN_SDK_BASE/lib"; then
25892         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25893 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25894         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25895 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25896       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25897         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25898 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25899         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25900         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25901           VS_ENV_ARGS="/x86"
25902         else
25903           VS_ENV_ARGS="/x64"
25904         fi
25905         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25906         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25907         # TODO: improve detection for other versions of SDK
25908         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25909       else
25910         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25911 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25912         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25913 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25914       fi
25915     fi
25916   fi
25917 
25918 
25919   if test "x$VS_ENV_CMD" = x; then
25920     VS_VERSION="${VS_VERSION}"
25921     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
25922     METHOD="well-known name"
25923 
25924   windows_path="$WIN_SDK_BASE"
25925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25926     unix_path=`$CYGPATH -u "$windows_path"`
25927     WIN_SDK_BASE="$unix_path"
25928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25930     WIN_SDK_BASE="$unix_path"
25931   fi
25932 
25933     if test -d "$WIN_SDK_BASE"; then
25934       # There have been cases of partial or broken SDK installations. A missing
25935       # lib dir is not going to work.
25936       if test ! -d "$WIN_SDK_BASE/lib"; then
25937         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25938 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25939         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
25940 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
25941       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
25942         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25943 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25944         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
25945         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
25946           VS_ENV_ARGS="/x86"
25947         else
25948           VS_ENV_ARGS="/x64"
25949         fi
25950         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
25951         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
25952         # TODO: improve detection for other versions of SDK
25953         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
25954       else
25955         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
25956 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
25957         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
25958 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
25959       fi
25960     fi
25961   fi
25962 
25963   fi
25964 
25965     if test "x$VS_ENV_CMD" != x; then
25966       TOOLCHAIN_VERSION=$VS_VERSION
25967       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
25968       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
25969       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
25970       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
25971       # The rest of the variables are already evaled while probing
25972       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
25973 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
25974       break
25975     fi
25976   done
25977 
25978 
25979   # If we have a devkit, skip all of the below.
25980   if test "x$DEVKIT_VS_VERSION" = x; then
25981     if test "x$VS_ENV_CMD" != x; then
25982       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
25983 
25984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25985 
25986   # First separate the path from the arguments. This will split at the first
25987   # space.
25988   complete="$VS_ENV_CMD"
25989   path="${complete%% *}"
25990   tmp="$complete EOL"
25991   arguments="${tmp#* }"
25992 
25993   # Input might be given as Windows format, start by converting to
25994   # unix format.
25995   new_path=`$CYGPATH -u "$path"`
25996 
25997   # Now try to locate executable using which
25998   new_path=`$WHICH "$new_path" 2> /dev/null`
25999   # bat and cmd files are not always considered executable in cygwin causing which
26000   # to not find them
26001   if test "x$new_path" = x \
26002       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26003       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26004     new_path=`$CYGPATH -u "$path"`
26005   fi
26006   if test "x$new_path" = x; then
26007     # Oops. Which didn't find the executable.
26008     # The splitting of arguments from the executable at a space might have been incorrect,
26009     # since paths with space are more likely in Windows. Give it another try with the whole
26010     # argument.
26011     path="$complete"
26012     arguments="EOL"
26013     new_path=`$CYGPATH -u "$path"`
26014     new_path=`$WHICH "$new_path" 2> /dev/null`
26015     # bat and cmd files are not always considered executable in cygwin causing which
26016     # to not find them
26017     if test "x$new_path" = x \
26018         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26019         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26020       new_path=`$CYGPATH -u "$path"`
26021     fi
26022     if test "x$new_path" = x; then
26023       # It's still not found. Now this is an unrecoverable error.
26024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26025 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26026       has_space=`$ECHO "$complete" | $GREP " "`
26027       if test "x$has_space" != x; then
26028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26030       fi
26031       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26032     fi
26033   fi
26034 
26035   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26036   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26037   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26038   # "foo.exe" is OK but "foo" is an error.
26039   #
26040   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26041   # It is also a way to make sure we got the proper file name for the real test later on.
26042   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26043   if test "x$test_shortpath" = x; then
26044     # Short path failed, file does not exist as specified.
26045     # Try adding .exe or .cmd
26046     if test -f "${new_path}.exe"; then
26047       input_to_shortpath="${new_path}.exe"
26048     elif test -f "${new_path}.cmd"; then
26049       input_to_shortpath="${new_path}.cmd"
26050     else
26051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26052 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26053       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26054 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26055       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26056     fi
26057   else
26058     input_to_shortpath="$new_path"
26059   fi
26060 
26061   # Call helper function which possibly converts this using DOS-style short mode.
26062   # If so, the updated path is stored in $new_path.
26063   new_path="$input_to_shortpath"
26064 
26065   input_path="$input_to_shortpath"
26066   # Check if we need to convert this using DOS-style short mode. If the path
26067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26068   # take no chances and rewrite it.
26069   # Note: m4 eats our [], so we need to use [ and ] instead.
26070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26071   if test "x$has_forbidden_chars" != x; then
26072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26076       # Going to short mode and back again did indeed matter. Since short mode is
26077       # case insensitive, let's make it lowercase to improve readability.
26078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26079       # Now convert it back to Unix-style (cygpath)
26080       input_path=`$CYGPATH -u "$shortmode_path"`
26081       new_path="$input_path"
26082     fi
26083   fi
26084 
26085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26086   if test "x$test_cygdrive_prefix" = x; then
26087     # As a simple fix, exclude /usr/bin since it's not a real path.
26088     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26090       # a path prefixed by /cygdrive for fixpath to work.
26091       new_path="$CYGWIN_ROOT_PATH$input_path"
26092     fi
26093   fi
26094 
26095   # remove trailing .exe if any
26096   new_path="${new_path/%.exe/}"
26097 
26098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26099 
26100   # First separate the path from the arguments. This will split at the first
26101   # space.
26102   complete="$VS_ENV_CMD"
26103   path="${complete%% *}"
26104   tmp="$complete EOL"
26105   arguments="${tmp#* }"
26106 
26107   # Input might be given as Windows format, start by converting to
26108   # unix format.
26109   new_path="$path"
26110 
26111   windows_path="$new_path"
26112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26113     unix_path=`$CYGPATH -u "$windows_path"`
26114     new_path="$unix_path"
26115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26117     new_path="$unix_path"
26118   fi
26119 
26120 
26121   # Now try to locate executable using which
26122   new_path=`$WHICH "$new_path" 2> /dev/null`
26123 
26124   if test "x$new_path" = x; then
26125     # Oops. Which didn't find the executable.
26126     # The splitting of arguments from the executable at a space might have been incorrect,
26127     # since paths with space are more likely in Windows. Give it another try with the whole
26128     # argument.
26129     path="$complete"
26130     arguments="EOL"
26131     new_path="$path"
26132 
26133   windows_path="$new_path"
26134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26135     unix_path=`$CYGPATH -u "$windows_path"`
26136     new_path="$unix_path"
26137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26139     new_path="$unix_path"
26140   fi
26141 
26142 
26143     new_path=`$WHICH "$new_path" 2> /dev/null`
26144     # bat and cmd files are not always considered executable in MSYS causing which
26145     # to not find them
26146     if test "x$new_path" = x \
26147         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26148         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26149       new_path="$path"
26150 
26151   windows_path="$new_path"
26152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153     unix_path=`$CYGPATH -u "$windows_path"`
26154     new_path="$unix_path"
26155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26157     new_path="$unix_path"
26158   fi
26159 
26160     fi
26161 
26162     if test "x$new_path" = x; then
26163       # It's still not found. Now this is an unrecoverable error.
26164       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26165 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26166       has_space=`$ECHO "$complete" | $GREP " "`
26167       if test "x$has_space" != x; then
26168         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26169 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26170       fi
26171       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26172     fi
26173   fi
26174 
26175   # Now new_path has a complete unix path to the binary
26176   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26177     # Keep paths in /bin as-is, but remove trailing .exe if any
26178     new_path="${new_path/%.exe/}"
26179     # Do not save /bin paths to all_fixpath_prefixes!
26180   else
26181     # Not in mixed or Windows style, start by that.
26182     new_path=`cmd //c echo $new_path`
26183 
26184   input_path="$new_path"
26185   # Check if we need to convert this using DOS-style short mode. If the path
26186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26187   # take no chances and rewrite it.
26188   # Note: m4 eats our [], so we need to use [ and ] instead.
26189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26190   if test "x$has_forbidden_chars" != x; then
26191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26193   fi
26194 
26195     # Output is in $new_path
26196 
26197   windows_path="$new_path"
26198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26199     unix_path=`$CYGPATH -u "$windows_path"`
26200     new_path="$unix_path"
26201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26203     new_path="$unix_path"
26204   fi
26205 
26206     # remove trailing .exe if any
26207     new_path="${new_path/%.exe/}"
26208 
26209     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26210     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26211   fi
26212 
26213   else
26214     # We're on a posix platform. Hooray! :)
26215     # First separate the path from the arguments. This will split at the first
26216     # space.
26217     complete="$VS_ENV_CMD"
26218     path="${complete%% *}"
26219     tmp="$complete EOL"
26220     arguments="${tmp#* }"
26221 
26222     # Cannot rely on the command "which" here since it doesn't always work.
26223     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26224     if test -z "$is_absolute_path"; then
26225       # Path to executable is not absolute. Find it.
26226       IFS_save="$IFS"
26227       IFS=:
26228       for p in $PATH; do
26229         if test -f "$p/$path" && test -x "$p/$path"; then
26230           new_path="$p/$path"
26231           break
26232         fi
26233       done
26234       IFS="$IFS_save"
26235     else
26236       # This is an absolute path, we can use it without further modifications.
26237       new_path="$path"
26238     fi
26239 
26240     if test "x$new_path" = x; then
26241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26242 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26243       has_space=`$ECHO "$complete" | $GREP " "`
26244       if test "x$has_space" != x; then
26245         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26246 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26247       fi
26248       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26249     fi
26250   fi
26251 
26252   # Now join together the path and the arguments once again
26253   if test "x$arguments" != xEOL; then
26254     new_complete="$new_path ${arguments% *}"
26255   else
26256     new_complete="$new_path"
26257   fi
26258 
26259   if test "x$complete" != "x$new_complete"; then
26260     VS_ENV_CMD="$new_complete"
26261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
26262 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
26263   fi
26264 
26265 
26266       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
26267       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
26268 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
26269 
26270       # We need to create a couple of temporary files.
26271       VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
26272       $MKDIR -p $VS_ENV_TMP_DIR
26273 
26274       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
26275       # Instead create a shell script which will set the relevant variables when run.
26276       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
26277 
26278   unix_path="$WINPATH_VS_ENV_CMD"
26279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26280     windows_path=`$CYGPATH -m "$unix_path"`
26281     WINPATH_VS_ENV_CMD="$windows_path"
26282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26283     windows_path=`cmd //c echo $unix_path`
26284     WINPATH_VS_ENV_CMD="$windows_path"
26285   fi
26286 
26287       WINPATH_BASH="$BASH"
26288 
26289   unix_path="$WINPATH_BASH"
26290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26291     windows_path=`$CYGPATH -m "$unix_path"`
26292     WINPATH_BASH="$windows_path"
26293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26294     windows_path=`cmd //c echo $unix_path`
26295     WINPATH_BASH="$windows_path"
26296   fi
26297 
26298 
26299       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
26300       # script (executable by bash) that will setup the important variables.
26301       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
26302       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
26303       # This will end up something like:
26304       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
26305       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
26306       # These will end up something like:
26307       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
26308       # The trailing space for everyone except PATH is no typo, but is needed due
26309       # to trailing \ in the Windows paths. These will be stripped later.
26310       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh'
26311           >> $EXTRACT_VC_ENV_BAT_FILE
26312       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' \
26313           >> $EXTRACT_VC_ENV_BAT_FILE
26314       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' \
26315           >> $EXTRACT_VC_ENV_BAT_FILE
26316       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
26317           >> $EXTRACT_VC_ENV_BAT_FILE
26318       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
26319           >> $EXTRACT_VC_ENV_BAT_FILE
26320       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
26321           >> $EXTRACT_VC_ENV_BAT_FILE
26322 
26323       # Now execute the newly created bat file.
26324       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
26325       # Change directory so we don't need to mess with Windows paths in redirects.
26326       cd $VS_ENV_TMP_DIR
26327       cmd /c extract-vs-env.bat | $CAT
26328       cd $CURDIR
26329 
26330       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
26331         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
26332 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
26333         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26334 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26335         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26336 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26337         as_fn_error $? "Cannot continue" "$LINENO" 5
26338       fi
26339 
26340       # Now set all paths and other env variables. This will allow the rest of
26341       # the configure script to find and run the compiler in the proper way.
26342       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
26343 $as_echo "$as_me: Setting extracted environment variables" >&6;}
26344       . $VS_ENV_TMP_DIR/set-vs-env.sh
26345       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
26346       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
26347     else
26348       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
26349      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
26350 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
26351     fi
26352   fi
26353 
26354   # At this point, we should have correct variables in the environment, or we can't continue.
26355   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
26356 $as_echo_n "checking for Visual Studio variables... " >&6; }
26357 
26358   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
26359       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
26360     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
26361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
26362 $as_echo "present but broken" >&6; }
26363       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
26364     else
26365       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26366 $as_echo "ok" >&6; }
26367       # Remove any trailing "\" and " " from the variables.
26368       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
26369       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
26370       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
26371       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
26372       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
26373       # Remove any paths containing # (typically F#) as that messes up make. This
26374       # is needed if visual studio was installed with F# support.
26375       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
26376 
26377 
26378 
26379 
26380     fi
26381   else
26382     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26383 $as_echo "not found" >&6; }
26384 
26385     if test "x$VS_ENV_CMD" = x; then
26386       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
26387 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
26388       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
26389 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
26390     else
26391       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
26392 $as_echo "$as_me: Running the extraction script failed." >&6;}
26393     fi
26394     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
26395 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
26396     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
26397 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
26398     as_fn_error $? "Cannot continue" "$LINENO" 5
26399   fi
26400 
26401     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
26402     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
26403     PATH="$VS_PATH"
26404     # The microsoft toolchain also requires INCLUDE and LIB to be set.
26405     export INCLUDE="$VS_INCLUDE"
26406     export LIB="$VS_LIB"
26407   fi
26408 
26409   # Before we locate the compilers, we need to sanitize the Xcode build environment
26410   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26411     # determine path to Xcode developer directory
26412     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
26413     SET_DEVELOPER_DIR=
26414 
26415     if test -n "$XCODE_PATH"; then
26416       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26417     fi
26418 
26419     # DEVELOPER_DIR could also be provided directly
26420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
26421 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
26422     if test -n "$DEVELOPER_DIR"; then
26423       if test ! -d "$DEVELOPER_DIR"; then
26424         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
26425       fi
26426       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
26427         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
26428       fi
26429       # make it visible to all the tools immediately
26430       export DEVELOPER_DIR
26431       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
26432       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
26433 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
26434     else
26435       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26436 $as_echo "no" >&6; }
26437     fi
26438 
26439 
26440     # Extract the first word of "xcodebuild", so it can be a program name with args.
26441 set dummy xcodebuild; ac_word=$2
26442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26443 $as_echo_n "checking for $ac_word... " >&6; }
26444 if ${ac_cv_path_XCODEBUILD+:} false; then :
26445   $as_echo_n "(cached) " >&6
26446 else
26447   case $XCODEBUILD in
26448   [\\/]* | ?:[\\/]*)
26449   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
26450   ;;
26451   *)
26452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26453 for as_dir in $PATH
26454 do
26455   IFS=$as_save_IFS
26456   test -z "$as_dir" && as_dir=.
26457     for ac_exec_ext in '' $ac_executable_extensions; do
26458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26459     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
26460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26461     break 2
26462   fi
26463 done
26464   done
26465 IFS=$as_save_IFS
26466 
26467   ;;
26468 esac
26469 fi
26470 XCODEBUILD=$ac_cv_path_XCODEBUILD
26471 if test -n "$XCODEBUILD"; then
26472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
26473 $as_echo "$XCODEBUILD" >&6; }
26474 else
26475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26476 $as_echo "no" >&6; }
26477 fi
26478 
26479 
26480     if test -z "$XCODEBUILD"; then
26481       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
26482     fi
26483 
26484     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
26485     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
26486     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
26487     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
26488       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
26489     fi
26490 
26491     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
26492     # clang and clang++, which will break the build. So handle that here if we need to.
26493     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
26494       # use xcrun to find the real gcc and add it's directory to PATH
26495       # then autoconf magic will find it
26496       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
26497 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
26498       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
26499       PATH="$XCODE_BIN_PATH":$PATH
26500     fi
26501 
26502     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
26503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
26504 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
26505     # allow SDKNAME to be set to override the default SDK selection
26506     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
26507     if test -n "$SDKPATH"; then
26508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
26509 $as_echo "$SDKPATH" >&6; }
26510     else
26511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
26512 $as_echo "(none, will use system headers and frameworks)" >&6; }
26513     fi
26514 
26515 
26516     # Perform a basic sanity test
26517     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
26518       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
26519     fi
26520 
26521     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
26522     if test -n "$SDKPATH"; then
26523       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
26524       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26525       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26526       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26527     fi
26528 
26529     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
26530     # setting this here means it doesn't have to be peppered throughout the forest
26531     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26532     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26533     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26534   fi
26535 
26536   # For solaris we really need solaris tools, and not the GNU equivalent.
26537   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26538   # so add that to path before starting to probe.
26539   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26540   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26541     PATH="/usr/ccs/bin:$PATH"
26542   fi
26543 
26544   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
26545   # override all other locations.
26546   if test "x$TOOLCHAIN_PATH" != x; then
26547     PATH=$TOOLCHAIN_PATH:$PATH
26548   fi
26549 
26550 
26551   #
26552   # Setup the compilers (CC and CXX)
26553   #
26554 
26555   COMPILER_NAME=C
26556   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26557 
26558   if test "x$CC" != x; then
26559     # User has supplied compiler name already, always let that override.
26560     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26561 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26562     if test "x`basename $CC`" = "x$CC"; then
26563       # A command without a complete path is provided, search $PATH.
26564 
26565       for ac_prog in $CC
26566 do
26567   # Extract the first word of "$ac_prog", so it can be a program name with args.
26568 set dummy $ac_prog; ac_word=$2
26569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26570 $as_echo_n "checking for $ac_word... " >&6; }
26571 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26572   $as_echo_n "(cached) " >&6
26573 else
26574   case $POTENTIAL_CC in
26575   [\\/]* | ?:[\\/]*)
26576   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26577   ;;
26578   *)
26579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26580 for as_dir in $PATH
26581 do
26582   IFS=$as_save_IFS
26583   test -z "$as_dir" && as_dir=.
26584     for ac_exec_ext in '' $ac_executable_extensions; do
26585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26586     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26588     break 2
26589   fi
26590 done
26591   done
26592 IFS=$as_save_IFS
26593 
26594   ;;
26595 esac
26596 fi
26597 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26598 if test -n "$POTENTIAL_CC"; then
26599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26600 $as_echo "$POTENTIAL_CC" >&6; }
26601 else
26602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26603 $as_echo "no" >&6; }
26604 fi
26605 
26606 
26607   test -n "$POTENTIAL_CC" && break
26608 done
26609 
26610       if test "x$POTENTIAL_CC" != x; then
26611         CC=$POTENTIAL_CC
26612       else
26613         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26614       fi
26615     else
26616       # Otherwise it might already be a complete path
26617       if test ! -x "$CC"; then
26618         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26619       fi
26620     fi
26621   else
26622     # No user supplied value. Locate compiler ourselves.
26623 
26624     # If we are cross compiling, assume cross compilation tools follows the
26625     # cross compilation standard where they are prefixed with the autoconf
26626     # standard name for the target. For example the binary
26627     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
26628     # If we are not cross compiling, then the default compiler name will be
26629     # used.
26630 
26631     CC=
26632     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
26633     # before checking the rest of the PATH.
26634     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
26635     # step, this should not be necessary.
26636     if test -n "$TOOLCHAIN_PATH"; then
26637       PATH_save="$PATH"
26638       PATH="$TOOLCHAIN_PATH"
26639       for ac_prog in $SEARCH_LIST
26640 do
26641   # Extract the first word of "$ac_prog", so it can be a program name with args.
26642 set dummy $ac_prog; ac_word=$2
26643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26644 $as_echo_n "checking for $ac_word... " >&6; }
26645 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
26646   $as_echo_n "(cached) " >&6
26647 else
26648   case $TOOLCHAIN_PATH_CC in
26649   [\\/]* | ?:[\\/]*)
26650   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
26651   ;;
26652   *)
26653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26654 for as_dir in $PATH
26655 do
26656   IFS=$as_save_IFS
26657   test -z "$as_dir" && as_dir=.
26658     for ac_exec_ext in '' $ac_executable_extensions; do
26659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26660     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
26661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26662     break 2
26663   fi
26664 done
26665   done
26666 IFS=$as_save_IFS
26667 
26668   ;;
26669 esac
26670 fi
26671 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
26672 if test -n "$TOOLCHAIN_PATH_CC"; then
26673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
26674 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
26675 else
26676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26677 $as_echo "no" >&6; }
26678 fi
26679 
26680 
26681   test -n "$TOOLCHAIN_PATH_CC" && break
26682 done
26683 
26684       CC=$TOOLCHAIN_PATH_CC
26685       PATH="$PATH_save"
26686     fi
26687 
26688     # AC_PATH_PROGS can't be run multiple times with the same variable,
26689     # so create a new name for this run.
26690     if test "x$CC" = x; then
26691       for ac_prog in $TOOLCHAIN_CC_BINARY
26692 do
26693   # Extract the first word of "$ac_prog", so it can be a program name with args.
26694 set dummy $ac_prog; ac_word=$2
26695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26696 $as_echo_n "checking for $ac_word... " >&6; }
26697 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26698   $as_echo_n "(cached) " >&6
26699 else
26700   case $POTENTIAL_CC in
26701   [\\/]* | ?:[\\/]*)
26702   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26703   ;;
26704   *)
26705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26706 for as_dir in $PATH
26707 do
26708   IFS=$as_save_IFS
26709   test -z "$as_dir" && as_dir=.
26710     for ac_exec_ext in '' $ac_executable_extensions; do
26711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26712     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
26713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26714     break 2
26715   fi
26716 done
26717   done
26718 IFS=$as_save_IFS
26719 
26720   ;;
26721 esac
26722 fi
26723 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
26724 if test -n "$POTENTIAL_CC"; then
26725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
26726 $as_echo "$POTENTIAL_CC" >&6; }
26727 else
26728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26729 $as_echo "no" >&6; }
26730 fi
26731 
26732 
26733   test -n "$POTENTIAL_CC" && break
26734 done
26735 
26736       CC=$POTENTIAL_CC
26737     fi
26738 
26739     if test "x$CC" = x; then
26740 
26741   # Print a helpful message on how to acquire the necessary build dependency.
26742   # devkit is the help tag: freetype, cups, pulse, alsa etc
26743   MISSING_DEPENDENCY=devkit
26744 
26745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26746     cygwin_help $MISSING_DEPENDENCY
26747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26748     msys_help $MISSING_DEPENDENCY
26749   else
26750     PKGHANDLER_COMMAND=
26751 
26752     case $PKGHANDLER in
26753       apt-get)
26754         apt_help     $MISSING_DEPENDENCY ;;
26755       yum)
26756         yum_help     $MISSING_DEPENDENCY ;;
26757       port)
26758         port_help    $MISSING_DEPENDENCY ;;
26759       pkgutil)
26760         pkgutil_help $MISSING_DEPENDENCY ;;
26761       pkgadd)
26762         pkgadd_help  $MISSING_DEPENDENCY ;;
26763     esac
26764 
26765     if test "x$PKGHANDLER_COMMAND" != x; then
26766       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26767     fi
26768   fi
26769 
26770       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
26771     fi
26772   fi
26773 
26774   # Now we have a compiler binary in CC. Make sure it's okay.
26775 
26776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777 
26778   # First separate the path from the arguments. This will split at the first
26779   # space.
26780   complete="$CC"
26781   path="${complete%% *}"
26782   tmp="$complete EOL"
26783   arguments="${tmp#* }"
26784 
26785   # Input might be given as Windows format, start by converting to
26786   # unix format.
26787   new_path=`$CYGPATH -u "$path"`
26788 
26789   # Now try to locate executable using which
26790   new_path=`$WHICH "$new_path" 2> /dev/null`
26791   # bat and cmd files are not always considered executable in cygwin causing which
26792   # to not find them
26793   if test "x$new_path" = x \
26794       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26795       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26796     new_path=`$CYGPATH -u "$path"`
26797   fi
26798   if test "x$new_path" = x; then
26799     # Oops. Which didn't find the executable.
26800     # The splitting of arguments from the executable at a space might have been incorrect,
26801     # since paths with space are more likely in Windows. Give it another try with the whole
26802     # argument.
26803     path="$complete"
26804     arguments="EOL"
26805     new_path=`$CYGPATH -u "$path"`
26806     new_path=`$WHICH "$new_path" 2> /dev/null`
26807     # bat and cmd files are not always considered executable in cygwin causing which
26808     # to not find them
26809     if test "x$new_path" = x \
26810         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26811         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26812       new_path=`$CYGPATH -u "$path"`
26813     fi
26814     if test "x$new_path" = x; then
26815       # It's still not found. Now this is an unrecoverable error.
26816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
26817 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
26818       has_space=`$ECHO "$complete" | $GREP " "`
26819       if test "x$has_space" != x; then
26820         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26821 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26822       fi
26823       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
26824     fi
26825   fi
26826 
26827   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26828   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26829   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26830   # "foo.exe" is OK but "foo" is an error.
26831   #
26832   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26833   # It is also a way to make sure we got the proper file name for the real test later on.
26834   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26835   if test "x$test_shortpath" = x; then
26836     # Short path failed, file does not exist as specified.
26837     # Try adding .exe or .cmd
26838     if test -f "${new_path}.exe"; then
26839       input_to_shortpath="${new_path}.exe"
26840     elif test -f "${new_path}.cmd"; then
26841       input_to_shortpath="${new_path}.cmd"
26842     else
26843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
26844 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
26845       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26846 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26847       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
26848     fi
26849   else
26850     input_to_shortpath="$new_path"
26851   fi
26852 
26853   # Call helper function which possibly converts this using DOS-style short mode.
26854   # If so, the updated path is stored in $new_path.
26855   new_path="$input_to_shortpath"
26856 
26857   input_path="$input_to_shortpath"
26858   # Check if we need to convert this using DOS-style short mode. If the path
26859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26860   # take no chances and rewrite it.
26861   # Note: m4 eats our [], so we need to use [ and ] instead.
26862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26863   if test "x$has_forbidden_chars" != x; then
26864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26868       # Going to short mode and back again did indeed matter. Since short mode is
26869       # case insensitive, let's make it lowercase to improve readability.
26870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26871       # Now convert it back to Unix-style (cygpath)
26872       input_path=`$CYGPATH -u "$shortmode_path"`
26873       new_path="$input_path"
26874     fi
26875   fi
26876 
26877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26878   if test "x$test_cygdrive_prefix" = x; then
26879     # As a simple fix, exclude /usr/bin since it's not a real path.
26880     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26882       # a path prefixed by /cygdrive for fixpath to work.
26883       new_path="$CYGWIN_ROOT_PATH$input_path"
26884     fi
26885   fi
26886 
26887   # remove trailing .exe if any
26888   new_path="${new_path/%.exe/}"
26889 
26890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26891 
26892   # First separate the path from the arguments. This will split at the first
26893   # space.
26894   complete="$CC"
26895   path="${complete%% *}"
26896   tmp="$complete EOL"
26897   arguments="${tmp#* }"
26898 
26899   # Input might be given as Windows format, start by converting to
26900   # unix format.
26901   new_path="$path"
26902 
26903   windows_path="$new_path"
26904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905     unix_path=`$CYGPATH -u "$windows_path"`
26906     new_path="$unix_path"
26907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26909     new_path="$unix_path"
26910   fi
26911 
26912 
26913   # Now try to locate executable using which
26914   new_path=`$WHICH "$new_path" 2> /dev/null`
26915 
26916   if test "x$new_path" = x; then
26917     # Oops. Which didn't find the executable.
26918     # The splitting of arguments from the executable at a space might have been incorrect,
26919     # since paths with space are more likely in Windows. Give it another try with the whole
26920     # argument.
26921     path="$complete"
26922     arguments="EOL"
26923     new_path="$path"
26924 
26925   windows_path="$new_path"
26926   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927     unix_path=`$CYGPATH -u "$windows_path"`
26928     new_path="$unix_path"
26929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26931     new_path="$unix_path"
26932   fi
26933 
26934 
26935     new_path=`$WHICH "$new_path" 2> /dev/null`
26936     # bat and cmd files are not always considered executable in MSYS causing which
26937     # to not find them
26938     if test "x$new_path" = x \
26939         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26940         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26941       new_path="$path"
26942 
26943   windows_path="$new_path"
26944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26945     unix_path=`$CYGPATH -u "$windows_path"`
26946     new_path="$unix_path"
26947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26949     new_path="$unix_path"
26950   fi
26951 
26952     fi
26953 
26954     if test "x$new_path" = x; then
26955       # It's still not found. Now this is an unrecoverable error.
26956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
26957 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
26958       has_space=`$ECHO "$complete" | $GREP " "`
26959       if test "x$has_space" != x; then
26960         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26962       fi
26963       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
26964     fi
26965   fi
26966 
26967   # Now new_path has a complete unix path to the binary
26968   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26969     # Keep paths in /bin as-is, but remove trailing .exe if any
26970     new_path="${new_path/%.exe/}"
26971     # Do not save /bin paths to all_fixpath_prefixes!
26972   else
26973     # Not in mixed or Windows style, start by that.
26974     new_path=`cmd //c echo $new_path`
26975 
26976   input_path="$new_path"
26977   # Check if we need to convert this using DOS-style short mode. If the path
26978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26979   # take no chances and rewrite it.
26980   # Note: m4 eats our [], so we need to use [ and ] instead.
26981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26982   if test "x$has_forbidden_chars" != x; then
26983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26984     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26985   fi
26986 
26987     # Output is in $new_path
26988 
26989   windows_path="$new_path"
26990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991     unix_path=`$CYGPATH -u "$windows_path"`
26992     new_path="$unix_path"
26993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995     new_path="$unix_path"
26996   fi
26997 
26998     # remove trailing .exe if any
26999     new_path="${new_path/%.exe/}"
27000 
27001     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27002     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27003   fi
27004 
27005   else
27006     # We're on a posix platform. Hooray! :)
27007     # First separate the path from the arguments. This will split at the first
27008     # space.
27009     complete="$CC"
27010     path="${complete%% *}"
27011     tmp="$complete EOL"
27012     arguments="${tmp#* }"
27013 
27014     # Cannot rely on the command "which" here since it doesn't always work.
27015     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27016     if test -z "$is_absolute_path"; then
27017       # Path to executable is not absolute. Find it.
27018       IFS_save="$IFS"
27019       IFS=:
27020       for p in $PATH; do
27021         if test -f "$p/$path" && test -x "$p/$path"; then
27022           new_path="$p/$path"
27023           break
27024         fi
27025       done
27026       IFS="$IFS_save"
27027     else
27028       # This is an absolute path, we can use it without further modifications.
27029       new_path="$path"
27030     fi
27031 
27032     if test "x$new_path" = x; then
27033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27034 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27035       has_space=`$ECHO "$complete" | $GREP " "`
27036       if test "x$has_space" != x; then
27037         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27039       fi
27040       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27041     fi
27042   fi
27043 
27044   # Now join together the path and the arguments once again
27045   if test "x$arguments" != xEOL; then
27046     new_complete="$new_path ${arguments% *}"
27047   else
27048     new_complete="$new_path"
27049   fi
27050 
27051   if test "x$complete" != "x$new_complete"; then
27052     CC="$new_complete"
27053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27054 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27055   fi
27056 
27057   TEST_COMPILER="$CC"
27058   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27059   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27060   if test "x$OPENJDK_BUILD_OS" != xaix; then
27061     # FIXME: This test should not be needed anymore; we don't do that for any platform.
27062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27063 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
27064 
27065   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27066     # Follow a chain of symbolic links. Use readlink
27067     # where it exists, else fall back to horribly
27068     # complicated shell code.
27069     if test "x$READLINK_TESTED" != yes; then
27070       # On MacOSX there is a readlink tool with a different
27071       # purpose than the GNU readlink tool. Check the found readlink.
27072       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27073       if test "x$ISGNU" = x; then
27074         # A readlink that we do not know how to use.
27075         # Are there other non-GNU readlinks out there?
27076         READLINK_TESTED=yes
27077         READLINK=
27078       fi
27079     fi
27080 
27081     if test "x$READLINK" != x; then
27082       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27083     else
27084       # Save the current directory for restoring afterwards
27085       STARTDIR=$PWD
27086       COUNTER=0
27087       sym_link_dir=`$DIRNAME $TEST_COMPILER`
27088       sym_link_file=`$BASENAME $TEST_COMPILER`
27089       cd $sym_link_dir
27090       # Use -P flag to resolve symlinks in directories.
27091       cd `$THEPWDCMD -P`
27092       sym_link_dir=`$THEPWDCMD -P`
27093       # Resolve file symlinks
27094       while test $COUNTER -lt 20; do
27095         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27096         if test "x$ISLINK" == x; then
27097           # This is not a symbolic link! We are done!
27098           break
27099         fi
27100         # Again resolve directory symlinks since the target of the just found
27101         # link could be in a different directory
27102         cd `$DIRNAME $ISLINK`
27103         sym_link_dir=`$THEPWDCMD -P`
27104         sym_link_file=`$BASENAME $ISLINK`
27105         let COUNTER=COUNTER+1
27106       done
27107       cd $STARTDIR
27108       TEST_COMPILER=$sym_link_dir/$sym_link_file
27109     fi
27110   fi
27111 
27112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27113 $as_echo "$TEST_COMPILER" >&6; }
27114   fi
27115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27116 $as_echo_n "checking if CC is disguised ccache... " >&6; }
27117 
27118   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27119   if test "x$COMPILER_BASENAME" = "xccache"; then
27120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27121 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27122     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27123     # We want to control ccache invocation ourselves, so ignore this cc and try
27124     # searching again.
27125 
27126     # Remove the path to the fake ccache cc from the PATH
27127     RETRY_COMPILER_SAVED_PATH="$PATH"
27128     COMPILER_DIRNAME=`$DIRNAME $CC`
27129     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27130 
27131     # Try again looking for our compiler
27132     if test -n "$ac_tool_prefix"; then
27133   for ac_prog in $TOOLCHAIN_CC_BINARY
27134   do
27135     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27136 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27138 $as_echo_n "checking for $ac_word... " >&6; }
27139 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27140   $as_echo_n "(cached) " >&6
27141 else
27142   if test -n "$PROPER_COMPILER_CC"; then
27143   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27144 else
27145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27146 for as_dir in $PATH
27147 do
27148   IFS=$as_save_IFS
27149   test -z "$as_dir" && as_dir=.
27150     for ac_exec_ext in '' $ac_executable_extensions; do
27151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27152     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27154     break 2
27155   fi
27156 done
27157   done
27158 IFS=$as_save_IFS
27159 
27160 fi
27161 fi
27162 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27163 if test -n "$PROPER_COMPILER_CC"; then
27164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27165 $as_echo "$PROPER_COMPILER_CC" >&6; }
27166 else
27167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27168 $as_echo "no" >&6; }
27169 fi
27170 
27171 
27172     test -n "$PROPER_COMPILER_CC" && break
27173   done
27174 fi
27175 if test -z "$PROPER_COMPILER_CC"; then
27176   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27177   for ac_prog in $TOOLCHAIN_CC_BINARY
27178 do
27179   # Extract the first word of "$ac_prog", so it can be a program name with args.
27180 set dummy $ac_prog; ac_word=$2
27181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27182 $as_echo_n "checking for $ac_word... " >&6; }
27183 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
27184   $as_echo_n "(cached) " >&6
27185 else
27186   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27187   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
27188 else
27189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27190 for as_dir in $PATH
27191 do
27192   IFS=$as_save_IFS
27193   test -z "$as_dir" && as_dir=.
27194     for ac_exec_ext in '' $ac_executable_extensions; do
27195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27196     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
27197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27198     break 2
27199   fi
27200 done
27201   done
27202 IFS=$as_save_IFS
27203 
27204 fi
27205 fi
27206 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
27207 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
27208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
27209 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
27210 else
27211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27212 $as_echo "no" >&6; }
27213 fi
27214 
27215 
27216   test -n "$ac_ct_PROPER_COMPILER_CC" && break
27217 done
27218 
27219   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
27220     PROPER_COMPILER_CC=""
27221   else
27222     case $cross_compiling:$ac_tool_warned in
27223 yes:)
27224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27225 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27226 ac_tool_warned=yes ;;
27227 esac
27228     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
27229   fi
27230 fi
27231 
27232 
27233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234 
27235   # First separate the path from the arguments. This will split at the first
27236   # space.
27237   complete="$PROPER_COMPILER_CC"
27238   path="${complete%% *}"
27239   tmp="$complete EOL"
27240   arguments="${tmp#* }"
27241 
27242   # Input might be given as Windows format, start by converting to
27243   # unix format.
27244   new_path=`$CYGPATH -u "$path"`
27245 
27246   # Now try to locate executable using which
27247   new_path=`$WHICH "$new_path" 2> /dev/null`
27248   # bat and cmd files are not always considered executable in cygwin causing which
27249   # to not find them
27250   if test "x$new_path" = x \
27251       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27252       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27253     new_path=`$CYGPATH -u "$path"`
27254   fi
27255   if test "x$new_path" = x; then
27256     # Oops. Which didn't find the executable.
27257     # The splitting of arguments from the executable at a space might have been incorrect,
27258     # since paths with space are more likely in Windows. Give it another try with the whole
27259     # argument.
27260     path="$complete"
27261     arguments="EOL"
27262     new_path=`$CYGPATH -u "$path"`
27263     new_path=`$WHICH "$new_path" 2> /dev/null`
27264     # bat and cmd files are not always considered executable in cygwin causing which
27265     # to not find them
27266     if test "x$new_path" = x \
27267         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27268         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27269       new_path=`$CYGPATH -u "$path"`
27270     fi
27271     if test "x$new_path" = x; then
27272       # It's still not found. Now this is an unrecoverable error.
27273       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27274 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27275       has_space=`$ECHO "$complete" | $GREP " "`
27276       if test "x$has_space" != x; then
27277         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27279       fi
27280       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27281     fi
27282   fi
27283 
27284   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27285   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27286   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27287   # "foo.exe" is OK but "foo" is an error.
27288   #
27289   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27290   # It is also a way to make sure we got the proper file name for the real test later on.
27291   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27292   if test "x$test_shortpath" = x; then
27293     # Short path failed, file does not exist as specified.
27294     # Try adding .exe or .cmd
27295     if test -f "${new_path}.exe"; then
27296       input_to_shortpath="${new_path}.exe"
27297     elif test -f "${new_path}.cmd"; then
27298       input_to_shortpath="${new_path}.cmd"
27299     else
27300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
27301 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
27302       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27303 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27304       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27305     fi
27306   else
27307     input_to_shortpath="$new_path"
27308   fi
27309 
27310   # Call helper function which possibly converts this using DOS-style short mode.
27311   # If so, the updated path is stored in $new_path.
27312   new_path="$input_to_shortpath"
27313 
27314   input_path="$input_to_shortpath"
27315   # Check if we need to convert this using DOS-style short mode. If the path
27316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27317   # take no chances and rewrite it.
27318   # Note: m4 eats our [], so we need to use [ and ] instead.
27319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27320   if test "x$has_forbidden_chars" != x; then
27321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27325       # Going to short mode and back again did indeed matter. Since short mode is
27326       # case insensitive, let's make it lowercase to improve readability.
27327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27328       # Now convert it back to Unix-style (cygpath)
27329       input_path=`$CYGPATH -u "$shortmode_path"`
27330       new_path="$input_path"
27331     fi
27332   fi
27333 
27334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27335   if test "x$test_cygdrive_prefix" = x; then
27336     # As a simple fix, exclude /usr/bin since it's not a real path.
27337     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27339       # a path prefixed by /cygdrive for fixpath to work.
27340       new_path="$CYGWIN_ROOT_PATH$input_path"
27341     fi
27342   fi
27343 
27344   # remove trailing .exe if any
27345   new_path="${new_path/%.exe/}"
27346 
27347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27348 
27349   # First separate the path from the arguments. This will split at the first
27350   # space.
27351   complete="$PROPER_COMPILER_CC"
27352   path="${complete%% *}"
27353   tmp="$complete EOL"
27354   arguments="${tmp#* }"
27355 
27356   # Input might be given as Windows format, start by converting to
27357   # unix format.
27358   new_path="$path"
27359 
27360   windows_path="$new_path"
27361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27362     unix_path=`$CYGPATH -u "$windows_path"`
27363     new_path="$unix_path"
27364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27366     new_path="$unix_path"
27367   fi
27368 
27369 
27370   # Now try to locate executable using which
27371   new_path=`$WHICH "$new_path" 2> /dev/null`
27372 
27373   if test "x$new_path" = x; then
27374     # Oops. Which didn't find the executable.
27375     # The splitting of arguments from the executable at a space might have been incorrect,
27376     # since paths with space are more likely in Windows. Give it another try with the whole
27377     # argument.
27378     path="$complete"
27379     arguments="EOL"
27380     new_path="$path"
27381 
27382   windows_path="$new_path"
27383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27384     unix_path=`$CYGPATH -u "$windows_path"`
27385     new_path="$unix_path"
27386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27388     new_path="$unix_path"
27389   fi
27390 
27391 
27392     new_path=`$WHICH "$new_path" 2> /dev/null`
27393     # bat and cmd files are not always considered executable in MSYS causing which
27394     # to not find them
27395     if test "x$new_path" = x \
27396         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27397         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27398       new_path="$path"
27399 
27400   windows_path="$new_path"
27401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27402     unix_path=`$CYGPATH -u "$windows_path"`
27403     new_path="$unix_path"
27404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27406     new_path="$unix_path"
27407   fi
27408 
27409     fi
27410 
27411     if test "x$new_path" = x; then
27412       # It's still not found. Now this is an unrecoverable error.
27413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27414 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27415       has_space=`$ECHO "$complete" | $GREP " "`
27416       if test "x$has_space" != x; then
27417         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27419       fi
27420       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27421     fi
27422   fi
27423 
27424   # Now new_path has a complete unix path to the binary
27425   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27426     # Keep paths in /bin as-is, but remove trailing .exe if any
27427     new_path="${new_path/%.exe/}"
27428     # Do not save /bin paths to all_fixpath_prefixes!
27429   else
27430     # Not in mixed or Windows style, start by that.
27431     new_path=`cmd //c echo $new_path`
27432 
27433   input_path="$new_path"
27434   # Check if we need to convert this using DOS-style short mode. If the path
27435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27436   # take no chances and rewrite it.
27437   # Note: m4 eats our [], so we need to use [ and ] instead.
27438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27439   if test "x$has_forbidden_chars" != x; then
27440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27441     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27442   fi
27443 
27444     # Output is in $new_path
27445 
27446   windows_path="$new_path"
27447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448     unix_path=`$CYGPATH -u "$windows_path"`
27449     new_path="$unix_path"
27450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27452     new_path="$unix_path"
27453   fi
27454 
27455     # remove trailing .exe if any
27456     new_path="${new_path/%.exe/}"
27457 
27458     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27459     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27460   fi
27461 
27462   else
27463     # We're on a posix platform. Hooray! :)
27464     # First separate the path from the arguments. This will split at the first
27465     # space.
27466     complete="$PROPER_COMPILER_CC"
27467     path="${complete%% *}"
27468     tmp="$complete EOL"
27469     arguments="${tmp#* }"
27470 
27471     # Cannot rely on the command "which" here since it doesn't always work.
27472     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27473     if test -z "$is_absolute_path"; then
27474       # Path to executable is not absolute. Find it.
27475       IFS_save="$IFS"
27476       IFS=:
27477       for p in $PATH; do
27478         if test -f "$p/$path" && test -x "$p/$path"; then
27479           new_path="$p/$path"
27480           break
27481         fi
27482       done
27483       IFS="$IFS_save"
27484     else
27485       # This is an absolute path, we can use it without further modifications.
27486       new_path="$path"
27487     fi
27488 
27489     if test "x$new_path" = x; then
27490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
27491 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
27492       has_space=`$ECHO "$complete" | $GREP " "`
27493       if test "x$has_space" != x; then
27494         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27496       fi
27497       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
27498     fi
27499   fi
27500 
27501   # Now join together the path and the arguments once again
27502   if test "x$arguments" != xEOL; then
27503     new_complete="$new_path ${arguments% *}"
27504   else
27505     new_complete="$new_path"
27506   fi
27507 
27508   if test "x$complete" != "x$new_complete"; then
27509     PROPER_COMPILER_CC="$new_complete"
27510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
27511 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
27512   fi
27513 
27514     PATH="$RETRY_COMPILER_SAVED_PATH"
27515 
27516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
27517 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
27518 
27519   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27520     # Follow a chain of symbolic links. Use readlink
27521     # where it exists, else fall back to horribly
27522     # complicated shell code.
27523     if test "x$READLINK_TESTED" != yes; then
27524       # On MacOSX there is a readlink tool with a different
27525       # purpose than the GNU readlink tool. Check the found readlink.
27526       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27527       if test "x$ISGNU" = x; then
27528         # A readlink that we do not know how to use.
27529         # Are there other non-GNU readlinks out there?
27530         READLINK_TESTED=yes
27531         READLINK=
27532       fi
27533     fi
27534 
27535     if test "x$READLINK" != x; then
27536       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
27537     else
27538       # Save the current directory for restoring afterwards
27539       STARTDIR=$PWD
27540       COUNTER=0
27541       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
27542       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
27543       cd $sym_link_dir
27544       # Use -P flag to resolve symlinks in directories.
27545       cd `$THEPWDCMD -P`
27546       sym_link_dir=`$THEPWDCMD -P`
27547       # Resolve file symlinks
27548       while test $COUNTER -lt 20; do
27549         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27550         if test "x$ISLINK" == x; then
27551           # This is not a symbolic link! We are done!
27552           break
27553         fi
27554         # Again resolve directory symlinks since the target of the just found
27555         # link could be in a different directory
27556         cd `$DIRNAME $ISLINK`
27557         sym_link_dir=`$THEPWDCMD -P`
27558         sym_link_file=`$BASENAME $ISLINK`
27559         let COUNTER=COUNTER+1
27560       done
27561       cd $STARTDIR
27562       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
27563     fi
27564   fi
27565 
27566     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27567 $as_echo "$PROPER_COMPILER_CC" >&6; }
27568     CC="$PROPER_COMPILER_CC"
27569   else
27570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
27571 $as_echo "no, keeping CC" >&6; }
27572     CC="$TEST_COMPILER"
27573   fi
27574 
27575 
27576   COMPILER=$CC
27577   COMPILER_NAME=$COMPILER_NAME
27578 
27579   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27580     # cc -V output typically looks like
27581     #     cc: Sun C 5.12 Linux_i386 2011/11/16
27582     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
27583     # Check that this is likely to be the Solaris Studio cc.
27584     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
27585     if test $? -ne 0; then
27586       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27587       { $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
27588 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27589       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27590 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27591       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27592 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27593       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27594     fi
27595     # Remove usage instructions (if present), and
27596     # collapse compiler output into a single line
27597     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27598         $SED -e 's/ *[Uu]sage:.*//'`
27599     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27600         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
27601   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
27602     # xlc -qversion output typically looks like
27603     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
27604     #     Version: 11.01.0000.0015
27605     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
27606     # Check that this is likely to be the IBM XL C compiler.
27607     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
27608     if test $? -ne 0; then
27609       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27610       { $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
27611 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27612       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27613 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27614       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
27615 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
27616       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27617     fi
27618     # Collapse compiler output into a single line
27619     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27620     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27621         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
27622   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
27623     # There is no specific version flag, but all output starts with a version string.
27624     # First line typically looks something like:
27625     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
27626     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
27627     # Check that this is likely to be Microsoft CL.EXE.
27628     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
27629     if test $? -ne 0; then
27630       { $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
27631 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27632       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27633 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27634       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27635     fi
27636     # Collapse compiler output into a single line
27637     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27638     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27639         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
27640   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
27641     # gcc --version output typically looks like
27642     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
27643     #     Copyright (C) 2013 Free Software Foundation, Inc.
27644     #     This is free software; see the source for copying conditions.  There is NO
27645     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27646     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27647     # Check that this is likely to be GCC.
27648     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
27649     if test $? -ne 0; then
27650       { $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
27651 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27652       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
27653 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
27654       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27655     fi
27656     # Remove Copyright and legalese from version string, and
27657     # collapse into a single line
27658     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
27659         $SED -e 's/ *Copyright .*//'`
27660     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27661         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
27662   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
27663     # clang --version output typically looks like
27664     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
27665     #    clang version 3.3 (tags/RELEASE_33/final)
27666     # or
27667     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
27668     #    Target: x86_64-pc-linux-gnu
27669     #    Thread model: posix
27670     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
27671     # Check that this is likely to be clang
27672     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
27673     if test $? -ne 0; then
27674       { $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
27675 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
27676       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
27677 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
27678       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
27679     fi
27680     # Collapse compiler output into a single line
27681     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
27682     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
27683         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
27684 
27685   else
27686       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
27687   fi
27688   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
27689   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
27690   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
27691   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
27692 
27693   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
27694 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
27695 
27696 
27697   # Now that we have resolved CC ourself, let autoconf have its go at it
27698   ac_ext=c
27699 ac_cpp='$CPP $CPPFLAGS'
27700 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27701 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27702 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27703 if test -n "$ac_tool_prefix"; then
27704   for ac_prog in $CC
27705   do
27706     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27707 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27709 $as_echo_n "checking for $ac_word... " >&6; }
27710 if ${ac_cv_prog_CC+:} false; then :
27711   $as_echo_n "(cached) " >&6
27712 else
27713   if test -n "$CC"; then
27714   ac_cv_prog_CC="$CC" # Let the user override the test.
27715 else
27716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27717 for as_dir in $PATH
27718 do
27719   IFS=$as_save_IFS
27720   test -z "$as_dir" && as_dir=.
27721     for ac_exec_ext in '' $ac_executable_extensions; do
27722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27723     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
27724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27725     break 2
27726   fi
27727 done
27728   done
27729 IFS=$as_save_IFS
27730 
27731 fi
27732 fi
27733 CC=$ac_cv_prog_CC
27734 if test -n "$CC"; then
27735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
27736 $as_echo "$CC" >&6; }
27737 else
27738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27739 $as_echo "no" >&6; }
27740 fi
27741 
27742 
27743     test -n "$CC" && break
27744   done
27745 fi
27746 if test -z "$CC"; then
27747   ac_ct_CC=$CC
27748   for ac_prog in $CC
27749 do
27750   # Extract the first word of "$ac_prog", so it can be a program name with args.
27751 set dummy $ac_prog; ac_word=$2
27752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27753 $as_echo_n "checking for $ac_word... " >&6; }
27754 if ${ac_cv_prog_ac_ct_CC+:} false; then :
27755   $as_echo_n "(cached) " >&6
27756 else
27757   if test -n "$ac_ct_CC"; then
27758   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
27759 else
27760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27761 for as_dir in $PATH
27762 do
27763   IFS=$as_save_IFS
27764   test -z "$as_dir" && as_dir=.
27765     for ac_exec_ext in '' $ac_executable_extensions; do
27766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27767     ac_cv_prog_ac_ct_CC="$ac_prog"
27768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27769     break 2
27770   fi
27771 done
27772   done
27773 IFS=$as_save_IFS
27774 
27775 fi
27776 fi
27777 ac_ct_CC=$ac_cv_prog_ac_ct_CC
27778 if test -n "$ac_ct_CC"; then
27779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
27780 $as_echo "$ac_ct_CC" >&6; }
27781 else
27782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27783 $as_echo "no" >&6; }
27784 fi
27785 
27786 
27787   test -n "$ac_ct_CC" && break
27788 done
27789 
27790   if test "x$ac_ct_CC" = x; then
27791     CC=""
27792   else
27793     case $cross_compiling:$ac_tool_warned in
27794 yes:)
27795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27796 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27797 ac_tool_warned=yes ;;
27798 esac
27799     CC=$ac_ct_CC
27800   fi
27801 fi
27802 
27803 
27804 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27806 as_fn_error $? "no acceptable C compiler found in \$PATH
27807 See \`config.log' for more details" "$LINENO" 5; }
27808 
27809 # Provide some information about the compiler.
27810 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
27811 set X $ac_compile
27812 ac_compiler=$2
27813 for ac_option in --version -v -V -qversion; do
27814   { { ac_try="$ac_compiler $ac_option >&5"
27815 case "(($ac_try" in
27816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27817   *) ac_try_echo=$ac_try;;
27818 esac
27819 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
27820 $as_echo "$ac_try_echo"; } >&5
27821   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
27822   ac_status=$?
27823   if test -s conftest.err; then
27824     sed '10a\
27825 ... rest of stderr output deleted ...
27826          10q' conftest.err >conftest.er1
27827     cat conftest.er1 >&5
27828   fi
27829   rm -f conftest.er1 conftest.err
27830   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27831   test $ac_status = 0; }
27832 done
27833 
27834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27835 /* end confdefs.h.  */
27836 
27837 int
27838 main ()
27839 {
27840 
27841   ;
27842   return 0;
27843 }
27844 _ACEOF
27845 ac_clean_files_save=$ac_clean_files
27846 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
27847 # Try to create an executable without -o first, disregard a.out.
27848 # It will help us diagnose broken compilers, and finding out an intuition
27849 # of exeext.
27850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
27851 $as_echo_n "checking whether the C compiler works... " >&6; }
27852 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
27853 
27854 # The possible output files:
27855 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
27856 
27857 ac_rmfiles=
27858 for ac_file in $ac_files
27859 do
27860   case $ac_file in
27861     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
27862     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
27863   esac
27864 done
27865 rm -f $ac_rmfiles
27866 
27867 if { { ac_try="$ac_link_default"
27868 case "(($ac_try" in
27869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27870   *) ac_try_echo=$ac_try;;
27871 esac
27872 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
27873 $as_echo "$ac_try_echo"; } >&5
27874   (eval "$ac_link_default") 2>&5
27875   ac_status=$?
27876   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27877   test $ac_status = 0; }; then :
27878   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
27879 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
27880 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
27881 # so that the user can short-circuit this test for compilers unknown to
27882 # Autoconf.
27883 for ac_file in $ac_files ''
27884 do
27885   test -f "$ac_file" || continue
27886   case $ac_file in
27887     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
27888         ;;
27889     [ab].out )
27890         # We found the default executable, but exeext='' is most
27891         # certainly right.
27892         break;;
27893     *.* )
27894         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
27895         then :; else
27896            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
27897         fi
27898         # We set ac_cv_exeext here because the later test for it is not
27899         # safe: cross compilers may not add the suffix if given an `-o'
27900         # argument, so we may need to know it at that point already.
27901         # Even if this section looks crufty: it has the advantage of
27902         # actually working.
27903         break;;
27904     * )
27905         break;;
27906   esac
27907 done
27908 test "$ac_cv_exeext" = no && ac_cv_exeext=
27909 
27910 else
27911   ac_file=''
27912 fi
27913 if test -z "$ac_file"; then :
27914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27915 $as_echo "no" >&6; }
27916 $as_echo "$as_me: failed program was:" >&5
27917 sed 's/^/| /' conftest.$ac_ext >&5
27918 
27919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27921 as_fn_error 77 "C compiler cannot create executables
27922 See \`config.log' for more details" "$LINENO" 5; }
27923 else
27924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27925 $as_echo "yes" >&6; }
27926 fi
27927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
27928 $as_echo_n "checking for C compiler default output file name... " >&6; }
27929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
27930 $as_echo "$ac_file" >&6; }
27931 ac_exeext=$ac_cv_exeext
27932 
27933 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
27934 ac_clean_files=$ac_clean_files_save
27935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
27936 $as_echo_n "checking for suffix of executables... " >&6; }
27937 if { { ac_try="$ac_link"
27938 case "(($ac_try" in
27939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27940   *) ac_try_echo=$ac_try;;
27941 esac
27942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
27943 $as_echo "$ac_try_echo"; } >&5
27944   (eval "$ac_link") 2>&5
27945   ac_status=$?
27946   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27947   test $ac_status = 0; }; then :
27948   # If both `conftest.exe' and `conftest' are `present' (well, observable)
27949 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
27950 # work properly (i.e., refer to `conftest.exe'), while it won't with
27951 # `rm'.
27952 for ac_file in conftest.exe conftest conftest.*; do
27953   test -f "$ac_file" || continue
27954   case $ac_file in
27955     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
27956     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
27957           break;;
27958     * ) break;;
27959   esac
27960 done
27961 else
27962   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27963 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27964 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
27965 See \`config.log' for more details" "$LINENO" 5; }
27966 fi
27967 rm -f conftest conftest$ac_cv_exeext
27968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
27969 $as_echo "$ac_cv_exeext" >&6; }
27970 
27971 rm -f conftest.$ac_ext
27972 EXEEXT=$ac_cv_exeext
27973 ac_exeext=$EXEEXT
27974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27975 /* end confdefs.h.  */
27976 #include <stdio.h>
27977 int
27978 main ()
27979 {
27980 FILE *f = fopen ("conftest.out", "w");
27981  return ferror (f) || fclose (f) != 0;
27982 
27983   ;
27984   return 0;
27985 }
27986 _ACEOF
27987 ac_clean_files="$ac_clean_files conftest.out"
27988 # Check that the compiler produces executables we can run.  If not, either
27989 # the compiler is broken, or we cross compile.
27990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
27991 $as_echo_n "checking whether we are cross compiling... " >&6; }
27992 if test "$cross_compiling" != yes; then
27993   { { ac_try="$ac_link"
27994 case "(($ac_try" in
27995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27996   *) ac_try_echo=$ac_try;;
27997 esac
27998 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
27999 $as_echo "$ac_try_echo"; } >&5
28000   (eval "$ac_link") 2>&5
28001   ac_status=$?
28002   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28003   test $ac_status = 0; }
28004   if { ac_try='./conftest$ac_cv_exeext'
28005   { { case "(($ac_try" in
28006   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28007   *) ac_try_echo=$ac_try;;
28008 esac
28009 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28010 $as_echo "$ac_try_echo"; } >&5
28011   (eval "$ac_try") 2>&5
28012   ac_status=$?
28013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28014   test $ac_status = 0; }; }; then
28015     cross_compiling=no
28016   else
28017     if test "$cross_compiling" = maybe; then
28018         cross_compiling=yes
28019     else
28020         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28021 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28022 as_fn_error $? "cannot run C compiled programs.
28023 If you meant to cross compile, use \`--host'.
28024 See \`config.log' for more details" "$LINENO" 5; }
28025     fi
28026   fi
28027 fi
28028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28029 $as_echo "$cross_compiling" >&6; }
28030 
28031 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28032 ac_clean_files=$ac_clean_files_save
28033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28034 $as_echo_n "checking for suffix of object files... " >&6; }
28035 if ${ac_cv_objext+:} false; then :
28036   $as_echo_n "(cached) " >&6
28037 else
28038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28039 /* end confdefs.h.  */
28040 
28041 int
28042 main ()
28043 {
28044 
28045   ;
28046   return 0;
28047 }
28048 _ACEOF
28049 rm -f conftest.o conftest.obj
28050 if { { ac_try="$ac_compile"
28051 case "(($ac_try" in
28052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28053   *) ac_try_echo=$ac_try;;
28054 esac
28055 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28056 $as_echo "$ac_try_echo"; } >&5
28057   (eval "$ac_compile") 2>&5
28058   ac_status=$?
28059   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28060   test $ac_status = 0; }; then :
28061   for ac_file in conftest.o conftest.obj conftest.*; do
28062   test -f "$ac_file" || continue;
28063   case $ac_file in
28064     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28065     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28066        break;;
28067   esac
28068 done
28069 else
28070   $as_echo "$as_me: failed program was:" >&5
28071 sed 's/^/| /' conftest.$ac_ext >&5
28072 
28073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28074 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28075 as_fn_error $? "cannot compute suffix of object files: cannot compile
28076 See \`config.log' for more details" "$LINENO" 5; }
28077 fi
28078 rm -f conftest.$ac_cv_objext conftest.$ac_ext
28079 fi
28080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28081 $as_echo "$ac_cv_objext" >&6; }
28082 OBJEXT=$ac_cv_objext
28083 ac_objext=$OBJEXT
28084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28085 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28086 if ${ac_cv_c_compiler_gnu+:} false; then :
28087   $as_echo_n "(cached) " >&6
28088 else
28089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28090 /* end confdefs.h.  */
28091 
28092 int
28093 main ()
28094 {
28095 #ifndef __GNUC__
28096        choke me
28097 #endif
28098 
28099   ;
28100   return 0;
28101 }
28102 _ACEOF
28103 if ac_fn_c_try_compile "$LINENO"; then :
28104   ac_compiler_gnu=yes
28105 else
28106   ac_compiler_gnu=no
28107 fi
28108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28109 ac_cv_c_compiler_gnu=$ac_compiler_gnu
28110 
28111 fi
28112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28113 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
28114 if test $ac_compiler_gnu = yes; then
28115   GCC=yes
28116 else
28117   GCC=
28118 fi
28119 ac_test_CFLAGS=${CFLAGS+set}
28120 ac_save_CFLAGS=$CFLAGS
28121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28122 $as_echo_n "checking whether $CC accepts -g... " >&6; }
28123 if ${ac_cv_prog_cc_g+:} false; then :
28124   $as_echo_n "(cached) " >&6
28125 else
28126   ac_save_c_werror_flag=$ac_c_werror_flag
28127    ac_c_werror_flag=yes
28128    ac_cv_prog_cc_g=no
28129    CFLAGS="-g"
28130    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28131 /* end confdefs.h.  */
28132 
28133 int
28134 main ()
28135 {
28136 
28137   ;
28138   return 0;
28139 }
28140 _ACEOF
28141 if ac_fn_c_try_compile "$LINENO"; then :
28142   ac_cv_prog_cc_g=yes
28143 else
28144   CFLAGS=""
28145       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28146 /* end confdefs.h.  */
28147 
28148 int
28149 main ()
28150 {
28151 
28152   ;
28153   return 0;
28154 }
28155 _ACEOF
28156 if ac_fn_c_try_compile "$LINENO"; then :
28157 
28158 else
28159   ac_c_werror_flag=$ac_save_c_werror_flag
28160          CFLAGS="-g"
28161          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28162 /* end confdefs.h.  */
28163 
28164 int
28165 main ()
28166 {
28167 
28168   ;
28169   return 0;
28170 }
28171 _ACEOF
28172 if ac_fn_c_try_compile "$LINENO"; then :
28173   ac_cv_prog_cc_g=yes
28174 fi
28175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28176 fi
28177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28178 fi
28179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28180    ac_c_werror_flag=$ac_save_c_werror_flag
28181 fi
28182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28183 $as_echo "$ac_cv_prog_cc_g" >&6; }
28184 if test "$ac_test_CFLAGS" = set; then
28185   CFLAGS=$ac_save_CFLAGS
28186 elif test $ac_cv_prog_cc_g = yes; then
28187   if test "$GCC" = yes; then
28188     CFLAGS="-g -O2"
28189   else
28190     CFLAGS="-g"
28191   fi
28192 else
28193   if test "$GCC" = yes; then
28194     CFLAGS="-O2"
28195   else
28196     CFLAGS=
28197   fi
28198 fi
28199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
28200 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
28201 if ${ac_cv_prog_cc_c89+:} false; then :
28202   $as_echo_n "(cached) " >&6
28203 else
28204   ac_cv_prog_cc_c89=no
28205 ac_save_CC=$CC
28206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28207 /* end confdefs.h.  */
28208 #include <stdarg.h>
28209 #include <stdio.h>
28210 struct stat;
28211 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
28212 struct buf { int x; };
28213 FILE * (*rcsopen) (struct buf *, struct stat *, int);
28214 static char *e (p, i)
28215      char **p;
28216      int i;
28217 {
28218   return p[i];
28219 }
28220 static char *f (char * (*g) (char **, int), char **p, ...)
28221 {
28222   char *s;
28223   va_list v;
28224   va_start (v,p);
28225   s = g (p, va_arg (v,int));
28226   va_end (v);
28227   return s;
28228 }
28229 
28230 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
28231    function prototypes and stuff, but not '\xHH' hex character constants.
28232    These don't provoke an error unfortunately, instead are silently treated
28233    as 'x'.  The following induces an error, until -std is added to get
28234    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
28235    array size at least.  It's necessary to write '\x00'==0 to get something
28236    that's true only with -std.  */
28237 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
28238 
28239 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
28240    inside strings and character constants.  */
28241 #define FOO(x) 'x'
28242 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
28243 
28244 int test (int i, double x);
28245 struct s1 {int (*f) (int a);};
28246 struct s2 {int (*f) (double a);};
28247 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
28248 int argc;
28249 char **argv;
28250 int
28251 main ()
28252 {
28253 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
28254   ;
28255   return 0;
28256 }
28257 _ACEOF
28258 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
28259         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
28260 do
28261   CC="$ac_save_CC $ac_arg"
28262   if ac_fn_c_try_compile "$LINENO"; then :
28263   ac_cv_prog_cc_c89=$ac_arg
28264 fi
28265 rm -f core conftest.err conftest.$ac_objext
28266   test "x$ac_cv_prog_cc_c89" != "xno" && break
28267 done
28268 rm -f conftest.$ac_ext
28269 CC=$ac_save_CC
28270 
28271 fi
28272 # AC_CACHE_VAL
28273 case "x$ac_cv_prog_cc_c89" in
28274   x)
28275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
28276 $as_echo "none needed" >&6; } ;;
28277   xno)
28278     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
28279 $as_echo "unsupported" >&6; } ;;
28280   *)
28281     CC="$CC $ac_cv_prog_cc_c89"
28282     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
28283 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
28284 esac
28285 if test "x$ac_cv_prog_cc_c89" != xno; then :
28286 
28287 fi
28288 
28289 ac_ext=cpp
28290 ac_cpp='$CXXCPP $CPPFLAGS'
28291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28294 
28295 
28296 
28297   COMPILER_NAME=C++
28298   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
28299 
28300   if test "x$CXX" != x; then
28301     # User has supplied compiler name already, always let that override.
28302     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
28303 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
28304     if test "x`basename $CXX`" = "x$CXX"; then
28305       # A command without a complete path is provided, search $PATH.
28306 
28307       for ac_prog in $CXX
28308 do
28309   # Extract the first word of "$ac_prog", so it can be a program name with args.
28310 set dummy $ac_prog; ac_word=$2
28311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28312 $as_echo_n "checking for $ac_word... " >&6; }
28313 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28314   $as_echo_n "(cached) " >&6
28315 else
28316   case $POTENTIAL_CXX in
28317   [\\/]* | ?:[\\/]*)
28318   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28319   ;;
28320   *)
28321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28322 for as_dir in $PATH
28323 do
28324   IFS=$as_save_IFS
28325   test -z "$as_dir" && as_dir=.
28326     for ac_exec_ext in '' $ac_executable_extensions; do
28327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28328     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28330     break 2
28331   fi
28332 done
28333   done
28334 IFS=$as_save_IFS
28335 
28336   ;;
28337 esac
28338 fi
28339 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28340 if test -n "$POTENTIAL_CXX"; then
28341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28342 $as_echo "$POTENTIAL_CXX" >&6; }
28343 else
28344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28345 $as_echo "no" >&6; }
28346 fi
28347 
28348 
28349   test -n "$POTENTIAL_CXX" && break
28350 done
28351 
28352       if test "x$POTENTIAL_CXX" != x; then
28353         CXX=$POTENTIAL_CXX
28354       else
28355         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
28356       fi
28357     else
28358       # Otherwise it might already be a complete path
28359       if test ! -x "$CXX"; then
28360         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
28361       fi
28362     fi
28363   else
28364     # No user supplied value. Locate compiler ourselves.
28365 
28366     # If we are cross compiling, assume cross compilation tools follows the
28367     # cross compilation standard where they are prefixed with the autoconf
28368     # standard name for the target. For example the binary
28369     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28370     # If we are not cross compiling, then the default compiler name will be
28371     # used.
28372 
28373     CXX=
28374     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28375     # before checking the rest of the PATH.
28376     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28377     # step, this should not be necessary.
28378     if test -n "$TOOLCHAIN_PATH"; then
28379       PATH_save="$PATH"
28380       PATH="$TOOLCHAIN_PATH"
28381       for ac_prog in $SEARCH_LIST
28382 do
28383   # Extract the first word of "$ac_prog", so it can be a program name with args.
28384 set dummy $ac_prog; ac_word=$2
28385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28386 $as_echo_n "checking for $ac_word... " >&6; }
28387 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
28388   $as_echo_n "(cached) " >&6
28389 else
28390   case $TOOLCHAIN_PATH_CXX in
28391   [\\/]* | ?:[\\/]*)
28392   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
28393   ;;
28394   *)
28395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28396 for as_dir in $PATH
28397 do
28398   IFS=$as_save_IFS
28399   test -z "$as_dir" && as_dir=.
28400     for ac_exec_ext in '' $ac_executable_extensions; do
28401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28402     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
28403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28404     break 2
28405   fi
28406 done
28407   done
28408 IFS=$as_save_IFS
28409 
28410   ;;
28411 esac
28412 fi
28413 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
28414 if test -n "$TOOLCHAIN_PATH_CXX"; then
28415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
28416 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
28417 else
28418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28419 $as_echo "no" >&6; }
28420 fi
28421 
28422 
28423   test -n "$TOOLCHAIN_PATH_CXX" && break
28424 done
28425 
28426       CXX=$TOOLCHAIN_PATH_CXX
28427       PATH="$PATH_save"
28428     fi
28429 
28430     # AC_PATH_PROGS can't be run multiple times with the same variable,
28431     # so create a new name for this run.
28432     if test "x$CXX" = x; then
28433       for ac_prog in $TOOLCHAIN_CXX_BINARY
28434 do
28435   # Extract the first word of "$ac_prog", so it can be a program name with args.
28436 set dummy $ac_prog; ac_word=$2
28437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28438 $as_echo_n "checking for $ac_word... " >&6; }
28439 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
28440   $as_echo_n "(cached) " >&6
28441 else
28442   case $POTENTIAL_CXX in
28443   [\\/]* | ?:[\\/]*)
28444   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
28445   ;;
28446   *)
28447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28448 for as_dir in $PATH
28449 do
28450   IFS=$as_save_IFS
28451   test -z "$as_dir" && as_dir=.
28452     for ac_exec_ext in '' $ac_executable_extensions; do
28453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28454     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
28455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28456     break 2
28457   fi
28458 done
28459   done
28460 IFS=$as_save_IFS
28461 
28462   ;;
28463 esac
28464 fi
28465 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
28466 if test -n "$POTENTIAL_CXX"; then
28467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
28468 $as_echo "$POTENTIAL_CXX" >&6; }
28469 else
28470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28471 $as_echo "no" >&6; }
28472 fi
28473 
28474 
28475   test -n "$POTENTIAL_CXX" && break
28476 done
28477 
28478       CXX=$POTENTIAL_CXX
28479     fi
28480 
28481     if test "x$CXX" = x; then
28482 
28483   # Print a helpful message on how to acquire the necessary build dependency.
28484   # devkit is the help tag: freetype, cups, pulse, alsa etc
28485   MISSING_DEPENDENCY=devkit
28486 
28487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488     cygwin_help $MISSING_DEPENDENCY
28489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28490     msys_help $MISSING_DEPENDENCY
28491   else
28492     PKGHANDLER_COMMAND=
28493 
28494     case $PKGHANDLER in
28495       apt-get)
28496         apt_help     $MISSING_DEPENDENCY ;;
28497       yum)
28498         yum_help     $MISSING_DEPENDENCY ;;
28499       port)
28500         port_help    $MISSING_DEPENDENCY ;;
28501       pkgutil)
28502         pkgutil_help $MISSING_DEPENDENCY ;;
28503       pkgadd)
28504         pkgadd_help  $MISSING_DEPENDENCY ;;
28505     esac
28506 
28507     if test "x$PKGHANDLER_COMMAND" != x; then
28508       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28509     fi
28510   fi
28511 
28512       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28513     fi
28514   fi
28515 
28516   # Now we have a compiler binary in CXX. Make sure it's okay.
28517 
28518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28519 
28520   # First separate the path from the arguments. This will split at the first
28521   # space.
28522   complete="$CXX"
28523   path="${complete%% *}"
28524   tmp="$complete EOL"
28525   arguments="${tmp#* }"
28526 
28527   # Input might be given as Windows format, start by converting to
28528   # unix format.
28529   new_path=`$CYGPATH -u "$path"`
28530 
28531   # Now try to locate executable using which
28532   new_path=`$WHICH "$new_path" 2> /dev/null`
28533   # bat and cmd files are not always considered executable in cygwin causing which
28534   # to not find them
28535   if test "x$new_path" = x \
28536       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28537       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28538     new_path=`$CYGPATH -u "$path"`
28539   fi
28540   if test "x$new_path" = x; then
28541     # Oops. Which didn't find the executable.
28542     # The splitting of arguments from the executable at a space might have been incorrect,
28543     # since paths with space are more likely in Windows. Give it another try with the whole
28544     # argument.
28545     path="$complete"
28546     arguments="EOL"
28547     new_path=`$CYGPATH -u "$path"`
28548     new_path=`$WHICH "$new_path" 2> /dev/null`
28549     # bat and cmd files are not always considered executable in cygwin causing which
28550     # to not find them
28551     if test "x$new_path" = x \
28552         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28553         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28554       new_path=`$CYGPATH -u "$path"`
28555     fi
28556     if test "x$new_path" = x; then
28557       # It's still not found. Now this is an unrecoverable error.
28558       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28559 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28560       has_space=`$ECHO "$complete" | $GREP " "`
28561       if test "x$has_space" != x; then
28562         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28563 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28564       fi
28565       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28566     fi
28567   fi
28568 
28569   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28570   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28571   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28572   # "foo.exe" is OK but "foo" is an error.
28573   #
28574   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28575   # It is also a way to make sure we got the proper file name for the real test later on.
28576   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28577   if test "x$test_shortpath" = x; then
28578     # Short path failed, file does not exist as specified.
28579     # Try adding .exe or .cmd
28580     if test -f "${new_path}.exe"; then
28581       input_to_shortpath="${new_path}.exe"
28582     elif test -f "${new_path}.cmd"; then
28583       input_to_shortpath="${new_path}.cmd"
28584     else
28585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
28586 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
28587       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28588 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28589       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28590     fi
28591   else
28592     input_to_shortpath="$new_path"
28593   fi
28594 
28595   # Call helper function which possibly converts this using DOS-style short mode.
28596   # If so, the updated path is stored in $new_path.
28597   new_path="$input_to_shortpath"
28598 
28599   input_path="$input_to_shortpath"
28600   # Check if we need to convert this using DOS-style short mode. If the path
28601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28602   # take no chances and rewrite it.
28603   # Note: m4 eats our [], so we need to use [ and ] instead.
28604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28605   if test "x$has_forbidden_chars" != x; then
28606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28607     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28608     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28609     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28610       # Going to short mode and back again did indeed matter. Since short mode is
28611       # case insensitive, let's make it lowercase to improve readability.
28612       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28613       # Now convert it back to Unix-style (cygpath)
28614       input_path=`$CYGPATH -u "$shortmode_path"`
28615       new_path="$input_path"
28616     fi
28617   fi
28618 
28619   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28620   if test "x$test_cygdrive_prefix" = x; then
28621     # As a simple fix, exclude /usr/bin since it's not a real path.
28622     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28623       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28624       # a path prefixed by /cygdrive for fixpath to work.
28625       new_path="$CYGWIN_ROOT_PATH$input_path"
28626     fi
28627   fi
28628 
28629   # remove trailing .exe if any
28630   new_path="${new_path/%.exe/}"
28631 
28632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28633 
28634   # First separate the path from the arguments. This will split at the first
28635   # space.
28636   complete="$CXX"
28637   path="${complete%% *}"
28638   tmp="$complete EOL"
28639   arguments="${tmp#* }"
28640 
28641   # Input might be given as Windows format, start by converting to
28642   # unix format.
28643   new_path="$path"
28644 
28645   windows_path="$new_path"
28646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28647     unix_path=`$CYGPATH -u "$windows_path"`
28648     new_path="$unix_path"
28649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28651     new_path="$unix_path"
28652   fi
28653 
28654 
28655   # Now try to locate executable using which
28656   new_path=`$WHICH "$new_path" 2> /dev/null`
28657 
28658   if test "x$new_path" = x; then
28659     # Oops. Which didn't find the executable.
28660     # The splitting of arguments from the executable at a space might have been incorrect,
28661     # since paths with space are more likely in Windows. Give it another try with the whole
28662     # argument.
28663     path="$complete"
28664     arguments="EOL"
28665     new_path="$path"
28666 
28667   windows_path="$new_path"
28668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28669     unix_path=`$CYGPATH -u "$windows_path"`
28670     new_path="$unix_path"
28671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28673     new_path="$unix_path"
28674   fi
28675 
28676 
28677     new_path=`$WHICH "$new_path" 2> /dev/null`
28678     # bat and cmd files are not always considered executable in MSYS causing which
28679     # to not find them
28680     if test "x$new_path" = x \
28681         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28682         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28683       new_path="$path"
28684 
28685   windows_path="$new_path"
28686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28687     unix_path=`$CYGPATH -u "$windows_path"`
28688     new_path="$unix_path"
28689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28691     new_path="$unix_path"
28692   fi
28693 
28694     fi
28695 
28696     if test "x$new_path" = x; then
28697       # It's still not found. Now this is an unrecoverable error.
28698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28699 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28700       has_space=`$ECHO "$complete" | $GREP " "`
28701       if test "x$has_space" != x; then
28702         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28703 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28704       fi
28705       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28706     fi
28707   fi
28708 
28709   # Now new_path has a complete unix path to the binary
28710   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28711     # Keep paths in /bin as-is, but remove trailing .exe if any
28712     new_path="${new_path/%.exe/}"
28713     # Do not save /bin paths to all_fixpath_prefixes!
28714   else
28715     # Not in mixed or Windows style, start by that.
28716     new_path=`cmd //c echo $new_path`
28717 
28718   input_path="$new_path"
28719   # Check if we need to convert this using DOS-style short mode. If the path
28720   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28721   # take no chances and rewrite it.
28722   # Note: m4 eats our [], so we need to use [ and ] instead.
28723   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28724   if test "x$has_forbidden_chars" != x; then
28725     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28726     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28727   fi
28728 
28729     # Output is in $new_path
28730 
28731   windows_path="$new_path"
28732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28733     unix_path=`$CYGPATH -u "$windows_path"`
28734     new_path="$unix_path"
28735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28737     new_path="$unix_path"
28738   fi
28739 
28740     # remove trailing .exe if any
28741     new_path="${new_path/%.exe/}"
28742 
28743     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28744     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28745   fi
28746 
28747   else
28748     # We're on a posix platform. Hooray! :)
28749     # First separate the path from the arguments. This will split at the first
28750     # space.
28751     complete="$CXX"
28752     path="${complete%% *}"
28753     tmp="$complete EOL"
28754     arguments="${tmp#* }"
28755 
28756     # Cannot rely on the command "which" here since it doesn't always work.
28757     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28758     if test -z "$is_absolute_path"; then
28759       # Path to executable is not absolute. Find it.
28760       IFS_save="$IFS"
28761       IFS=:
28762       for p in $PATH; do
28763         if test -f "$p/$path" && test -x "$p/$path"; then
28764           new_path="$p/$path"
28765           break
28766         fi
28767       done
28768       IFS="$IFS_save"
28769     else
28770       # This is an absolute path, we can use it without further modifications.
28771       new_path="$path"
28772     fi
28773 
28774     if test "x$new_path" = x; then
28775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
28776 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
28777       has_space=`$ECHO "$complete" | $GREP " "`
28778       if test "x$has_space" != x; then
28779         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28780 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28781       fi
28782       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
28783     fi
28784   fi
28785 
28786   # Now join together the path and the arguments once again
28787   if test "x$arguments" != xEOL; then
28788     new_complete="$new_path ${arguments% *}"
28789   else
28790     new_complete="$new_path"
28791   fi
28792 
28793   if test "x$complete" != "x$new_complete"; then
28794     CXX="$new_complete"
28795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
28796 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
28797   fi
28798 
28799   TEST_COMPILER="$CXX"
28800   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28801   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28802   if test "x$OPENJDK_BUILD_OS" != xaix; then
28803     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
28805 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
28806 
28807   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28808     # Follow a chain of symbolic links. Use readlink
28809     # where it exists, else fall back to horribly
28810     # complicated shell code.
28811     if test "x$READLINK_TESTED" != yes; then
28812       # On MacOSX there is a readlink tool with a different
28813       # purpose than the GNU readlink tool. Check the found readlink.
28814       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28815       if test "x$ISGNU" = x; then
28816         # A readlink that we do not know how to use.
28817         # Are there other non-GNU readlinks out there?
28818         READLINK_TESTED=yes
28819         READLINK=
28820       fi
28821     fi
28822 
28823     if test "x$READLINK" != x; then
28824       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28825     else
28826       # Save the current directory for restoring afterwards
28827       STARTDIR=$PWD
28828       COUNTER=0
28829       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28830       sym_link_file=`$BASENAME $TEST_COMPILER`
28831       cd $sym_link_dir
28832       # Use -P flag to resolve symlinks in directories.
28833       cd `$THEPWDCMD -P`
28834       sym_link_dir=`$THEPWDCMD -P`
28835       # Resolve file symlinks
28836       while test $COUNTER -lt 20; do
28837         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28838         if test "x$ISLINK" == x; then
28839           # This is not a symbolic link! We are done!
28840           break
28841         fi
28842         # Again resolve directory symlinks since the target of the just found
28843         # link could be in a different directory
28844         cd `$DIRNAME $ISLINK`
28845         sym_link_dir=`$THEPWDCMD -P`
28846         sym_link_file=`$BASENAME $ISLINK`
28847         let COUNTER=COUNTER+1
28848       done
28849       cd $STARTDIR
28850       TEST_COMPILER=$sym_link_dir/$sym_link_file
28851     fi
28852   fi
28853 
28854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28855 $as_echo "$TEST_COMPILER" >&6; }
28856   fi
28857   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
28858 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
28859 
28860   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28861   if test "x$COMPILER_BASENAME" = "xccache"; then
28862     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28863 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28864     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28865     # We want to control ccache invocation ourselves, so ignore this cc and try
28866     # searching again.
28867 
28868     # Remove the path to the fake ccache cc from the PATH
28869     RETRY_COMPILER_SAVED_PATH="$PATH"
28870     COMPILER_DIRNAME=`$DIRNAME $CXX`
28871     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28872 
28873     # Try again looking for our compiler
28874     if test -n "$ac_tool_prefix"; then
28875   for ac_prog in $TOOLCHAIN_CXX_BINARY
28876   do
28877     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28878 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28880 $as_echo_n "checking for $ac_word... " >&6; }
28881 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
28882   $as_echo_n "(cached) " >&6
28883 else
28884   if test -n "$PROPER_COMPILER_CXX"; then
28885   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
28886 else
28887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28888 for as_dir in $PATH
28889 do
28890   IFS=$as_save_IFS
28891   test -z "$as_dir" && as_dir=.
28892     for ac_exec_ext in '' $ac_executable_extensions; do
28893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28894     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
28895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28896     break 2
28897   fi
28898 done
28899   done
28900 IFS=$as_save_IFS
28901 
28902 fi
28903 fi
28904 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
28905 if test -n "$PROPER_COMPILER_CXX"; then
28906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
28907 $as_echo "$PROPER_COMPILER_CXX" >&6; }
28908 else
28909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28910 $as_echo "no" >&6; }
28911 fi
28912 
28913 
28914     test -n "$PROPER_COMPILER_CXX" && break
28915   done
28916 fi
28917 if test -z "$PROPER_COMPILER_CXX"; then
28918   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
28919   for ac_prog in $TOOLCHAIN_CXX_BINARY
28920 do
28921   # Extract the first word of "$ac_prog", so it can be a program name with args.
28922 set dummy $ac_prog; ac_word=$2
28923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28924 $as_echo_n "checking for $ac_word... " >&6; }
28925 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
28926   $as_echo_n "(cached) " >&6
28927 else
28928   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
28929   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
28930 else
28931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28932 for as_dir in $PATH
28933 do
28934   IFS=$as_save_IFS
28935   test -z "$as_dir" && as_dir=.
28936     for ac_exec_ext in '' $ac_executable_extensions; do
28937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28938     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
28939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28940     break 2
28941   fi
28942 done
28943   done
28944 IFS=$as_save_IFS
28945 
28946 fi
28947 fi
28948 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
28949 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
28950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
28951 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
28952 else
28953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28954 $as_echo "no" >&6; }
28955 fi
28956 
28957 
28958   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
28959 done
28960 
28961   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
28962     PROPER_COMPILER_CXX=""
28963   else
28964     case $cross_compiling:$ac_tool_warned in
28965 yes:)
28966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28967 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28968 ac_tool_warned=yes ;;
28969 esac
28970     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
28971   fi
28972 fi
28973 
28974 
28975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28976 
28977   # First separate the path from the arguments. This will split at the first
28978   # space.
28979   complete="$PROPER_COMPILER_CXX"
28980   path="${complete%% *}"
28981   tmp="$complete EOL"
28982   arguments="${tmp#* }"
28983 
28984   # Input might be given as Windows format, start by converting to
28985   # unix format.
28986   new_path=`$CYGPATH -u "$path"`
28987 
28988   # Now try to locate executable using which
28989   new_path=`$WHICH "$new_path" 2> /dev/null`
28990   # bat and cmd files are not always considered executable in cygwin causing which
28991   # to not find them
28992   if test "x$new_path" = x \
28993       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28994       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28995     new_path=`$CYGPATH -u "$path"`
28996   fi
28997   if test "x$new_path" = x; then
28998     # Oops. Which didn't find the executable.
28999     # The splitting of arguments from the executable at a space might have been incorrect,
29000     # since paths with space are more likely in Windows. Give it another try with the whole
29001     # argument.
29002     path="$complete"
29003     arguments="EOL"
29004     new_path=`$CYGPATH -u "$path"`
29005     new_path=`$WHICH "$new_path" 2> /dev/null`
29006     # bat and cmd files are not always considered executable in cygwin causing which
29007     # to not find them
29008     if test "x$new_path" = x \
29009         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29010         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29011       new_path=`$CYGPATH -u "$path"`
29012     fi
29013     if test "x$new_path" = x; then
29014       # It's still not found. Now this is an unrecoverable error.
29015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29016 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29017       has_space=`$ECHO "$complete" | $GREP " "`
29018       if test "x$has_space" != x; then
29019         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29020 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29021       fi
29022       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29023     fi
29024   fi
29025 
29026   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29027   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29028   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29029   # "foo.exe" is OK but "foo" is an error.
29030   #
29031   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29032   # It is also a way to make sure we got the proper file name for the real test later on.
29033   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29034   if test "x$test_shortpath" = x; then
29035     # Short path failed, file does not exist as specified.
29036     # Try adding .exe or .cmd
29037     if test -f "${new_path}.exe"; then
29038       input_to_shortpath="${new_path}.exe"
29039     elif test -f "${new_path}.cmd"; then
29040       input_to_shortpath="${new_path}.cmd"
29041     else
29042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29043 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29044       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29045 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29046       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29047     fi
29048   else
29049     input_to_shortpath="$new_path"
29050   fi
29051 
29052   # Call helper function which possibly converts this using DOS-style short mode.
29053   # If so, the updated path is stored in $new_path.
29054   new_path="$input_to_shortpath"
29055 
29056   input_path="$input_to_shortpath"
29057   # Check if we need to convert this using DOS-style short mode. If the path
29058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29059   # take no chances and rewrite it.
29060   # Note: m4 eats our [], so we need to use [ and ] instead.
29061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29062   if test "x$has_forbidden_chars" != x; then
29063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29067       # Going to short mode and back again did indeed matter. Since short mode is
29068       # case insensitive, let's make it lowercase to improve readability.
29069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29070       # Now convert it back to Unix-style (cygpath)
29071       input_path=`$CYGPATH -u "$shortmode_path"`
29072       new_path="$input_path"
29073     fi
29074   fi
29075 
29076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29077   if test "x$test_cygdrive_prefix" = x; then
29078     # As a simple fix, exclude /usr/bin since it's not a real path.
29079     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29081       # a path prefixed by /cygdrive for fixpath to work.
29082       new_path="$CYGWIN_ROOT_PATH$input_path"
29083     fi
29084   fi
29085 
29086   # remove trailing .exe if any
29087   new_path="${new_path/%.exe/}"
29088 
29089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29090 
29091   # First separate the path from the arguments. This will split at the first
29092   # space.
29093   complete="$PROPER_COMPILER_CXX"
29094   path="${complete%% *}"
29095   tmp="$complete EOL"
29096   arguments="${tmp#* }"
29097 
29098   # Input might be given as Windows format, start by converting to
29099   # unix format.
29100   new_path="$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 
29112   # Now try to locate executable using which
29113   new_path=`$WHICH "$new_path" 2> /dev/null`
29114 
29115   if test "x$new_path" = x; then
29116     # Oops. Which didn't find the executable.
29117     # The splitting of arguments from the executable at a space might have been incorrect,
29118     # since paths with space are more likely in Windows. Give it another try with the whole
29119     # argument.
29120     path="$complete"
29121     arguments="EOL"
29122     new_path="$path"
29123 
29124   windows_path="$new_path"
29125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29126     unix_path=`$CYGPATH -u "$windows_path"`
29127     new_path="$unix_path"
29128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29130     new_path="$unix_path"
29131   fi
29132 
29133 
29134     new_path=`$WHICH "$new_path" 2> /dev/null`
29135     # bat and cmd files are not always considered executable in MSYS causing which
29136     # to not find them
29137     if test "x$new_path" = x \
29138         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29139         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29140       new_path="$path"
29141 
29142   windows_path="$new_path"
29143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29144     unix_path=`$CYGPATH -u "$windows_path"`
29145     new_path="$unix_path"
29146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29148     new_path="$unix_path"
29149   fi
29150 
29151     fi
29152 
29153     if test "x$new_path" = x; then
29154       # It's still not found. Now this is an unrecoverable error.
29155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29156 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29157       has_space=`$ECHO "$complete" | $GREP " "`
29158       if test "x$has_space" != x; then
29159         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29160 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29161       fi
29162       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29163     fi
29164   fi
29165 
29166   # Now new_path has a complete unix path to the binary
29167   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29168     # Keep paths in /bin as-is, but remove trailing .exe if any
29169     new_path="${new_path/%.exe/}"
29170     # Do not save /bin paths to all_fixpath_prefixes!
29171   else
29172     # Not in mixed or Windows style, start by that.
29173     new_path=`cmd //c echo $new_path`
29174 
29175   input_path="$new_path"
29176   # Check if we need to convert this using DOS-style short mode. If the path
29177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29178   # take no chances and rewrite it.
29179   # Note: m4 eats our [], so we need to use [ and ] instead.
29180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29181   if test "x$has_forbidden_chars" != x; then
29182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29183     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29184   fi
29185 
29186     # Output is in $new_path
29187 
29188   windows_path="$new_path"
29189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29190     unix_path=`$CYGPATH -u "$windows_path"`
29191     new_path="$unix_path"
29192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29194     new_path="$unix_path"
29195   fi
29196 
29197     # remove trailing .exe if any
29198     new_path="${new_path/%.exe/}"
29199 
29200     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29201     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29202   fi
29203 
29204   else
29205     # We're on a posix platform. Hooray! :)
29206     # First separate the path from the arguments. This will split at the first
29207     # space.
29208     complete="$PROPER_COMPILER_CXX"
29209     path="${complete%% *}"
29210     tmp="$complete EOL"
29211     arguments="${tmp#* }"
29212 
29213     # Cannot rely on the command "which" here since it doesn't always work.
29214     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29215     if test -z "$is_absolute_path"; then
29216       # Path to executable is not absolute. Find it.
29217       IFS_save="$IFS"
29218       IFS=:
29219       for p in $PATH; do
29220         if test -f "$p/$path" && test -x "$p/$path"; then
29221           new_path="$p/$path"
29222           break
29223         fi
29224       done
29225       IFS="$IFS_save"
29226     else
29227       # This is an absolute path, we can use it without further modifications.
29228       new_path="$path"
29229     fi
29230 
29231     if test "x$new_path" = x; then
29232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29233 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29234       has_space=`$ECHO "$complete" | $GREP " "`
29235       if test "x$has_space" != x; then
29236         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29237 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29238       fi
29239       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29240     fi
29241   fi
29242 
29243   # Now join together the path and the arguments once again
29244   if test "x$arguments" != xEOL; then
29245     new_complete="$new_path ${arguments% *}"
29246   else
29247     new_complete="$new_path"
29248   fi
29249 
29250   if test "x$complete" != "x$new_complete"; then
29251     PROPER_COMPILER_CXX="$new_complete"
29252     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
29253 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
29254   fi
29255 
29256     PATH="$RETRY_COMPILER_SAVED_PATH"
29257 
29258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
29259 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
29260 
29261   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29262     # Follow a chain of symbolic links. Use readlink
29263     # where it exists, else fall back to horribly
29264     # complicated shell code.
29265     if test "x$READLINK_TESTED" != yes; then
29266       # On MacOSX there is a readlink tool with a different
29267       # purpose than the GNU readlink tool. Check the found readlink.
29268       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29269       if test "x$ISGNU" = x; then
29270         # A readlink that we do not know how to use.
29271         # Are there other non-GNU readlinks out there?
29272         READLINK_TESTED=yes
29273         READLINK=
29274       fi
29275     fi
29276 
29277     if test "x$READLINK" != x; then
29278       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
29279     else
29280       # Save the current directory for restoring afterwards
29281       STARTDIR=$PWD
29282       COUNTER=0
29283       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
29284       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
29285       cd $sym_link_dir
29286       # Use -P flag to resolve symlinks in directories.
29287       cd `$THEPWDCMD -P`
29288       sym_link_dir=`$THEPWDCMD -P`
29289       # Resolve file symlinks
29290       while test $COUNTER -lt 20; do
29291         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29292         if test "x$ISLINK" == x; then
29293           # This is not a symbolic link! We are done!
29294           break
29295         fi
29296         # Again resolve directory symlinks since the target of the just found
29297         # link could be in a different directory
29298         cd `$DIRNAME $ISLINK`
29299         sym_link_dir=`$THEPWDCMD -P`
29300         sym_link_file=`$BASENAME $ISLINK`
29301         let COUNTER=COUNTER+1
29302       done
29303       cd $STARTDIR
29304       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
29305     fi
29306   fi
29307 
29308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29309 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29310     CXX="$PROPER_COMPILER_CXX"
29311   else
29312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
29313 $as_echo "no, keeping CXX" >&6; }
29314     CXX="$TEST_COMPILER"
29315   fi
29316 
29317 
29318   COMPILER=$CXX
29319   COMPILER_NAME=$COMPILER_NAME
29320 
29321   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29322     # cc -V output typically looks like
29323     #     cc: Sun C 5.12 Linux_i386 2011/11/16
29324     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29325     # Check that this is likely to be the Solaris Studio cc.
29326     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29327     if test $? -ne 0; then
29328       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29329       { $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
29330 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29331       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29332 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29333       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29334 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29335       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29336     fi
29337     # Remove usage instructions (if present), and
29338     # collapse compiler output into a single line
29339     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29340         $SED -e 's/ *[Uu]sage:.*//'`
29341     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29342         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29343   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29344     # xlc -qversion output typically looks like
29345     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29346     #     Version: 11.01.0000.0015
29347     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29348     # Check that this is likely to be the IBM XL C compiler.
29349     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29350     if test $? -ne 0; then
29351       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29352       { $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
29353 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29354       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29355 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29356       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29357 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29358       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29359     fi
29360     # Collapse compiler output into a single line
29361     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29362     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29363         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29364   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29365     # There is no specific version flag, but all output starts with a version string.
29366     # First line typically looks something like:
29367     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29368     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29369     # Check that this is likely to be Microsoft CL.EXE.
29370     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29371     if test $? -ne 0; then
29372       { $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
29373 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29374       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29375 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29376       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29377     fi
29378     # Collapse compiler output into a single line
29379     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29380     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29381         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29382   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29383     # gcc --version output typically looks like
29384     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29385     #     Copyright (C) 2013 Free Software Foundation, Inc.
29386     #     This is free software; see the source for copying conditions.  There is NO
29387     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29388     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29389     # Check that this is likely to be GCC.
29390     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29391     if test $? -ne 0; then
29392       { $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
29393 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29394       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29395 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29396       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29397     fi
29398     # Remove Copyright and legalese from version string, and
29399     # collapse into a single line
29400     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29401         $SED -e 's/ *Copyright .*//'`
29402     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29403         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29404   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29405     # clang --version output typically looks like
29406     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29407     #    clang version 3.3 (tags/RELEASE_33/final)
29408     # or
29409     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29410     #    Target: x86_64-pc-linux-gnu
29411     #    Thread model: posix
29412     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29413     # Check that this is likely to be clang
29414     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29415     if test $? -ne 0; then
29416       { $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
29417 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29418       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29419 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29420       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29421     fi
29422     # Collapse compiler output into a single line
29423     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29424     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29425         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29426 
29427   else
29428       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29429   fi
29430   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29431   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29432   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29433   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
29434 
29435   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29436 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29437 
29438 
29439   # Now that we have resolved CXX ourself, let autoconf have its go at it
29440   ac_ext=cpp
29441 ac_cpp='$CXXCPP $CPPFLAGS'
29442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29445 if test -z "$CXX"; then
29446   if test -n "$CCC"; then
29447     CXX=$CCC
29448   else
29449     if test -n "$ac_tool_prefix"; then
29450   for ac_prog in $CXX
29451   do
29452     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29453 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29455 $as_echo_n "checking for $ac_word... " >&6; }
29456 if ${ac_cv_prog_CXX+:} false; then :
29457   $as_echo_n "(cached) " >&6
29458 else
29459   if test -n "$CXX"; then
29460   ac_cv_prog_CXX="$CXX" # Let the user override the test.
29461 else
29462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29463 for as_dir in $PATH
29464 do
29465   IFS=$as_save_IFS
29466   test -z "$as_dir" && as_dir=.
29467     for ac_exec_ext in '' $ac_executable_extensions; do
29468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29469     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
29470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29471     break 2
29472   fi
29473 done
29474   done
29475 IFS=$as_save_IFS
29476 
29477 fi
29478 fi
29479 CXX=$ac_cv_prog_CXX
29480 if test -n "$CXX"; then
29481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
29482 $as_echo "$CXX" >&6; }
29483 else
29484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29485 $as_echo "no" >&6; }
29486 fi
29487 
29488 
29489     test -n "$CXX" && break
29490   done
29491 fi
29492 if test -z "$CXX"; then
29493   ac_ct_CXX=$CXX
29494   for ac_prog in $CXX
29495 do
29496   # Extract the first word of "$ac_prog", so it can be a program name with args.
29497 set dummy $ac_prog; ac_word=$2
29498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29499 $as_echo_n "checking for $ac_word... " >&6; }
29500 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
29501   $as_echo_n "(cached) " >&6
29502 else
29503   if test -n "$ac_ct_CXX"; then
29504   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
29505 else
29506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29507 for as_dir in $PATH
29508 do
29509   IFS=$as_save_IFS
29510   test -z "$as_dir" && as_dir=.
29511     for ac_exec_ext in '' $ac_executable_extensions; do
29512   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29513     ac_cv_prog_ac_ct_CXX="$ac_prog"
29514     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29515     break 2
29516   fi
29517 done
29518   done
29519 IFS=$as_save_IFS
29520 
29521 fi
29522 fi
29523 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
29524 if test -n "$ac_ct_CXX"; then
29525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
29526 $as_echo "$ac_ct_CXX" >&6; }
29527 else
29528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29529 $as_echo "no" >&6; }
29530 fi
29531 
29532 
29533   test -n "$ac_ct_CXX" && break
29534 done
29535 
29536   if test "x$ac_ct_CXX" = x; then
29537     CXX="g++"
29538   else
29539     case $cross_compiling:$ac_tool_warned in
29540 yes:)
29541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29542 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29543 ac_tool_warned=yes ;;
29544 esac
29545     CXX=$ac_ct_CXX
29546   fi
29547 fi
29548 
29549   fi
29550 fi
29551 # Provide some information about the compiler.
29552 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
29553 set X $ac_compile
29554 ac_compiler=$2
29555 for ac_option in --version -v -V -qversion; do
29556   { { ac_try="$ac_compiler $ac_option >&5"
29557 case "(($ac_try" in
29558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29559   *) ac_try_echo=$ac_try;;
29560 esac
29561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29562 $as_echo "$ac_try_echo"; } >&5
29563   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29564   ac_status=$?
29565   if test -s conftest.err; then
29566     sed '10a\
29567 ... rest of stderr output deleted ...
29568          10q' conftest.err >conftest.er1
29569     cat conftest.er1 >&5
29570   fi
29571   rm -f conftest.er1 conftest.err
29572   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29573   test $ac_status = 0; }
29574 done
29575 
29576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
29577 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
29578 if ${ac_cv_cxx_compiler_gnu+:} false; then :
29579   $as_echo_n "(cached) " >&6
29580 else
29581   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29582 /* end confdefs.h.  */
29583 
29584 int
29585 main ()
29586 {
29587 #ifndef __GNUC__
29588        choke me
29589 #endif
29590 
29591   ;
29592   return 0;
29593 }
29594 _ACEOF
29595 if ac_fn_cxx_try_compile "$LINENO"; then :
29596   ac_compiler_gnu=yes
29597 else
29598   ac_compiler_gnu=no
29599 fi
29600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29601 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
29602 
29603 fi
29604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
29605 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
29606 if test $ac_compiler_gnu = yes; then
29607   GXX=yes
29608 else
29609   GXX=
29610 fi
29611 ac_test_CXXFLAGS=${CXXFLAGS+set}
29612 ac_save_CXXFLAGS=$CXXFLAGS
29613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
29614 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
29615 if ${ac_cv_prog_cxx_g+:} false; then :
29616   $as_echo_n "(cached) " >&6
29617 else
29618   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
29619    ac_cxx_werror_flag=yes
29620    ac_cv_prog_cxx_g=no
29621    CXXFLAGS="-g"
29622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29623 /* end confdefs.h.  */
29624 
29625 int
29626 main ()
29627 {
29628 
29629   ;
29630   return 0;
29631 }
29632 _ACEOF
29633 if ac_fn_cxx_try_compile "$LINENO"; then :
29634   ac_cv_prog_cxx_g=yes
29635 else
29636   CXXFLAGS=""
29637       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29638 /* end confdefs.h.  */
29639 
29640 int
29641 main ()
29642 {
29643 
29644   ;
29645   return 0;
29646 }
29647 _ACEOF
29648 if ac_fn_cxx_try_compile "$LINENO"; then :
29649 
29650 else
29651   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29652          CXXFLAGS="-g"
29653          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29654 /* end confdefs.h.  */
29655 
29656 int
29657 main ()
29658 {
29659 
29660   ;
29661   return 0;
29662 }
29663 _ACEOF
29664 if ac_fn_cxx_try_compile "$LINENO"; then :
29665   ac_cv_prog_cxx_g=yes
29666 fi
29667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29668 fi
29669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29670 fi
29671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29672    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
29673 fi
29674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
29675 $as_echo "$ac_cv_prog_cxx_g" >&6; }
29676 if test "$ac_test_CXXFLAGS" = set; then
29677   CXXFLAGS=$ac_save_CXXFLAGS
29678 elif test $ac_cv_prog_cxx_g = yes; then
29679   if test "$GXX" = yes; then
29680     CXXFLAGS="-g -O2"
29681   else
29682     CXXFLAGS="-g"
29683   fi
29684 else
29685   if test "$GXX" = yes; then
29686     CXXFLAGS="-O2"
29687   else
29688     CXXFLAGS=
29689   fi
29690 fi
29691 ac_ext=cpp
29692 ac_cpp='$CXXCPP $CPPFLAGS'
29693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29694 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29696 
29697 
29698   # This is the compiler version number on the form X.Y[.Z]
29699 
29700 
29701 
29702 
29703   if test "x$CC_VERSION" != "x$CXX_VERSION"; then
29704     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
29705 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
29706     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
29707 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
29708   fi
29709 
29710   # We only check CC_VERSION since we assume CXX_VERSION is equal.
29711   if  [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
29712     { $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
29713 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
29714   fi
29715 
29716   if  [[  "$CC_VERSION" =~ [0-9]{6} ]] ; then
29717     { $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
29718 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
29719   fi
29720 
29721   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
29722 
29723 
29724   #
29725   # Setup the preprocessor (CPP and CXXCPP)
29726   #
29727   ac_ext=c
29728 ac_cpp='$CPP $CPPFLAGS'
29729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
29733 $as_echo_n "checking how to run the C preprocessor... " >&6; }
29734 # On Suns, sometimes $CPP names a directory.
29735 if test -n "$CPP" && test -d "$CPP"; then
29736   CPP=
29737 fi
29738 if test -z "$CPP"; then
29739   if ${ac_cv_prog_CPP+:} false; then :
29740   $as_echo_n "(cached) " >&6
29741 else
29742       # Double quotes because CPP needs to be expanded
29743     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
29744     do
29745       ac_preproc_ok=false
29746 for ac_c_preproc_warn_flag in '' yes
29747 do
29748   # Use a header file that comes with gcc, so configuring glibc
29749   # with a fresh cross-compiler works.
29750   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29751   # <limits.h> exists even on freestanding compilers.
29752   # On the NeXT, cc -E runs the code through the compiler's parser,
29753   # not just through cpp. "Syntax error" is here to catch this case.
29754   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29755 /* end confdefs.h.  */
29756 #ifdef __STDC__
29757 # include <limits.h>
29758 #else
29759 # include <assert.h>
29760 #endif
29761                      Syntax error
29762 _ACEOF
29763 if ac_fn_c_try_cpp "$LINENO"; then :
29764 
29765 else
29766   # Broken: fails on valid input.
29767 continue
29768 fi
29769 rm -f conftest.err conftest.i conftest.$ac_ext
29770 
29771   # OK, works on sane cases.  Now check whether nonexistent headers
29772   # can be detected and how.
29773   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29774 /* end confdefs.h.  */
29775 #include <ac_nonexistent.h>
29776 _ACEOF
29777 if ac_fn_c_try_cpp "$LINENO"; then :
29778   # Broken: success on invalid input.
29779 continue
29780 else
29781   # Passes both tests.
29782 ac_preproc_ok=:
29783 break
29784 fi
29785 rm -f conftest.err conftest.i conftest.$ac_ext
29786 
29787 done
29788 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
29789 rm -f conftest.i conftest.err conftest.$ac_ext
29790 if $ac_preproc_ok; then :
29791   break
29792 fi
29793 
29794     done
29795     ac_cv_prog_CPP=$CPP
29796 
29797 fi
29798   CPP=$ac_cv_prog_CPP
29799 else
29800   ac_cv_prog_CPP=$CPP
29801 fi
29802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
29803 $as_echo "$CPP" >&6; }
29804 ac_preproc_ok=false
29805 for ac_c_preproc_warn_flag in '' yes
29806 do
29807   # Use a header file that comes with gcc, so configuring glibc
29808   # with a fresh cross-compiler works.
29809   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29810   # <limits.h> exists even on freestanding compilers.
29811   # On the NeXT, cc -E runs the code through the compiler's parser,
29812   # not just through cpp. "Syntax error" is here to catch this case.
29813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29814 /* end confdefs.h.  */
29815 #ifdef __STDC__
29816 # include <limits.h>
29817 #else
29818 # include <assert.h>
29819 #endif
29820                      Syntax error
29821 _ACEOF
29822 if ac_fn_c_try_cpp "$LINENO"; then :
29823 
29824 else
29825   # Broken: fails on valid input.
29826 continue
29827 fi
29828 rm -f conftest.err conftest.i conftest.$ac_ext
29829 
29830   # OK, works on sane cases.  Now check whether nonexistent headers
29831   # can be detected and how.
29832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29833 /* end confdefs.h.  */
29834 #include <ac_nonexistent.h>
29835 _ACEOF
29836 if ac_fn_c_try_cpp "$LINENO"; then :
29837   # Broken: success on invalid input.
29838 continue
29839 else
29840   # Passes both tests.
29841 ac_preproc_ok=:
29842 break
29843 fi
29844 rm -f conftest.err conftest.i conftest.$ac_ext
29845 
29846 done
29847 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
29848 rm -f conftest.i conftest.err conftest.$ac_ext
29849 if $ac_preproc_ok; then :
29850 
29851 else
29852   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29853 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29854 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
29855 See \`config.log' for more details" "$LINENO" 5; }
29856 fi
29857 
29858 ac_ext=cpp
29859 ac_cpp='$CXXCPP $CPPFLAGS'
29860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29863 
29864 
29865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866 
29867   # First separate the path from the arguments. This will split at the first
29868   # space.
29869   complete="$CPP"
29870   path="${complete%% *}"
29871   tmp="$complete EOL"
29872   arguments="${tmp#* }"
29873 
29874   # Input might be given as Windows format, start by converting to
29875   # unix format.
29876   new_path=`$CYGPATH -u "$path"`
29877 
29878   # Now try to locate executable using which
29879   new_path=`$WHICH "$new_path" 2> /dev/null`
29880   # bat and cmd files are not always considered executable in cygwin causing which
29881   # to not find them
29882   if test "x$new_path" = x \
29883       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29884       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29885     new_path=`$CYGPATH -u "$path"`
29886   fi
29887   if test "x$new_path" = x; then
29888     # Oops. Which didn't find the executable.
29889     # The splitting of arguments from the executable at a space might have been incorrect,
29890     # since paths with space are more likely in Windows. Give it another try with the whole
29891     # argument.
29892     path="$complete"
29893     arguments="EOL"
29894     new_path=`$CYGPATH -u "$path"`
29895     new_path=`$WHICH "$new_path" 2> /dev/null`
29896     # bat and cmd files are not always considered executable in cygwin causing which
29897     # to not find them
29898     if test "x$new_path" = x \
29899         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29900         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29901       new_path=`$CYGPATH -u "$path"`
29902     fi
29903     if test "x$new_path" = x; then
29904       # It's still not found. Now this is an unrecoverable error.
29905       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
29906 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
29907       has_space=`$ECHO "$complete" | $GREP " "`
29908       if test "x$has_space" != x; then
29909         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29910 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29911       fi
29912       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
29913     fi
29914   fi
29915 
29916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29919   # "foo.exe" is OK but "foo" is an error.
29920   #
29921   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29922   # It is also a way to make sure we got the proper file name for the real test later on.
29923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29924   if test "x$test_shortpath" = x; then
29925     # Short path failed, file does not exist as specified.
29926     # Try adding .exe or .cmd
29927     if test -f "${new_path}.exe"; then
29928       input_to_shortpath="${new_path}.exe"
29929     elif test -f "${new_path}.cmd"; then
29930       input_to_shortpath="${new_path}.cmd"
29931     else
29932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
29933 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
29934       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29935 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29936       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
29937     fi
29938   else
29939     input_to_shortpath="$new_path"
29940   fi
29941 
29942   # Call helper function which possibly converts this using DOS-style short mode.
29943   # If so, the updated path is stored in $new_path.
29944   new_path="$input_to_shortpath"
29945 
29946   input_path="$input_to_shortpath"
29947   # Check if we need to convert this using DOS-style short mode. If the path
29948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29949   # take no chances and rewrite it.
29950   # Note: m4 eats our [], so we need to use [ and ] instead.
29951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29952   if test "x$has_forbidden_chars" != x; then
29953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29954     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29955     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29956     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29957       # Going to short mode and back again did indeed matter. Since short mode is
29958       # case insensitive, let's make it lowercase to improve readability.
29959       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29960       # Now convert it back to Unix-style (cygpath)
29961       input_path=`$CYGPATH -u "$shortmode_path"`
29962       new_path="$input_path"
29963     fi
29964   fi
29965 
29966   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29967   if test "x$test_cygdrive_prefix" = x; then
29968     # As a simple fix, exclude /usr/bin since it's not a real path.
29969     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29970       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29971       # a path prefixed by /cygdrive for fixpath to work.
29972       new_path="$CYGWIN_ROOT_PATH$input_path"
29973     fi
29974   fi
29975 
29976   # remove trailing .exe if any
29977   new_path="${new_path/%.exe/}"
29978 
29979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29980 
29981   # First separate the path from the arguments. This will split at the first
29982   # space.
29983   complete="$CPP"
29984   path="${complete%% *}"
29985   tmp="$complete EOL"
29986   arguments="${tmp#* }"
29987 
29988   # Input might be given as Windows format, start by converting to
29989   # unix format.
29990   new_path="$path"
29991 
29992   windows_path="$new_path"
29993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29994     unix_path=`$CYGPATH -u "$windows_path"`
29995     new_path="$unix_path"
29996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29998     new_path="$unix_path"
29999   fi
30000 
30001 
30002   # Now try to locate executable using which
30003   new_path=`$WHICH "$new_path" 2> /dev/null`
30004 
30005   if test "x$new_path" = x; then
30006     # Oops. Which didn't find the executable.
30007     # The splitting of arguments from the executable at a space might have been incorrect,
30008     # since paths with space are more likely in Windows. Give it another try with the whole
30009     # argument.
30010     path="$complete"
30011     arguments="EOL"
30012     new_path="$path"
30013 
30014   windows_path="$new_path"
30015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30016     unix_path=`$CYGPATH -u "$windows_path"`
30017     new_path="$unix_path"
30018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30020     new_path="$unix_path"
30021   fi
30022 
30023 
30024     new_path=`$WHICH "$new_path" 2> /dev/null`
30025     # bat and cmd files are not always considered executable in MSYS causing which
30026     # to not find them
30027     if test "x$new_path" = x \
30028         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30029         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30030       new_path="$path"
30031 
30032   windows_path="$new_path"
30033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30034     unix_path=`$CYGPATH -u "$windows_path"`
30035     new_path="$unix_path"
30036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30038     new_path="$unix_path"
30039   fi
30040 
30041     fi
30042 
30043     if test "x$new_path" = x; then
30044       # It's still not found. Now this is an unrecoverable error.
30045       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30046 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30047       has_space=`$ECHO "$complete" | $GREP " "`
30048       if test "x$has_space" != x; then
30049         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30050 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30051       fi
30052       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30053     fi
30054   fi
30055 
30056   # Now new_path has a complete unix path to the binary
30057   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30058     # Keep paths in /bin as-is, but remove trailing .exe if any
30059     new_path="${new_path/%.exe/}"
30060     # Do not save /bin paths to all_fixpath_prefixes!
30061   else
30062     # Not in mixed or Windows style, start by that.
30063     new_path=`cmd //c echo $new_path`
30064 
30065   input_path="$new_path"
30066   # Check if we need to convert this using DOS-style short mode. If the path
30067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30068   # take no chances and rewrite it.
30069   # Note: m4 eats our [], so we need to use [ and ] instead.
30070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30071   if test "x$has_forbidden_chars" != x; then
30072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30073     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30074   fi
30075 
30076     # Output is in $new_path
30077 
30078   windows_path="$new_path"
30079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30080     unix_path=`$CYGPATH -u "$windows_path"`
30081     new_path="$unix_path"
30082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30084     new_path="$unix_path"
30085   fi
30086 
30087     # remove trailing .exe if any
30088     new_path="${new_path/%.exe/}"
30089 
30090     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30091     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30092   fi
30093 
30094   else
30095     # We're on a posix platform. Hooray! :)
30096     # First separate the path from the arguments. This will split at the first
30097     # space.
30098     complete="$CPP"
30099     path="${complete%% *}"
30100     tmp="$complete EOL"
30101     arguments="${tmp#* }"
30102 
30103     # Cannot rely on the command "which" here since it doesn't always work.
30104     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30105     if test -z "$is_absolute_path"; then
30106       # Path to executable is not absolute. Find it.
30107       IFS_save="$IFS"
30108       IFS=:
30109       for p in $PATH; do
30110         if test -f "$p/$path" && test -x "$p/$path"; then
30111           new_path="$p/$path"
30112           break
30113         fi
30114       done
30115       IFS="$IFS_save"
30116     else
30117       # This is an absolute path, we can use it without further modifications.
30118       new_path="$path"
30119     fi
30120 
30121     if test "x$new_path" = x; then
30122       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30123 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30124       has_space=`$ECHO "$complete" | $GREP " "`
30125       if test "x$has_space" != x; then
30126         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30127 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30128       fi
30129       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30130     fi
30131   fi
30132 
30133   # Now join together the path and the arguments once again
30134   if test "x$arguments" != xEOL; then
30135     new_complete="$new_path ${arguments% *}"
30136   else
30137     new_complete="$new_path"
30138   fi
30139 
30140   if test "x$complete" != "x$new_complete"; then
30141     CPP="$new_complete"
30142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30143 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30144   fi
30145 
30146   ac_ext=cpp
30147 ac_cpp='$CXXCPP $CPPFLAGS'
30148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30152 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30153 if test -z "$CXXCPP"; then
30154   if ${ac_cv_prog_CXXCPP+:} false; then :
30155   $as_echo_n "(cached) " >&6
30156 else
30157       # Double quotes because CXXCPP needs to be expanded
30158     for CXXCPP in "$CXX -E" "/lib/cpp"
30159     do
30160       ac_preproc_ok=false
30161 for ac_cxx_preproc_warn_flag in '' yes
30162 do
30163   # Use a header file that comes with gcc, so configuring glibc
30164   # with a fresh cross-compiler works.
30165   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30166   # <limits.h> exists even on freestanding compilers.
30167   # On the NeXT, cc -E runs the code through the compiler's parser,
30168   # not just through cpp. "Syntax error" is here to catch this case.
30169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30170 /* end confdefs.h.  */
30171 #ifdef __STDC__
30172 # include <limits.h>
30173 #else
30174 # include <assert.h>
30175 #endif
30176                      Syntax error
30177 _ACEOF
30178 if ac_fn_cxx_try_cpp "$LINENO"; then :
30179 
30180 else
30181   # Broken: fails on valid input.
30182 continue
30183 fi
30184 rm -f conftest.err conftest.i conftest.$ac_ext
30185 
30186   # OK, works on sane cases.  Now check whether nonexistent headers
30187   # can be detected and how.
30188   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30189 /* end confdefs.h.  */
30190 #include <ac_nonexistent.h>
30191 _ACEOF
30192 if ac_fn_cxx_try_cpp "$LINENO"; then :
30193   # Broken: success on invalid input.
30194 continue
30195 else
30196   # Passes both tests.
30197 ac_preproc_ok=:
30198 break
30199 fi
30200 rm -f conftest.err conftest.i conftest.$ac_ext
30201 
30202 done
30203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30204 rm -f conftest.i conftest.err conftest.$ac_ext
30205 if $ac_preproc_ok; then :
30206   break
30207 fi
30208 
30209     done
30210     ac_cv_prog_CXXCPP=$CXXCPP
30211 
30212 fi
30213   CXXCPP=$ac_cv_prog_CXXCPP
30214 else
30215   ac_cv_prog_CXXCPP=$CXXCPP
30216 fi
30217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30218 $as_echo "$CXXCPP" >&6; }
30219 ac_preproc_ok=false
30220 for ac_cxx_preproc_warn_flag in '' yes
30221 do
30222   # Use a header file that comes with gcc, so configuring glibc
30223   # with a fresh cross-compiler works.
30224   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30225   # <limits.h> exists even on freestanding compilers.
30226   # On the NeXT, cc -E runs the code through the compiler's parser,
30227   # not just through cpp. "Syntax error" is here to catch this case.
30228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30229 /* end confdefs.h.  */
30230 #ifdef __STDC__
30231 # include <limits.h>
30232 #else
30233 # include <assert.h>
30234 #endif
30235                      Syntax error
30236 _ACEOF
30237 if ac_fn_cxx_try_cpp "$LINENO"; then :
30238 
30239 else
30240   # Broken: fails on valid input.
30241 continue
30242 fi
30243 rm -f conftest.err conftest.i conftest.$ac_ext
30244 
30245   # OK, works on sane cases.  Now check whether nonexistent headers
30246   # can be detected and how.
30247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30248 /* end confdefs.h.  */
30249 #include <ac_nonexistent.h>
30250 _ACEOF
30251 if ac_fn_cxx_try_cpp "$LINENO"; then :
30252   # Broken: success on invalid input.
30253 continue
30254 else
30255   # Passes both tests.
30256 ac_preproc_ok=:
30257 break
30258 fi
30259 rm -f conftest.err conftest.i conftest.$ac_ext
30260 
30261 done
30262 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30263 rm -f conftest.i conftest.err conftest.$ac_ext
30264 if $ac_preproc_ok; then :
30265 
30266 else
30267   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30268 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30269 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30270 See \`config.log' for more details" "$LINENO" 5; }
30271 fi
30272 
30273 ac_ext=cpp
30274 ac_cpp='$CXXCPP $CPPFLAGS'
30275 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30276 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30277 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30278 
30279 
30280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30281 
30282   # First separate the path from the arguments. This will split at the first
30283   # space.
30284   complete="$CXXCPP"
30285   path="${complete%% *}"
30286   tmp="$complete EOL"
30287   arguments="${tmp#* }"
30288 
30289   # Input might be given as Windows format, start by converting to
30290   # unix format.
30291   new_path=`$CYGPATH -u "$path"`
30292 
30293   # Now try to locate executable using which
30294   new_path=`$WHICH "$new_path" 2> /dev/null`
30295   # bat and cmd files are not always considered executable in cygwin causing which
30296   # to not find them
30297   if test "x$new_path" = x \
30298       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30299       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30300     new_path=`$CYGPATH -u "$path"`
30301   fi
30302   if test "x$new_path" = x; then
30303     # Oops. Which didn't find the executable.
30304     # The splitting of arguments from the executable at a space might have been incorrect,
30305     # since paths with space are more likely in Windows. Give it another try with the whole
30306     # argument.
30307     path="$complete"
30308     arguments="EOL"
30309     new_path=`$CYGPATH -u "$path"`
30310     new_path=`$WHICH "$new_path" 2> /dev/null`
30311     # bat and cmd files are not always considered executable in cygwin causing which
30312     # to not find them
30313     if test "x$new_path" = x \
30314         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30315         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30316       new_path=`$CYGPATH -u "$path"`
30317     fi
30318     if test "x$new_path" = x; then
30319       # It's still not found. Now this is an unrecoverable error.
30320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30321 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30322       has_space=`$ECHO "$complete" | $GREP " "`
30323       if test "x$has_space" != x; then
30324         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30325 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30326       fi
30327       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30328     fi
30329   fi
30330 
30331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30334   # "foo.exe" is OK but "foo" is an error.
30335   #
30336   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30337   # It is also a way to make sure we got the proper file name for the real test later on.
30338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30339   if test "x$test_shortpath" = x; then
30340     # Short path failed, file does not exist as specified.
30341     # Try adding .exe or .cmd
30342     if test -f "${new_path}.exe"; then
30343       input_to_shortpath="${new_path}.exe"
30344     elif test -f "${new_path}.cmd"; then
30345       input_to_shortpath="${new_path}.cmd"
30346     else
30347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
30348 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
30349       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30350 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30351       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30352     fi
30353   else
30354     input_to_shortpath="$new_path"
30355   fi
30356 
30357   # Call helper function which possibly converts this using DOS-style short mode.
30358   # If so, the updated path is stored in $new_path.
30359   new_path="$input_to_shortpath"
30360 
30361   input_path="$input_to_shortpath"
30362   # Check if we need to convert this using DOS-style short mode. If the path
30363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30364   # take no chances and rewrite it.
30365   # Note: m4 eats our [], so we need to use [ and ] instead.
30366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30367   if test "x$has_forbidden_chars" != x; then
30368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30372       # Going to short mode and back again did indeed matter. Since short mode is
30373       # case insensitive, let's make it lowercase to improve readability.
30374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30375       # Now convert it back to Unix-style (cygpath)
30376       input_path=`$CYGPATH -u "$shortmode_path"`
30377       new_path="$input_path"
30378     fi
30379   fi
30380 
30381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30382   if test "x$test_cygdrive_prefix" = x; then
30383     # As a simple fix, exclude /usr/bin since it's not a real path.
30384     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30386       # a path prefixed by /cygdrive for fixpath to work.
30387       new_path="$CYGWIN_ROOT_PATH$input_path"
30388     fi
30389   fi
30390 
30391   # remove trailing .exe if any
30392   new_path="${new_path/%.exe/}"
30393 
30394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30395 
30396   # First separate the path from the arguments. This will split at the first
30397   # space.
30398   complete="$CXXCPP"
30399   path="${complete%% *}"
30400   tmp="$complete EOL"
30401   arguments="${tmp#* }"
30402 
30403   # Input might be given as Windows format, start by converting to
30404   # unix format.
30405   new_path="$path"
30406 
30407   windows_path="$new_path"
30408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30409     unix_path=`$CYGPATH -u "$windows_path"`
30410     new_path="$unix_path"
30411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30413     new_path="$unix_path"
30414   fi
30415 
30416 
30417   # Now try to locate executable using which
30418   new_path=`$WHICH "$new_path" 2> /dev/null`
30419 
30420   if test "x$new_path" = x; then
30421     # Oops. Which didn't find the executable.
30422     # The splitting of arguments from the executable at a space might have been incorrect,
30423     # since paths with space are more likely in Windows. Give it another try with the whole
30424     # argument.
30425     path="$complete"
30426     arguments="EOL"
30427     new_path="$path"
30428 
30429   windows_path="$new_path"
30430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30431     unix_path=`$CYGPATH -u "$windows_path"`
30432     new_path="$unix_path"
30433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30435     new_path="$unix_path"
30436   fi
30437 
30438 
30439     new_path=`$WHICH "$new_path" 2> /dev/null`
30440     # bat and cmd files are not always considered executable in MSYS causing which
30441     # to not find them
30442     if test "x$new_path" = x \
30443         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30444         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30445       new_path="$path"
30446 
30447   windows_path="$new_path"
30448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30449     unix_path=`$CYGPATH -u "$windows_path"`
30450     new_path="$unix_path"
30451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30453     new_path="$unix_path"
30454   fi
30455 
30456     fi
30457 
30458     if test "x$new_path" = x; then
30459       # It's still not found. Now this is an unrecoverable error.
30460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30461 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30462       has_space=`$ECHO "$complete" | $GREP " "`
30463       if test "x$has_space" != x; then
30464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30466       fi
30467       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30468     fi
30469   fi
30470 
30471   # Now new_path has a complete unix path to the binary
30472   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30473     # Keep paths in /bin as-is, but remove trailing .exe if any
30474     new_path="${new_path/%.exe/}"
30475     # Do not save /bin paths to all_fixpath_prefixes!
30476   else
30477     # Not in mixed or Windows style, start by that.
30478     new_path=`cmd //c echo $new_path`
30479 
30480   input_path="$new_path"
30481   # Check if we need to convert this using DOS-style short mode. If the path
30482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30483   # take no chances and rewrite it.
30484   # Note: m4 eats our [], so we need to use [ and ] instead.
30485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30486   if test "x$has_forbidden_chars" != x; then
30487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30489   fi
30490 
30491     # Output is in $new_path
30492 
30493   windows_path="$new_path"
30494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30495     unix_path=`$CYGPATH -u "$windows_path"`
30496     new_path="$unix_path"
30497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30499     new_path="$unix_path"
30500   fi
30501 
30502     # remove trailing .exe if any
30503     new_path="${new_path/%.exe/}"
30504 
30505     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30506     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30507   fi
30508 
30509   else
30510     # We're on a posix platform. Hooray! :)
30511     # First separate the path from the arguments. This will split at the first
30512     # space.
30513     complete="$CXXCPP"
30514     path="${complete%% *}"
30515     tmp="$complete EOL"
30516     arguments="${tmp#* }"
30517 
30518     # Cannot rely on the command "which" here since it doesn't always work.
30519     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30520     if test -z "$is_absolute_path"; then
30521       # Path to executable is not absolute. Find it.
30522       IFS_save="$IFS"
30523       IFS=:
30524       for p in $PATH; do
30525         if test -f "$p/$path" && test -x "$p/$path"; then
30526           new_path="$p/$path"
30527           break
30528         fi
30529       done
30530       IFS="$IFS_save"
30531     else
30532       # This is an absolute path, we can use it without further modifications.
30533       new_path="$path"
30534     fi
30535 
30536     if test "x$new_path" = x; then
30537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
30538 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
30539       has_space=`$ECHO "$complete" | $GREP " "`
30540       if test "x$has_space" != x; then
30541         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30542 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30543       fi
30544       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
30545     fi
30546   fi
30547 
30548   # Now join together the path and the arguments once again
30549   if test "x$arguments" != xEOL; then
30550     new_complete="$new_path ${arguments% *}"
30551   else
30552     new_complete="$new_path"
30553   fi
30554 
30555   if test "x$complete" != "x$new_complete"; then
30556     CXXCPP="$new_complete"
30557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
30558 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
30559   fi
30560 
30561 
30562   #
30563   # Setup the linker (LD)
30564   #
30565   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30566     # In the Microsoft toolchain we have a separate LD command "link".
30567     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
30568     # a cygwin program for something completely different.
30569     # Extract the first word of "link", so it can be a program name with args.
30570 set dummy link; ac_word=$2
30571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30572 $as_echo_n "checking for $ac_word... " >&6; }
30573 if ${ac_cv_prog_LD+:} false; then :
30574   $as_echo_n "(cached) " >&6
30575 else
30576   if test -n "$LD"; then
30577   ac_cv_prog_LD="$LD" # Let the user override the test.
30578 else
30579   ac_prog_rejected=no
30580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30581 for as_dir in $PATH
30582 do
30583   IFS=$as_save_IFS
30584   test -z "$as_dir" && as_dir=.
30585     for ac_exec_ext in '' $ac_executable_extensions; do
30586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30587     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
30588        ac_prog_rejected=yes
30589        continue
30590      fi
30591     ac_cv_prog_LD="link"
30592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30593     break 2
30594   fi
30595 done
30596   done
30597 IFS=$as_save_IFS
30598 
30599 if test $ac_prog_rejected = yes; then
30600   # We found a bogon in the path, so make sure we never use it.
30601   set dummy $ac_cv_prog_LD
30602   shift
30603   if test $# != 0; then
30604     # We chose a different compiler from the bogus one.
30605     # However, it has the same basename, so the bogon will be chosen
30606     # first if we set LD to just the basename; use the full file name.
30607     shift
30608     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
30609   fi
30610 fi
30611 fi
30612 fi
30613 LD=$ac_cv_prog_LD
30614 if test -n "$LD"; then
30615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
30616 $as_echo "$LD" >&6; }
30617 else
30618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30619 $as_echo "no" >&6; }
30620 fi
30621 
30622 
30623 
30624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30625 
30626   # First separate the path from the arguments. This will split at the first
30627   # space.
30628   complete="$LD"
30629   path="${complete%% *}"
30630   tmp="$complete EOL"
30631   arguments="${tmp#* }"
30632 
30633   # Input might be given as Windows format, start by converting to
30634   # unix format.
30635   new_path=`$CYGPATH -u "$path"`
30636 
30637   # Now try to locate executable using which
30638   new_path=`$WHICH "$new_path" 2> /dev/null`
30639   # bat and cmd files are not always considered executable in cygwin causing which
30640   # to not find them
30641   if test "x$new_path" = x \
30642       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30643       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30644     new_path=`$CYGPATH -u "$path"`
30645   fi
30646   if test "x$new_path" = x; then
30647     # Oops. Which didn't find the executable.
30648     # The splitting of arguments from the executable at a space might have been incorrect,
30649     # since paths with space are more likely in Windows. Give it another try with the whole
30650     # argument.
30651     path="$complete"
30652     arguments="EOL"
30653     new_path=`$CYGPATH -u "$path"`
30654     new_path=`$WHICH "$new_path" 2> /dev/null`
30655     # bat and cmd files are not always considered executable in cygwin causing which
30656     # to not find them
30657     if test "x$new_path" = x \
30658         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30659         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30660       new_path=`$CYGPATH -u "$path"`
30661     fi
30662     if test "x$new_path" = x; then
30663       # It's still not found. Now this is an unrecoverable error.
30664       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30665 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30666       has_space=`$ECHO "$complete" | $GREP " "`
30667       if test "x$has_space" != x; then
30668         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30669 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30670       fi
30671       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30672     fi
30673   fi
30674 
30675   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30676   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30677   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30678   # "foo.exe" is OK but "foo" is an error.
30679   #
30680   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30681   # It is also a way to make sure we got the proper file name for the real test later on.
30682   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30683   if test "x$test_shortpath" = x; then
30684     # Short path failed, file does not exist as specified.
30685     # Try adding .exe or .cmd
30686     if test -f "${new_path}.exe"; then
30687       input_to_shortpath="${new_path}.exe"
30688     elif test -f "${new_path}.cmd"; then
30689       input_to_shortpath="${new_path}.cmd"
30690     else
30691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
30692 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
30693       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30694 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30695       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30696     fi
30697   else
30698     input_to_shortpath="$new_path"
30699   fi
30700 
30701   # Call helper function which possibly converts this using DOS-style short mode.
30702   # If so, the updated path is stored in $new_path.
30703   new_path="$input_to_shortpath"
30704 
30705   input_path="$input_to_shortpath"
30706   # Check if we need to convert this using DOS-style short mode. If the path
30707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30708   # take no chances and rewrite it.
30709   # Note: m4 eats our [], so we need to use [ and ] instead.
30710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30711   if test "x$has_forbidden_chars" != x; then
30712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30716       # Going to short mode and back again did indeed matter. Since short mode is
30717       # case insensitive, let's make it lowercase to improve readability.
30718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30719       # Now convert it back to Unix-style (cygpath)
30720       input_path=`$CYGPATH -u "$shortmode_path"`
30721       new_path="$input_path"
30722     fi
30723   fi
30724 
30725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30726   if test "x$test_cygdrive_prefix" = x; then
30727     # As a simple fix, exclude /usr/bin since it's not a real path.
30728     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30730       # a path prefixed by /cygdrive for fixpath to work.
30731       new_path="$CYGWIN_ROOT_PATH$input_path"
30732     fi
30733   fi
30734 
30735   # remove trailing .exe if any
30736   new_path="${new_path/%.exe/}"
30737 
30738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30739 
30740   # First separate the path from the arguments. This will split at the first
30741   # space.
30742   complete="$LD"
30743   path="${complete%% *}"
30744   tmp="$complete EOL"
30745   arguments="${tmp#* }"
30746 
30747   # Input might be given as Windows format, start by converting to
30748   # unix format.
30749   new_path="$path"
30750 
30751   windows_path="$new_path"
30752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30753     unix_path=`$CYGPATH -u "$windows_path"`
30754     new_path="$unix_path"
30755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30757     new_path="$unix_path"
30758   fi
30759 
30760 
30761   # Now try to locate executable using which
30762   new_path=`$WHICH "$new_path" 2> /dev/null`
30763 
30764   if test "x$new_path" = x; then
30765     # Oops. Which didn't find the executable.
30766     # The splitting of arguments from the executable at a space might have been incorrect,
30767     # since paths with space are more likely in Windows. Give it another try with the whole
30768     # argument.
30769     path="$complete"
30770     arguments="EOL"
30771     new_path="$path"
30772 
30773   windows_path="$new_path"
30774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30775     unix_path=`$CYGPATH -u "$windows_path"`
30776     new_path="$unix_path"
30777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30779     new_path="$unix_path"
30780   fi
30781 
30782 
30783     new_path=`$WHICH "$new_path" 2> /dev/null`
30784     # bat and cmd files are not always considered executable in MSYS causing which
30785     # to not find them
30786     if test "x$new_path" = x \
30787         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30788         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30789       new_path="$path"
30790 
30791   windows_path="$new_path"
30792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30793     unix_path=`$CYGPATH -u "$windows_path"`
30794     new_path="$unix_path"
30795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30797     new_path="$unix_path"
30798   fi
30799 
30800     fi
30801 
30802     if test "x$new_path" = x; then
30803       # It's still not found. Now this is an unrecoverable error.
30804       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30805 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30806       has_space=`$ECHO "$complete" | $GREP " "`
30807       if test "x$has_space" != x; then
30808         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30809 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30810       fi
30811       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30812     fi
30813   fi
30814 
30815   # Now new_path has a complete unix path to the binary
30816   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30817     # Keep paths in /bin as-is, but remove trailing .exe if any
30818     new_path="${new_path/%.exe/}"
30819     # Do not save /bin paths to all_fixpath_prefixes!
30820   else
30821     # Not in mixed or Windows style, start by that.
30822     new_path=`cmd //c echo $new_path`
30823 
30824   input_path="$new_path"
30825   # Check if we need to convert this using DOS-style short mode. If the path
30826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30827   # take no chances and rewrite it.
30828   # Note: m4 eats our [], so we need to use [ and ] instead.
30829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30830   if test "x$has_forbidden_chars" != x; then
30831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30832     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30833   fi
30834 
30835     # Output is in $new_path
30836 
30837   windows_path="$new_path"
30838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30839     unix_path=`$CYGPATH -u "$windows_path"`
30840     new_path="$unix_path"
30841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30843     new_path="$unix_path"
30844   fi
30845 
30846     # remove trailing .exe if any
30847     new_path="${new_path/%.exe/}"
30848 
30849     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30850     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30851   fi
30852 
30853   else
30854     # We're on a posix platform. Hooray! :)
30855     # First separate the path from the arguments. This will split at the first
30856     # space.
30857     complete="$LD"
30858     path="${complete%% *}"
30859     tmp="$complete EOL"
30860     arguments="${tmp#* }"
30861 
30862     # Cannot rely on the command "which" here since it doesn't always work.
30863     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30864     if test -z "$is_absolute_path"; then
30865       # Path to executable is not absolute. Find it.
30866       IFS_save="$IFS"
30867       IFS=:
30868       for p in $PATH; do
30869         if test -f "$p/$path" && test -x "$p/$path"; then
30870           new_path="$p/$path"
30871           break
30872         fi
30873       done
30874       IFS="$IFS_save"
30875     else
30876       # This is an absolute path, we can use it without further modifications.
30877       new_path="$path"
30878     fi
30879 
30880     if test "x$new_path" = x; then
30881       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
30882 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
30883       has_space=`$ECHO "$complete" | $GREP " "`
30884       if test "x$has_space" != x; then
30885         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30886 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30887       fi
30888       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
30889     fi
30890   fi
30891 
30892   # Now join together the path and the arguments once again
30893   if test "x$arguments" != xEOL; then
30894     new_complete="$new_path ${arguments% *}"
30895   else
30896     new_complete="$new_path"
30897   fi
30898 
30899   if test "x$complete" != "x$new_complete"; then
30900     LD="$new_complete"
30901     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
30902 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
30903   fi
30904 
30905     # Verify that we indeed succeeded with this trick.
30906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
30907 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
30908     "$LD" --version > /dev/null
30909     if test $? -eq 0 ; then
30910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30911 $as_echo "no" >&6; }
30912       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
30913     else
30914       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30915 $as_echo "yes" >&6; }
30916     fi
30917     LDCXX="$LD"
30918   else
30919     # All other toolchains use the compiler to link.
30920     LD="$CC"
30921     LDCXX="$CXX"
30922   fi
30923 
30924   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
30925 
30926 
30927   #
30928   # Setup the assembler (AS)
30929   #
30930   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30931     # FIXME: should this really be solaris, or solstudio?
30932 
30933 
30934   # Publish this variable in the help.
30935 
30936 
30937   if test "x$AS" = x; then
30938     # The variable is not set by user, try to locate tool using the code snippet
30939     for ac_prog in as
30940 do
30941   # Extract the first word of "$ac_prog", so it can be a program name with args.
30942 set dummy $ac_prog; ac_word=$2
30943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30944 $as_echo_n "checking for $ac_word... " >&6; }
30945 if ${ac_cv_path_AS+:} false; then :
30946   $as_echo_n "(cached) " >&6
30947 else
30948   case $AS in
30949   [\\/]* | ?:[\\/]*)
30950   ac_cv_path_AS="$AS" # Let the user override the test with a path.
30951   ;;
30952   *)
30953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30954 for as_dir in $PATH
30955 do
30956   IFS=$as_save_IFS
30957   test -z "$as_dir" && as_dir=.
30958     for ac_exec_ext in '' $ac_executable_extensions; do
30959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30960     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
30961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30962     break 2
30963   fi
30964 done
30965   done
30966 IFS=$as_save_IFS
30967 
30968   ;;
30969 esac
30970 fi
30971 AS=$ac_cv_path_AS
30972 if test -n "$AS"; then
30973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
30974 $as_echo "$AS" >&6; }
30975 else
30976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30977 $as_echo "no" >&6; }
30978 fi
30979 
30980 
30981   test -n "$AS" && break
30982 done
30983 
30984   else
30985     # The variable is set, but is it from the command line or the environment?
30986 
30987     # Try to remove the string !AS! from our list.
30988     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
30989     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30990       # If it failed, the variable was not from the command line. Ignore it,
30991       # but warn the user (except for BASH, which is always set by the calling BASH).
30992       if test "xAS" != xBASH; then
30993         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
30994 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
30995       fi
30996       # Try to locate tool using the code snippet
30997       for ac_prog in as
30998 do
30999   # Extract the first word of "$ac_prog", so it can be a program name with args.
31000 set dummy $ac_prog; ac_word=$2
31001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31002 $as_echo_n "checking for $ac_word... " >&6; }
31003 if ${ac_cv_path_AS+:} false; then :
31004   $as_echo_n "(cached) " >&6
31005 else
31006   case $AS in
31007   [\\/]* | ?:[\\/]*)
31008   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31009   ;;
31010   *)
31011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31012 for as_dir in $PATH
31013 do
31014   IFS=$as_save_IFS
31015   test -z "$as_dir" && as_dir=.
31016     for ac_exec_ext in '' $ac_executable_extensions; do
31017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31018     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31020     break 2
31021   fi
31022 done
31023   done
31024 IFS=$as_save_IFS
31025 
31026   ;;
31027 esac
31028 fi
31029 AS=$ac_cv_path_AS
31030 if test -n "$AS"; then
31031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31032 $as_echo "$AS" >&6; }
31033 else
31034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31035 $as_echo "no" >&6; }
31036 fi
31037 
31038 
31039   test -n "$AS" && break
31040 done
31041 
31042     else
31043       # If it succeeded, then it was overridden by the user. We will use it
31044       # for the tool.
31045 
31046       # First remove it from the list of overridden variables, so we can test
31047       # for unknown variables in the end.
31048       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31049 
31050       # Check if the provided tool contains a complete path.
31051       tool_specified="$AS"
31052       tool_basename="${tool_specified##*/}"
31053       if test "x$tool_basename" = "x$tool_specified"; then
31054         # A command without a complete path is provided, search $PATH.
31055         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31056 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31057         # Extract the first word of "$tool_basename", so it can be a program name with args.
31058 set dummy $tool_basename; ac_word=$2
31059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31060 $as_echo_n "checking for $ac_word... " >&6; }
31061 if ${ac_cv_path_AS+:} false; then :
31062   $as_echo_n "(cached) " >&6
31063 else
31064   case $AS in
31065   [\\/]* | ?:[\\/]*)
31066   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31067   ;;
31068   *)
31069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31070 for as_dir in $PATH
31071 do
31072   IFS=$as_save_IFS
31073   test -z "$as_dir" && as_dir=.
31074     for ac_exec_ext in '' $ac_executable_extensions; do
31075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31076     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31078     break 2
31079   fi
31080 done
31081   done
31082 IFS=$as_save_IFS
31083 
31084   ;;
31085 esac
31086 fi
31087 AS=$ac_cv_path_AS
31088 if test -n "$AS"; then
31089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31090 $as_echo "$AS" >&6; }
31091 else
31092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31093 $as_echo "no" >&6; }
31094 fi
31095 
31096 
31097         if test "x$AS" = x; then
31098           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31099         fi
31100       else
31101         # Otherwise we believe it is a complete path. Use it as it is.
31102         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31103 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31104         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31105 $as_echo_n "checking for AS... " >&6; }
31106         if test ! -x "$tool_specified"; then
31107           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31108 $as_echo "not found" >&6; }
31109           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31110         fi
31111         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31112 $as_echo "$tool_specified" >&6; }
31113       fi
31114     fi
31115   fi
31116 
31117 
31118 
31119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31120 
31121   # First separate the path from the arguments. This will split at the first
31122   # space.
31123   complete="$AS"
31124   path="${complete%% *}"
31125   tmp="$complete EOL"
31126   arguments="${tmp#* }"
31127 
31128   # Input might be given as Windows format, start by converting to
31129   # unix format.
31130   new_path=`$CYGPATH -u "$path"`
31131 
31132   # Now try to locate executable using which
31133   new_path=`$WHICH "$new_path" 2> /dev/null`
31134   # bat and cmd files are not always considered executable in cygwin causing which
31135   # to not find them
31136   if test "x$new_path" = x \
31137       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31138       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31139     new_path=`$CYGPATH -u "$path"`
31140   fi
31141   if test "x$new_path" = x; then
31142     # Oops. Which didn't find the executable.
31143     # The splitting of arguments from the executable at a space might have been incorrect,
31144     # since paths with space are more likely in Windows. Give it another try with the whole
31145     # argument.
31146     path="$complete"
31147     arguments="EOL"
31148     new_path=`$CYGPATH -u "$path"`
31149     new_path=`$WHICH "$new_path" 2> /dev/null`
31150     # bat and cmd files are not always considered executable in cygwin causing which
31151     # to not find them
31152     if test "x$new_path" = x \
31153         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31154         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31155       new_path=`$CYGPATH -u "$path"`
31156     fi
31157     if test "x$new_path" = x; then
31158       # It's still not found. Now this is an unrecoverable error.
31159       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31160 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31161       has_space=`$ECHO "$complete" | $GREP " "`
31162       if test "x$has_space" != x; then
31163         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31164 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31165       fi
31166       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31167     fi
31168   fi
31169 
31170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31173   # "foo.exe" is OK but "foo" is an error.
31174   #
31175   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31176   # It is also a way to make sure we got the proper file name for the real test later on.
31177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31178   if test "x$test_shortpath" = x; then
31179     # Short path failed, file does not exist as specified.
31180     # Try adding .exe or .cmd
31181     if test -f "${new_path}.exe"; then
31182       input_to_shortpath="${new_path}.exe"
31183     elif test -f "${new_path}.cmd"; then
31184       input_to_shortpath="${new_path}.cmd"
31185     else
31186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31187 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31188       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31189 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31190       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31191     fi
31192   else
31193     input_to_shortpath="$new_path"
31194   fi
31195 
31196   # Call helper function which possibly converts this using DOS-style short mode.
31197   # If so, the updated path is stored in $new_path.
31198   new_path="$input_to_shortpath"
31199 
31200   input_path="$input_to_shortpath"
31201   # Check if we need to convert this using DOS-style short mode. If the path
31202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31203   # take no chances and rewrite it.
31204   # Note: m4 eats our [], so we need to use [ and ] instead.
31205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31206   if test "x$has_forbidden_chars" != x; then
31207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31211       # Going to short mode and back again did indeed matter. Since short mode is
31212       # case insensitive, let's make it lowercase to improve readability.
31213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31214       # Now convert it back to Unix-style (cygpath)
31215       input_path=`$CYGPATH -u "$shortmode_path"`
31216       new_path="$input_path"
31217     fi
31218   fi
31219 
31220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31221   if test "x$test_cygdrive_prefix" = x; then
31222     # As a simple fix, exclude /usr/bin since it's not a real path.
31223     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31225       # a path prefixed by /cygdrive for fixpath to work.
31226       new_path="$CYGWIN_ROOT_PATH$input_path"
31227     fi
31228   fi
31229 
31230   # remove trailing .exe if any
31231   new_path="${new_path/%.exe/}"
31232 
31233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31234 
31235   # First separate the path from the arguments. This will split at the first
31236   # space.
31237   complete="$AS"
31238   path="${complete%% *}"
31239   tmp="$complete EOL"
31240   arguments="${tmp#* }"
31241 
31242   # Input might be given as Windows format, start by converting to
31243   # unix format.
31244   new_path="$path"
31245 
31246   windows_path="$new_path"
31247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31248     unix_path=`$CYGPATH -u "$windows_path"`
31249     new_path="$unix_path"
31250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31252     new_path="$unix_path"
31253   fi
31254 
31255 
31256   # Now try to locate executable using which
31257   new_path=`$WHICH "$new_path" 2> /dev/null`
31258 
31259   if test "x$new_path" = x; then
31260     # Oops. Which didn't find the executable.
31261     # The splitting of arguments from the executable at a space might have been incorrect,
31262     # since paths with space are more likely in Windows. Give it another try with the whole
31263     # argument.
31264     path="$complete"
31265     arguments="EOL"
31266     new_path="$path"
31267 
31268   windows_path="$new_path"
31269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31270     unix_path=`$CYGPATH -u "$windows_path"`
31271     new_path="$unix_path"
31272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31274     new_path="$unix_path"
31275   fi
31276 
31277 
31278     new_path=`$WHICH "$new_path" 2> /dev/null`
31279     # bat and cmd files are not always considered executable in MSYS causing which
31280     # to not find them
31281     if test "x$new_path" = x \
31282         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31283         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31284       new_path="$path"
31285 
31286   windows_path="$new_path"
31287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31288     unix_path=`$CYGPATH -u "$windows_path"`
31289     new_path="$unix_path"
31290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31292     new_path="$unix_path"
31293   fi
31294 
31295     fi
31296 
31297     if test "x$new_path" = x; then
31298       # It's still not found. Now this is an unrecoverable error.
31299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31300 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31301       has_space=`$ECHO "$complete" | $GREP " "`
31302       if test "x$has_space" != x; then
31303         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31304 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31305       fi
31306       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31307     fi
31308   fi
31309 
31310   # Now new_path has a complete unix path to the binary
31311   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31312     # Keep paths in /bin as-is, but remove trailing .exe if any
31313     new_path="${new_path/%.exe/}"
31314     # Do not save /bin paths to all_fixpath_prefixes!
31315   else
31316     # Not in mixed or Windows style, start by that.
31317     new_path=`cmd //c echo $new_path`
31318 
31319   input_path="$new_path"
31320   # Check if we need to convert this using DOS-style short mode. If the path
31321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31322   # take no chances and rewrite it.
31323   # Note: m4 eats our [], so we need to use [ and ] instead.
31324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31325   if test "x$has_forbidden_chars" != x; then
31326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31327     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31328   fi
31329 
31330     # Output is in $new_path
31331 
31332   windows_path="$new_path"
31333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31334     unix_path=`$CYGPATH -u "$windows_path"`
31335     new_path="$unix_path"
31336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31338     new_path="$unix_path"
31339   fi
31340 
31341     # remove trailing .exe if any
31342     new_path="${new_path/%.exe/}"
31343 
31344     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31345     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31346   fi
31347 
31348   else
31349     # We're on a posix platform. Hooray! :)
31350     # First separate the path from the arguments. This will split at the first
31351     # space.
31352     complete="$AS"
31353     path="${complete%% *}"
31354     tmp="$complete EOL"
31355     arguments="${tmp#* }"
31356 
31357     # Cannot rely on the command "which" here since it doesn't always work.
31358     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31359     if test -z "$is_absolute_path"; then
31360       # Path to executable is not absolute. Find it.
31361       IFS_save="$IFS"
31362       IFS=:
31363       for p in $PATH; do
31364         if test -f "$p/$path" && test -x "$p/$path"; then
31365           new_path="$p/$path"
31366           break
31367         fi
31368       done
31369       IFS="$IFS_save"
31370     else
31371       # This is an absolute path, we can use it without further modifications.
31372       new_path="$path"
31373     fi
31374 
31375     if test "x$new_path" = x; then
31376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31377 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31378       has_space=`$ECHO "$complete" | $GREP " "`
31379       if test "x$has_space" != x; then
31380         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31381 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31382       fi
31383       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31384     fi
31385   fi
31386 
31387   # Now join together the path and the arguments once again
31388   if test "x$arguments" != xEOL; then
31389     new_complete="$new_path ${arguments% *}"
31390   else
31391     new_complete="$new_path"
31392   fi
31393 
31394   if test "x$complete" != "x$new_complete"; then
31395     AS="$new_complete"
31396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
31397 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
31398   fi
31399 
31400   else
31401     # FIXME: is this correct for microsoft?
31402     AS="$CC -c"
31403   fi
31404 
31405 
31406   #
31407   # Setup the archiver (AR)
31408   #
31409   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31410     # The corresponding ar tool is lib.exe (used to create static libraries)
31411     # Extract the first word of "lib", so it can be a program name with args.
31412 set dummy lib; ac_word=$2
31413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31414 $as_echo_n "checking for $ac_word... " >&6; }
31415 if ${ac_cv_prog_AR+:} false; then :
31416   $as_echo_n "(cached) " >&6
31417 else
31418   if test -n "$AR"; then
31419   ac_cv_prog_AR="$AR" # Let the user override the test.
31420 else
31421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31422 for as_dir in $PATH
31423 do
31424   IFS=$as_save_IFS
31425   test -z "$as_dir" && as_dir=.
31426     for ac_exec_ext in '' $ac_executable_extensions; do
31427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31428     ac_cv_prog_AR="lib"
31429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31430     break 2
31431   fi
31432 done
31433   done
31434 IFS=$as_save_IFS
31435 
31436 fi
31437 fi
31438 AR=$ac_cv_prog_AR
31439 if test -n "$AR"; then
31440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31441 $as_echo "$AR" >&6; }
31442 else
31443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31444 $as_echo "no" >&6; }
31445 fi
31446 
31447 
31448   else
31449 
31450 
31451   # Publish this variable in the help.
31452 
31453 
31454   if test "x$AR" = x; then
31455     # The variable is not set by user, try to locate tool using the code snippet
31456     if test -n "$ac_tool_prefix"; then
31457   for ac_prog in ar
31458   do
31459     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31460 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31462 $as_echo_n "checking for $ac_word... " >&6; }
31463 if ${ac_cv_prog_AR+:} false; then :
31464   $as_echo_n "(cached) " >&6
31465 else
31466   if test -n "$AR"; then
31467   ac_cv_prog_AR="$AR" # Let the user override the test.
31468 else
31469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31470 for as_dir in $PATH
31471 do
31472   IFS=$as_save_IFS
31473   test -z "$as_dir" && as_dir=.
31474     for ac_exec_ext in '' $ac_executable_extensions; do
31475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31476     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31478     break 2
31479   fi
31480 done
31481   done
31482 IFS=$as_save_IFS
31483 
31484 fi
31485 fi
31486 AR=$ac_cv_prog_AR
31487 if test -n "$AR"; then
31488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31489 $as_echo "$AR" >&6; }
31490 else
31491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31492 $as_echo "no" >&6; }
31493 fi
31494 
31495 
31496     test -n "$AR" && break
31497   done
31498 fi
31499 if test -z "$AR"; then
31500   ac_ct_AR=$AR
31501   for ac_prog in ar
31502 do
31503   # Extract the first word of "$ac_prog", so it can be a program name with args.
31504 set dummy $ac_prog; ac_word=$2
31505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31506 $as_echo_n "checking for $ac_word... " >&6; }
31507 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31508   $as_echo_n "(cached) " >&6
31509 else
31510   if test -n "$ac_ct_AR"; then
31511   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31512 else
31513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31514 for as_dir in $PATH
31515 do
31516   IFS=$as_save_IFS
31517   test -z "$as_dir" && as_dir=.
31518     for ac_exec_ext in '' $ac_executable_extensions; do
31519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31520     ac_cv_prog_ac_ct_AR="$ac_prog"
31521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31522     break 2
31523   fi
31524 done
31525   done
31526 IFS=$as_save_IFS
31527 
31528 fi
31529 fi
31530 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31531 if test -n "$ac_ct_AR"; then
31532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31533 $as_echo "$ac_ct_AR" >&6; }
31534 else
31535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31536 $as_echo "no" >&6; }
31537 fi
31538 
31539 
31540   test -n "$ac_ct_AR" && break
31541 done
31542 
31543   if test "x$ac_ct_AR" = x; then
31544     AR=""
31545   else
31546     case $cross_compiling:$ac_tool_warned in
31547 yes:)
31548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31549 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31550 ac_tool_warned=yes ;;
31551 esac
31552     AR=$ac_ct_AR
31553   fi
31554 fi
31555 
31556   else
31557     # The variable is set, but is it from the command line or the environment?
31558 
31559     # Try to remove the string !AR! from our list.
31560     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
31561     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31562       # If it failed, the variable was not from the command line. Ignore it,
31563       # but warn the user (except for BASH, which is always set by the calling BASH).
31564       if test "xAR" != xBASH; then
31565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
31566 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
31567       fi
31568       # Try to locate tool using the code snippet
31569       if test -n "$ac_tool_prefix"; then
31570   for ac_prog in ar
31571   do
31572     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31573 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31575 $as_echo_n "checking for $ac_word... " >&6; }
31576 if ${ac_cv_prog_AR+:} false; then :
31577   $as_echo_n "(cached) " >&6
31578 else
31579   if test -n "$AR"; then
31580   ac_cv_prog_AR="$AR" # Let the user override the test.
31581 else
31582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31583 for as_dir in $PATH
31584 do
31585   IFS=$as_save_IFS
31586   test -z "$as_dir" && as_dir=.
31587     for ac_exec_ext in '' $ac_executable_extensions; do
31588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31589     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
31590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31591     break 2
31592   fi
31593 done
31594   done
31595 IFS=$as_save_IFS
31596 
31597 fi
31598 fi
31599 AR=$ac_cv_prog_AR
31600 if test -n "$AR"; then
31601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31602 $as_echo "$AR" >&6; }
31603 else
31604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31605 $as_echo "no" >&6; }
31606 fi
31607 
31608 
31609     test -n "$AR" && break
31610   done
31611 fi
31612 if test -z "$AR"; then
31613   ac_ct_AR=$AR
31614   for ac_prog in ar
31615 do
31616   # Extract the first word of "$ac_prog", so it can be a program name with args.
31617 set dummy $ac_prog; ac_word=$2
31618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31619 $as_echo_n "checking for $ac_word... " >&6; }
31620 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31621   $as_echo_n "(cached) " >&6
31622 else
31623   if test -n "$ac_ct_AR"; then
31624   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31625 else
31626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31627 for as_dir in $PATH
31628 do
31629   IFS=$as_save_IFS
31630   test -z "$as_dir" && as_dir=.
31631     for ac_exec_ext in '' $ac_executable_extensions; do
31632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31633     ac_cv_prog_ac_ct_AR="$ac_prog"
31634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31635     break 2
31636   fi
31637 done
31638   done
31639 IFS=$as_save_IFS
31640 
31641 fi
31642 fi
31643 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31644 if test -n "$ac_ct_AR"; then
31645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31646 $as_echo "$ac_ct_AR" >&6; }
31647 else
31648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31649 $as_echo "no" >&6; }
31650 fi
31651 
31652 
31653   test -n "$ac_ct_AR" && break
31654 done
31655 
31656   if test "x$ac_ct_AR" = x; then
31657     AR=""
31658   else
31659     case $cross_compiling:$ac_tool_warned in
31660 yes:)
31661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31663 ac_tool_warned=yes ;;
31664 esac
31665     AR=$ac_ct_AR
31666   fi
31667 fi
31668 
31669     else
31670       # If it succeeded, then it was overridden by the user. We will use it
31671       # for the tool.
31672 
31673       # First remove it from the list of overridden variables, so we can test
31674       # for unknown variables in the end.
31675       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31676 
31677       # Check if the provided tool contains a complete path.
31678       tool_specified="$AR"
31679       tool_basename="${tool_specified##*/}"
31680       if test "x$tool_basename" = "x$tool_specified"; then
31681         # A command without a complete path is provided, search $PATH.
31682         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
31683 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
31684         # Extract the first word of "$tool_basename", so it can be a program name with args.
31685 set dummy $tool_basename; ac_word=$2
31686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31687 $as_echo_n "checking for $ac_word... " >&6; }
31688 if ${ac_cv_path_AR+:} false; then :
31689   $as_echo_n "(cached) " >&6
31690 else
31691   case $AR in
31692   [\\/]* | ?:[\\/]*)
31693   ac_cv_path_AR="$AR" # Let the user override the test with a path.
31694   ;;
31695   *)
31696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31697 for as_dir in $PATH
31698 do
31699   IFS=$as_save_IFS
31700   test -z "$as_dir" && as_dir=.
31701     for ac_exec_ext in '' $ac_executable_extensions; do
31702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31703     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
31704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31705     break 2
31706   fi
31707 done
31708   done
31709 IFS=$as_save_IFS
31710 
31711   ;;
31712 esac
31713 fi
31714 AR=$ac_cv_path_AR
31715 if test -n "$AR"; then
31716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31717 $as_echo "$AR" >&6; }
31718 else
31719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31720 $as_echo "no" >&6; }
31721 fi
31722 
31723 
31724         if test "x$AR" = x; then
31725           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31726         fi
31727       else
31728         # Otherwise we believe it is a complete path. Use it as it is.
31729         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
31730 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
31731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
31732 $as_echo_n "checking for AR... " >&6; }
31733         if test ! -x "$tool_specified"; then
31734           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31735 $as_echo "not found" >&6; }
31736           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
31737         fi
31738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31739 $as_echo "$tool_specified" >&6; }
31740       fi
31741     fi
31742   fi
31743 
31744 
31745   fi
31746 
31747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31748 
31749   # First separate the path from the arguments. This will split at the first
31750   # space.
31751   complete="$AR"
31752   path="${complete%% *}"
31753   tmp="$complete EOL"
31754   arguments="${tmp#* }"
31755 
31756   # Input might be given as Windows format, start by converting to
31757   # unix format.
31758   new_path=`$CYGPATH -u "$path"`
31759 
31760   # Now try to locate executable using which
31761   new_path=`$WHICH "$new_path" 2> /dev/null`
31762   # bat and cmd files are not always considered executable in cygwin causing which
31763   # to not find them
31764   if test "x$new_path" = x \
31765       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31766       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31767     new_path=`$CYGPATH -u "$path"`
31768   fi
31769   if test "x$new_path" = x; then
31770     # Oops. Which didn't find the executable.
31771     # The splitting of arguments from the executable at a space might have been incorrect,
31772     # since paths with space are more likely in Windows. Give it another try with the whole
31773     # argument.
31774     path="$complete"
31775     arguments="EOL"
31776     new_path=`$CYGPATH -u "$path"`
31777     new_path=`$WHICH "$new_path" 2> /dev/null`
31778     # bat and cmd files are not always considered executable in cygwin causing which
31779     # to not find them
31780     if test "x$new_path" = x \
31781         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31782         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31783       new_path=`$CYGPATH -u "$path"`
31784     fi
31785     if test "x$new_path" = x; then
31786       # It's still not found. Now this is an unrecoverable error.
31787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31788 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31789       has_space=`$ECHO "$complete" | $GREP " "`
31790       if test "x$has_space" != x; then
31791         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31792 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31793       fi
31794       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31795     fi
31796   fi
31797 
31798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31801   # "foo.exe" is OK but "foo" is an error.
31802   #
31803   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31804   # It is also a way to make sure we got the proper file name for the real test later on.
31805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31806   if test "x$test_shortpath" = x; then
31807     # Short path failed, file does not exist as specified.
31808     # Try adding .exe or .cmd
31809     if test -f "${new_path}.exe"; then
31810       input_to_shortpath="${new_path}.exe"
31811     elif test -f "${new_path}.cmd"; then
31812       input_to_shortpath="${new_path}.cmd"
31813     else
31814       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
31815 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
31816       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31817 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31818       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31819     fi
31820   else
31821     input_to_shortpath="$new_path"
31822   fi
31823 
31824   # Call helper function which possibly converts this using DOS-style short mode.
31825   # If so, the updated path is stored in $new_path.
31826   new_path="$input_to_shortpath"
31827 
31828   input_path="$input_to_shortpath"
31829   # Check if we need to convert this using DOS-style short mode. If the path
31830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31831   # take no chances and rewrite it.
31832   # Note: m4 eats our [], so we need to use [ and ] instead.
31833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31834   if test "x$has_forbidden_chars" != x; then
31835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31836     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31837     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31838     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31839       # Going to short mode and back again did indeed matter. Since short mode is
31840       # case insensitive, let's make it lowercase to improve readability.
31841       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31842       # Now convert it back to Unix-style (cygpath)
31843       input_path=`$CYGPATH -u "$shortmode_path"`
31844       new_path="$input_path"
31845     fi
31846   fi
31847 
31848   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31849   if test "x$test_cygdrive_prefix" = x; then
31850     # As a simple fix, exclude /usr/bin since it's not a real path.
31851     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31852       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31853       # a path prefixed by /cygdrive for fixpath to work.
31854       new_path="$CYGWIN_ROOT_PATH$input_path"
31855     fi
31856   fi
31857 
31858   # remove trailing .exe if any
31859   new_path="${new_path/%.exe/}"
31860 
31861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31862 
31863   # First separate the path from the arguments. This will split at the first
31864   # space.
31865   complete="$AR"
31866   path="${complete%% *}"
31867   tmp="$complete EOL"
31868   arguments="${tmp#* }"
31869 
31870   # Input might be given as Windows format, start by converting to
31871   # unix format.
31872   new_path="$path"
31873 
31874   windows_path="$new_path"
31875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31876     unix_path=`$CYGPATH -u "$windows_path"`
31877     new_path="$unix_path"
31878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31880     new_path="$unix_path"
31881   fi
31882 
31883 
31884   # Now try to locate executable using which
31885   new_path=`$WHICH "$new_path" 2> /dev/null`
31886 
31887   if test "x$new_path" = x; then
31888     # Oops. Which didn't find the executable.
31889     # The splitting of arguments from the executable at a space might have been incorrect,
31890     # since paths with space are more likely in Windows. Give it another try with the whole
31891     # argument.
31892     path="$complete"
31893     arguments="EOL"
31894     new_path="$path"
31895 
31896   windows_path="$new_path"
31897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31898     unix_path=`$CYGPATH -u "$windows_path"`
31899     new_path="$unix_path"
31900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31902     new_path="$unix_path"
31903   fi
31904 
31905 
31906     new_path=`$WHICH "$new_path" 2> /dev/null`
31907     # bat and cmd files are not always considered executable in MSYS causing which
31908     # to not find them
31909     if test "x$new_path" = x \
31910         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31911         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31912       new_path="$path"
31913 
31914   windows_path="$new_path"
31915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31916     unix_path=`$CYGPATH -u "$windows_path"`
31917     new_path="$unix_path"
31918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31920     new_path="$unix_path"
31921   fi
31922 
31923     fi
31924 
31925     if test "x$new_path" = x; then
31926       # It's still not found. Now this is an unrecoverable error.
31927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
31928 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
31929       has_space=`$ECHO "$complete" | $GREP " "`
31930       if test "x$has_space" != x; then
31931         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31932 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31933       fi
31934       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
31935     fi
31936   fi
31937 
31938   # Now new_path has a complete unix path to the binary
31939   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31940     # Keep paths in /bin as-is, but remove trailing .exe if any
31941     new_path="${new_path/%.exe/}"
31942     # Do not save /bin paths to all_fixpath_prefixes!
31943   else
31944     # Not in mixed or Windows style, start by that.
31945     new_path=`cmd //c echo $new_path`
31946 
31947   input_path="$new_path"
31948   # Check if we need to convert this using DOS-style short mode. If the path
31949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31950   # take no chances and rewrite it.
31951   # Note: m4 eats our [], so we need to use [ and ] instead.
31952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31953   if test "x$has_forbidden_chars" != x; then
31954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31955     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31956   fi
31957 
31958     # Output is in $new_path
31959 
31960   windows_path="$new_path"
31961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31962     unix_path=`$CYGPATH -u "$windows_path"`
31963     new_path="$unix_path"
31964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31966     new_path="$unix_path"
31967   fi
31968 
31969     # remove trailing .exe if any
31970     new_path="${new_path/%.exe/}"
31971 
31972     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31973     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31974   fi
31975 
31976   else
31977     # We're on a posix platform. Hooray! :)
31978     # First separate the path from the arguments. This will split at the first
31979     # space.
31980     complete="$AR"
31981     path="${complete%% *}"
31982     tmp="$complete EOL"
31983     arguments="${tmp#* }"
31984 
31985     # Cannot rely on the command "which" here since it doesn't always work.
31986     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31987     if test -z "$is_absolute_path"; then
31988       # Path to executable is not absolute. Find it.
31989       IFS_save="$IFS"
31990       IFS=:
31991       for p in $PATH; do
31992         if test -f "$p/$path" && test -x "$p/$path"; then
31993           new_path="$p/$path"
31994           break
31995         fi
31996       done
31997       IFS="$IFS_save"
31998     else
31999       # This is an absolute path, we can use it without further modifications.
32000       new_path="$path"
32001     fi
32002 
32003     if test "x$new_path" = x; then
32004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32005 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32006       has_space=`$ECHO "$complete" | $GREP " "`
32007       if test "x$has_space" != x; then
32008         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32009 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32010       fi
32011       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32012     fi
32013   fi
32014 
32015   # Now join together the path and the arguments once again
32016   if test "x$arguments" != xEOL; then
32017     new_complete="$new_path ${arguments% *}"
32018   else
32019     new_complete="$new_path"
32020   fi
32021 
32022   if test "x$complete" != "x$new_complete"; then
32023     AR="$new_complete"
32024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32025 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32026   fi
32027 
32028 
32029 
32030   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32031     ac_ext=m
32032 ac_cpp='$OBJCPP $CPPFLAGS'
32033 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32034 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32035 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32036 if test -n "$ac_tool_prefix"; then
32037   for ac_prog in gcc objcc objc cc CC
32038   do
32039     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32040 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32042 $as_echo_n "checking for $ac_word... " >&6; }
32043 if ${ac_cv_prog_OBJC+:} false; then :
32044   $as_echo_n "(cached) " >&6
32045 else
32046   if test -n "$OBJC"; then
32047   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32048 else
32049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32050 for as_dir in $PATH
32051 do
32052   IFS=$as_save_IFS
32053   test -z "$as_dir" && as_dir=.
32054     for ac_exec_ext in '' $ac_executable_extensions; do
32055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32056     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32058     break 2
32059   fi
32060 done
32061   done
32062 IFS=$as_save_IFS
32063 
32064 fi
32065 fi
32066 OBJC=$ac_cv_prog_OBJC
32067 if test -n "$OBJC"; then
32068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32069 $as_echo "$OBJC" >&6; }
32070 else
32071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32072 $as_echo "no" >&6; }
32073 fi
32074 
32075 
32076     test -n "$OBJC" && break
32077   done
32078 fi
32079 if test -z "$OBJC"; then
32080   ac_ct_OBJC=$OBJC
32081   for ac_prog in gcc objcc objc cc CC
32082 do
32083   # Extract the first word of "$ac_prog", so it can be a program name with args.
32084 set dummy $ac_prog; ac_word=$2
32085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32086 $as_echo_n "checking for $ac_word... " >&6; }
32087 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32088   $as_echo_n "(cached) " >&6
32089 else
32090   if test -n "$ac_ct_OBJC"; then
32091   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32092 else
32093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32094 for as_dir in $PATH
32095 do
32096   IFS=$as_save_IFS
32097   test -z "$as_dir" && as_dir=.
32098     for ac_exec_ext in '' $ac_executable_extensions; do
32099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32100     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32102     break 2
32103   fi
32104 done
32105   done
32106 IFS=$as_save_IFS
32107 
32108 fi
32109 fi
32110 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32111 if test -n "$ac_ct_OBJC"; then
32112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32113 $as_echo "$ac_ct_OBJC" >&6; }
32114 else
32115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32116 $as_echo "no" >&6; }
32117 fi
32118 
32119 
32120   test -n "$ac_ct_OBJC" && break
32121 done
32122 
32123   if test "x$ac_ct_OBJC" = x; then
32124     OBJC="gcc"
32125   else
32126     case $cross_compiling:$ac_tool_warned in
32127 yes:)
32128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32129 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32130 ac_tool_warned=yes ;;
32131 esac
32132     OBJC=$ac_ct_OBJC
32133   fi
32134 fi
32135 
32136 # Provide some information about the compiler.
32137 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32138 set X $ac_compile
32139 ac_compiler=$2
32140 for ac_option in --version -v -V -qversion; do
32141   { { ac_try="$ac_compiler $ac_option >&5"
32142 case "(($ac_try" in
32143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32144   *) ac_try_echo=$ac_try;;
32145 esac
32146 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32147 $as_echo "$ac_try_echo"; } >&5
32148   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32149   ac_status=$?
32150   if test -s conftest.err; then
32151     sed '10a\
32152 ... rest of stderr output deleted ...
32153          10q' conftest.err >conftest.er1
32154     cat conftest.er1 >&5
32155   fi
32156   rm -f conftest.er1 conftest.err
32157   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32158   test $ac_status = 0; }
32159 done
32160 
32161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32162 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32163 if ${ac_cv_objc_compiler_gnu+:} false; then :
32164   $as_echo_n "(cached) " >&6
32165 else
32166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32167 /* end confdefs.h.  */
32168 
32169 int
32170 main ()
32171 {
32172 #ifndef __GNUC__
32173        choke me
32174 #endif
32175 
32176   ;
32177   return 0;
32178 }
32179 _ACEOF
32180 if ac_fn_objc_try_compile "$LINENO"; then :
32181   ac_compiler_gnu=yes
32182 else
32183   ac_compiler_gnu=no
32184 fi
32185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32186 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32187 
32188 fi
32189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32190 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32191 if test $ac_compiler_gnu = yes; then
32192   GOBJC=yes
32193 else
32194   GOBJC=
32195 fi
32196 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32197 ac_save_OBJCFLAGS=$OBJCFLAGS
32198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32199 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32200 if ${ac_cv_prog_objc_g+:} false; then :
32201   $as_echo_n "(cached) " >&6
32202 else
32203   ac_save_objc_werror_flag=$ac_objc_werror_flag
32204    ac_objc_werror_flag=yes
32205    ac_cv_prog_objc_g=no
32206    OBJCFLAGS="-g"
32207    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h.  */
32209 
32210 int
32211 main ()
32212 {
32213 
32214   ;
32215   return 0;
32216 }
32217 _ACEOF
32218 if ac_fn_objc_try_compile "$LINENO"; then :
32219   ac_cv_prog_objc_g=yes
32220 else
32221   OBJCFLAGS=""
32222       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32223 /* end confdefs.h.  */
32224 
32225 int
32226 main ()
32227 {
32228 
32229   ;
32230   return 0;
32231 }
32232 _ACEOF
32233 if ac_fn_objc_try_compile "$LINENO"; then :
32234 
32235 else
32236   ac_objc_werror_flag=$ac_save_objc_werror_flag
32237          OBJCFLAGS="-g"
32238          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32239 /* end confdefs.h.  */
32240 
32241 int
32242 main ()
32243 {
32244 
32245   ;
32246   return 0;
32247 }
32248 _ACEOF
32249 if ac_fn_objc_try_compile "$LINENO"; then :
32250   ac_cv_prog_objc_g=yes
32251 fi
32252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32253 fi
32254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32255 fi
32256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32257    ac_objc_werror_flag=$ac_save_objc_werror_flag
32258 fi
32259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32260 $as_echo "$ac_cv_prog_objc_g" >&6; }
32261 if test "$ac_test_OBJCFLAGS" = set; then
32262   OBJCFLAGS=$ac_save_OBJCFLAGS
32263 elif test $ac_cv_prog_objc_g = yes; then
32264   if test "$GOBJC" = yes; then
32265     OBJCFLAGS="-g -O2"
32266   else
32267     OBJCFLAGS="-g"
32268   fi
32269 else
32270   if test "$GOBJC" = yes; then
32271     OBJCFLAGS="-O2"
32272   else
32273     OBJCFLAGS=
32274   fi
32275 fi
32276 ac_ext=cpp
32277 ac_cpp='$CXXCPP $CPPFLAGS'
32278 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32279 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32280 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32281 
32282 
32283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32284 
32285   # First separate the path from the arguments. This will split at the first
32286   # space.
32287   complete="$OBJC"
32288   path="${complete%% *}"
32289   tmp="$complete EOL"
32290   arguments="${tmp#* }"
32291 
32292   # Input might be given as Windows format, start by converting to
32293   # unix format.
32294   new_path=`$CYGPATH -u "$path"`
32295 
32296   # Now try to locate executable using which
32297   new_path=`$WHICH "$new_path" 2> /dev/null`
32298   # bat and cmd files are not always considered executable in cygwin causing which
32299   # to not find them
32300   if test "x$new_path" = x \
32301       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32302       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32303     new_path=`$CYGPATH -u "$path"`
32304   fi
32305   if test "x$new_path" = x; then
32306     # Oops. Which didn't find the executable.
32307     # The splitting of arguments from the executable at a space might have been incorrect,
32308     # since paths with space are more likely in Windows. Give it another try with the whole
32309     # argument.
32310     path="$complete"
32311     arguments="EOL"
32312     new_path=`$CYGPATH -u "$path"`
32313     new_path=`$WHICH "$new_path" 2> /dev/null`
32314     # bat and cmd files are not always considered executable in cygwin causing which
32315     # to not find them
32316     if test "x$new_path" = x \
32317         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32318         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32319       new_path=`$CYGPATH -u "$path"`
32320     fi
32321     if test "x$new_path" = x; then
32322       # It's still not found. Now this is an unrecoverable error.
32323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32324 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32325       has_space=`$ECHO "$complete" | $GREP " "`
32326       if test "x$has_space" != x; then
32327         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32328 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32329       fi
32330       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32331     fi
32332   fi
32333 
32334   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32335   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32336   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32337   # "foo.exe" is OK but "foo" is an error.
32338   #
32339   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32340   # It is also a way to make sure we got the proper file name for the real test later on.
32341   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32342   if test "x$test_shortpath" = x; then
32343     # Short path failed, file does not exist as specified.
32344     # Try adding .exe or .cmd
32345     if test -f "${new_path}.exe"; then
32346       input_to_shortpath="${new_path}.exe"
32347     elif test -f "${new_path}.cmd"; then
32348       input_to_shortpath="${new_path}.cmd"
32349     else
32350       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32351 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32352       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32353 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32354       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32355     fi
32356   else
32357     input_to_shortpath="$new_path"
32358   fi
32359 
32360   # Call helper function which possibly converts this using DOS-style short mode.
32361   # If so, the updated path is stored in $new_path.
32362   new_path="$input_to_shortpath"
32363 
32364   input_path="$input_to_shortpath"
32365   # Check if we need to convert this using DOS-style short mode. If the path
32366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32367   # take no chances and rewrite it.
32368   # Note: m4 eats our [], so we need to use [ and ] instead.
32369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32370   if test "x$has_forbidden_chars" != x; then
32371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32375       # Going to short mode and back again did indeed matter. Since short mode is
32376       # case insensitive, let's make it lowercase to improve readability.
32377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32378       # Now convert it back to Unix-style (cygpath)
32379       input_path=`$CYGPATH -u "$shortmode_path"`
32380       new_path="$input_path"
32381     fi
32382   fi
32383 
32384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32385   if test "x$test_cygdrive_prefix" = x; then
32386     # As a simple fix, exclude /usr/bin since it's not a real path.
32387     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32389       # a path prefixed by /cygdrive for fixpath to work.
32390       new_path="$CYGWIN_ROOT_PATH$input_path"
32391     fi
32392   fi
32393 
32394   # remove trailing .exe if any
32395   new_path="${new_path/%.exe/}"
32396 
32397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32398 
32399   # First separate the path from the arguments. This will split at the first
32400   # space.
32401   complete="$OBJC"
32402   path="${complete%% *}"
32403   tmp="$complete EOL"
32404   arguments="${tmp#* }"
32405 
32406   # Input might be given as Windows format, start by converting to
32407   # unix format.
32408   new_path="$path"
32409 
32410   windows_path="$new_path"
32411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32412     unix_path=`$CYGPATH -u "$windows_path"`
32413     new_path="$unix_path"
32414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32416     new_path="$unix_path"
32417   fi
32418 
32419 
32420   # Now try to locate executable using which
32421   new_path=`$WHICH "$new_path" 2> /dev/null`
32422 
32423   if test "x$new_path" = x; then
32424     # Oops. Which didn't find the executable.
32425     # The splitting of arguments from the executable at a space might have been incorrect,
32426     # since paths with space are more likely in Windows. Give it another try with the whole
32427     # argument.
32428     path="$complete"
32429     arguments="EOL"
32430     new_path="$path"
32431 
32432   windows_path="$new_path"
32433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32434     unix_path=`$CYGPATH -u "$windows_path"`
32435     new_path="$unix_path"
32436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32438     new_path="$unix_path"
32439   fi
32440 
32441 
32442     new_path=`$WHICH "$new_path" 2> /dev/null`
32443     # bat and cmd files are not always considered executable in MSYS causing which
32444     # to not find them
32445     if test "x$new_path" = x \
32446         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32447         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32448       new_path="$path"
32449 
32450   windows_path="$new_path"
32451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32452     unix_path=`$CYGPATH -u "$windows_path"`
32453     new_path="$unix_path"
32454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32456     new_path="$unix_path"
32457   fi
32458 
32459     fi
32460 
32461     if test "x$new_path" = x; then
32462       # It's still not found. Now this is an unrecoverable error.
32463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32464 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32465       has_space=`$ECHO "$complete" | $GREP " "`
32466       if test "x$has_space" != x; then
32467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32469       fi
32470       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32471     fi
32472   fi
32473 
32474   # Now new_path has a complete unix path to the binary
32475   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32476     # Keep paths in /bin as-is, but remove trailing .exe if any
32477     new_path="${new_path/%.exe/}"
32478     # Do not save /bin paths to all_fixpath_prefixes!
32479   else
32480     # Not in mixed or Windows style, start by that.
32481     new_path=`cmd //c echo $new_path`
32482 
32483   input_path="$new_path"
32484   # Check if we need to convert this using DOS-style short mode. If the path
32485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32486   # take no chances and rewrite it.
32487   # Note: m4 eats our [], so we need to use [ and ] instead.
32488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32489   if test "x$has_forbidden_chars" != x; then
32490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32492   fi
32493 
32494     # Output is in $new_path
32495 
32496   windows_path="$new_path"
32497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32498     unix_path=`$CYGPATH -u "$windows_path"`
32499     new_path="$unix_path"
32500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32502     new_path="$unix_path"
32503   fi
32504 
32505     # remove trailing .exe if any
32506     new_path="${new_path/%.exe/}"
32507 
32508     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32509     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32510   fi
32511 
32512   else
32513     # We're on a posix platform. Hooray! :)
32514     # First separate the path from the arguments. This will split at the first
32515     # space.
32516     complete="$OBJC"
32517     path="${complete%% *}"
32518     tmp="$complete EOL"
32519     arguments="${tmp#* }"
32520 
32521     # Cannot rely on the command "which" here since it doesn't always work.
32522     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32523     if test -z "$is_absolute_path"; then
32524       # Path to executable is not absolute. Find it.
32525       IFS_save="$IFS"
32526       IFS=:
32527       for p in $PATH; do
32528         if test -f "$p/$path" && test -x "$p/$path"; then
32529           new_path="$p/$path"
32530           break
32531         fi
32532       done
32533       IFS="$IFS_save"
32534     else
32535       # This is an absolute path, we can use it without further modifications.
32536       new_path="$path"
32537     fi
32538 
32539     if test "x$new_path" = x; then
32540       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32541 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32542       has_space=`$ECHO "$complete" | $GREP " "`
32543       if test "x$has_space" != x; then
32544         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32545 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32546       fi
32547       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32548     fi
32549   fi
32550 
32551   # Now join together the path and the arguments once again
32552   if test "x$arguments" != xEOL; then
32553     new_complete="$new_path ${arguments% *}"
32554   else
32555     new_complete="$new_path"
32556   fi
32557 
32558   if test "x$complete" != "x$new_complete"; then
32559     OBJC="$new_complete"
32560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32561 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32562   fi
32563 
32564 
32565 
32566   # Publish this variable in the help.
32567 
32568 
32569   if test "x$LIPO" = x; then
32570     # The variable is not set by user, try to locate tool using the code snippet
32571     for ac_prog in lipo
32572 do
32573   # Extract the first word of "$ac_prog", so it can be a program name with args.
32574 set dummy $ac_prog; ac_word=$2
32575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32576 $as_echo_n "checking for $ac_word... " >&6; }
32577 if ${ac_cv_path_LIPO+:} false; then :
32578   $as_echo_n "(cached) " >&6
32579 else
32580   case $LIPO in
32581   [\\/]* | ?:[\\/]*)
32582   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32583   ;;
32584   *)
32585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32586 for as_dir in $PATH
32587 do
32588   IFS=$as_save_IFS
32589   test -z "$as_dir" && as_dir=.
32590     for ac_exec_ext in '' $ac_executable_extensions; do
32591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32592     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32594     break 2
32595   fi
32596 done
32597   done
32598 IFS=$as_save_IFS
32599 
32600   ;;
32601 esac
32602 fi
32603 LIPO=$ac_cv_path_LIPO
32604 if test -n "$LIPO"; then
32605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32606 $as_echo "$LIPO" >&6; }
32607 else
32608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32609 $as_echo "no" >&6; }
32610 fi
32611 
32612 
32613   test -n "$LIPO" && break
32614 done
32615 
32616   else
32617     # The variable is set, but is it from the command line or the environment?
32618 
32619     # Try to remove the string !LIPO! from our list.
32620     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
32621     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32622       # If it failed, the variable was not from the command line. Ignore it,
32623       # but warn the user (except for BASH, which is always set by the calling BASH).
32624       if test "xLIPO" != xBASH; then
32625         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
32626 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
32627       fi
32628       # Try to locate tool using the code snippet
32629       for ac_prog in lipo
32630 do
32631   # Extract the first word of "$ac_prog", so it can be a program name with args.
32632 set dummy $ac_prog; ac_word=$2
32633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32634 $as_echo_n "checking for $ac_word... " >&6; }
32635 if ${ac_cv_path_LIPO+:} false; then :
32636   $as_echo_n "(cached) " >&6
32637 else
32638   case $LIPO in
32639   [\\/]* | ?:[\\/]*)
32640   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32641   ;;
32642   *)
32643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32644 for as_dir in $PATH
32645 do
32646   IFS=$as_save_IFS
32647   test -z "$as_dir" && as_dir=.
32648     for ac_exec_ext in '' $ac_executable_extensions; do
32649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32650     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32652     break 2
32653   fi
32654 done
32655   done
32656 IFS=$as_save_IFS
32657 
32658   ;;
32659 esac
32660 fi
32661 LIPO=$ac_cv_path_LIPO
32662 if test -n "$LIPO"; then
32663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32664 $as_echo "$LIPO" >&6; }
32665 else
32666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32667 $as_echo "no" >&6; }
32668 fi
32669 
32670 
32671   test -n "$LIPO" && break
32672 done
32673 
32674     else
32675       # If it succeeded, then it was overridden by the user. We will use it
32676       # for the tool.
32677 
32678       # First remove it from the list of overridden variables, so we can test
32679       # for unknown variables in the end.
32680       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32681 
32682       # Check if the provided tool contains a complete path.
32683       tool_specified="$LIPO"
32684       tool_basename="${tool_specified##*/}"
32685       if test "x$tool_basename" = "x$tool_specified"; then
32686         # A command without a complete path is provided, search $PATH.
32687         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
32688 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
32689         # Extract the first word of "$tool_basename", so it can be a program name with args.
32690 set dummy $tool_basename; ac_word=$2
32691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32692 $as_echo_n "checking for $ac_word... " >&6; }
32693 if ${ac_cv_path_LIPO+:} false; then :
32694   $as_echo_n "(cached) " >&6
32695 else
32696   case $LIPO in
32697   [\\/]* | ?:[\\/]*)
32698   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
32699   ;;
32700   *)
32701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32702 for as_dir in $PATH
32703 do
32704   IFS=$as_save_IFS
32705   test -z "$as_dir" && as_dir=.
32706     for ac_exec_ext in '' $ac_executable_extensions; do
32707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32708     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
32709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32710     break 2
32711   fi
32712 done
32713   done
32714 IFS=$as_save_IFS
32715 
32716   ;;
32717 esac
32718 fi
32719 LIPO=$ac_cv_path_LIPO
32720 if test -n "$LIPO"; then
32721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
32722 $as_echo "$LIPO" >&6; }
32723 else
32724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32725 $as_echo "no" >&6; }
32726 fi
32727 
32728 
32729         if test "x$LIPO" = x; then
32730           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32731         fi
32732       else
32733         # Otherwise we believe it is a complete path. Use it as it is.
32734         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
32735 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
32736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
32737 $as_echo_n "checking for LIPO... " >&6; }
32738         if test ! -x "$tool_specified"; then
32739           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32740 $as_echo "not found" >&6; }
32741           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
32742         fi
32743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32744 $as_echo "$tool_specified" >&6; }
32745       fi
32746     fi
32747   fi
32748 
32749 
32750 
32751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32752 
32753   # First separate the path from the arguments. This will split at the first
32754   # space.
32755   complete="$LIPO"
32756   path="${complete%% *}"
32757   tmp="$complete EOL"
32758   arguments="${tmp#* }"
32759 
32760   # Input might be given as Windows format, start by converting to
32761   # unix format.
32762   new_path=`$CYGPATH -u "$path"`
32763 
32764   # Now try to locate executable using which
32765   new_path=`$WHICH "$new_path" 2> /dev/null`
32766   # bat and cmd files are not always considered executable in cygwin causing which
32767   # to not find them
32768   if test "x$new_path" = x \
32769       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32770       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32771     new_path=`$CYGPATH -u "$path"`
32772   fi
32773   if test "x$new_path" = x; then
32774     # Oops. Which didn't find the executable.
32775     # The splitting of arguments from the executable at a space might have been incorrect,
32776     # since paths with space are more likely in Windows. Give it another try with the whole
32777     # argument.
32778     path="$complete"
32779     arguments="EOL"
32780     new_path=`$CYGPATH -u "$path"`
32781     new_path=`$WHICH "$new_path" 2> /dev/null`
32782     # bat and cmd files are not always considered executable in cygwin causing which
32783     # to not find them
32784     if test "x$new_path" = x \
32785         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32786         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32787       new_path=`$CYGPATH -u "$path"`
32788     fi
32789     if test "x$new_path" = x; then
32790       # It's still not found. Now this is an unrecoverable error.
32791       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
32792 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
32793       has_space=`$ECHO "$complete" | $GREP " "`
32794       if test "x$has_space" != x; then
32795         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32796 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32797       fi
32798       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
32799     fi
32800   fi
32801 
32802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32805   # "foo.exe" is OK but "foo" is an error.
32806   #
32807   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32808   # It is also a way to make sure we got the proper file name for the real test later on.
32809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32810   if test "x$test_shortpath" = x; then
32811     # Short path failed, file does not exist as specified.
32812     # Try adding .exe or .cmd
32813     if test -f "${new_path}.exe"; then
32814       input_to_shortpath="${new_path}.exe"
32815     elif test -f "${new_path}.cmd"; then
32816       input_to_shortpath="${new_path}.cmd"
32817     else
32818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
32819 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
32820       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32821 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32822       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
32823     fi
32824   else
32825     input_to_shortpath="$new_path"
32826   fi
32827 
32828   # Call helper function which possibly converts this using DOS-style short mode.
32829   # If so, the updated path is stored in $new_path.
32830   new_path="$input_to_shortpath"
32831 
32832   input_path="$input_to_shortpath"
32833   # Check if we need to convert this using DOS-style short mode. If the path
32834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32835   # take no chances and rewrite it.
32836   # Note: m4 eats our [], so we need to use [ and ] instead.
32837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32838   if test "x$has_forbidden_chars" != x; then
32839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32843       # Going to short mode and back again did indeed matter. Since short mode is
32844       # case insensitive, let's make it lowercase to improve readability.
32845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32846       # Now convert it back to Unix-style (cygpath)
32847       input_path=`$CYGPATH -u "$shortmode_path"`
32848       new_path="$input_path"
32849     fi
32850   fi
32851 
32852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32853   if test "x$test_cygdrive_prefix" = x; then
32854     # As a simple fix, exclude /usr/bin since it's not a real path.
32855     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32857       # a path prefixed by /cygdrive for fixpath to work.
32858       new_path="$CYGWIN_ROOT_PATH$input_path"
32859     fi
32860   fi
32861 
32862   # remove trailing .exe if any
32863   new_path="${new_path/%.exe/}"
32864 
32865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866 
32867   # First separate the path from the arguments. This will split at the first
32868   # space.
32869   complete="$LIPO"
32870   path="${complete%% *}"
32871   tmp="$complete EOL"
32872   arguments="${tmp#* }"
32873 
32874   # Input might be given as Windows format, start by converting to
32875   # unix format.
32876   new_path="$path"
32877 
32878   windows_path="$new_path"
32879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880     unix_path=`$CYGPATH -u "$windows_path"`
32881     new_path="$unix_path"
32882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32884     new_path="$unix_path"
32885   fi
32886 
32887 
32888   # Now try to locate executable using which
32889   new_path=`$WHICH "$new_path" 2> /dev/null`
32890 
32891   if test "x$new_path" = x; then
32892     # Oops. Which didn't find the executable.
32893     # The splitting of arguments from the executable at a space might have been incorrect,
32894     # since paths with space are more likely in Windows. Give it another try with the whole
32895     # argument.
32896     path="$complete"
32897     arguments="EOL"
32898     new_path="$path"
32899 
32900   windows_path="$new_path"
32901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32902     unix_path=`$CYGPATH -u "$windows_path"`
32903     new_path="$unix_path"
32904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32906     new_path="$unix_path"
32907   fi
32908 
32909 
32910     new_path=`$WHICH "$new_path" 2> /dev/null`
32911     # bat and cmd files are not always considered executable in MSYS causing which
32912     # to not find them
32913     if test "x$new_path" = x \
32914         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32915         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32916       new_path="$path"
32917 
32918   windows_path="$new_path"
32919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32920     unix_path=`$CYGPATH -u "$windows_path"`
32921     new_path="$unix_path"
32922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32924     new_path="$unix_path"
32925   fi
32926 
32927     fi
32928 
32929     if test "x$new_path" = x; then
32930       # It's still not found. Now this is an unrecoverable error.
32931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
32932 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
32933       has_space=`$ECHO "$complete" | $GREP " "`
32934       if test "x$has_space" != x; then
32935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32937       fi
32938       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
32939     fi
32940   fi
32941 
32942   # Now new_path has a complete unix path to the binary
32943   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32944     # Keep paths in /bin as-is, but remove trailing .exe if any
32945     new_path="${new_path/%.exe/}"
32946     # Do not save /bin paths to all_fixpath_prefixes!
32947   else
32948     # Not in mixed or Windows style, start by that.
32949     new_path=`cmd //c echo $new_path`
32950 
32951   input_path="$new_path"
32952   # Check if we need to convert this using DOS-style short mode. If the path
32953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32954   # take no chances and rewrite it.
32955   # Note: m4 eats our [], so we need to use [ and ] instead.
32956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32957   if test "x$has_forbidden_chars" != x; then
32958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32959     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32960   fi
32961 
32962     # Output is in $new_path
32963 
32964   windows_path="$new_path"
32965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32966     unix_path=`$CYGPATH -u "$windows_path"`
32967     new_path="$unix_path"
32968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32970     new_path="$unix_path"
32971   fi
32972 
32973     # remove trailing .exe if any
32974     new_path="${new_path/%.exe/}"
32975 
32976     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32977     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32978   fi
32979 
32980   else
32981     # We're on a posix platform. Hooray! :)
32982     # First separate the path from the arguments. This will split at the first
32983     # space.
32984     complete="$LIPO"
32985     path="${complete%% *}"
32986     tmp="$complete EOL"
32987     arguments="${tmp#* }"
32988 
32989     # Cannot rely on the command "which" here since it doesn't always work.
32990     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32991     if test -z "$is_absolute_path"; then
32992       # Path to executable is not absolute. Find it.
32993       IFS_save="$IFS"
32994       IFS=:
32995       for p in $PATH; do
32996         if test -f "$p/$path" && test -x "$p/$path"; then
32997           new_path="$p/$path"
32998           break
32999         fi
33000       done
33001       IFS="$IFS_save"
33002     else
33003       # This is an absolute path, we can use it without further modifications.
33004       new_path="$path"
33005     fi
33006 
33007     if test "x$new_path" = x; then
33008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33009 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33010       has_space=`$ECHO "$complete" | $GREP " "`
33011       if test "x$has_space" != x; then
33012         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33013 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33014       fi
33015       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33016     fi
33017   fi
33018 
33019   # Now join together the path and the arguments once again
33020   if test "x$arguments" != xEOL; then
33021     new_complete="$new_path ${arguments% *}"
33022   else
33023     new_complete="$new_path"
33024   fi
33025 
33026   if test "x$complete" != "x$new_complete"; then
33027     LIPO="$new_complete"
33028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33029 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33030   fi
33031 
33032   else
33033     OBJC=
33034   fi
33035 
33036   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33037     # Extract the first word of "mt", so it can be a program name with args.
33038 set dummy mt; ac_word=$2
33039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33040 $as_echo_n "checking for $ac_word... " >&6; }
33041 if ${ac_cv_prog_MT+:} false; then :
33042   $as_echo_n "(cached) " >&6
33043 else
33044   if test -n "$MT"; then
33045   ac_cv_prog_MT="$MT" # Let the user override the test.
33046 else
33047   ac_prog_rejected=no
33048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33049 for as_dir in $PATH
33050 do
33051   IFS=$as_save_IFS
33052   test -z "$as_dir" && as_dir=.
33053     for ac_exec_ext in '' $ac_executable_extensions; do
33054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33055     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33056        ac_prog_rejected=yes
33057        continue
33058      fi
33059     ac_cv_prog_MT="mt"
33060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33061     break 2
33062   fi
33063 done
33064   done
33065 IFS=$as_save_IFS
33066 
33067 if test $ac_prog_rejected = yes; then
33068   # We found a bogon in the path, so make sure we never use it.
33069   set dummy $ac_cv_prog_MT
33070   shift
33071   if test $# != 0; then
33072     # We chose a different compiler from the bogus one.
33073     # However, it has the same basename, so the bogon will be chosen
33074     # first if we set MT to just the basename; use the full file name.
33075     shift
33076     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33077   fi
33078 fi
33079 fi
33080 fi
33081 MT=$ac_cv_prog_MT
33082 if test -n "$MT"; then
33083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33084 $as_echo "$MT" >&6; }
33085 else
33086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33087 $as_echo "no" >&6; }
33088 fi
33089 
33090 
33091 
33092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33093 
33094   # First separate the path from the arguments. This will split at the first
33095   # space.
33096   complete="$MT"
33097   path="${complete%% *}"
33098   tmp="$complete EOL"
33099   arguments="${tmp#* }"
33100 
33101   # Input might be given as Windows format, start by converting to
33102   # unix format.
33103   new_path=`$CYGPATH -u "$path"`
33104 
33105   # Now try to locate executable using which
33106   new_path=`$WHICH "$new_path" 2> /dev/null`
33107   # bat and cmd files are not always considered executable in cygwin causing which
33108   # to not find them
33109   if test "x$new_path" = x \
33110       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33111       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33112     new_path=`$CYGPATH -u "$path"`
33113   fi
33114   if test "x$new_path" = x; then
33115     # Oops. Which didn't find the executable.
33116     # The splitting of arguments from the executable at a space might have been incorrect,
33117     # since paths with space are more likely in Windows. Give it another try with the whole
33118     # argument.
33119     path="$complete"
33120     arguments="EOL"
33121     new_path=`$CYGPATH -u "$path"`
33122     new_path=`$WHICH "$new_path" 2> /dev/null`
33123     # bat and cmd files are not always considered executable in cygwin causing which
33124     # to not find them
33125     if test "x$new_path" = x \
33126         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33127         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33128       new_path=`$CYGPATH -u "$path"`
33129     fi
33130     if test "x$new_path" = x; then
33131       # It's still not found. Now this is an unrecoverable error.
33132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33133 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33134       has_space=`$ECHO "$complete" | $GREP " "`
33135       if test "x$has_space" != x; then
33136         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33137 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33138       fi
33139       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33140     fi
33141   fi
33142 
33143   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33144   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33145   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33146   # "foo.exe" is OK but "foo" is an error.
33147   #
33148   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33149   # It is also a way to make sure we got the proper file name for the real test later on.
33150   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33151   if test "x$test_shortpath" = x; then
33152     # Short path failed, file does not exist as specified.
33153     # Try adding .exe or .cmd
33154     if test -f "${new_path}.exe"; then
33155       input_to_shortpath="${new_path}.exe"
33156     elif test -f "${new_path}.cmd"; then
33157       input_to_shortpath="${new_path}.cmd"
33158     else
33159       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33160 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33161       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33162 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33163       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33164     fi
33165   else
33166     input_to_shortpath="$new_path"
33167   fi
33168 
33169   # Call helper function which possibly converts this using DOS-style short mode.
33170   # If so, the updated path is stored in $new_path.
33171   new_path="$input_to_shortpath"
33172 
33173   input_path="$input_to_shortpath"
33174   # Check if we need to convert this using DOS-style short mode. If the path
33175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33176   # take no chances and rewrite it.
33177   # Note: m4 eats our [], so we need to use [ and ] instead.
33178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33179   if test "x$has_forbidden_chars" != x; then
33180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33184       # Going to short mode and back again did indeed matter. Since short mode is
33185       # case insensitive, let's make it lowercase to improve readability.
33186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33187       # Now convert it back to Unix-style (cygpath)
33188       input_path=`$CYGPATH -u "$shortmode_path"`
33189       new_path="$input_path"
33190     fi
33191   fi
33192 
33193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33194   if test "x$test_cygdrive_prefix" = x; then
33195     # As a simple fix, exclude /usr/bin since it's not a real path.
33196     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33198       # a path prefixed by /cygdrive for fixpath to work.
33199       new_path="$CYGWIN_ROOT_PATH$input_path"
33200     fi
33201   fi
33202 
33203   # remove trailing .exe if any
33204   new_path="${new_path/%.exe/}"
33205 
33206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33207 
33208   # First separate the path from the arguments. This will split at the first
33209   # space.
33210   complete="$MT"
33211   path="${complete%% *}"
33212   tmp="$complete EOL"
33213   arguments="${tmp#* }"
33214 
33215   # Input might be given as Windows format, start by converting to
33216   # unix format.
33217   new_path="$path"
33218 
33219   windows_path="$new_path"
33220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33221     unix_path=`$CYGPATH -u "$windows_path"`
33222     new_path="$unix_path"
33223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33224     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33225     new_path="$unix_path"
33226   fi
33227 
33228 
33229   # Now try to locate executable using which
33230   new_path=`$WHICH "$new_path" 2> /dev/null`
33231 
33232   if test "x$new_path" = x; then
33233     # Oops. Which didn't find the executable.
33234     # The splitting of arguments from the executable at a space might have been incorrect,
33235     # since paths with space are more likely in Windows. Give it another try with the whole
33236     # argument.
33237     path="$complete"
33238     arguments="EOL"
33239     new_path="$path"
33240 
33241   windows_path="$new_path"
33242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33243     unix_path=`$CYGPATH -u "$windows_path"`
33244     new_path="$unix_path"
33245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33247     new_path="$unix_path"
33248   fi
33249 
33250 
33251     new_path=`$WHICH "$new_path" 2> /dev/null`
33252     # bat and cmd files are not always considered executable in MSYS causing which
33253     # to not find them
33254     if test "x$new_path" = x \
33255         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33256         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33257       new_path="$path"
33258 
33259   windows_path="$new_path"
33260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261     unix_path=`$CYGPATH -u "$windows_path"`
33262     new_path="$unix_path"
33263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33265     new_path="$unix_path"
33266   fi
33267 
33268     fi
33269 
33270     if test "x$new_path" = x; then
33271       # It's still not found. Now this is an unrecoverable error.
33272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33273 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33274       has_space=`$ECHO "$complete" | $GREP " "`
33275       if test "x$has_space" != x; then
33276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33278       fi
33279       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33280     fi
33281   fi
33282 
33283   # Now new_path has a complete unix path to the binary
33284   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33285     # Keep paths in /bin as-is, but remove trailing .exe if any
33286     new_path="${new_path/%.exe/}"
33287     # Do not save /bin paths to all_fixpath_prefixes!
33288   else
33289     # Not in mixed or Windows style, start by that.
33290     new_path=`cmd //c echo $new_path`
33291 
33292   input_path="$new_path"
33293   # Check if we need to convert this using DOS-style short mode. If the path
33294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33295   # take no chances and rewrite it.
33296   # Note: m4 eats our [], so we need to use [ and ] instead.
33297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33298   if test "x$has_forbidden_chars" != x; then
33299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33300     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33301   fi
33302 
33303     # Output is in $new_path
33304 
33305   windows_path="$new_path"
33306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33307     unix_path=`$CYGPATH -u "$windows_path"`
33308     new_path="$unix_path"
33309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33311     new_path="$unix_path"
33312   fi
33313 
33314     # remove trailing .exe if any
33315     new_path="${new_path/%.exe/}"
33316 
33317     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33318     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33319   fi
33320 
33321   else
33322     # We're on a posix platform. Hooray! :)
33323     # First separate the path from the arguments. This will split at the first
33324     # space.
33325     complete="$MT"
33326     path="${complete%% *}"
33327     tmp="$complete EOL"
33328     arguments="${tmp#* }"
33329 
33330     # Cannot rely on the command "which" here since it doesn't always work.
33331     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33332     if test -z "$is_absolute_path"; then
33333       # Path to executable is not absolute. Find it.
33334       IFS_save="$IFS"
33335       IFS=:
33336       for p in $PATH; do
33337         if test -f "$p/$path" && test -x "$p/$path"; then
33338           new_path="$p/$path"
33339           break
33340         fi
33341       done
33342       IFS="$IFS_save"
33343     else
33344       # This is an absolute path, we can use it without further modifications.
33345       new_path="$path"
33346     fi
33347 
33348     if test "x$new_path" = x; then
33349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33350 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33351       has_space=`$ECHO "$complete" | $GREP " "`
33352       if test "x$has_space" != x; then
33353         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33354 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33355       fi
33356       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33357     fi
33358   fi
33359 
33360   # Now join together the path and the arguments once again
33361   if test "x$arguments" != xEOL; then
33362     new_complete="$new_path ${arguments% *}"
33363   else
33364     new_complete="$new_path"
33365   fi
33366 
33367   if test "x$complete" != "x$new_complete"; then
33368     MT="$new_complete"
33369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33370 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33371   fi
33372 
33373     # Setup the resource compiler (RC)
33374     # Extract the first word of "rc", so it can be a program name with args.
33375 set dummy rc; ac_word=$2
33376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33377 $as_echo_n "checking for $ac_word... " >&6; }
33378 if ${ac_cv_prog_RC+:} false; then :
33379   $as_echo_n "(cached) " >&6
33380 else
33381   if test -n "$RC"; then
33382   ac_cv_prog_RC="$RC" # Let the user override the test.
33383 else
33384   ac_prog_rejected=no
33385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33386 for as_dir in $PATH
33387 do
33388   IFS=$as_save_IFS
33389   test -z "$as_dir" && as_dir=.
33390     for ac_exec_ext in '' $ac_executable_extensions; do
33391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33392     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33393        ac_prog_rejected=yes
33394        continue
33395      fi
33396     ac_cv_prog_RC="rc"
33397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33398     break 2
33399   fi
33400 done
33401   done
33402 IFS=$as_save_IFS
33403 
33404 if test $ac_prog_rejected = yes; then
33405   # We found a bogon in the path, so make sure we never use it.
33406   set dummy $ac_cv_prog_RC
33407   shift
33408   if test $# != 0; then
33409     # We chose a different compiler from the bogus one.
33410     # However, it has the same basename, so the bogon will be chosen
33411     # first if we set RC to just the basename; use the full file name.
33412     shift
33413     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
33414   fi
33415 fi
33416 fi
33417 fi
33418 RC=$ac_cv_prog_RC
33419 if test -n "$RC"; then
33420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
33421 $as_echo "$RC" >&6; }
33422 else
33423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33424 $as_echo "no" >&6; }
33425 fi
33426 
33427 
33428 
33429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33430 
33431   # First separate the path from the arguments. This will split at the first
33432   # space.
33433   complete="$RC"
33434   path="${complete%% *}"
33435   tmp="$complete EOL"
33436   arguments="${tmp#* }"
33437 
33438   # Input might be given as Windows format, start by converting to
33439   # unix format.
33440   new_path=`$CYGPATH -u "$path"`
33441 
33442   # Now try to locate executable using which
33443   new_path=`$WHICH "$new_path" 2> /dev/null`
33444   # bat and cmd files are not always considered executable in cygwin causing which
33445   # to not find them
33446   if test "x$new_path" = x \
33447       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33448       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33449     new_path=`$CYGPATH -u "$path"`
33450   fi
33451   if test "x$new_path" = x; then
33452     # Oops. Which didn't find the executable.
33453     # The splitting of arguments from the executable at a space might have been incorrect,
33454     # since paths with space are more likely in Windows. Give it another try with the whole
33455     # argument.
33456     path="$complete"
33457     arguments="EOL"
33458     new_path=`$CYGPATH -u "$path"`
33459     new_path=`$WHICH "$new_path" 2> /dev/null`
33460     # bat and cmd files are not always considered executable in cygwin causing which
33461     # to not find them
33462     if test "x$new_path" = x \
33463         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33464         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33465       new_path=`$CYGPATH -u "$path"`
33466     fi
33467     if test "x$new_path" = x; then
33468       # It's still not found. Now this is an unrecoverable error.
33469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33470 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33471       has_space=`$ECHO "$complete" | $GREP " "`
33472       if test "x$has_space" != x; then
33473         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33474 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33475       fi
33476       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33477     fi
33478   fi
33479 
33480   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33481   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33482   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33483   # "foo.exe" is OK but "foo" is an error.
33484   #
33485   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33486   # It is also a way to make sure we got the proper file name for the real test later on.
33487   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33488   if test "x$test_shortpath" = x; then
33489     # Short path failed, file does not exist as specified.
33490     # Try adding .exe or .cmd
33491     if test -f "${new_path}.exe"; then
33492       input_to_shortpath="${new_path}.exe"
33493     elif test -f "${new_path}.cmd"; then
33494       input_to_shortpath="${new_path}.cmd"
33495     else
33496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
33497 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
33498       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33499 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33500       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33501     fi
33502   else
33503     input_to_shortpath="$new_path"
33504   fi
33505 
33506   # Call helper function which possibly converts this using DOS-style short mode.
33507   # If so, the updated path is stored in $new_path.
33508   new_path="$input_to_shortpath"
33509 
33510   input_path="$input_to_shortpath"
33511   # Check if we need to convert this using DOS-style short mode. If the path
33512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33513   # take no chances and rewrite it.
33514   # Note: m4 eats our [], so we need to use [ and ] instead.
33515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33516   if test "x$has_forbidden_chars" != x; then
33517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33521       # Going to short mode and back again did indeed matter. Since short mode is
33522       # case insensitive, let's make it lowercase to improve readability.
33523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33524       # Now convert it back to Unix-style (cygpath)
33525       input_path=`$CYGPATH -u "$shortmode_path"`
33526       new_path="$input_path"
33527     fi
33528   fi
33529 
33530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33531   if test "x$test_cygdrive_prefix" = x; then
33532     # As a simple fix, exclude /usr/bin since it's not a real path.
33533     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33535       # a path prefixed by /cygdrive for fixpath to work.
33536       new_path="$CYGWIN_ROOT_PATH$input_path"
33537     fi
33538   fi
33539 
33540   # remove trailing .exe if any
33541   new_path="${new_path/%.exe/}"
33542 
33543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33544 
33545   # First separate the path from the arguments. This will split at the first
33546   # space.
33547   complete="$RC"
33548   path="${complete%% *}"
33549   tmp="$complete EOL"
33550   arguments="${tmp#* }"
33551 
33552   # Input might be given as Windows format, start by converting to
33553   # unix format.
33554   new_path="$path"
33555 
33556   windows_path="$new_path"
33557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33558     unix_path=`$CYGPATH -u "$windows_path"`
33559     new_path="$unix_path"
33560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33562     new_path="$unix_path"
33563   fi
33564 
33565 
33566   # Now try to locate executable using which
33567   new_path=`$WHICH "$new_path" 2> /dev/null`
33568 
33569   if test "x$new_path" = x; then
33570     # Oops. Which didn't find the executable.
33571     # The splitting of arguments from the executable at a space might have been incorrect,
33572     # since paths with space are more likely in Windows. Give it another try with the whole
33573     # argument.
33574     path="$complete"
33575     arguments="EOL"
33576     new_path="$path"
33577 
33578   windows_path="$new_path"
33579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33580     unix_path=`$CYGPATH -u "$windows_path"`
33581     new_path="$unix_path"
33582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33584     new_path="$unix_path"
33585   fi
33586 
33587 
33588     new_path=`$WHICH "$new_path" 2> /dev/null`
33589     # bat and cmd files are not always considered executable in MSYS causing which
33590     # to not find them
33591     if test "x$new_path" = x \
33592         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33593         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33594       new_path="$path"
33595 
33596   windows_path="$new_path"
33597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33598     unix_path=`$CYGPATH -u "$windows_path"`
33599     new_path="$unix_path"
33600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33602     new_path="$unix_path"
33603   fi
33604 
33605     fi
33606 
33607     if test "x$new_path" = x; then
33608       # It's still not found. Now this is an unrecoverable error.
33609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33610 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33611       has_space=`$ECHO "$complete" | $GREP " "`
33612       if test "x$has_space" != x; then
33613         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33614 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33615       fi
33616       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33617     fi
33618   fi
33619 
33620   # Now new_path has a complete unix path to the binary
33621   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33622     # Keep paths in /bin as-is, but remove trailing .exe if any
33623     new_path="${new_path/%.exe/}"
33624     # Do not save /bin paths to all_fixpath_prefixes!
33625   else
33626     # Not in mixed or Windows style, start by that.
33627     new_path=`cmd //c echo $new_path`
33628 
33629   input_path="$new_path"
33630   # Check if we need to convert this using DOS-style short mode. If the path
33631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33632   # take no chances and rewrite it.
33633   # Note: m4 eats our [], so we need to use [ and ] instead.
33634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33635   if test "x$has_forbidden_chars" != x; then
33636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33638   fi
33639 
33640     # Output is in $new_path
33641 
33642   windows_path="$new_path"
33643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33644     unix_path=`$CYGPATH -u "$windows_path"`
33645     new_path="$unix_path"
33646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33648     new_path="$unix_path"
33649   fi
33650 
33651     # remove trailing .exe if any
33652     new_path="${new_path/%.exe/}"
33653 
33654     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33655     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33656   fi
33657 
33658   else
33659     # We're on a posix platform. Hooray! :)
33660     # First separate the path from the arguments. This will split at the first
33661     # space.
33662     complete="$RC"
33663     path="${complete%% *}"
33664     tmp="$complete EOL"
33665     arguments="${tmp#* }"
33666 
33667     # Cannot rely on the command "which" here since it doesn't always work.
33668     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33669     if test -z "$is_absolute_path"; then
33670       # Path to executable is not absolute. Find it.
33671       IFS_save="$IFS"
33672       IFS=:
33673       for p in $PATH; do
33674         if test -f "$p/$path" && test -x "$p/$path"; then
33675           new_path="$p/$path"
33676           break
33677         fi
33678       done
33679       IFS="$IFS_save"
33680     else
33681       # This is an absolute path, we can use it without further modifications.
33682       new_path="$path"
33683     fi
33684 
33685     if test "x$new_path" = x; then
33686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
33687 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
33688       has_space=`$ECHO "$complete" | $GREP " "`
33689       if test "x$has_space" != x; then
33690         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33691 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33692       fi
33693       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
33694     fi
33695   fi
33696 
33697   # Now join together the path and the arguments once again
33698   if test "x$arguments" != xEOL; then
33699     new_complete="$new_path ${arguments% *}"
33700   else
33701     new_complete="$new_path"
33702   fi
33703 
33704   if test "x$complete" != "x$new_complete"; then
33705     RC="$new_complete"
33706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
33707 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
33708   fi
33709 
33710     # Extract the first word of "dumpbin", so it can be a program name with args.
33711 set dummy dumpbin; ac_word=$2
33712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33713 $as_echo_n "checking for $ac_word... " >&6; }
33714 if ${ac_cv_prog_DUMPBIN+:} false; then :
33715   $as_echo_n "(cached) " >&6
33716 else
33717   if test -n "$DUMPBIN"; then
33718   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
33719 else
33720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33721 for as_dir in $PATH
33722 do
33723   IFS=$as_save_IFS
33724   test -z "$as_dir" && as_dir=.
33725     for ac_exec_ext in '' $ac_executable_extensions; do
33726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33727     ac_cv_prog_DUMPBIN="dumpbin"
33728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33729     break 2
33730   fi
33731 done
33732   done
33733 IFS=$as_save_IFS
33734 
33735 fi
33736 fi
33737 DUMPBIN=$ac_cv_prog_DUMPBIN
33738 if test -n "$DUMPBIN"; then
33739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
33740 $as_echo "$DUMPBIN" >&6; }
33741 else
33742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33743 $as_echo "no" >&6; }
33744 fi
33745 
33746 
33747 
33748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33749 
33750   # First separate the path from the arguments. This will split at the first
33751   # space.
33752   complete="$DUMPBIN"
33753   path="${complete%% *}"
33754   tmp="$complete EOL"
33755   arguments="${tmp#* }"
33756 
33757   # Input might be given as Windows format, start by converting to
33758   # unix format.
33759   new_path=`$CYGPATH -u "$path"`
33760 
33761   # Now try to locate executable using which
33762   new_path=`$WHICH "$new_path" 2> /dev/null`
33763   # bat and cmd files are not always considered executable in cygwin causing which
33764   # to not find them
33765   if test "x$new_path" = x \
33766       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33767       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33768     new_path=`$CYGPATH -u "$path"`
33769   fi
33770   if test "x$new_path" = x; then
33771     # Oops. Which didn't find the executable.
33772     # The splitting of arguments from the executable at a space might have been incorrect,
33773     # since paths with space are more likely in Windows. Give it another try with the whole
33774     # argument.
33775     path="$complete"
33776     arguments="EOL"
33777     new_path=`$CYGPATH -u "$path"`
33778     new_path=`$WHICH "$new_path" 2> /dev/null`
33779     # bat and cmd files are not always considered executable in cygwin causing which
33780     # to not find them
33781     if test "x$new_path" = x \
33782         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33783         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33784       new_path=`$CYGPATH -u "$path"`
33785     fi
33786     if test "x$new_path" = x; then
33787       # It's still not found. Now this is an unrecoverable error.
33788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33789 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33790       has_space=`$ECHO "$complete" | $GREP " "`
33791       if test "x$has_space" != x; then
33792         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33793 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33794       fi
33795       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33796     fi
33797   fi
33798 
33799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33802   # "foo.exe" is OK but "foo" is an error.
33803   #
33804   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33805   # It is also a way to make sure we got the proper file name for the real test later on.
33806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33807   if test "x$test_shortpath" = x; then
33808     # Short path failed, file does not exist as specified.
33809     # Try adding .exe or .cmd
33810     if test -f "${new_path}.exe"; then
33811       input_to_shortpath="${new_path}.exe"
33812     elif test -f "${new_path}.cmd"; then
33813       input_to_shortpath="${new_path}.cmd"
33814     else
33815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
33816 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
33817       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33818 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33819       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33820     fi
33821   else
33822     input_to_shortpath="$new_path"
33823   fi
33824 
33825   # Call helper function which possibly converts this using DOS-style short mode.
33826   # If so, the updated path is stored in $new_path.
33827   new_path="$input_to_shortpath"
33828 
33829   input_path="$input_to_shortpath"
33830   # Check if we need to convert this using DOS-style short mode. If the path
33831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33832   # take no chances and rewrite it.
33833   # Note: m4 eats our [], so we need to use [ and ] instead.
33834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33835   if test "x$has_forbidden_chars" != x; then
33836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33837     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33838     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33839     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33840       # Going to short mode and back again did indeed matter. Since short mode is
33841       # case insensitive, let's make it lowercase to improve readability.
33842       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33843       # Now convert it back to Unix-style (cygpath)
33844       input_path=`$CYGPATH -u "$shortmode_path"`
33845       new_path="$input_path"
33846     fi
33847   fi
33848 
33849   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33850   if test "x$test_cygdrive_prefix" = x; then
33851     # As a simple fix, exclude /usr/bin since it's not a real path.
33852     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33853       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33854       # a path prefixed by /cygdrive for fixpath to work.
33855       new_path="$CYGWIN_ROOT_PATH$input_path"
33856     fi
33857   fi
33858 
33859   # remove trailing .exe if any
33860   new_path="${new_path/%.exe/}"
33861 
33862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33863 
33864   # First separate the path from the arguments. This will split at the first
33865   # space.
33866   complete="$DUMPBIN"
33867   path="${complete%% *}"
33868   tmp="$complete EOL"
33869   arguments="${tmp#* }"
33870 
33871   # Input might be given as Windows format, start by converting to
33872   # unix format.
33873   new_path="$path"
33874 
33875   windows_path="$new_path"
33876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33877     unix_path=`$CYGPATH -u "$windows_path"`
33878     new_path="$unix_path"
33879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33881     new_path="$unix_path"
33882   fi
33883 
33884 
33885   # Now try to locate executable using which
33886   new_path=`$WHICH "$new_path" 2> /dev/null`
33887 
33888   if test "x$new_path" = x; then
33889     # Oops. Which didn't find the executable.
33890     # The splitting of arguments from the executable at a space might have been incorrect,
33891     # since paths with space are more likely in Windows. Give it another try with the whole
33892     # argument.
33893     path="$complete"
33894     arguments="EOL"
33895     new_path="$path"
33896 
33897   windows_path="$new_path"
33898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33899     unix_path=`$CYGPATH -u "$windows_path"`
33900     new_path="$unix_path"
33901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33903     new_path="$unix_path"
33904   fi
33905 
33906 
33907     new_path=`$WHICH "$new_path" 2> /dev/null`
33908     # bat and cmd files are not always considered executable in MSYS causing which
33909     # to not find them
33910     if test "x$new_path" = x \
33911         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33912         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33913       new_path="$path"
33914 
33915   windows_path="$new_path"
33916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33917     unix_path=`$CYGPATH -u "$windows_path"`
33918     new_path="$unix_path"
33919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33921     new_path="$unix_path"
33922   fi
33923 
33924     fi
33925 
33926     if test "x$new_path" = x; then
33927       # It's still not found. Now this is an unrecoverable error.
33928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
33929 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
33930       has_space=`$ECHO "$complete" | $GREP " "`
33931       if test "x$has_space" != x; then
33932         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33933 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33934       fi
33935       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
33936     fi
33937   fi
33938 
33939   # Now new_path has a complete unix path to the binary
33940   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33941     # Keep paths in /bin as-is, but remove trailing .exe if any
33942     new_path="${new_path/%.exe/}"
33943     # Do not save /bin paths to all_fixpath_prefixes!
33944   else
33945     # Not in mixed or Windows style, start by that.
33946     new_path=`cmd //c echo $new_path`
33947 
33948   input_path="$new_path"
33949   # Check if we need to convert this using DOS-style short mode. If the path
33950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33951   # take no chances and rewrite it.
33952   # Note: m4 eats our [], so we need to use [ and ] instead.
33953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33954   if test "x$has_forbidden_chars" != x; then
33955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33956     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33957   fi
33958 
33959     # Output is in $new_path
33960 
33961   windows_path="$new_path"
33962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33963     unix_path=`$CYGPATH -u "$windows_path"`
33964     new_path="$unix_path"
33965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33967     new_path="$unix_path"
33968   fi
33969 
33970     # remove trailing .exe if any
33971     new_path="${new_path/%.exe/}"
33972 
33973     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33974     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33975   fi
33976 
33977   else
33978     # We're on a posix platform. Hooray! :)
33979     # First separate the path from the arguments. This will split at the first
33980     # space.
33981     complete="$DUMPBIN"
33982     path="${complete%% *}"
33983     tmp="$complete EOL"
33984     arguments="${tmp#* }"
33985 
33986     # Cannot rely on the command "which" here since it doesn't always work.
33987     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33988     if test -z "$is_absolute_path"; then
33989       # Path to executable is not absolute. Find it.
33990       IFS_save="$IFS"
33991       IFS=:
33992       for p in $PATH; do
33993         if test -f "$p/$path" && test -x "$p/$path"; then
33994           new_path="$p/$path"
33995           break
33996         fi
33997       done
33998       IFS="$IFS_save"
33999     else
34000       # This is an absolute path, we can use it without further modifications.
34001       new_path="$path"
34002     fi
34003 
34004     if test "x$new_path" = x; then
34005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34006 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34007       has_space=`$ECHO "$complete" | $GREP " "`
34008       if test "x$has_space" != x; then
34009         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34010 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34011       fi
34012       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34013     fi
34014   fi
34015 
34016   # Now join together the path and the arguments once again
34017   if test "x$arguments" != xEOL; then
34018     new_complete="$new_path ${arguments% *}"
34019   else
34020     new_complete="$new_path"
34021   fi
34022 
34023   if test "x$complete" != "x$new_complete"; then
34024     DUMPBIN="$new_complete"
34025     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34026 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34027   fi
34028 
34029     # We need to check for 'msbuild.exe' because at the place where we expect to
34030     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34031     # won't find the 'msbuild.exe' executable in that case (and the
34032     # 'ac_executable_extensions' is unusable due to performance reasons).
34033     # Notice that we intentionally don't fix up the path to MSBUILD because we
34034     # will call it in a DOS shell during freetype detection on Windows (see
34035     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34036     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34037 set dummy msbuild.exe; ac_word=$2
34038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34039 $as_echo_n "checking for $ac_word... " >&6; }
34040 if ${ac_cv_prog_MSBUILD+:} false; then :
34041   $as_echo_n "(cached) " >&6
34042 else
34043   if test -n "$MSBUILD"; then
34044   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34045 else
34046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34047 for as_dir in $PATH
34048 do
34049   IFS=$as_save_IFS
34050   test -z "$as_dir" && as_dir=.
34051     for ac_exec_ext in '' $ac_executable_extensions; do
34052   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34053     ac_cv_prog_MSBUILD="msbuild.exe"
34054     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34055     break 2
34056   fi
34057 done
34058   done
34059 IFS=$as_save_IFS
34060 
34061 fi
34062 fi
34063 MSBUILD=$ac_cv_prog_MSBUILD
34064 if test -n "$MSBUILD"; then
34065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
34066 $as_echo "$MSBUILD" >&6; }
34067 else
34068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34069 $as_echo "no" >&6; }
34070 fi
34071 
34072 
34073   fi
34074 
34075   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34076 
34077 
34078   # Publish this variable in the help.
34079 
34080 
34081   if test "x$STRIP" = x; then
34082     # The variable is not set by user, try to locate tool using the code snippet
34083     for ac_prog in strip
34084 do
34085   # Extract the first word of "$ac_prog", so it can be a program name with args.
34086 set dummy $ac_prog; ac_word=$2
34087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34088 $as_echo_n "checking for $ac_word... " >&6; }
34089 if ${ac_cv_path_STRIP+:} false; then :
34090   $as_echo_n "(cached) " >&6
34091 else
34092   case $STRIP in
34093   [\\/]* | ?:[\\/]*)
34094   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34095   ;;
34096   *)
34097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34098 for as_dir in $PATH
34099 do
34100   IFS=$as_save_IFS
34101   test -z "$as_dir" && as_dir=.
34102     for ac_exec_ext in '' $ac_executable_extensions; do
34103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34104     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34106     break 2
34107   fi
34108 done
34109   done
34110 IFS=$as_save_IFS
34111 
34112   ;;
34113 esac
34114 fi
34115 STRIP=$ac_cv_path_STRIP
34116 if test -n "$STRIP"; then
34117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34118 $as_echo "$STRIP" >&6; }
34119 else
34120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34121 $as_echo "no" >&6; }
34122 fi
34123 
34124 
34125   test -n "$STRIP" && break
34126 done
34127 
34128   else
34129     # The variable is set, but is it from the command line or the environment?
34130 
34131     # Try to remove the string !STRIP! from our list.
34132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34134       # If it failed, the variable was not from the command line. Ignore it,
34135       # but warn the user (except for BASH, which is always set by the calling BASH).
34136       if test "xSTRIP" != xBASH; then
34137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34138 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34139       fi
34140       # Try to locate tool using the code snippet
34141       for ac_prog in strip
34142 do
34143   # Extract the first word of "$ac_prog", so it can be a program name with args.
34144 set dummy $ac_prog; ac_word=$2
34145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34146 $as_echo_n "checking for $ac_word... " >&6; }
34147 if ${ac_cv_path_STRIP+:} false; then :
34148   $as_echo_n "(cached) " >&6
34149 else
34150   case $STRIP in
34151   [\\/]* | ?:[\\/]*)
34152   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34153   ;;
34154   *)
34155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34156 for as_dir in $PATH
34157 do
34158   IFS=$as_save_IFS
34159   test -z "$as_dir" && as_dir=.
34160     for ac_exec_ext in '' $ac_executable_extensions; do
34161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34162     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34164     break 2
34165   fi
34166 done
34167   done
34168 IFS=$as_save_IFS
34169 
34170   ;;
34171 esac
34172 fi
34173 STRIP=$ac_cv_path_STRIP
34174 if test -n "$STRIP"; then
34175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34176 $as_echo "$STRIP" >&6; }
34177 else
34178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34179 $as_echo "no" >&6; }
34180 fi
34181 
34182 
34183   test -n "$STRIP" && break
34184 done
34185 
34186     else
34187       # If it succeeded, then it was overridden by the user. We will use it
34188       # for the tool.
34189 
34190       # First remove it from the list of overridden variables, so we can test
34191       # for unknown variables in the end.
34192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34193 
34194       # Check if the provided tool contains a complete path.
34195       tool_specified="$STRIP"
34196       tool_basename="${tool_specified##*/}"
34197       if test "x$tool_basename" = "x$tool_specified"; then
34198         # A command without a complete path is provided, search $PATH.
34199         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34200 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34201         # Extract the first word of "$tool_basename", so it can be a program name with args.
34202 set dummy $tool_basename; ac_word=$2
34203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34204 $as_echo_n "checking for $ac_word... " >&6; }
34205 if ${ac_cv_path_STRIP+:} false; then :
34206   $as_echo_n "(cached) " >&6
34207 else
34208   case $STRIP in
34209   [\\/]* | ?:[\\/]*)
34210   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34211   ;;
34212   *)
34213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34214 for as_dir in $PATH
34215 do
34216   IFS=$as_save_IFS
34217   test -z "$as_dir" && as_dir=.
34218     for ac_exec_ext in '' $ac_executable_extensions; do
34219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34220     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34222     break 2
34223   fi
34224 done
34225   done
34226 IFS=$as_save_IFS
34227 
34228   ;;
34229 esac
34230 fi
34231 STRIP=$ac_cv_path_STRIP
34232 if test -n "$STRIP"; then
34233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34234 $as_echo "$STRIP" >&6; }
34235 else
34236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34237 $as_echo "no" >&6; }
34238 fi
34239 
34240 
34241         if test "x$STRIP" = x; then
34242           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34243         fi
34244       else
34245         # Otherwise we believe it is a complete path. Use it as it is.
34246         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34247 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34249 $as_echo_n "checking for STRIP... " >&6; }
34250         if test ! -x "$tool_specified"; then
34251           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34252 $as_echo "not found" >&6; }
34253           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34254         fi
34255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34256 $as_echo "$tool_specified" >&6; }
34257       fi
34258     fi
34259   fi
34260 
34261 
34262 
34263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264 
34265   # First separate the path from the arguments. This will split at the first
34266   # space.
34267   complete="$STRIP"
34268   path="${complete%% *}"
34269   tmp="$complete EOL"
34270   arguments="${tmp#* }"
34271 
34272   # Input might be given as Windows format, start by converting to
34273   # unix format.
34274   new_path=`$CYGPATH -u "$path"`
34275 
34276   # Now try to locate executable using which
34277   new_path=`$WHICH "$new_path" 2> /dev/null`
34278   # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
34284   fi
34285   if test "x$new_path" = x; then
34286     # Oops. Which didn't find the executable.
34287     # The splitting of arguments from the executable at a space might have been incorrect,
34288     # since paths with space are more likely in Windows. Give it another try with the whole
34289     # argument.
34290     path="$complete"
34291     arguments="EOL"
34292     new_path=`$CYGPATH -u "$path"`
34293     new_path=`$WHICH "$new_path" 2> /dev/null`
34294     # bat and cmd files are not always considered executable in cygwin causing which
34295     # to not find them
34296     if test "x$new_path" = x \
34297         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34298         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34299       new_path=`$CYGPATH -u "$path"`
34300     fi
34301     if test "x$new_path" = x; then
34302       # It's still not found. Now this is an unrecoverable error.
34303       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34304 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34305       has_space=`$ECHO "$complete" | $GREP " "`
34306       if test "x$has_space" != x; then
34307         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34308 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34309       fi
34310       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34311     fi
34312   fi
34313 
34314   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34315   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34316   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34317   # "foo.exe" is OK but "foo" is an error.
34318   #
34319   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34320   # It is also a way to make sure we got the proper file name for the real test later on.
34321   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34322   if test "x$test_shortpath" = x; then
34323     # Short path failed, file does not exist as specified.
34324     # Try adding .exe or .cmd
34325     if test -f "${new_path}.exe"; then
34326       input_to_shortpath="${new_path}.exe"
34327     elif test -f "${new_path}.cmd"; then
34328       input_to_shortpath="${new_path}.cmd"
34329     else
34330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34331 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34332       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34333 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34334       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34335     fi
34336   else
34337     input_to_shortpath="$new_path"
34338   fi
34339 
34340   # Call helper function which possibly converts this using DOS-style short mode.
34341   # If so, the updated path is stored in $new_path.
34342   new_path="$input_to_shortpath"
34343 
34344   input_path="$input_to_shortpath"
34345   # Check if we need to convert this using DOS-style short mode. If the path
34346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34347   # take no chances and rewrite it.
34348   # Note: m4 eats our [], so we need to use [ and ] instead.
34349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34350   if test "x$has_forbidden_chars" != x; then
34351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34352     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34353     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34354     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34355       # Going to short mode and back again did indeed matter. Since short mode is
34356       # case insensitive, let's make it lowercase to improve readability.
34357       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34358       # Now convert it back to Unix-style (cygpath)
34359       input_path=`$CYGPATH -u "$shortmode_path"`
34360       new_path="$input_path"
34361     fi
34362   fi
34363 
34364   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34365   if test "x$test_cygdrive_prefix" = x; then
34366     # As a simple fix, exclude /usr/bin since it's not a real path.
34367     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34368       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34369       # a path prefixed by /cygdrive for fixpath to work.
34370       new_path="$CYGWIN_ROOT_PATH$input_path"
34371     fi
34372   fi
34373 
34374   # remove trailing .exe if any
34375   new_path="${new_path/%.exe/}"
34376 
34377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34378 
34379   # First separate the path from the arguments. This will split at the first
34380   # space.
34381   complete="$STRIP"
34382   path="${complete%% *}"
34383   tmp="$complete EOL"
34384   arguments="${tmp#* }"
34385 
34386   # Input might be given as Windows format, start by converting to
34387   # unix format.
34388   new_path="$path"
34389 
34390   windows_path="$new_path"
34391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34392     unix_path=`$CYGPATH -u "$windows_path"`
34393     new_path="$unix_path"
34394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34396     new_path="$unix_path"
34397   fi
34398 
34399 
34400   # Now try to locate executable using which
34401   new_path=`$WHICH "$new_path" 2> /dev/null`
34402 
34403   if test "x$new_path" = x; then
34404     # Oops. Which didn't find the executable.
34405     # The splitting of arguments from the executable at a space might have been incorrect,
34406     # since paths with space are more likely in Windows. Give it another try with the whole
34407     # argument.
34408     path="$complete"
34409     arguments="EOL"
34410     new_path="$path"
34411 
34412   windows_path="$new_path"
34413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34414     unix_path=`$CYGPATH -u "$windows_path"`
34415     new_path="$unix_path"
34416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34418     new_path="$unix_path"
34419   fi
34420 
34421 
34422     new_path=`$WHICH "$new_path" 2> /dev/null`
34423     # bat and cmd files are not always considered executable in MSYS causing which
34424     # to not find them
34425     if test "x$new_path" = x \
34426         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34427         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34428       new_path="$path"
34429 
34430   windows_path="$new_path"
34431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34432     unix_path=`$CYGPATH -u "$windows_path"`
34433     new_path="$unix_path"
34434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34436     new_path="$unix_path"
34437   fi
34438 
34439     fi
34440 
34441     if test "x$new_path" = x; then
34442       # It's still not found. Now this is an unrecoverable error.
34443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34444 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34445       has_space=`$ECHO "$complete" | $GREP " "`
34446       if test "x$has_space" != x; then
34447         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34448 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34449       fi
34450       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34451     fi
34452   fi
34453 
34454   # Now new_path has a complete unix path to the binary
34455   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34456     # Keep paths in /bin as-is, but remove trailing .exe if any
34457     new_path="${new_path/%.exe/}"
34458     # Do not save /bin paths to all_fixpath_prefixes!
34459   else
34460     # Not in mixed or Windows style, start by that.
34461     new_path=`cmd //c echo $new_path`
34462 
34463   input_path="$new_path"
34464   # Check if we need to convert this using DOS-style short mode. If the path
34465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34466   # take no chances and rewrite it.
34467   # Note: m4 eats our [], so we need to use [ and ] instead.
34468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34469   if test "x$has_forbidden_chars" != x; then
34470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34472   fi
34473 
34474     # Output is in $new_path
34475 
34476   windows_path="$new_path"
34477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34478     unix_path=`$CYGPATH -u "$windows_path"`
34479     new_path="$unix_path"
34480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34482     new_path="$unix_path"
34483   fi
34484 
34485     # remove trailing .exe if any
34486     new_path="${new_path/%.exe/}"
34487 
34488     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34489     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34490   fi
34491 
34492   else
34493     # We're on a posix platform. Hooray! :)
34494     # First separate the path from the arguments. This will split at the first
34495     # space.
34496     complete="$STRIP"
34497     path="${complete%% *}"
34498     tmp="$complete EOL"
34499     arguments="${tmp#* }"
34500 
34501     # Cannot rely on the command "which" here since it doesn't always work.
34502     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34503     if test -z "$is_absolute_path"; then
34504       # Path to executable is not absolute. Find it.
34505       IFS_save="$IFS"
34506       IFS=:
34507       for p in $PATH; do
34508         if test -f "$p/$path" && test -x "$p/$path"; then
34509           new_path="$p/$path"
34510           break
34511         fi
34512       done
34513       IFS="$IFS_save"
34514     else
34515       # This is an absolute path, we can use it without further modifications.
34516       new_path="$path"
34517     fi
34518 
34519     if test "x$new_path" = x; then
34520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34521 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34522       has_space=`$ECHO "$complete" | $GREP " "`
34523       if test "x$has_space" != x; then
34524         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34525 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34526       fi
34527       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34528     fi
34529   fi
34530 
34531   # Now join together the path and the arguments once again
34532   if test "x$arguments" != xEOL; then
34533     new_complete="$new_path ${arguments% *}"
34534   else
34535     new_complete="$new_path"
34536   fi
34537 
34538   if test "x$complete" != "x$new_complete"; then
34539     STRIP="$new_complete"
34540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
34541 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
34542   fi
34543 
34544 
34545 
34546   # Publish this variable in the help.
34547 
34548 
34549   if test "x$NM" = x; then
34550     # The variable is not set by user, try to locate tool using the code snippet
34551     for ac_prog in nm
34552 do
34553   # Extract the first word of "$ac_prog", so it can be a program name with args.
34554 set dummy $ac_prog; ac_word=$2
34555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34556 $as_echo_n "checking for $ac_word... " >&6; }
34557 if ${ac_cv_path_NM+:} false; then :
34558   $as_echo_n "(cached) " >&6
34559 else
34560   case $NM in
34561   [\\/]* | ?:[\\/]*)
34562   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34563   ;;
34564   *)
34565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34566 for as_dir in $PATH
34567 do
34568   IFS=$as_save_IFS
34569   test -z "$as_dir" && as_dir=.
34570     for ac_exec_ext in '' $ac_executable_extensions; do
34571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34572     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34574     break 2
34575   fi
34576 done
34577   done
34578 IFS=$as_save_IFS
34579 
34580   ;;
34581 esac
34582 fi
34583 NM=$ac_cv_path_NM
34584 if test -n "$NM"; then
34585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34586 $as_echo "$NM" >&6; }
34587 else
34588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34589 $as_echo "no" >&6; }
34590 fi
34591 
34592 
34593   test -n "$NM" && break
34594 done
34595 
34596   else
34597     # The variable is set, but is it from the command line or the environment?
34598 
34599     # Try to remove the string !NM! from our list.
34600     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
34601     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34602       # If it failed, the variable was not from the command line. Ignore it,
34603       # but warn the user (except for BASH, which is always set by the calling BASH).
34604       if test "xNM" != xBASH; then
34605         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
34606 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
34607       fi
34608       # Try to locate tool using the code snippet
34609       for ac_prog in nm
34610 do
34611   # Extract the first word of "$ac_prog", so it can be a program name with args.
34612 set dummy $ac_prog; ac_word=$2
34613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34614 $as_echo_n "checking for $ac_word... " >&6; }
34615 if ${ac_cv_path_NM+:} false; then :
34616   $as_echo_n "(cached) " >&6
34617 else
34618   case $NM in
34619   [\\/]* | ?:[\\/]*)
34620   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34621   ;;
34622   *)
34623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34624 for as_dir in $PATH
34625 do
34626   IFS=$as_save_IFS
34627   test -z "$as_dir" && as_dir=.
34628     for ac_exec_ext in '' $ac_executable_extensions; do
34629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34630     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34632     break 2
34633   fi
34634 done
34635   done
34636 IFS=$as_save_IFS
34637 
34638   ;;
34639 esac
34640 fi
34641 NM=$ac_cv_path_NM
34642 if test -n "$NM"; then
34643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34644 $as_echo "$NM" >&6; }
34645 else
34646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34647 $as_echo "no" >&6; }
34648 fi
34649 
34650 
34651   test -n "$NM" && break
34652 done
34653 
34654     else
34655       # If it succeeded, then it was overridden by the user. We will use it
34656       # for the tool.
34657 
34658       # First remove it from the list of overridden variables, so we can test
34659       # for unknown variables in the end.
34660       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34661 
34662       # Check if the provided tool contains a complete path.
34663       tool_specified="$NM"
34664       tool_basename="${tool_specified##*/}"
34665       if test "x$tool_basename" = "x$tool_specified"; then
34666         # A command without a complete path is provided, search $PATH.
34667         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
34668 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
34669         # Extract the first word of "$tool_basename", so it can be a program name with args.
34670 set dummy $tool_basename; ac_word=$2
34671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34672 $as_echo_n "checking for $ac_word... " >&6; }
34673 if ${ac_cv_path_NM+:} false; then :
34674   $as_echo_n "(cached) " >&6
34675 else
34676   case $NM in
34677   [\\/]* | ?:[\\/]*)
34678   ac_cv_path_NM="$NM" # Let the user override the test with a path.
34679   ;;
34680   *)
34681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34682 for as_dir in $PATH
34683 do
34684   IFS=$as_save_IFS
34685   test -z "$as_dir" && as_dir=.
34686     for ac_exec_ext in '' $ac_executable_extensions; do
34687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34688     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
34689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34690     break 2
34691   fi
34692 done
34693   done
34694 IFS=$as_save_IFS
34695 
34696   ;;
34697 esac
34698 fi
34699 NM=$ac_cv_path_NM
34700 if test -n "$NM"; then
34701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
34702 $as_echo "$NM" >&6; }
34703 else
34704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34705 $as_echo "no" >&6; }
34706 fi
34707 
34708 
34709         if test "x$NM" = x; then
34710           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34711         fi
34712       else
34713         # Otherwise we believe it is a complete path. Use it as it is.
34714         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
34715 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
34716         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
34717 $as_echo_n "checking for NM... " >&6; }
34718         if test ! -x "$tool_specified"; then
34719           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34720 $as_echo "not found" >&6; }
34721           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
34722         fi
34723         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34724 $as_echo "$tool_specified" >&6; }
34725       fi
34726     fi
34727   fi
34728 
34729 
34730 
34731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34732 
34733   # First separate the path from the arguments. This will split at the first
34734   # space.
34735   complete="$NM"
34736   path="${complete%% *}"
34737   tmp="$complete EOL"
34738   arguments="${tmp#* }"
34739 
34740   # Input might be given as Windows format, start by converting to
34741   # unix format.
34742   new_path=`$CYGPATH -u "$path"`
34743 
34744   # Now try to locate executable using which
34745   new_path=`$WHICH "$new_path" 2> /dev/null`
34746   # bat and cmd files are not always considered executable in cygwin causing which
34747   # to not find them
34748   if test "x$new_path" = x \
34749       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34750       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34751     new_path=`$CYGPATH -u "$path"`
34752   fi
34753   if test "x$new_path" = x; then
34754     # Oops. Which didn't find the executable.
34755     # The splitting of arguments from the executable at a space might have been incorrect,
34756     # since paths with space are more likely in Windows. Give it another try with the whole
34757     # argument.
34758     path="$complete"
34759     arguments="EOL"
34760     new_path=`$CYGPATH -u "$path"`
34761     new_path=`$WHICH "$new_path" 2> /dev/null`
34762     # bat and cmd files are not always considered executable in cygwin causing which
34763     # to not find them
34764     if test "x$new_path" = x \
34765         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34766         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34767       new_path=`$CYGPATH -u "$path"`
34768     fi
34769     if test "x$new_path" = x; then
34770       # It's still not found. Now this is an unrecoverable error.
34771       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
34772 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
34773       has_space=`$ECHO "$complete" | $GREP " "`
34774       if test "x$has_space" != x; then
34775         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34776 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34777       fi
34778       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34779     fi
34780   fi
34781 
34782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34785   # "foo.exe" is OK but "foo" is an error.
34786   #
34787   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34788   # It is also a way to make sure we got the proper file name for the real test later on.
34789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34790   if test "x$test_shortpath" = x; then
34791     # Short path failed, file does not exist as specified.
34792     # Try adding .exe or .cmd
34793     if test -f "${new_path}.exe"; then
34794       input_to_shortpath="${new_path}.exe"
34795     elif test -f "${new_path}.cmd"; then
34796       input_to_shortpath="${new_path}.cmd"
34797     else
34798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
34799 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
34800       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34801 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34802       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34803     fi
34804   else
34805     input_to_shortpath="$new_path"
34806   fi
34807 
34808   # Call helper function which possibly converts this using DOS-style short mode.
34809   # If so, the updated path is stored in $new_path.
34810   new_path="$input_to_shortpath"
34811 
34812   input_path="$input_to_shortpath"
34813   # Check if we need to convert this using DOS-style short mode. If the path
34814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34815   # take no chances and rewrite it.
34816   # Note: m4 eats our [], so we need to use [ and ] instead.
34817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34818   if test "x$has_forbidden_chars" != x; then
34819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34820     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34821     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34822     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34823       # Going to short mode and back again did indeed matter. Since short mode is
34824       # case insensitive, let's make it lowercase to improve readability.
34825       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34826       # Now convert it back to Unix-style (cygpath)
34827       input_path=`$CYGPATH -u "$shortmode_path"`
34828       new_path="$input_path"
34829     fi
34830   fi
34831 
34832   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34833   if test "x$test_cygdrive_prefix" = x; then
34834     # As a simple fix, exclude /usr/bin since it's not a real path.
34835     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34836       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34837       # a path prefixed by /cygdrive for fixpath to work.
34838       new_path="$CYGWIN_ROOT_PATH$input_path"
34839     fi
34840   fi
34841 
34842   # remove trailing .exe if any
34843   new_path="${new_path/%.exe/}"
34844 
34845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34846 
34847   # First separate the path from the arguments. This will split at the first
34848   # space.
34849   complete="$NM"
34850   path="${complete%% *}"
34851   tmp="$complete EOL"
34852   arguments="${tmp#* }"
34853 
34854   # Input might be given as Windows format, start by converting to
34855   # unix format.
34856   new_path="$path"
34857 
34858   windows_path="$new_path"
34859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34860     unix_path=`$CYGPATH -u "$windows_path"`
34861     new_path="$unix_path"
34862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34864     new_path="$unix_path"
34865   fi
34866 
34867 
34868   # Now try to locate executable using which
34869   new_path=`$WHICH "$new_path" 2> /dev/null`
34870 
34871   if test "x$new_path" = x; then
34872     # Oops. Which didn't find the executable.
34873     # The splitting of arguments from the executable at a space might have been incorrect,
34874     # since paths with space are more likely in Windows. Give it another try with the whole
34875     # argument.
34876     path="$complete"
34877     arguments="EOL"
34878     new_path="$path"
34879 
34880   windows_path="$new_path"
34881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34882     unix_path=`$CYGPATH -u "$windows_path"`
34883     new_path="$unix_path"
34884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34886     new_path="$unix_path"
34887   fi
34888 
34889 
34890     new_path=`$WHICH "$new_path" 2> /dev/null`
34891     # bat and cmd files are not always considered executable in MSYS causing which
34892     # to not find them
34893     if test "x$new_path" = x \
34894         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34895         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34896       new_path="$path"
34897 
34898   windows_path="$new_path"
34899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34900     unix_path=`$CYGPATH -u "$windows_path"`
34901     new_path="$unix_path"
34902   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34903     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34904     new_path="$unix_path"
34905   fi
34906 
34907     fi
34908 
34909     if test "x$new_path" = x; then
34910       # It's still not found. Now this is an unrecoverable error.
34911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
34912 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
34913       has_space=`$ECHO "$complete" | $GREP " "`
34914       if test "x$has_space" != x; then
34915         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34917       fi
34918       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34919     fi
34920   fi
34921 
34922   # Now new_path has a complete unix path to the binary
34923   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34924     # Keep paths in /bin as-is, but remove trailing .exe if any
34925     new_path="${new_path/%.exe/}"
34926     # Do not save /bin paths to all_fixpath_prefixes!
34927   else
34928     # Not in mixed or Windows style, start by that.
34929     new_path=`cmd //c echo $new_path`
34930 
34931   input_path="$new_path"
34932   # Check if we need to convert this using DOS-style short mode. If the path
34933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34934   # take no chances and rewrite it.
34935   # Note: m4 eats our [], so we need to use [ and ] instead.
34936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34937   if test "x$has_forbidden_chars" != x; then
34938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34939     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34940   fi
34941 
34942     # Output is in $new_path
34943 
34944   windows_path="$new_path"
34945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34946     unix_path=`$CYGPATH -u "$windows_path"`
34947     new_path="$unix_path"
34948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34950     new_path="$unix_path"
34951   fi
34952 
34953     # remove trailing .exe if any
34954     new_path="${new_path/%.exe/}"
34955 
34956     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34957     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34958   fi
34959 
34960   else
34961     # We're on a posix platform. Hooray! :)
34962     # First separate the path from the arguments. This will split at the first
34963     # space.
34964     complete="$NM"
34965     path="${complete%% *}"
34966     tmp="$complete EOL"
34967     arguments="${tmp#* }"
34968 
34969     # Cannot rely on the command "which" here since it doesn't always work.
34970     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34971     if test -z "$is_absolute_path"; then
34972       # Path to executable is not absolute. Find it.
34973       IFS_save="$IFS"
34974       IFS=:
34975       for p in $PATH; do
34976         if test -f "$p/$path" && test -x "$p/$path"; then
34977           new_path="$p/$path"
34978           break
34979         fi
34980       done
34981       IFS="$IFS_save"
34982     else
34983       # This is an absolute path, we can use it without further modifications.
34984       new_path="$path"
34985     fi
34986 
34987     if test "x$new_path" = x; then
34988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
34989 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
34990       has_space=`$ECHO "$complete" | $GREP " "`
34991       if test "x$has_space" != x; then
34992         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34993 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34994       fi
34995       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
34996     fi
34997   fi
34998 
34999   # Now join together the path and the arguments once again
35000   if test "x$arguments" != xEOL; then
35001     new_complete="$new_path ${arguments% *}"
35002   else
35003     new_complete="$new_path"
35004   fi
35005 
35006   if test "x$complete" != "x$new_complete"; then
35007     NM="$new_complete"
35008     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35009 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35010   fi
35011 
35012 
35013 
35014   # Publish this variable in the help.
35015 
35016 
35017   if test "x$GNM" = x; then
35018     # The variable is not set by user, try to locate tool using the code snippet
35019     for ac_prog in gnm
35020 do
35021   # Extract the first word of "$ac_prog", so it can be a program name with args.
35022 set dummy $ac_prog; ac_word=$2
35023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35024 $as_echo_n "checking for $ac_word... " >&6; }
35025 if ${ac_cv_path_GNM+:} false; then :
35026   $as_echo_n "(cached) " >&6
35027 else
35028   case $GNM in
35029   [\\/]* | ?:[\\/]*)
35030   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35031   ;;
35032   *)
35033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35034 for as_dir in $PATH
35035 do
35036   IFS=$as_save_IFS
35037   test -z "$as_dir" && as_dir=.
35038     for ac_exec_ext in '' $ac_executable_extensions; do
35039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35040     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35042     break 2
35043   fi
35044 done
35045   done
35046 IFS=$as_save_IFS
35047 
35048   ;;
35049 esac
35050 fi
35051 GNM=$ac_cv_path_GNM
35052 if test -n "$GNM"; then
35053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35054 $as_echo "$GNM" >&6; }
35055 else
35056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35057 $as_echo "no" >&6; }
35058 fi
35059 
35060 
35061   test -n "$GNM" && break
35062 done
35063 
35064   else
35065     # The variable is set, but is it from the command line or the environment?
35066 
35067     # Try to remove the string !GNM! from our list.
35068     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35069     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35070       # If it failed, the variable was not from the command line. Ignore it,
35071       # but warn the user (except for BASH, which is always set by the calling BASH).
35072       if test "xGNM" != xBASH; then
35073         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35074 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35075       fi
35076       # Try to locate tool using the code snippet
35077       for ac_prog in gnm
35078 do
35079   # Extract the first word of "$ac_prog", so it can be a program name with args.
35080 set dummy $ac_prog; ac_word=$2
35081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35082 $as_echo_n "checking for $ac_word... " >&6; }
35083 if ${ac_cv_path_GNM+:} false; then :
35084   $as_echo_n "(cached) " >&6
35085 else
35086   case $GNM in
35087   [\\/]* | ?:[\\/]*)
35088   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35089   ;;
35090   *)
35091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35092 for as_dir in $PATH
35093 do
35094   IFS=$as_save_IFS
35095   test -z "$as_dir" && as_dir=.
35096     for ac_exec_ext in '' $ac_executable_extensions; do
35097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35098     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35100     break 2
35101   fi
35102 done
35103   done
35104 IFS=$as_save_IFS
35105 
35106   ;;
35107 esac
35108 fi
35109 GNM=$ac_cv_path_GNM
35110 if test -n "$GNM"; then
35111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35112 $as_echo "$GNM" >&6; }
35113 else
35114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35115 $as_echo "no" >&6; }
35116 fi
35117 
35118 
35119   test -n "$GNM" && break
35120 done
35121 
35122     else
35123       # If it succeeded, then it was overridden by the user. We will use it
35124       # for the tool.
35125 
35126       # First remove it from the list of overridden variables, so we can test
35127       # for unknown variables in the end.
35128       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35129 
35130       # Check if the provided tool contains a complete path.
35131       tool_specified="$GNM"
35132       tool_basename="${tool_specified##*/}"
35133       if test "x$tool_basename" = "x$tool_specified"; then
35134         # A command without a complete path is provided, search $PATH.
35135         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35136 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35137         # Extract the first word of "$tool_basename", so it can be a program name with args.
35138 set dummy $tool_basename; ac_word=$2
35139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35140 $as_echo_n "checking for $ac_word... " >&6; }
35141 if ${ac_cv_path_GNM+:} false; then :
35142   $as_echo_n "(cached) " >&6
35143 else
35144   case $GNM in
35145   [\\/]* | ?:[\\/]*)
35146   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35147   ;;
35148   *)
35149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35150 for as_dir in $PATH
35151 do
35152   IFS=$as_save_IFS
35153   test -z "$as_dir" && as_dir=.
35154     for ac_exec_ext in '' $ac_executable_extensions; do
35155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35156     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35158     break 2
35159   fi
35160 done
35161   done
35162 IFS=$as_save_IFS
35163 
35164   ;;
35165 esac
35166 fi
35167 GNM=$ac_cv_path_GNM
35168 if test -n "$GNM"; then
35169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35170 $as_echo "$GNM" >&6; }
35171 else
35172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35173 $as_echo "no" >&6; }
35174 fi
35175 
35176 
35177         if test "x$GNM" = x; then
35178           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35179         fi
35180       else
35181         # Otherwise we believe it is a complete path. Use it as it is.
35182         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35183 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35185 $as_echo_n "checking for GNM... " >&6; }
35186         if test ! -x "$tool_specified"; then
35187           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35188 $as_echo "not found" >&6; }
35189           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35190         fi
35191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35192 $as_echo "$tool_specified" >&6; }
35193       fi
35194     fi
35195   fi
35196 
35197 
35198 
35199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35200 
35201   # First separate the path from the arguments. This will split at the first
35202   # space.
35203   complete="$GNM"
35204   path="${complete%% *}"
35205   tmp="$complete EOL"
35206   arguments="${tmp#* }"
35207 
35208   # Input might be given as Windows format, start by converting to
35209   # unix format.
35210   new_path=`$CYGPATH -u "$path"`
35211 
35212   # Now try to locate executable using which
35213   new_path=`$WHICH "$new_path" 2> /dev/null`
35214   # bat and cmd files are not always considered executable in cygwin causing which
35215   # to not find them
35216   if test "x$new_path" = x \
35217       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35218       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35219     new_path=`$CYGPATH -u "$path"`
35220   fi
35221   if test "x$new_path" = x; then
35222     # Oops. Which didn't find the executable.
35223     # The splitting of arguments from the executable at a space might have been incorrect,
35224     # since paths with space are more likely in Windows. Give it another try with the whole
35225     # argument.
35226     path="$complete"
35227     arguments="EOL"
35228     new_path=`$CYGPATH -u "$path"`
35229     new_path=`$WHICH "$new_path" 2> /dev/null`
35230     # bat and cmd files are not always considered executable in cygwin causing which
35231     # to not find them
35232     if test "x$new_path" = x \
35233         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35234         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35235       new_path=`$CYGPATH -u "$path"`
35236     fi
35237     if test "x$new_path" = x; then
35238       # It's still not found. Now this is an unrecoverable error.
35239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35240 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35241       has_space=`$ECHO "$complete" | $GREP " "`
35242       if test "x$has_space" != x; then
35243         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35244 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35245       fi
35246       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35247     fi
35248   fi
35249 
35250   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35251   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35252   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35253   # "foo.exe" is OK but "foo" is an error.
35254   #
35255   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35256   # It is also a way to make sure we got the proper file name for the real test later on.
35257   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35258   if test "x$test_shortpath" = x; then
35259     # Short path failed, file does not exist as specified.
35260     # Try adding .exe or .cmd
35261     if test -f "${new_path}.exe"; then
35262       input_to_shortpath="${new_path}.exe"
35263     elif test -f "${new_path}.cmd"; then
35264       input_to_shortpath="${new_path}.cmd"
35265     else
35266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35267 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35268       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35269 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35270       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35271     fi
35272   else
35273     input_to_shortpath="$new_path"
35274   fi
35275 
35276   # Call helper function which possibly converts this using DOS-style short mode.
35277   # If so, the updated path is stored in $new_path.
35278   new_path="$input_to_shortpath"
35279 
35280   input_path="$input_to_shortpath"
35281   # Check if we need to convert this using DOS-style short mode. If the path
35282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35283   # take no chances and rewrite it.
35284   # Note: m4 eats our [], so we need to use [ and ] instead.
35285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35286   if test "x$has_forbidden_chars" != x; then
35287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35288     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35289     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35290     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35291       # Going to short mode and back again did indeed matter. Since short mode is
35292       # case insensitive, let's make it lowercase to improve readability.
35293       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35294       # Now convert it back to Unix-style (cygpath)
35295       input_path=`$CYGPATH -u "$shortmode_path"`
35296       new_path="$input_path"
35297     fi
35298   fi
35299 
35300   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35301   if test "x$test_cygdrive_prefix" = x; then
35302     # As a simple fix, exclude /usr/bin since it's not a real path.
35303     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35304       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35305       # a path prefixed by /cygdrive for fixpath to work.
35306       new_path="$CYGWIN_ROOT_PATH$input_path"
35307     fi
35308   fi
35309 
35310   # remove trailing .exe if any
35311   new_path="${new_path/%.exe/}"
35312 
35313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35314 
35315   # First separate the path from the arguments. This will split at the first
35316   # space.
35317   complete="$GNM"
35318   path="${complete%% *}"
35319   tmp="$complete EOL"
35320   arguments="${tmp#* }"
35321 
35322   # Input might be given as Windows format, start by converting to
35323   # unix format.
35324   new_path="$path"
35325 
35326   windows_path="$new_path"
35327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35328     unix_path=`$CYGPATH -u "$windows_path"`
35329     new_path="$unix_path"
35330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35332     new_path="$unix_path"
35333   fi
35334 
35335 
35336   # Now try to locate executable using which
35337   new_path=`$WHICH "$new_path" 2> /dev/null`
35338 
35339   if test "x$new_path" = x; then
35340     # Oops. Which didn't find the executable.
35341     # The splitting of arguments from the executable at a space might have been incorrect,
35342     # since paths with space are more likely in Windows. Give it another try with the whole
35343     # argument.
35344     path="$complete"
35345     arguments="EOL"
35346     new_path="$path"
35347 
35348   windows_path="$new_path"
35349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35350     unix_path=`$CYGPATH -u "$windows_path"`
35351     new_path="$unix_path"
35352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35353     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35354     new_path="$unix_path"
35355   fi
35356 
35357 
35358     new_path=`$WHICH "$new_path" 2> /dev/null`
35359     # bat and cmd files are not always considered executable in MSYS causing which
35360     # to not find them
35361     if test "x$new_path" = x \
35362         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35363         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35364       new_path="$path"
35365 
35366   windows_path="$new_path"
35367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35368     unix_path=`$CYGPATH -u "$windows_path"`
35369     new_path="$unix_path"
35370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35372     new_path="$unix_path"
35373   fi
35374 
35375     fi
35376 
35377     if test "x$new_path" = x; then
35378       # It's still not found. Now this is an unrecoverable error.
35379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35380 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35381       has_space=`$ECHO "$complete" | $GREP " "`
35382       if test "x$has_space" != x; then
35383         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35384 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35385       fi
35386       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35387     fi
35388   fi
35389 
35390   # Now new_path has a complete unix path to the binary
35391   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35392     # Keep paths in /bin as-is, but remove trailing .exe if any
35393     new_path="${new_path/%.exe/}"
35394     # Do not save /bin paths to all_fixpath_prefixes!
35395   else
35396     # Not in mixed or Windows style, start by that.
35397     new_path=`cmd //c echo $new_path`
35398 
35399   input_path="$new_path"
35400   # Check if we need to convert this using DOS-style short mode. If the path
35401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35402   # take no chances and rewrite it.
35403   # Note: m4 eats our [], so we need to use [ and ] instead.
35404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35405   if test "x$has_forbidden_chars" != x; then
35406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35407     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35408   fi
35409 
35410     # Output is in $new_path
35411 
35412   windows_path="$new_path"
35413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35414     unix_path=`$CYGPATH -u "$windows_path"`
35415     new_path="$unix_path"
35416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35418     new_path="$unix_path"
35419   fi
35420 
35421     # remove trailing .exe if any
35422     new_path="${new_path/%.exe/}"
35423 
35424     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35425     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35426   fi
35427 
35428   else
35429     # We're on a posix platform. Hooray! :)
35430     # First separate the path from the arguments. This will split at the first
35431     # space.
35432     complete="$GNM"
35433     path="${complete%% *}"
35434     tmp="$complete EOL"
35435     arguments="${tmp#* }"
35436 
35437     # Cannot rely on the command "which" here since it doesn't always work.
35438     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35439     if test -z "$is_absolute_path"; then
35440       # Path to executable is not absolute. Find it.
35441       IFS_save="$IFS"
35442       IFS=:
35443       for p in $PATH; do
35444         if test -f "$p/$path" && test -x "$p/$path"; then
35445           new_path="$p/$path"
35446           break
35447         fi
35448       done
35449       IFS="$IFS_save"
35450     else
35451       # This is an absolute path, we can use it without further modifications.
35452       new_path="$path"
35453     fi
35454 
35455     if test "x$new_path" = x; then
35456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35457 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35458       has_space=`$ECHO "$complete" | $GREP " "`
35459       if test "x$has_space" != x; then
35460         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35462       fi
35463       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35464     fi
35465   fi
35466 
35467   # Now join together the path and the arguments once again
35468   if test "x$arguments" != xEOL; then
35469     new_complete="$new_path ${arguments% *}"
35470   else
35471     new_complete="$new_path"
35472   fi
35473 
35474   if test "x$complete" != "x$new_complete"; then
35475     GNM="$new_complete"
35476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35477 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35478   fi
35479 
35480 
35481 
35482 
35483   # Publish this variable in the help.
35484 
35485 
35486   if test "x$MCS" = x; then
35487     # The variable is not set by user, try to locate tool using the code snippet
35488     for ac_prog in mcs
35489 do
35490   # Extract the first word of "$ac_prog", so it can be a program name with args.
35491 set dummy $ac_prog; ac_word=$2
35492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35493 $as_echo_n "checking for $ac_word... " >&6; }
35494 if ${ac_cv_path_MCS+:} false; then :
35495   $as_echo_n "(cached) " >&6
35496 else
35497   case $MCS in
35498   [\\/]* | ?:[\\/]*)
35499   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35500   ;;
35501   *)
35502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35503 for as_dir in $PATH
35504 do
35505   IFS=$as_save_IFS
35506   test -z "$as_dir" && as_dir=.
35507     for ac_exec_ext in '' $ac_executable_extensions; do
35508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35509     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35511     break 2
35512   fi
35513 done
35514   done
35515 IFS=$as_save_IFS
35516 
35517   ;;
35518 esac
35519 fi
35520 MCS=$ac_cv_path_MCS
35521 if test -n "$MCS"; then
35522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35523 $as_echo "$MCS" >&6; }
35524 else
35525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35526 $as_echo "no" >&6; }
35527 fi
35528 
35529 
35530   test -n "$MCS" && break
35531 done
35532 
35533   else
35534     # The variable is set, but is it from the command line or the environment?
35535 
35536     # Try to remove the string !MCS! from our list.
35537     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
35538     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35539       # If it failed, the variable was not from the command line. Ignore it,
35540       # but warn the user (except for BASH, which is always set by the calling BASH).
35541       if test "xMCS" != xBASH; then
35542         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
35543 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
35544       fi
35545       # Try to locate tool using the code snippet
35546       for ac_prog in mcs
35547 do
35548   # Extract the first word of "$ac_prog", so it can be a program name with args.
35549 set dummy $ac_prog; ac_word=$2
35550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35551 $as_echo_n "checking for $ac_word... " >&6; }
35552 if ${ac_cv_path_MCS+:} false; then :
35553   $as_echo_n "(cached) " >&6
35554 else
35555   case $MCS in
35556   [\\/]* | ?:[\\/]*)
35557   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35558   ;;
35559   *)
35560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35561 for as_dir in $PATH
35562 do
35563   IFS=$as_save_IFS
35564   test -z "$as_dir" && as_dir=.
35565     for ac_exec_ext in '' $ac_executable_extensions; do
35566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35567     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35569     break 2
35570   fi
35571 done
35572   done
35573 IFS=$as_save_IFS
35574 
35575   ;;
35576 esac
35577 fi
35578 MCS=$ac_cv_path_MCS
35579 if test -n "$MCS"; then
35580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35581 $as_echo "$MCS" >&6; }
35582 else
35583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35584 $as_echo "no" >&6; }
35585 fi
35586 
35587 
35588   test -n "$MCS" && break
35589 done
35590 
35591     else
35592       # If it succeeded, then it was overridden by the user. We will use it
35593       # for the tool.
35594 
35595       # First remove it from the list of overridden variables, so we can test
35596       # for unknown variables in the end.
35597       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35598 
35599       # Check if the provided tool contains a complete path.
35600       tool_specified="$MCS"
35601       tool_basename="${tool_specified##*/}"
35602       if test "x$tool_basename" = "x$tool_specified"; then
35603         # A command without a complete path is provided, search $PATH.
35604         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
35605 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
35606         # Extract the first word of "$tool_basename", so it can be a program name with args.
35607 set dummy $tool_basename; ac_word=$2
35608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35609 $as_echo_n "checking for $ac_word... " >&6; }
35610 if ${ac_cv_path_MCS+:} false; then :
35611   $as_echo_n "(cached) " >&6
35612 else
35613   case $MCS in
35614   [\\/]* | ?:[\\/]*)
35615   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35616   ;;
35617   *)
35618   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35619 for as_dir in $PATH
35620 do
35621   IFS=$as_save_IFS
35622   test -z "$as_dir" && as_dir=.
35623     for ac_exec_ext in '' $ac_executable_extensions; do
35624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35625     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35627     break 2
35628   fi
35629 done
35630   done
35631 IFS=$as_save_IFS
35632 
35633   ;;
35634 esac
35635 fi
35636 MCS=$ac_cv_path_MCS
35637 if test -n "$MCS"; then
35638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35639 $as_echo "$MCS" >&6; }
35640 else
35641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35642 $as_echo "no" >&6; }
35643 fi
35644 
35645 
35646         if test "x$MCS" = x; then
35647           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35648         fi
35649       else
35650         # Otherwise we believe it is a complete path. Use it as it is.
35651         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
35652 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
35653         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
35654 $as_echo_n "checking for MCS... " >&6; }
35655         if test ! -x "$tool_specified"; then
35656           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35657 $as_echo "not found" >&6; }
35658           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
35659         fi
35660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35661 $as_echo "$tool_specified" >&6; }
35662       fi
35663     fi
35664   fi
35665 
35666 
35667 
35668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35669 
35670   # First separate the path from the arguments. This will split at the first
35671   # space.
35672   complete="$MCS"
35673   path="${complete%% *}"
35674   tmp="$complete EOL"
35675   arguments="${tmp#* }"
35676 
35677   # Input might be given as Windows format, start by converting to
35678   # unix format.
35679   new_path=`$CYGPATH -u "$path"`
35680 
35681   # Now try to locate executable using which
35682   new_path=`$WHICH "$new_path" 2> /dev/null`
35683   # bat and cmd files are not always considered executable in cygwin causing which
35684   # to not find them
35685   if test "x$new_path" = x \
35686       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35687       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35688     new_path=`$CYGPATH -u "$path"`
35689   fi
35690   if test "x$new_path" = x; then
35691     # Oops. Which didn't find the executable.
35692     # The splitting of arguments from the executable at a space might have been incorrect,
35693     # since paths with space are more likely in Windows. Give it another try with the whole
35694     # argument.
35695     path="$complete"
35696     arguments="EOL"
35697     new_path=`$CYGPATH -u "$path"`
35698     new_path=`$WHICH "$new_path" 2> /dev/null`
35699     # bat and cmd files are not always considered executable in cygwin causing which
35700     # to not find them
35701     if test "x$new_path" = x \
35702         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35703         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35704       new_path=`$CYGPATH -u "$path"`
35705     fi
35706     if test "x$new_path" = x; then
35707       # It's still not found. Now this is an unrecoverable error.
35708       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
35709 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
35710       has_space=`$ECHO "$complete" | $GREP " "`
35711       if test "x$has_space" != x; then
35712         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35713 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35714       fi
35715       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35716     fi
35717   fi
35718 
35719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35722   # "foo.exe" is OK but "foo" is an error.
35723   #
35724   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35725   # It is also a way to make sure we got the proper file name for the real test later on.
35726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35727   if test "x$test_shortpath" = x; then
35728     # Short path failed, file does not exist as specified.
35729     # Try adding .exe or .cmd
35730     if test -f "${new_path}.exe"; then
35731       input_to_shortpath="${new_path}.exe"
35732     elif test -f "${new_path}.cmd"; then
35733       input_to_shortpath="${new_path}.cmd"
35734     else
35735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
35736 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
35737       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35738 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35739       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35740     fi
35741   else
35742     input_to_shortpath="$new_path"
35743   fi
35744 
35745   # Call helper function which possibly converts this using DOS-style short mode.
35746   # If so, the updated path is stored in $new_path.
35747   new_path="$input_to_shortpath"
35748 
35749   input_path="$input_to_shortpath"
35750   # Check if we need to convert this using DOS-style short mode. If the path
35751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35752   # take no chances and rewrite it.
35753   # Note: m4 eats our [], so we need to use [ and ] instead.
35754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35755   if test "x$has_forbidden_chars" != x; then
35756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35757     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35758     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35759     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35760       # Going to short mode and back again did indeed matter. Since short mode is
35761       # case insensitive, let's make it lowercase to improve readability.
35762       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35763       # Now convert it back to Unix-style (cygpath)
35764       input_path=`$CYGPATH -u "$shortmode_path"`
35765       new_path="$input_path"
35766     fi
35767   fi
35768 
35769   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35770   if test "x$test_cygdrive_prefix" = x; then
35771     # As a simple fix, exclude /usr/bin since it's not a real path.
35772     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35773       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35774       # a path prefixed by /cygdrive for fixpath to work.
35775       new_path="$CYGWIN_ROOT_PATH$input_path"
35776     fi
35777   fi
35778 
35779   # remove trailing .exe if any
35780   new_path="${new_path/%.exe/}"
35781 
35782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35783 
35784   # First separate the path from the arguments. This will split at the first
35785   # space.
35786   complete="$MCS"
35787   path="${complete%% *}"
35788   tmp="$complete EOL"
35789   arguments="${tmp#* }"
35790 
35791   # Input might be given as Windows format, start by converting to
35792   # unix format.
35793   new_path="$path"
35794 
35795   windows_path="$new_path"
35796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35797     unix_path=`$CYGPATH -u "$windows_path"`
35798     new_path="$unix_path"
35799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35801     new_path="$unix_path"
35802   fi
35803 
35804 
35805   # Now try to locate executable using which
35806   new_path=`$WHICH "$new_path" 2> /dev/null`
35807 
35808   if test "x$new_path" = x; then
35809     # Oops. Which didn't find the executable.
35810     # The splitting of arguments from the executable at a space might have been incorrect,
35811     # since paths with space are more likely in Windows. Give it another try with the whole
35812     # argument.
35813     path="$complete"
35814     arguments="EOL"
35815     new_path="$path"
35816 
35817   windows_path="$new_path"
35818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35819     unix_path=`$CYGPATH -u "$windows_path"`
35820     new_path="$unix_path"
35821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35823     new_path="$unix_path"
35824   fi
35825 
35826 
35827     new_path=`$WHICH "$new_path" 2> /dev/null`
35828     # bat and cmd files are not always considered executable in MSYS causing which
35829     # to not find them
35830     if test "x$new_path" = x \
35831         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35832         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35833       new_path="$path"
35834 
35835   windows_path="$new_path"
35836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35837     unix_path=`$CYGPATH -u "$windows_path"`
35838     new_path="$unix_path"
35839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35841     new_path="$unix_path"
35842   fi
35843 
35844     fi
35845 
35846     if test "x$new_path" = x; then
35847       # It's still not found. Now this is an unrecoverable error.
35848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
35849 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
35850       has_space=`$ECHO "$complete" | $GREP " "`
35851       if test "x$has_space" != x; then
35852         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35853 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35854       fi
35855       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35856     fi
35857   fi
35858 
35859   # Now new_path has a complete unix path to the binary
35860   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35861     # Keep paths in /bin as-is, but remove trailing .exe if any
35862     new_path="${new_path/%.exe/}"
35863     # Do not save /bin paths to all_fixpath_prefixes!
35864   else
35865     # Not in mixed or Windows style, start by that.
35866     new_path=`cmd //c echo $new_path`
35867 
35868   input_path="$new_path"
35869   # Check if we need to convert this using DOS-style short mode. If the path
35870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35871   # take no chances and rewrite it.
35872   # Note: m4 eats our [], so we need to use [ and ] instead.
35873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35874   if test "x$has_forbidden_chars" != x; then
35875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35876     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35877   fi
35878 
35879     # Output is in $new_path
35880 
35881   windows_path="$new_path"
35882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35883     unix_path=`$CYGPATH -u "$windows_path"`
35884     new_path="$unix_path"
35885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35887     new_path="$unix_path"
35888   fi
35889 
35890     # remove trailing .exe if any
35891     new_path="${new_path/%.exe/}"
35892 
35893     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35894     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35895   fi
35896 
35897   else
35898     # We're on a posix platform. Hooray! :)
35899     # First separate the path from the arguments. This will split at the first
35900     # space.
35901     complete="$MCS"
35902     path="${complete%% *}"
35903     tmp="$complete EOL"
35904     arguments="${tmp#* }"
35905 
35906     # Cannot rely on the command "which" here since it doesn't always work.
35907     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35908     if test -z "$is_absolute_path"; then
35909       # Path to executable is not absolute. Find it.
35910       IFS_save="$IFS"
35911       IFS=:
35912       for p in $PATH; do
35913         if test -f "$p/$path" && test -x "$p/$path"; then
35914           new_path="$p/$path"
35915           break
35916         fi
35917       done
35918       IFS="$IFS_save"
35919     else
35920       # This is an absolute path, we can use it without further modifications.
35921       new_path="$path"
35922     fi
35923 
35924     if test "x$new_path" = x; then
35925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
35926 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
35927       has_space=`$ECHO "$complete" | $GREP " "`
35928       if test "x$has_space" != x; then
35929         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35930 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35931       fi
35932       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
35933     fi
35934   fi
35935 
35936   # Now join together the path and the arguments once again
35937   if test "x$arguments" != xEOL; then
35938     new_complete="$new_path ${arguments% *}"
35939   else
35940     new_complete="$new_path"
35941   fi
35942 
35943   if test "x$complete" != "x$new_complete"; then
35944     MCS="$new_complete"
35945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
35946 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
35947   fi
35948 
35949   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
35950     # FIXME: we should unify this with the solaris case above.
35951 
35952 
35953   # Publish this variable in the help.
35954 
35955 
35956   if test "x$STRIP" = x; then
35957     # The variable is not set by user, try to locate tool using the code snippet
35958     if test -n "$ac_tool_prefix"; then
35959   for ac_prog in strip
35960   do
35961     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35962 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35964 $as_echo_n "checking for $ac_word... " >&6; }
35965 if ${ac_cv_prog_STRIP+:} false; then :
35966   $as_echo_n "(cached) " >&6
35967 else
35968   if test -n "$STRIP"; then
35969   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
35970 else
35971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35972 for as_dir in $PATH
35973 do
35974   IFS=$as_save_IFS
35975   test -z "$as_dir" && as_dir=.
35976     for ac_exec_ext in '' $ac_executable_extensions; do
35977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35978     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
35979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35980     break 2
35981   fi
35982 done
35983   done
35984 IFS=$as_save_IFS
35985 
35986 fi
35987 fi
35988 STRIP=$ac_cv_prog_STRIP
35989 if test -n "$STRIP"; then
35990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35991 $as_echo "$STRIP" >&6; }
35992 else
35993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35994 $as_echo "no" >&6; }
35995 fi
35996 
35997 
35998     test -n "$STRIP" && break
35999   done
36000 fi
36001 if test -z "$STRIP"; then
36002   ac_ct_STRIP=$STRIP
36003   for ac_prog in strip
36004 do
36005   # Extract the first word of "$ac_prog", so it can be a program name with args.
36006 set dummy $ac_prog; ac_word=$2
36007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36008 $as_echo_n "checking for $ac_word... " >&6; }
36009 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36010   $as_echo_n "(cached) " >&6
36011 else
36012   if test -n "$ac_ct_STRIP"; then
36013   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36014 else
36015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36016 for as_dir in $PATH
36017 do
36018   IFS=$as_save_IFS
36019   test -z "$as_dir" && as_dir=.
36020     for ac_exec_ext in '' $ac_executable_extensions; do
36021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36022     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36024     break 2
36025   fi
36026 done
36027   done
36028 IFS=$as_save_IFS
36029 
36030 fi
36031 fi
36032 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36033 if test -n "$ac_ct_STRIP"; then
36034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36035 $as_echo "$ac_ct_STRIP" >&6; }
36036 else
36037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36038 $as_echo "no" >&6; }
36039 fi
36040 
36041 
36042   test -n "$ac_ct_STRIP" && break
36043 done
36044 
36045   if test "x$ac_ct_STRIP" = x; then
36046     STRIP=""
36047   else
36048     case $cross_compiling:$ac_tool_warned in
36049 yes:)
36050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36051 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36052 ac_tool_warned=yes ;;
36053 esac
36054     STRIP=$ac_ct_STRIP
36055   fi
36056 fi
36057 
36058   else
36059     # The variable is set, but is it from the command line or the environment?
36060 
36061     # Try to remove the string !STRIP! from our list.
36062     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36063     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36064       # If it failed, the variable was not from the command line. Ignore it,
36065       # but warn the user (except for BASH, which is always set by the calling BASH).
36066       if test "xSTRIP" != xBASH; then
36067         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36068 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36069       fi
36070       # Try to locate tool using the code snippet
36071       if test -n "$ac_tool_prefix"; then
36072   for ac_prog in strip
36073   do
36074     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36075 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36077 $as_echo_n "checking for $ac_word... " >&6; }
36078 if ${ac_cv_prog_STRIP+:} false; then :
36079   $as_echo_n "(cached) " >&6
36080 else
36081   if test -n "$STRIP"; then
36082   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36083 else
36084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36085 for as_dir in $PATH
36086 do
36087   IFS=$as_save_IFS
36088   test -z "$as_dir" && as_dir=.
36089     for ac_exec_ext in '' $ac_executable_extensions; do
36090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36091     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36093     break 2
36094   fi
36095 done
36096   done
36097 IFS=$as_save_IFS
36098 
36099 fi
36100 fi
36101 STRIP=$ac_cv_prog_STRIP
36102 if test -n "$STRIP"; then
36103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36104 $as_echo "$STRIP" >&6; }
36105 else
36106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36107 $as_echo "no" >&6; }
36108 fi
36109 
36110 
36111     test -n "$STRIP" && break
36112   done
36113 fi
36114 if test -z "$STRIP"; then
36115   ac_ct_STRIP=$STRIP
36116   for ac_prog in strip
36117 do
36118   # Extract the first word of "$ac_prog", so it can be a program name with args.
36119 set dummy $ac_prog; ac_word=$2
36120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36121 $as_echo_n "checking for $ac_word... " >&6; }
36122 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36123   $as_echo_n "(cached) " >&6
36124 else
36125   if test -n "$ac_ct_STRIP"; then
36126   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36127 else
36128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36129 for as_dir in $PATH
36130 do
36131   IFS=$as_save_IFS
36132   test -z "$as_dir" && as_dir=.
36133     for ac_exec_ext in '' $ac_executable_extensions; do
36134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36135     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36137     break 2
36138   fi
36139 done
36140   done
36141 IFS=$as_save_IFS
36142 
36143 fi
36144 fi
36145 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36146 if test -n "$ac_ct_STRIP"; then
36147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36148 $as_echo "$ac_ct_STRIP" >&6; }
36149 else
36150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36151 $as_echo "no" >&6; }
36152 fi
36153 
36154 
36155   test -n "$ac_ct_STRIP" && break
36156 done
36157 
36158   if test "x$ac_ct_STRIP" = x; then
36159     STRIP=""
36160   else
36161     case $cross_compiling:$ac_tool_warned in
36162 yes:)
36163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36164 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36165 ac_tool_warned=yes ;;
36166 esac
36167     STRIP=$ac_ct_STRIP
36168   fi
36169 fi
36170 
36171     else
36172       # If it succeeded, then it was overridden by the user. We will use it
36173       # for the tool.
36174 
36175       # First remove it from the list of overridden variables, so we can test
36176       # for unknown variables in the end.
36177       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36178 
36179       # Check if the provided tool contains a complete path.
36180       tool_specified="$STRIP"
36181       tool_basename="${tool_specified##*/}"
36182       if test "x$tool_basename" = "x$tool_specified"; then
36183         # A command without a complete path is provided, search $PATH.
36184         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36185 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36186         # Extract the first word of "$tool_basename", so it can be a program name with args.
36187 set dummy $tool_basename; ac_word=$2
36188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36189 $as_echo_n "checking for $ac_word... " >&6; }
36190 if ${ac_cv_path_STRIP+:} false; then :
36191   $as_echo_n "(cached) " >&6
36192 else
36193   case $STRIP in
36194   [\\/]* | ?:[\\/]*)
36195   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36196   ;;
36197   *)
36198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36199 for as_dir in $PATH
36200 do
36201   IFS=$as_save_IFS
36202   test -z "$as_dir" && as_dir=.
36203     for ac_exec_ext in '' $ac_executable_extensions; do
36204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36205     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36207     break 2
36208   fi
36209 done
36210   done
36211 IFS=$as_save_IFS
36212 
36213   ;;
36214 esac
36215 fi
36216 STRIP=$ac_cv_path_STRIP
36217 if test -n "$STRIP"; then
36218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36219 $as_echo "$STRIP" >&6; }
36220 else
36221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36222 $as_echo "no" >&6; }
36223 fi
36224 
36225 
36226         if test "x$STRIP" = x; then
36227           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36228         fi
36229       else
36230         # Otherwise we believe it is a complete path. Use it as it is.
36231         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36232 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36233         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36234 $as_echo_n "checking for STRIP... " >&6; }
36235         if test ! -x "$tool_specified"; then
36236           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36237 $as_echo "not found" >&6; }
36238           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36239         fi
36240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36241 $as_echo "$tool_specified" >&6; }
36242       fi
36243     fi
36244   fi
36245 
36246 
36247 
36248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36249 
36250   # First separate the path from the arguments. This will split at the first
36251   # space.
36252   complete="$STRIP"
36253   path="${complete%% *}"
36254   tmp="$complete EOL"
36255   arguments="${tmp#* }"
36256 
36257   # Input might be given as Windows format, start by converting to
36258   # unix format.
36259   new_path=`$CYGPATH -u "$path"`
36260 
36261   # Now try to locate executable using which
36262   new_path=`$WHICH "$new_path" 2> /dev/null`
36263   # bat and cmd files are not always considered executable in cygwin causing which
36264   # to not find them
36265   if test "x$new_path" = x \
36266       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36267       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36268     new_path=`$CYGPATH -u "$path"`
36269   fi
36270   if test "x$new_path" = x; then
36271     # Oops. Which didn't find the executable.
36272     # The splitting of arguments from the executable at a space might have been incorrect,
36273     # since paths with space are more likely in Windows. Give it another try with the whole
36274     # argument.
36275     path="$complete"
36276     arguments="EOL"
36277     new_path=`$CYGPATH -u "$path"`
36278     new_path=`$WHICH "$new_path" 2> /dev/null`
36279     # bat and cmd files are not always considered executable in cygwin causing which
36280     # to not find them
36281     if test "x$new_path" = x \
36282         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36283         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36284       new_path=`$CYGPATH -u "$path"`
36285     fi
36286     if test "x$new_path" = x; then
36287       # It's still not found. Now this is an unrecoverable error.
36288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36289 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36290       has_space=`$ECHO "$complete" | $GREP " "`
36291       if test "x$has_space" != x; then
36292         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36294       fi
36295       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36296     fi
36297   fi
36298 
36299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36302   # "foo.exe" is OK but "foo" is an error.
36303   #
36304   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36305   # It is also a way to make sure we got the proper file name for the real test later on.
36306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36307   if test "x$test_shortpath" = x; then
36308     # Short path failed, file does not exist as specified.
36309     # Try adding .exe or .cmd
36310     if test -f "${new_path}.exe"; then
36311       input_to_shortpath="${new_path}.exe"
36312     elif test -f "${new_path}.cmd"; then
36313       input_to_shortpath="${new_path}.cmd"
36314     else
36315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36316 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36317       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36319       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36320     fi
36321   else
36322     input_to_shortpath="$new_path"
36323   fi
36324 
36325   # Call helper function which possibly converts this using DOS-style short mode.
36326   # If so, the updated path is stored in $new_path.
36327   new_path="$input_to_shortpath"
36328 
36329   input_path="$input_to_shortpath"
36330   # Check if we need to convert this using DOS-style short mode. If the path
36331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36332   # take no chances and rewrite it.
36333   # Note: m4 eats our [], so we need to use [ and ] instead.
36334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36335   if test "x$has_forbidden_chars" != x; then
36336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36337     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36338     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36339     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36340       # Going to short mode and back again did indeed matter. Since short mode is
36341       # case insensitive, let's make it lowercase to improve readability.
36342       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36343       # Now convert it back to Unix-style (cygpath)
36344       input_path=`$CYGPATH -u "$shortmode_path"`
36345       new_path="$input_path"
36346     fi
36347   fi
36348 
36349   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36350   if test "x$test_cygdrive_prefix" = x; then
36351     # As a simple fix, exclude /usr/bin since it's not a real path.
36352     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36353       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36354       # a path prefixed by /cygdrive for fixpath to work.
36355       new_path="$CYGWIN_ROOT_PATH$input_path"
36356     fi
36357   fi
36358 
36359   # remove trailing .exe if any
36360   new_path="${new_path/%.exe/}"
36361 
36362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36363 
36364   # First separate the path from the arguments. This will split at the first
36365   # space.
36366   complete="$STRIP"
36367   path="${complete%% *}"
36368   tmp="$complete EOL"
36369   arguments="${tmp#* }"
36370 
36371   # Input might be given as Windows format, start by converting to
36372   # unix format.
36373   new_path="$path"
36374 
36375   windows_path="$new_path"
36376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36377     unix_path=`$CYGPATH -u "$windows_path"`
36378     new_path="$unix_path"
36379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36381     new_path="$unix_path"
36382   fi
36383 
36384 
36385   # Now try to locate executable using which
36386   new_path=`$WHICH "$new_path" 2> /dev/null`
36387 
36388   if test "x$new_path" = x; then
36389     # Oops. Which didn't find the executable.
36390     # The splitting of arguments from the executable at a space might have been incorrect,
36391     # since paths with space are more likely in Windows. Give it another try with the whole
36392     # argument.
36393     path="$complete"
36394     arguments="EOL"
36395     new_path="$path"
36396 
36397   windows_path="$new_path"
36398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36399     unix_path=`$CYGPATH -u "$windows_path"`
36400     new_path="$unix_path"
36401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36403     new_path="$unix_path"
36404   fi
36405 
36406 
36407     new_path=`$WHICH "$new_path" 2> /dev/null`
36408     # bat and cmd files are not always considered executable in MSYS causing which
36409     # to not find them
36410     if test "x$new_path" = x \
36411         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36412         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36413       new_path="$path"
36414 
36415   windows_path="$new_path"
36416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36417     unix_path=`$CYGPATH -u "$windows_path"`
36418     new_path="$unix_path"
36419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36421     new_path="$unix_path"
36422   fi
36423 
36424     fi
36425 
36426     if test "x$new_path" = x; then
36427       # It's still not found. Now this is an unrecoverable error.
36428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36429 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36430       has_space=`$ECHO "$complete" | $GREP " "`
36431       if test "x$has_space" != x; then
36432         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36434       fi
36435       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36436     fi
36437   fi
36438 
36439   # Now new_path has a complete unix path to the binary
36440   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36441     # Keep paths in /bin as-is, but remove trailing .exe if any
36442     new_path="${new_path/%.exe/}"
36443     # Do not save /bin paths to all_fixpath_prefixes!
36444   else
36445     # Not in mixed or Windows style, start by that.
36446     new_path=`cmd //c echo $new_path`
36447 
36448   input_path="$new_path"
36449   # Check if we need to convert this using DOS-style short mode. If the path
36450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36451   # take no chances and rewrite it.
36452   # Note: m4 eats our [], so we need to use [ and ] instead.
36453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36454   if test "x$has_forbidden_chars" != x; then
36455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36456     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36457   fi
36458 
36459     # Output is in $new_path
36460 
36461   windows_path="$new_path"
36462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36463     unix_path=`$CYGPATH -u "$windows_path"`
36464     new_path="$unix_path"
36465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36467     new_path="$unix_path"
36468   fi
36469 
36470     # remove trailing .exe if any
36471     new_path="${new_path/%.exe/}"
36472 
36473     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36474     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36475   fi
36476 
36477   else
36478     # We're on a posix platform. Hooray! :)
36479     # First separate the path from the arguments. This will split at the first
36480     # space.
36481     complete="$STRIP"
36482     path="${complete%% *}"
36483     tmp="$complete EOL"
36484     arguments="${tmp#* }"
36485 
36486     # Cannot rely on the command "which" here since it doesn't always work.
36487     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36488     if test -z "$is_absolute_path"; then
36489       # Path to executable is not absolute. Find it.
36490       IFS_save="$IFS"
36491       IFS=:
36492       for p in $PATH; do
36493         if test -f "$p/$path" && test -x "$p/$path"; then
36494           new_path="$p/$path"
36495           break
36496         fi
36497       done
36498       IFS="$IFS_save"
36499     else
36500       # This is an absolute path, we can use it without further modifications.
36501       new_path="$path"
36502     fi
36503 
36504     if test "x$new_path" = x; then
36505       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36506 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36507       has_space=`$ECHO "$complete" | $GREP " "`
36508       if test "x$has_space" != x; then
36509         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36511       fi
36512       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36513     fi
36514   fi
36515 
36516   # Now join together the path and the arguments once again
36517   if test "x$arguments" != xEOL; then
36518     new_complete="$new_path ${arguments% *}"
36519   else
36520     new_complete="$new_path"
36521   fi
36522 
36523   if test "x$complete" != "x$new_complete"; then
36524     STRIP="$new_complete"
36525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36526 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36527   fi
36528 
36529     # Extract the first word of "otool", so it can be a program name with args.
36530 set dummy otool; ac_word=$2
36531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36532 $as_echo_n "checking for $ac_word... " >&6; }
36533 if ${ac_cv_path_OTOOL+:} false; then :
36534   $as_echo_n "(cached) " >&6
36535 else
36536   case $OTOOL in
36537   [\\/]* | ?:[\\/]*)
36538   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
36539   ;;
36540   *)
36541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36542 for as_dir in $PATH
36543 do
36544   IFS=$as_save_IFS
36545   test -z "$as_dir" && as_dir=.
36546     for ac_exec_ext in '' $ac_executable_extensions; do
36547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36548     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
36549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36550     break 2
36551   fi
36552 done
36553   done
36554 IFS=$as_save_IFS
36555 
36556   ;;
36557 esac
36558 fi
36559 OTOOL=$ac_cv_path_OTOOL
36560 if test -n "$OTOOL"; then
36561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
36562 $as_echo "$OTOOL" >&6; }
36563 else
36564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36565 $as_echo "no" >&6; }
36566 fi
36567 
36568 
36569     if test "x$OTOOL" = "x"; then
36570       OTOOL="true"
36571     fi
36572 
36573 
36574   # Publish this variable in the help.
36575 
36576 
36577   if test "x$NM" = x; then
36578     # The variable is not set by user, try to locate tool using the code snippet
36579     if test -n "$ac_tool_prefix"; then
36580   for ac_prog in nm
36581   do
36582     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36583 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585 $as_echo_n "checking for $ac_word... " >&6; }
36586 if ${ac_cv_prog_NM+:} false; then :
36587   $as_echo_n "(cached) " >&6
36588 else
36589   if test -n "$NM"; then
36590   ac_cv_prog_NM="$NM" # Let the user override the test.
36591 else
36592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36593 for as_dir in $PATH
36594 do
36595   IFS=$as_save_IFS
36596   test -z "$as_dir" && as_dir=.
36597     for ac_exec_ext in '' $ac_executable_extensions; do
36598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36599     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36601     break 2
36602   fi
36603 done
36604   done
36605 IFS=$as_save_IFS
36606 
36607 fi
36608 fi
36609 NM=$ac_cv_prog_NM
36610 if test -n "$NM"; then
36611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36612 $as_echo "$NM" >&6; }
36613 else
36614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36615 $as_echo "no" >&6; }
36616 fi
36617 
36618 
36619     test -n "$NM" && break
36620   done
36621 fi
36622 if test -z "$NM"; then
36623   ac_ct_NM=$NM
36624   for ac_prog in nm
36625 do
36626   # Extract the first word of "$ac_prog", so it can be a program name with args.
36627 set dummy $ac_prog; ac_word=$2
36628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36629 $as_echo_n "checking for $ac_word... " >&6; }
36630 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36631   $as_echo_n "(cached) " >&6
36632 else
36633   if test -n "$ac_ct_NM"; then
36634   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36635 else
36636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36637 for as_dir in $PATH
36638 do
36639   IFS=$as_save_IFS
36640   test -z "$as_dir" && as_dir=.
36641     for ac_exec_ext in '' $ac_executable_extensions; do
36642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36643     ac_cv_prog_ac_ct_NM="$ac_prog"
36644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36645     break 2
36646   fi
36647 done
36648   done
36649 IFS=$as_save_IFS
36650 
36651 fi
36652 fi
36653 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36654 if test -n "$ac_ct_NM"; then
36655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36656 $as_echo "$ac_ct_NM" >&6; }
36657 else
36658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36659 $as_echo "no" >&6; }
36660 fi
36661 
36662 
36663   test -n "$ac_ct_NM" && break
36664 done
36665 
36666   if test "x$ac_ct_NM" = x; then
36667     NM=""
36668   else
36669     case $cross_compiling:$ac_tool_warned in
36670 yes:)
36671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36672 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36673 ac_tool_warned=yes ;;
36674 esac
36675     NM=$ac_ct_NM
36676   fi
36677 fi
36678 
36679   else
36680     # The variable is set, but is it from the command line or the environment?
36681 
36682     # Try to remove the string !NM! from our list.
36683     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36684     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36685       # If it failed, the variable was not from the command line. Ignore it,
36686       # but warn the user (except for BASH, which is always set by the calling BASH).
36687       if test "xNM" != xBASH; then
36688         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36689 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36690       fi
36691       # Try to locate tool using the code snippet
36692       if test -n "$ac_tool_prefix"; then
36693   for ac_prog in nm
36694   do
36695     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36696 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36698 $as_echo_n "checking for $ac_word... " >&6; }
36699 if ${ac_cv_prog_NM+:} false; then :
36700   $as_echo_n "(cached) " >&6
36701 else
36702   if test -n "$NM"; then
36703   ac_cv_prog_NM="$NM" # Let the user override the test.
36704 else
36705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36706 for as_dir in $PATH
36707 do
36708   IFS=$as_save_IFS
36709   test -z "$as_dir" && as_dir=.
36710     for ac_exec_ext in '' $ac_executable_extensions; do
36711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36712     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36714     break 2
36715   fi
36716 done
36717   done
36718 IFS=$as_save_IFS
36719 
36720 fi
36721 fi
36722 NM=$ac_cv_prog_NM
36723 if test -n "$NM"; then
36724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36725 $as_echo "$NM" >&6; }
36726 else
36727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36728 $as_echo "no" >&6; }
36729 fi
36730 
36731 
36732     test -n "$NM" && break
36733   done
36734 fi
36735 if test -z "$NM"; then
36736   ac_ct_NM=$NM
36737   for ac_prog in nm
36738 do
36739   # Extract the first word of "$ac_prog", so it can be a program name with args.
36740 set dummy $ac_prog; ac_word=$2
36741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36742 $as_echo_n "checking for $ac_word... " >&6; }
36743 if ${ac_cv_prog_ac_ct_NM+:} false; then :
36744   $as_echo_n "(cached) " >&6
36745 else
36746   if test -n "$ac_ct_NM"; then
36747   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
36748 else
36749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36750 for as_dir in $PATH
36751 do
36752   IFS=$as_save_IFS
36753   test -z "$as_dir" && as_dir=.
36754     for ac_exec_ext in '' $ac_executable_extensions; do
36755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36756     ac_cv_prog_ac_ct_NM="$ac_prog"
36757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36758     break 2
36759   fi
36760 done
36761   done
36762 IFS=$as_save_IFS
36763 
36764 fi
36765 fi
36766 ac_ct_NM=$ac_cv_prog_ac_ct_NM
36767 if test -n "$ac_ct_NM"; then
36768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
36769 $as_echo "$ac_ct_NM" >&6; }
36770 else
36771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36772 $as_echo "no" >&6; }
36773 fi
36774 
36775 
36776   test -n "$ac_ct_NM" && break
36777 done
36778 
36779   if test "x$ac_ct_NM" = x; then
36780     NM=""
36781   else
36782     case $cross_compiling:$ac_tool_warned in
36783 yes:)
36784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36785 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36786 ac_tool_warned=yes ;;
36787 esac
36788     NM=$ac_ct_NM
36789   fi
36790 fi
36791 
36792     else
36793       # If it succeeded, then it was overridden by the user. We will use it
36794       # for the tool.
36795 
36796       # First remove it from the list of overridden variables, so we can test
36797       # for unknown variables in the end.
36798       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36799 
36800       # Check if the provided tool contains a complete path.
36801       tool_specified="$NM"
36802       tool_basename="${tool_specified##*/}"
36803       if test "x$tool_basename" = "x$tool_specified"; then
36804         # A command without a complete path is provided, search $PATH.
36805         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36806 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36807         # Extract the first word of "$tool_basename", so it can be a program name with args.
36808 set dummy $tool_basename; ac_word=$2
36809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36810 $as_echo_n "checking for $ac_word... " >&6; }
36811 if ${ac_cv_path_NM+:} false; then :
36812   $as_echo_n "(cached) " >&6
36813 else
36814   case $NM in
36815   [\\/]* | ?:[\\/]*)
36816   ac_cv_path_NM="$NM" # Let the user override the test with a path.
36817   ;;
36818   *)
36819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36820 for as_dir in $PATH
36821 do
36822   IFS=$as_save_IFS
36823   test -z "$as_dir" && as_dir=.
36824     for ac_exec_ext in '' $ac_executable_extensions; do
36825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36826     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36828     break 2
36829   fi
36830 done
36831   done
36832 IFS=$as_save_IFS
36833 
36834   ;;
36835 esac
36836 fi
36837 NM=$ac_cv_path_NM
36838 if test -n "$NM"; then
36839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36840 $as_echo "$NM" >&6; }
36841 else
36842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36843 $as_echo "no" >&6; }
36844 fi
36845 
36846 
36847         if test "x$NM" = x; then
36848           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36849         fi
36850       else
36851         # Otherwise we believe it is a complete path. Use it as it is.
36852         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36853 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36854         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36855 $as_echo_n "checking for NM... " >&6; }
36856         if test ! -x "$tool_specified"; then
36857           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36858 $as_echo "not found" >&6; }
36859           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36860         fi
36861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36862 $as_echo "$tool_specified" >&6; }
36863       fi
36864     fi
36865   fi
36866 
36867 
36868 
36869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36870 
36871   # First separate the path from the arguments. This will split at the first
36872   # space.
36873   complete="$NM"
36874   path="${complete%% *}"
36875   tmp="$complete EOL"
36876   arguments="${tmp#* }"
36877 
36878   # Input might be given as Windows format, start by converting to
36879   # unix format.
36880   new_path=`$CYGPATH -u "$path"`
36881 
36882   # Now try to locate executable using which
36883   new_path=`$WHICH "$new_path" 2> /dev/null`
36884   # bat and cmd files are not always considered executable in cygwin causing which
36885   # to not find them
36886   if test "x$new_path" = x \
36887       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36888       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36889     new_path=`$CYGPATH -u "$path"`
36890   fi
36891   if test "x$new_path" = x; then
36892     # Oops. Which didn't find the executable.
36893     # The splitting of arguments from the executable at a space might have been incorrect,
36894     # since paths with space are more likely in Windows. Give it another try with the whole
36895     # argument.
36896     path="$complete"
36897     arguments="EOL"
36898     new_path=`$CYGPATH -u "$path"`
36899     new_path=`$WHICH "$new_path" 2> /dev/null`
36900     # bat and cmd files are not always considered executable in cygwin causing which
36901     # to not find them
36902     if test "x$new_path" = x \
36903         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36904         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36905       new_path=`$CYGPATH -u "$path"`
36906     fi
36907     if test "x$new_path" = x; then
36908       # It's still not found. Now this is an unrecoverable error.
36909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36910 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36911       has_space=`$ECHO "$complete" | $GREP " "`
36912       if test "x$has_space" != x; then
36913         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36914 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36915       fi
36916       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36917     fi
36918   fi
36919 
36920   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36921   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36922   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36923   # "foo.exe" is OK but "foo" is an error.
36924   #
36925   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36926   # It is also a way to make sure we got the proper file name for the real test later on.
36927   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36928   if test "x$test_shortpath" = x; then
36929     # Short path failed, file does not exist as specified.
36930     # Try adding .exe or .cmd
36931     if test -f "${new_path}.exe"; then
36932       input_to_shortpath="${new_path}.exe"
36933     elif test -f "${new_path}.cmd"; then
36934       input_to_shortpath="${new_path}.cmd"
36935     else
36936       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36937 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36938       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36939 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36940       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36941     fi
36942   else
36943     input_to_shortpath="$new_path"
36944   fi
36945 
36946   # Call helper function which possibly converts this using DOS-style short mode.
36947   # If so, the updated path is stored in $new_path.
36948   new_path="$input_to_shortpath"
36949 
36950   input_path="$input_to_shortpath"
36951   # Check if we need to convert this using DOS-style short mode. If the path
36952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36953   # take no chances and rewrite it.
36954   # Note: m4 eats our [], so we need to use [ and ] instead.
36955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36956   if test "x$has_forbidden_chars" != x; then
36957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36958     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36959     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36960     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36961       # Going to short mode and back again did indeed matter. Since short mode is
36962       # case insensitive, let's make it lowercase to improve readability.
36963       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36964       # Now convert it back to Unix-style (cygpath)
36965       input_path=`$CYGPATH -u "$shortmode_path"`
36966       new_path="$input_path"
36967     fi
36968   fi
36969 
36970   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36971   if test "x$test_cygdrive_prefix" = x; then
36972     # As a simple fix, exclude /usr/bin since it's not a real path.
36973     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36974       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36975       # a path prefixed by /cygdrive for fixpath to work.
36976       new_path="$CYGWIN_ROOT_PATH$input_path"
36977     fi
36978   fi
36979 
36980   # remove trailing .exe if any
36981   new_path="${new_path/%.exe/}"
36982 
36983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36984 
36985   # First separate the path from the arguments. This will split at the first
36986   # space.
36987   complete="$NM"
36988   path="${complete%% *}"
36989   tmp="$complete EOL"
36990   arguments="${tmp#* }"
36991 
36992   # Input might be given as Windows format, start by converting to
36993   # unix format.
36994   new_path="$path"
36995 
36996   windows_path="$new_path"
36997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36998     unix_path=`$CYGPATH -u "$windows_path"`
36999     new_path="$unix_path"
37000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37002     new_path="$unix_path"
37003   fi
37004 
37005 
37006   # Now try to locate executable using which
37007   new_path=`$WHICH "$new_path" 2> /dev/null`
37008 
37009   if test "x$new_path" = x; then
37010     # Oops. Which didn't find the executable.
37011     # The splitting of arguments from the executable at a space might have been incorrect,
37012     # since paths with space are more likely in Windows. Give it another try with the whole
37013     # argument.
37014     path="$complete"
37015     arguments="EOL"
37016     new_path="$path"
37017 
37018   windows_path="$new_path"
37019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37020     unix_path=`$CYGPATH -u "$windows_path"`
37021     new_path="$unix_path"
37022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37024     new_path="$unix_path"
37025   fi
37026 
37027 
37028     new_path=`$WHICH "$new_path" 2> /dev/null`
37029     # bat and cmd files are not always considered executable in MSYS causing which
37030     # to not find them
37031     if test "x$new_path" = x \
37032         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37033         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37034       new_path="$path"
37035 
37036   windows_path="$new_path"
37037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37038     unix_path=`$CYGPATH -u "$windows_path"`
37039     new_path="$unix_path"
37040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37042     new_path="$unix_path"
37043   fi
37044 
37045     fi
37046 
37047     if test "x$new_path" = x; then
37048       # It's still not found. Now this is an unrecoverable error.
37049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37050 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37051       has_space=`$ECHO "$complete" | $GREP " "`
37052       if test "x$has_space" != x; then
37053         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37055       fi
37056       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37057     fi
37058   fi
37059 
37060   # Now new_path has a complete unix path to the binary
37061   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37062     # Keep paths in /bin as-is, but remove trailing .exe if any
37063     new_path="${new_path/%.exe/}"
37064     # Do not save /bin paths to all_fixpath_prefixes!
37065   else
37066     # Not in mixed or Windows style, start by that.
37067     new_path=`cmd //c echo $new_path`
37068 
37069   input_path="$new_path"
37070   # Check if we need to convert this using DOS-style short mode. If the path
37071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37072   # take no chances and rewrite it.
37073   # Note: m4 eats our [], so we need to use [ and ] instead.
37074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37075   if test "x$has_forbidden_chars" != x; then
37076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37077     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37078   fi
37079 
37080     # Output is in $new_path
37081 
37082   windows_path="$new_path"
37083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37084     unix_path=`$CYGPATH -u "$windows_path"`
37085     new_path="$unix_path"
37086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37088     new_path="$unix_path"
37089   fi
37090 
37091     # remove trailing .exe if any
37092     new_path="${new_path/%.exe/}"
37093 
37094     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37095     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37096   fi
37097 
37098   else
37099     # We're on a posix platform. Hooray! :)
37100     # First separate the path from the arguments. This will split at the first
37101     # space.
37102     complete="$NM"
37103     path="${complete%% *}"
37104     tmp="$complete EOL"
37105     arguments="${tmp#* }"
37106 
37107     # Cannot rely on the command "which" here since it doesn't always work.
37108     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37109     if test -z "$is_absolute_path"; then
37110       # Path to executable is not absolute. Find it.
37111       IFS_save="$IFS"
37112       IFS=:
37113       for p in $PATH; do
37114         if test -f "$p/$path" && test -x "$p/$path"; then
37115           new_path="$p/$path"
37116           break
37117         fi
37118       done
37119       IFS="$IFS_save"
37120     else
37121       # This is an absolute path, we can use it without further modifications.
37122       new_path="$path"
37123     fi
37124 
37125     if test "x$new_path" = x; then
37126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37127 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37128       has_space=`$ECHO "$complete" | $GREP " "`
37129       if test "x$has_space" != x; then
37130         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37131 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37132       fi
37133       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37134     fi
37135   fi
37136 
37137   # Now join together the path and the arguments once again
37138   if test "x$arguments" != xEOL; then
37139     new_complete="$new_path ${arguments% *}"
37140   else
37141     new_complete="$new_path"
37142   fi
37143 
37144   if test "x$complete" != "x$new_complete"; then
37145     NM="$new_complete"
37146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37147 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37148   fi
37149 
37150     GNM="$NM"
37151 
37152   fi
37153 
37154   # objcopy is used for moving debug symbols to separate files when
37155   # full debug symbols are enabled.
37156   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37157 
37158 
37159   # Publish this variable in the help.
37160 
37161 
37162   if test "x$OBJCOPY" = x; then
37163     # The variable is not set by user, try to locate tool using the code snippet
37164     if test -n "$ac_tool_prefix"; then
37165   for ac_prog in gobjcopy objcopy
37166   do
37167     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37168 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37170 $as_echo_n "checking for $ac_word... " >&6; }
37171 if ${ac_cv_prog_OBJCOPY+:} false; then :
37172   $as_echo_n "(cached) " >&6
37173 else
37174   if test -n "$OBJCOPY"; then
37175   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37176 else
37177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37178 for as_dir in $PATH
37179 do
37180   IFS=$as_save_IFS
37181   test -z "$as_dir" && as_dir=.
37182     for ac_exec_ext in '' $ac_executable_extensions; do
37183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37184     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37186     break 2
37187   fi
37188 done
37189   done
37190 IFS=$as_save_IFS
37191 
37192 fi
37193 fi
37194 OBJCOPY=$ac_cv_prog_OBJCOPY
37195 if test -n "$OBJCOPY"; then
37196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37197 $as_echo "$OBJCOPY" >&6; }
37198 else
37199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37200 $as_echo "no" >&6; }
37201 fi
37202 
37203 
37204     test -n "$OBJCOPY" && break
37205   done
37206 fi
37207 if test -z "$OBJCOPY"; then
37208   ac_ct_OBJCOPY=$OBJCOPY
37209   for ac_prog in gobjcopy objcopy
37210 do
37211   # Extract the first word of "$ac_prog", so it can be a program name with args.
37212 set dummy $ac_prog; ac_word=$2
37213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37214 $as_echo_n "checking for $ac_word... " >&6; }
37215 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37216   $as_echo_n "(cached) " >&6
37217 else
37218   if test -n "$ac_ct_OBJCOPY"; then
37219   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37220 else
37221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37222 for as_dir in $PATH
37223 do
37224   IFS=$as_save_IFS
37225   test -z "$as_dir" && as_dir=.
37226     for ac_exec_ext in '' $ac_executable_extensions; do
37227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37228     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37230     break 2
37231   fi
37232 done
37233   done
37234 IFS=$as_save_IFS
37235 
37236 fi
37237 fi
37238 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37239 if test -n "$ac_ct_OBJCOPY"; then
37240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37241 $as_echo "$ac_ct_OBJCOPY" >&6; }
37242 else
37243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37244 $as_echo "no" >&6; }
37245 fi
37246 
37247 
37248   test -n "$ac_ct_OBJCOPY" && break
37249 done
37250 
37251   if test "x$ac_ct_OBJCOPY" = x; then
37252     OBJCOPY=""
37253   else
37254     case $cross_compiling:$ac_tool_warned in
37255 yes:)
37256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37257 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37258 ac_tool_warned=yes ;;
37259 esac
37260     OBJCOPY=$ac_ct_OBJCOPY
37261   fi
37262 fi
37263 
37264   else
37265     # The variable is set, but is it from the command line or the environment?
37266 
37267     # Try to remove the string !OBJCOPY! from our list.
37268     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37269     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37270       # If it failed, the variable was not from the command line. Ignore it,
37271       # but warn the user (except for BASH, which is always set by the calling BASH).
37272       if test "xOBJCOPY" != xBASH; then
37273         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37274 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37275       fi
37276       # Try to locate tool using the code snippet
37277       if test -n "$ac_tool_prefix"; then
37278   for ac_prog in gobjcopy objcopy
37279   do
37280     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37281 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37283 $as_echo_n "checking for $ac_word... " >&6; }
37284 if ${ac_cv_prog_OBJCOPY+:} false; then :
37285   $as_echo_n "(cached) " >&6
37286 else
37287   if test -n "$OBJCOPY"; then
37288   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37289 else
37290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37291 for as_dir in $PATH
37292 do
37293   IFS=$as_save_IFS
37294   test -z "$as_dir" && as_dir=.
37295     for ac_exec_ext in '' $ac_executable_extensions; do
37296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37297     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37299     break 2
37300   fi
37301 done
37302   done
37303 IFS=$as_save_IFS
37304 
37305 fi
37306 fi
37307 OBJCOPY=$ac_cv_prog_OBJCOPY
37308 if test -n "$OBJCOPY"; then
37309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37310 $as_echo "$OBJCOPY" >&6; }
37311 else
37312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37313 $as_echo "no" >&6; }
37314 fi
37315 
37316 
37317     test -n "$OBJCOPY" && break
37318   done
37319 fi
37320 if test -z "$OBJCOPY"; then
37321   ac_ct_OBJCOPY=$OBJCOPY
37322   for ac_prog in gobjcopy objcopy
37323 do
37324   # Extract the first word of "$ac_prog", so it can be a program name with args.
37325 set dummy $ac_prog; ac_word=$2
37326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37327 $as_echo_n "checking for $ac_word... " >&6; }
37328 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37329   $as_echo_n "(cached) " >&6
37330 else
37331   if test -n "$ac_ct_OBJCOPY"; then
37332   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37333 else
37334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37335 for as_dir in $PATH
37336 do
37337   IFS=$as_save_IFS
37338   test -z "$as_dir" && as_dir=.
37339     for ac_exec_ext in '' $ac_executable_extensions; do
37340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37341     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37343     break 2
37344   fi
37345 done
37346   done
37347 IFS=$as_save_IFS
37348 
37349 fi
37350 fi
37351 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37352 if test -n "$ac_ct_OBJCOPY"; then
37353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37354 $as_echo "$ac_ct_OBJCOPY" >&6; }
37355 else
37356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37357 $as_echo "no" >&6; }
37358 fi
37359 
37360 
37361   test -n "$ac_ct_OBJCOPY" && break
37362 done
37363 
37364   if test "x$ac_ct_OBJCOPY" = x; then
37365     OBJCOPY=""
37366   else
37367     case $cross_compiling:$ac_tool_warned in
37368 yes:)
37369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37370 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37371 ac_tool_warned=yes ;;
37372 esac
37373     OBJCOPY=$ac_ct_OBJCOPY
37374   fi
37375 fi
37376 
37377     else
37378       # If it succeeded, then it was overridden by the user. We will use it
37379       # for the tool.
37380 
37381       # First remove it from the list of overridden variables, so we can test
37382       # for unknown variables in the end.
37383       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37384 
37385       # Check if the provided tool contains a complete path.
37386       tool_specified="$OBJCOPY"
37387       tool_basename="${tool_specified##*/}"
37388       if test "x$tool_basename" = "x$tool_specified"; then
37389         # A command without a complete path is provided, search $PATH.
37390         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37391 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37392         # Extract the first word of "$tool_basename", so it can be a program name with args.
37393 set dummy $tool_basename; ac_word=$2
37394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37395 $as_echo_n "checking for $ac_word... " >&6; }
37396 if ${ac_cv_path_OBJCOPY+:} false; then :
37397   $as_echo_n "(cached) " >&6
37398 else
37399   case $OBJCOPY in
37400   [\\/]* | ?:[\\/]*)
37401   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37402   ;;
37403   *)
37404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37405 for as_dir in $PATH
37406 do
37407   IFS=$as_save_IFS
37408   test -z "$as_dir" && as_dir=.
37409     for ac_exec_ext in '' $ac_executable_extensions; do
37410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37411     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37413     break 2
37414   fi
37415 done
37416   done
37417 IFS=$as_save_IFS
37418 
37419   ;;
37420 esac
37421 fi
37422 OBJCOPY=$ac_cv_path_OBJCOPY
37423 if test -n "$OBJCOPY"; then
37424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37425 $as_echo "$OBJCOPY" >&6; }
37426 else
37427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37428 $as_echo "no" >&6; }
37429 fi
37430 
37431 
37432         if test "x$OBJCOPY" = x; then
37433           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37434         fi
37435       else
37436         # Otherwise we believe it is a complete path. Use it as it is.
37437         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37438 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37440 $as_echo_n "checking for OBJCOPY... " >&6; }
37441         if test ! -x "$tool_specified"; then
37442           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37443 $as_echo "not found" >&6; }
37444           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37445         fi
37446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37447 $as_echo "$tool_specified" >&6; }
37448       fi
37449     fi
37450   fi
37451 
37452 
37453     # Only call fixup if objcopy was found.
37454     if test -n "$OBJCOPY"; then
37455 
37456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37457 
37458   # First separate the path from the arguments. This will split at the first
37459   # space.
37460   complete="$OBJCOPY"
37461   path="${complete%% *}"
37462   tmp="$complete EOL"
37463   arguments="${tmp#* }"
37464 
37465   # Input might be given as Windows format, start by converting to
37466   # unix format.
37467   new_path=`$CYGPATH -u "$path"`
37468 
37469   # Now try to locate executable using which
37470   new_path=`$WHICH "$new_path" 2> /dev/null`
37471   # bat and cmd files are not always considered executable in cygwin causing which
37472   # to not find them
37473   if test "x$new_path" = x \
37474       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37475       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37476     new_path=`$CYGPATH -u "$path"`
37477   fi
37478   if test "x$new_path" = x; then
37479     # Oops. Which didn't find the executable.
37480     # The splitting of arguments from the executable at a space might have been incorrect,
37481     # since paths with space are more likely in Windows. Give it another try with the whole
37482     # argument.
37483     path="$complete"
37484     arguments="EOL"
37485     new_path=`$CYGPATH -u "$path"`
37486     new_path=`$WHICH "$new_path" 2> /dev/null`
37487     # bat and cmd files are not always considered executable in cygwin causing which
37488     # to not find them
37489     if test "x$new_path" = x \
37490         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37491         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37492       new_path=`$CYGPATH -u "$path"`
37493     fi
37494     if test "x$new_path" = x; then
37495       # It's still not found. Now this is an unrecoverable error.
37496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37497 $as_echo "$as_me: The path of OBJCOPY, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37501 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37502       fi
37503       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37504     fi
37505   fi
37506 
37507   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37508   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37509   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37510   # "foo.exe" is OK but "foo" is an error.
37511   #
37512   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37513   # It is also a way to make sure we got the proper file name for the real test later on.
37514   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37515   if test "x$test_shortpath" = x; then
37516     # Short path failed, file does not exist as specified.
37517     # Try adding .exe or .cmd
37518     if test -f "${new_path}.exe"; then
37519       input_to_shortpath="${new_path}.exe"
37520     elif test -f "${new_path}.cmd"; then
37521       input_to_shortpath="${new_path}.cmd"
37522     else
37523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37524 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37525       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37526 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37527       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37528     fi
37529   else
37530     input_to_shortpath="$new_path"
37531   fi
37532 
37533   # Call helper function which possibly converts this using DOS-style short mode.
37534   # If so, the updated path is stored in $new_path.
37535   new_path="$input_to_shortpath"
37536 
37537   input_path="$input_to_shortpath"
37538   # Check if we need to convert this using DOS-style short mode. If the path
37539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37540   # take no chances and rewrite it.
37541   # Note: m4 eats our [], so we need to use [ and ] instead.
37542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37543   if test "x$has_forbidden_chars" != x; then
37544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37545     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37546     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37547     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37548       # Going to short mode and back again did indeed matter. Since short mode is
37549       # case insensitive, let's make it lowercase to improve readability.
37550       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37551       # Now convert it back to Unix-style (cygpath)
37552       input_path=`$CYGPATH -u "$shortmode_path"`
37553       new_path="$input_path"
37554     fi
37555   fi
37556 
37557   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37558   if test "x$test_cygdrive_prefix" = x; then
37559     # As a simple fix, exclude /usr/bin since it's not a real path.
37560     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37561       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37562       # a path prefixed by /cygdrive for fixpath to work.
37563       new_path="$CYGWIN_ROOT_PATH$input_path"
37564     fi
37565   fi
37566 
37567   # remove trailing .exe if any
37568   new_path="${new_path/%.exe/}"
37569 
37570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37571 
37572   # First separate the path from the arguments. This will split at the first
37573   # space.
37574   complete="$OBJCOPY"
37575   path="${complete%% *}"
37576   tmp="$complete EOL"
37577   arguments="${tmp#* }"
37578 
37579   # Input might be given as Windows format, start by converting to
37580   # unix format.
37581   new_path="$path"
37582 
37583   windows_path="$new_path"
37584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37585     unix_path=`$CYGPATH -u "$windows_path"`
37586     new_path="$unix_path"
37587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37589     new_path="$unix_path"
37590   fi
37591 
37592 
37593   # Now try to locate executable using which
37594   new_path=`$WHICH "$new_path" 2> /dev/null`
37595 
37596   if test "x$new_path" = x; then
37597     # Oops. Which didn't find the executable.
37598     # The splitting of arguments from the executable at a space might have been incorrect,
37599     # since paths with space are more likely in Windows. Give it another try with the whole
37600     # argument.
37601     path="$complete"
37602     arguments="EOL"
37603     new_path="$path"
37604 
37605   windows_path="$new_path"
37606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37607     unix_path=`$CYGPATH -u "$windows_path"`
37608     new_path="$unix_path"
37609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37611     new_path="$unix_path"
37612   fi
37613 
37614 
37615     new_path=`$WHICH "$new_path" 2> /dev/null`
37616     # bat and cmd files are not always considered executable in MSYS causing which
37617     # to not find them
37618     if test "x$new_path" = x \
37619         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37620         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37621       new_path="$path"
37622 
37623   windows_path="$new_path"
37624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37625     unix_path=`$CYGPATH -u "$windows_path"`
37626     new_path="$unix_path"
37627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37629     new_path="$unix_path"
37630   fi
37631 
37632     fi
37633 
37634     if test "x$new_path" = x; then
37635       # It's still not found. Now this is an unrecoverable error.
37636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37637 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37638       has_space=`$ECHO "$complete" | $GREP " "`
37639       if test "x$has_space" != x; then
37640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37642       fi
37643       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37644     fi
37645   fi
37646 
37647   # Now new_path has a complete unix path to the binary
37648   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37649     # Keep paths in /bin as-is, but remove trailing .exe if any
37650     new_path="${new_path/%.exe/}"
37651     # Do not save /bin paths to all_fixpath_prefixes!
37652   else
37653     # Not in mixed or Windows style, start by that.
37654     new_path=`cmd //c echo $new_path`
37655 
37656   input_path="$new_path"
37657   # Check if we need to convert this using DOS-style short mode. If the path
37658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37659   # take no chances and rewrite it.
37660   # Note: m4 eats our [], so we need to use [ and ] instead.
37661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37662   if test "x$has_forbidden_chars" != x; then
37663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37665   fi
37666 
37667     # Output is in $new_path
37668 
37669   windows_path="$new_path"
37670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37671     unix_path=`$CYGPATH -u "$windows_path"`
37672     new_path="$unix_path"
37673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37675     new_path="$unix_path"
37676   fi
37677 
37678     # remove trailing .exe if any
37679     new_path="${new_path/%.exe/}"
37680 
37681     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37682     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37683   fi
37684 
37685   else
37686     # We're on a posix platform. Hooray! :)
37687     # First separate the path from the arguments. This will split at the first
37688     # space.
37689     complete="$OBJCOPY"
37690     path="${complete%% *}"
37691     tmp="$complete EOL"
37692     arguments="${tmp#* }"
37693 
37694     # Cannot rely on the command "which" here since it doesn't always work.
37695     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37696     if test -z "$is_absolute_path"; then
37697       # Path to executable is not absolute. Find it.
37698       IFS_save="$IFS"
37699       IFS=:
37700       for p in $PATH; do
37701         if test -f "$p/$path" && test -x "$p/$path"; then
37702           new_path="$p/$path"
37703           break
37704         fi
37705       done
37706       IFS="$IFS_save"
37707     else
37708       # This is an absolute path, we can use it without further modifications.
37709       new_path="$path"
37710     fi
37711 
37712     if test "x$new_path" = x; then
37713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37714 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37715       has_space=`$ECHO "$complete" | $GREP " "`
37716       if test "x$has_space" != x; then
37717         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37718 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37719       fi
37720       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37721     fi
37722   fi
37723 
37724   # Now join together the path and the arguments once again
37725   if test "x$arguments" != xEOL; then
37726     new_complete="$new_path ${arguments% *}"
37727   else
37728     new_complete="$new_path"
37729   fi
37730 
37731   if test "x$complete" != "x$new_complete"; then
37732     OBJCOPY="$new_complete"
37733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
37734 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
37735   fi
37736 
37737     fi
37738   fi
37739 
37740 
37741 
37742   # Publish this variable in the help.
37743 
37744 
37745   if test "x$OBJDUMP" = x; then
37746     # The variable is not set by user, try to locate tool using the code snippet
37747     if test -n "$ac_tool_prefix"; then
37748   for ac_prog in gobjdump objdump
37749   do
37750     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37751 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37753 $as_echo_n "checking for $ac_word... " >&6; }
37754 if ${ac_cv_prog_OBJDUMP+:} false; then :
37755   $as_echo_n "(cached) " >&6
37756 else
37757   if test -n "$OBJDUMP"; then
37758   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
37759 else
37760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37761 for as_dir in $PATH
37762 do
37763   IFS=$as_save_IFS
37764   test -z "$as_dir" && as_dir=.
37765     for ac_exec_ext in '' $ac_executable_extensions; do
37766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37767     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
37768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37769     break 2
37770   fi
37771 done
37772   done
37773 IFS=$as_save_IFS
37774 
37775 fi
37776 fi
37777 OBJDUMP=$ac_cv_prog_OBJDUMP
37778 if test -n "$OBJDUMP"; then
37779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
37780 $as_echo "$OBJDUMP" >&6; }
37781 else
37782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37783 $as_echo "no" >&6; }
37784 fi
37785 
37786 
37787     test -n "$OBJDUMP" && break
37788   done
37789 fi
37790 if test -z "$OBJDUMP"; then
37791   ac_ct_OBJDUMP=$OBJDUMP
37792   for ac_prog in gobjdump objdump
37793 do
37794   # Extract the first word of "$ac_prog", so it can be a program name with args.
37795 set dummy $ac_prog; ac_word=$2
37796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37797 $as_echo_n "checking for $ac_word... " >&6; }
37798 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
37799   $as_echo_n "(cached) " >&6
37800 else
37801   if test -n "$ac_ct_OBJDUMP"; then
37802   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
37803 else
37804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37805 for as_dir in $PATH
37806 do
37807   IFS=$as_save_IFS
37808   test -z "$as_dir" && as_dir=.
37809     for ac_exec_ext in '' $ac_executable_extensions; do
37810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37811     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
37812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37813     break 2
37814   fi
37815 done
37816   done
37817 IFS=$as_save_IFS
37818 
37819 fi
37820 fi
37821 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
37822 if test -n "$ac_ct_OBJDUMP"; then
37823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
37824 $as_echo "$ac_ct_OBJDUMP" >&6; }
37825 else
37826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37827 $as_echo "no" >&6; }
37828 fi
37829 
37830 
37831   test -n "$ac_ct_OBJDUMP" && break
37832 done
37833 
37834   if test "x$ac_ct_OBJDUMP" = x; then
37835     OBJDUMP=""
37836   else
37837     case $cross_compiling:$ac_tool_warned in
37838 yes:)
37839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37840 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37841 ac_tool_warned=yes ;;
37842 esac
37843     OBJDUMP=$ac_ct_OBJDUMP
37844   fi
37845 fi
37846 
37847   else
37848     # The variable is set, but is it from the command line or the environment?
37849 
37850     # Try to remove the string !OBJDUMP! from our list.
37851     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
37852     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37853       # If it failed, the variable was not from the command line. Ignore it,
37854       # but warn the user (except for BASH, which is always set by the calling BASH).
37855       if test "xOBJDUMP" != xBASH; then
37856         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
37857 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
37858       fi
37859       # Try to locate tool using the code snippet
37860       if test -n "$ac_tool_prefix"; then
37861   for ac_prog in gobjdump objdump
37862   do
37863     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37864 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37866 $as_echo_n "checking for $ac_word... " >&6; }
37867 if ${ac_cv_prog_OBJDUMP+:} false; then :
37868   $as_echo_n "(cached) " >&6
37869 else
37870   if test -n "$OBJDUMP"; then
37871   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
37872 else
37873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37874 for as_dir in $PATH
37875 do
37876   IFS=$as_save_IFS
37877   test -z "$as_dir" && as_dir=.
37878     for ac_exec_ext in '' $ac_executable_extensions; do
37879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37880     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
37881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37882     break 2
37883   fi
37884 done
37885   done
37886 IFS=$as_save_IFS
37887 
37888 fi
37889 fi
37890 OBJDUMP=$ac_cv_prog_OBJDUMP
37891 if test -n "$OBJDUMP"; then
37892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
37893 $as_echo "$OBJDUMP" >&6; }
37894 else
37895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37896 $as_echo "no" >&6; }
37897 fi
37898 
37899 
37900     test -n "$OBJDUMP" && break
37901   done
37902 fi
37903 if test -z "$OBJDUMP"; then
37904   ac_ct_OBJDUMP=$OBJDUMP
37905   for ac_prog in gobjdump objdump
37906 do
37907   # Extract the first word of "$ac_prog", so it can be a program name with args.
37908 set dummy $ac_prog; ac_word=$2
37909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37910 $as_echo_n "checking for $ac_word... " >&6; }
37911 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
37912   $as_echo_n "(cached) " >&6
37913 else
37914   if test -n "$ac_ct_OBJDUMP"; then
37915   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
37916 else
37917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37918 for as_dir in $PATH
37919 do
37920   IFS=$as_save_IFS
37921   test -z "$as_dir" && as_dir=.
37922     for ac_exec_ext in '' $ac_executable_extensions; do
37923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37924     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
37925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37926     break 2
37927   fi
37928 done
37929   done
37930 IFS=$as_save_IFS
37931 
37932 fi
37933 fi
37934 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
37935 if test -n "$ac_ct_OBJDUMP"; then
37936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
37937 $as_echo "$ac_ct_OBJDUMP" >&6; }
37938 else
37939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37940 $as_echo "no" >&6; }
37941 fi
37942 
37943 
37944   test -n "$ac_ct_OBJDUMP" && break
37945 done
37946 
37947   if test "x$ac_ct_OBJDUMP" = x; then
37948     OBJDUMP=""
37949   else
37950     case $cross_compiling:$ac_tool_warned in
37951 yes:)
37952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37954 ac_tool_warned=yes ;;
37955 esac
37956     OBJDUMP=$ac_ct_OBJDUMP
37957   fi
37958 fi
37959 
37960     else
37961       # If it succeeded, then it was overridden by the user. We will use it
37962       # for the tool.
37963 
37964       # First remove it from the list of overridden variables, so we can test
37965       # for unknown variables in the end.
37966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37967 
37968       # Check if the provided tool contains a complete path.
37969       tool_specified="$OBJDUMP"
37970       tool_basename="${tool_specified##*/}"
37971       if test "x$tool_basename" = "x$tool_specified"; then
37972         # A command without a complete path is provided, search $PATH.
37973         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
37974 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
37975         # Extract the first word of "$tool_basename", so it can be a program name with args.
37976 set dummy $tool_basename; ac_word=$2
37977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37978 $as_echo_n "checking for $ac_word... " >&6; }
37979 if ${ac_cv_path_OBJDUMP+:} false; then :
37980   $as_echo_n "(cached) " >&6
37981 else
37982   case $OBJDUMP in
37983   [\\/]* | ?:[\\/]*)
37984   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
37985   ;;
37986   *)
37987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37988 for as_dir in $PATH
37989 do
37990   IFS=$as_save_IFS
37991   test -z "$as_dir" && as_dir=.
37992     for ac_exec_ext in '' $ac_executable_extensions; do
37993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37994     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
37995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37996     break 2
37997   fi
37998 done
37999   done
38000 IFS=$as_save_IFS
38001 
38002   ;;
38003 esac
38004 fi
38005 OBJDUMP=$ac_cv_path_OBJDUMP
38006 if test -n "$OBJDUMP"; then
38007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38008 $as_echo "$OBJDUMP" >&6; }
38009 else
38010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38011 $as_echo "no" >&6; }
38012 fi
38013 
38014 
38015         if test "x$OBJDUMP" = x; then
38016           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38017         fi
38018       else
38019         # Otherwise we believe it is a complete path. Use it as it is.
38020         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38021 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38022         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38023 $as_echo_n "checking for OBJDUMP... " >&6; }
38024         if test ! -x "$tool_specified"; then
38025           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38026 $as_echo "not found" >&6; }
38027           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38028         fi
38029         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38030 $as_echo "$tool_specified" >&6; }
38031       fi
38032     fi
38033   fi
38034 
38035 
38036   if test "x$OBJDUMP" != x; then
38037     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38038     # bails if argument is missing.
38039 
38040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38041 
38042   # First separate the path from the arguments. This will split at the first
38043   # space.
38044   complete="$OBJDUMP"
38045   path="${complete%% *}"
38046   tmp="$complete EOL"
38047   arguments="${tmp#* }"
38048 
38049   # Input might be given as Windows format, start by converting to
38050   # unix format.
38051   new_path=`$CYGPATH -u "$path"`
38052 
38053   # Now try to locate executable using which
38054   new_path=`$WHICH "$new_path" 2> /dev/null`
38055   # bat and cmd files are not always considered executable in cygwin causing which
38056   # to not find them
38057   if test "x$new_path" = x \
38058       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38059       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38060     new_path=`$CYGPATH -u "$path"`
38061   fi
38062   if test "x$new_path" = x; then
38063     # Oops. Which didn't find the executable.
38064     # The splitting of arguments from the executable at a space might have been incorrect,
38065     # since paths with space are more likely in Windows. Give it another try with the whole
38066     # argument.
38067     path="$complete"
38068     arguments="EOL"
38069     new_path=`$CYGPATH -u "$path"`
38070     new_path=`$WHICH "$new_path" 2> /dev/null`
38071     # bat and cmd files are not always considered executable in cygwin causing which
38072     # to not find them
38073     if test "x$new_path" = x \
38074         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38075         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38076       new_path=`$CYGPATH -u "$path"`
38077     fi
38078     if test "x$new_path" = x; then
38079       # It's still not found. Now this is an unrecoverable error.
38080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38081 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38082       has_space=`$ECHO "$complete" | $GREP " "`
38083       if test "x$has_space" != x; then
38084         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38085 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38086       fi
38087       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38088     fi
38089   fi
38090 
38091   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38092   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38093   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38094   # "foo.exe" is OK but "foo" is an error.
38095   #
38096   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38097   # It is also a way to make sure we got the proper file name for the real test later on.
38098   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38099   if test "x$test_shortpath" = x; then
38100     # Short path failed, file does not exist as specified.
38101     # Try adding .exe or .cmd
38102     if test -f "${new_path}.exe"; then
38103       input_to_shortpath="${new_path}.exe"
38104     elif test -f "${new_path}.cmd"; then
38105       input_to_shortpath="${new_path}.cmd"
38106     else
38107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38108 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38109       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38110 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38111       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38112     fi
38113   else
38114     input_to_shortpath="$new_path"
38115   fi
38116 
38117   # Call helper function which possibly converts this using DOS-style short mode.
38118   # If so, the updated path is stored in $new_path.
38119   new_path="$input_to_shortpath"
38120 
38121   input_path="$input_to_shortpath"
38122   # Check if we need to convert this using DOS-style short mode. If the path
38123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38124   # take no chances and rewrite it.
38125   # Note: m4 eats our [], so we need to use [ and ] instead.
38126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38127   if test "x$has_forbidden_chars" != x; then
38128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38129     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38130     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38131     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38132       # Going to short mode and back again did indeed matter. Since short mode is
38133       # case insensitive, let's make it lowercase to improve readability.
38134       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38135       # Now convert it back to Unix-style (cygpath)
38136       input_path=`$CYGPATH -u "$shortmode_path"`
38137       new_path="$input_path"
38138     fi
38139   fi
38140 
38141   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38142   if test "x$test_cygdrive_prefix" = x; then
38143     # As a simple fix, exclude /usr/bin since it's not a real path.
38144     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38145       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38146       # a path prefixed by /cygdrive for fixpath to work.
38147       new_path="$CYGWIN_ROOT_PATH$input_path"
38148     fi
38149   fi
38150 
38151   # remove trailing .exe if any
38152   new_path="${new_path/%.exe/}"
38153 
38154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38155 
38156   # First separate the path from the arguments. This will split at the first
38157   # space.
38158   complete="$OBJDUMP"
38159   path="${complete%% *}"
38160   tmp="$complete EOL"
38161   arguments="${tmp#* }"
38162 
38163   # Input might be given as Windows format, start by converting to
38164   # unix format.
38165   new_path="$path"
38166 
38167   windows_path="$new_path"
38168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38169     unix_path=`$CYGPATH -u "$windows_path"`
38170     new_path="$unix_path"
38171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38172     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38173     new_path="$unix_path"
38174   fi
38175 
38176 
38177   # Now try to locate executable using which
38178   new_path=`$WHICH "$new_path" 2> /dev/null`
38179 
38180   if test "x$new_path" = x; then
38181     # Oops. Which didn't find the executable.
38182     # The splitting of arguments from the executable at a space might have been incorrect,
38183     # since paths with space are more likely in Windows. Give it another try with the whole
38184     # argument.
38185     path="$complete"
38186     arguments="EOL"
38187     new_path="$path"
38188 
38189   windows_path="$new_path"
38190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191     unix_path=`$CYGPATH -u "$windows_path"`
38192     new_path="$unix_path"
38193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195     new_path="$unix_path"
38196   fi
38197 
38198 
38199     new_path=`$WHICH "$new_path" 2> /dev/null`
38200     # bat and cmd files are not always considered executable in MSYS causing which
38201     # to not find them
38202     if test "x$new_path" = x \
38203         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38204         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38205       new_path="$path"
38206 
38207   windows_path="$new_path"
38208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38209     unix_path=`$CYGPATH -u "$windows_path"`
38210     new_path="$unix_path"
38211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38213     new_path="$unix_path"
38214   fi
38215 
38216     fi
38217 
38218     if test "x$new_path" = x; then
38219       # It's still not found. Now this is an unrecoverable error.
38220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38221 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38222       has_space=`$ECHO "$complete" | $GREP " "`
38223       if test "x$has_space" != x; then
38224         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38225 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38226       fi
38227       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38228     fi
38229   fi
38230 
38231   # Now new_path has a complete unix path to the binary
38232   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38233     # Keep paths in /bin as-is, but remove trailing .exe if any
38234     new_path="${new_path/%.exe/}"
38235     # Do not save /bin paths to all_fixpath_prefixes!
38236   else
38237     # Not in mixed or Windows style, start by that.
38238     new_path=`cmd //c echo $new_path`
38239 
38240   input_path="$new_path"
38241   # Check if we need to convert this using DOS-style short mode. If the path
38242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38243   # take no chances and rewrite it.
38244   # Note: m4 eats our [], so we need to use [ and ] instead.
38245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38246   if test "x$has_forbidden_chars" != x; then
38247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38248     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38249   fi
38250 
38251     # Output is in $new_path
38252 
38253   windows_path="$new_path"
38254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38255     unix_path=`$CYGPATH -u "$windows_path"`
38256     new_path="$unix_path"
38257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38259     new_path="$unix_path"
38260   fi
38261 
38262     # remove trailing .exe if any
38263     new_path="${new_path/%.exe/}"
38264 
38265     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38266     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38267   fi
38268 
38269   else
38270     # We're on a posix platform. Hooray! :)
38271     # First separate the path from the arguments. This will split at the first
38272     # space.
38273     complete="$OBJDUMP"
38274     path="${complete%% *}"
38275     tmp="$complete EOL"
38276     arguments="${tmp#* }"
38277 
38278     # Cannot rely on the command "which" here since it doesn't always work.
38279     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38280     if test -z "$is_absolute_path"; then
38281       # Path to executable is not absolute. Find it.
38282       IFS_save="$IFS"
38283       IFS=:
38284       for p in $PATH; do
38285         if test -f "$p/$path" && test -x "$p/$path"; then
38286           new_path="$p/$path"
38287           break
38288         fi
38289       done
38290       IFS="$IFS_save"
38291     else
38292       # This is an absolute path, we can use it without further modifications.
38293       new_path="$path"
38294     fi
38295 
38296     if test "x$new_path" = x; then
38297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38298 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38299       has_space=`$ECHO "$complete" | $GREP " "`
38300       if test "x$has_space" != x; then
38301         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38302 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38303       fi
38304       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38305     fi
38306   fi
38307 
38308   # Now join together the path and the arguments once again
38309   if test "x$arguments" != xEOL; then
38310     new_complete="$new_path ${arguments% *}"
38311   else
38312     new_complete="$new_path"
38313   fi
38314 
38315   if test "x$complete" != "x$new_complete"; then
38316     OBJDUMP="$new_complete"
38317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38318 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38319   fi
38320 
38321   fi
38322 
38323 
38324   # Restore old path.
38325   PATH="$OLD_PATH"
38326 
38327   # Restore the flags to the user specified values.
38328   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38329   CFLAGS="$ORG_CFLAGS"
38330   CXXFLAGS="$ORG_CXXFLAGS"
38331   OBJCFLAGS="$ORG_OBJCFLAGS"
38332 
38333 
38334 # Finally do some processing after the detection phase
38335 
38336   if test "x$COMPILE_TYPE" = "xcross"; then
38337     # Now we need to find a C/C++ compiler that can build executables for the
38338     # build platform. We can't use the AC_PROG_CC macro, since it can only be
38339     # used once. Also, we need to do this without adding a tools dir to the
38340     # path, otherwise we might pick up cross-compilers which don't use standard
38341     # naming.
38342 
38343     # FIXME: we should list the discovered compilers as an exclude pattern!
38344     # If we do that, we can do this detection before POST_DETECTION, and still
38345     # find the build compilers in the tools dir, if needed.
38346 
38347 
38348   # Publish this variable in the help.
38349 
38350 
38351   if test "x$BUILD_CC" = x; then
38352     # The variable is not set by user, try to locate tool using the code snippet
38353     for ac_prog in cl cc gcc
38354 do
38355   # Extract the first word of "$ac_prog", so it can be a program name with args.
38356 set dummy $ac_prog; ac_word=$2
38357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38358 $as_echo_n "checking for $ac_word... " >&6; }
38359 if ${ac_cv_path_BUILD_CC+:} false; then :
38360   $as_echo_n "(cached) " >&6
38361 else
38362   case $BUILD_CC in
38363   [\\/]* | ?:[\\/]*)
38364   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38365   ;;
38366   *)
38367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38368 for as_dir in $PATH
38369 do
38370   IFS=$as_save_IFS
38371   test -z "$as_dir" && as_dir=.
38372     for ac_exec_ext in '' $ac_executable_extensions; do
38373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38374     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38376     break 2
38377   fi
38378 done
38379   done
38380 IFS=$as_save_IFS
38381 
38382   ;;
38383 esac
38384 fi
38385 BUILD_CC=$ac_cv_path_BUILD_CC
38386 if test -n "$BUILD_CC"; then
38387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38388 $as_echo "$BUILD_CC" >&6; }
38389 else
38390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38391 $as_echo "no" >&6; }
38392 fi
38393 
38394 
38395   test -n "$BUILD_CC" && break
38396 done
38397 
38398   else
38399     # The variable is set, but is it from the command line or the environment?
38400 
38401     # Try to remove the string !BUILD_CC! from our list.
38402     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38403     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38404       # If it failed, the variable was not from the command line. Ignore it,
38405       # but warn the user (except for BASH, which is always set by the calling BASH).
38406       if test "xBUILD_CC" != xBASH; then
38407         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38408 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38409       fi
38410       # Try to locate tool using the code snippet
38411       for ac_prog in cl cc gcc
38412 do
38413   # Extract the first word of "$ac_prog", so it can be a program name with args.
38414 set dummy $ac_prog; ac_word=$2
38415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38416 $as_echo_n "checking for $ac_word... " >&6; }
38417 if ${ac_cv_path_BUILD_CC+:} false; then :
38418   $as_echo_n "(cached) " >&6
38419 else
38420   case $BUILD_CC in
38421   [\\/]* | ?:[\\/]*)
38422   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38423   ;;
38424   *)
38425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38426 for as_dir in $PATH
38427 do
38428   IFS=$as_save_IFS
38429   test -z "$as_dir" && as_dir=.
38430     for ac_exec_ext in '' $ac_executable_extensions; do
38431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38432     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38434     break 2
38435   fi
38436 done
38437   done
38438 IFS=$as_save_IFS
38439 
38440   ;;
38441 esac
38442 fi
38443 BUILD_CC=$ac_cv_path_BUILD_CC
38444 if test -n "$BUILD_CC"; then
38445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38446 $as_echo "$BUILD_CC" >&6; }
38447 else
38448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38449 $as_echo "no" >&6; }
38450 fi
38451 
38452 
38453   test -n "$BUILD_CC" && break
38454 done
38455 
38456     else
38457       # If it succeeded, then it was overridden by the user. We will use it
38458       # for the tool.
38459 
38460       # First remove it from the list of overridden variables, so we can test
38461       # for unknown variables in the end.
38462       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38463 
38464       # Check if the provided tool contains a complete path.
38465       tool_specified="$BUILD_CC"
38466       tool_basename="${tool_specified##*/}"
38467       if test "x$tool_basename" = "x$tool_specified"; then
38468         # A command without a complete path is provided, search $PATH.
38469         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38470 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38471         # Extract the first word of "$tool_basename", so it can be a program name with args.
38472 set dummy $tool_basename; ac_word=$2
38473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38474 $as_echo_n "checking for $ac_word... " >&6; }
38475 if ${ac_cv_path_BUILD_CC+:} false; then :
38476   $as_echo_n "(cached) " >&6
38477 else
38478   case $BUILD_CC in
38479   [\\/]* | ?:[\\/]*)
38480   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38481   ;;
38482   *)
38483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38484 for as_dir in $PATH
38485 do
38486   IFS=$as_save_IFS
38487   test -z "$as_dir" && as_dir=.
38488     for ac_exec_ext in '' $ac_executable_extensions; do
38489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38490     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38492     break 2
38493   fi
38494 done
38495   done
38496 IFS=$as_save_IFS
38497 
38498   ;;
38499 esac
38500 fi
38501 BUILD_CC=$ac_cv_path_BUILD_CC
38502 if test -n "$BUILD_CC"; then
38503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38504 $as_echo "$BUILD_CC" >&6; }
38505 else
38506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38507 $as_echo "no" >&6; }
38508 fi
38509 
38510 
38511         if test "x$BUILD_CC" = x; then
38512           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38513         fi
38514       else
38515         # Otherwise we believe it is a complete path. Use it as it is.
38516         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38517 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38518         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38519 $as_echo_n "checking for BUILD_CC... " >&6; }
38520         if test ! -x "$tool_specified"; then
38521           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38522 $as_echo "not found" >&6; }
38523           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38524         fi
38525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38526 $as_echo "$tool_specified" >&6; }
38527       fi
38528     fi
38529   fi
38530 
38531 
38532 
38533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534 
38535   # First separate the path from the arguments. This will split at the first
38536   # space.
38537   complete="$BUILD_CC"
38538   path="${complete%% *}"
38539   tmp="$complete EOL"
38540   arguments="${tmp#* }"
38541 
38542   # Input might be given as Windows format, start by converting to
38543   # unix format.
38544   new_path=`$CYGPATH -u "$path"`
38545 
38546   # Now try to locate executable using which
38547   new_path=`$WHICH "$new_path" 2> /dev/null`
38548   # bat and cmd files are not always considered executable in cygwin causing which
38549   # to not find them
38550   if test "x$new_path" = x \
38551       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553     new_path=`$CYGPATH -u "$path"`
38554   fi
38555   if test "x$new_path" = x; then
38556     # Oops. Which didn't find the executable.
38557     # The splitting of arguments from the executable at a space might have been incorrect,
38558     # since paths with space are more likely in Windows. Give it another try with the whole
38559     # argument.
38560     path="$complete"
38561     arguments="EOL"
38562     new_path=`$CYGPATH -u "$path"`
38563     new_path=`$WHICH "$new_path" 2> /dev/null`
38564     # bat and cmd files are not always considered executable in cygwin causing which
38565     # to not find them
38566     if test "x$new_path" = x \
38567         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569       new_path=`$CYGPATH -u "$path"`
38570     fi
38571     if test "x$new_path" = x; then
38572       # It's still not found. Now this is an unrecoverable error.
38573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38574 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38575       has_space=`$ECHO "$complete" | $GREP " "`
38576       if test "x$has_space" != x; then
38577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38579       fi
38580       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38581     fi
38582   fi
38583 
38584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38587   # "foo.exe" is OK but "foo" is an error.
38588   #
38589   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38590   # It is also a way to make sure we got the proper file name for the real test later on.
38591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38592   if test "x$test_shortpath" = x; then
38593     # Short path failed, file does not exist as specified.
38594     # Try adding .exe or .cmd
38595     if test -f "${new_path}.exe"; then
38596       input_to_shortpath="${new_path}.exe"
38597     elif test -f "${new_path}.cmd"; then
38598       input_to_shortpath="${new_path}.cmd"
38599     else
38600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38601 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38604       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38605     fi
38606   else
38607     input_to_shortpath="$new_path"
38608   fi
38609 
38610   # Call helper function which possibly converts this using DOS-style short mode.
38611   # If so, the updated path is stored in $new_path.
38612   new_path="$input_to_shortpath"
38613 
38614   input_path="$input_to_shortpath"
38615   # Check if we need to convert this using DOS-style short mode. If the path
38616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38617   # take no chances and rewrite it.
38618   # Note: m4 eats our [], so we need to use [ and ] instead.
38619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38620   if test "x$has_forbidden_chars" != x; then
38621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38625       # Going to short mode and back again did indeed matter. Since short mode is
38626       # case insensitive, let's make it lowercase to improve readability.
38627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628       # Now convert it back to Unix-style (cygpath)
38629       input_path=`$CYGPATH -u "$shortmode_path"`
38630       new_path="$input_path"
38631     fi
38632   fi
38633 
38634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38635   if test "x$test_cygdrive_prefix" = x; then
38636     # As a simple fix, exclude /usr/bin since it's not a real path.
38637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38639       # a path prefixed by /cygdrive for fixpath to work.
38640       new_path="$CYGWIN_ROOT_PATH$input_path"
38641     fi
38642   fi
38643 
38644   # remove trailing .exe if any
38645   new_path="${new_path/%.exe/}"
38646 
38647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648 
38649   # First separate the path from the arguments. This will split at the first
38650   # space.
38651   complete="$BUILD_CC"
38652   path="${complete%% *}"
38653   tmp="$complete EOL"
38654   arguments="${tmp#* }"
38655 
38656   # Input might be given as Windows format, start by converting to
38657   # unix format.
38658   new_path="$path"
38659 
38660   windows_path="$new_path"
38661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38662     unix_path=`$CYGPATH -u "$windows_path"`
38663     new_path="$unix_path"
38664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38666     new_path="$unix_path"
38667   fi
38668 
38669 
38670   # Now try to locate executable using which
38671   new_path=`$WHICH "$new_path" 2> /dev/null`
38672 
38673   if test "x$new_path" = x; then
38674     # Oops. Which didn't find the executable.
38675     # The splitting of arguments from the executable at a space might have been incorrect,
38676     # since paths with space are more likely in Windows. Give it another try with the whole
38677     # argument.
38678     path="$complete"
38679     arguments="EOL"
38680     new_path="$path"
38681 
38682   windows_path="$new_path"
38683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684     unix_path=`$CYGPATH -u "$windows_path"`
38685     new_path="$unix_path"
38686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688     new_path="$unix_path"
38689   fi
38690 
38691 
38692     new_path=`$WHICH "$new_path" 2> /dev/null`
38693     # bat and cmd files are not always considered executable in MSYS causing which
38694     # to not find them
38695     if test "x$new_path" = x \
38696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38698       new_path="$path"
38699 
38700   windows_path="$new_path"
38701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38702     unix_path=`$CYGPATH -u "$windows_path"`
38703     new_path="$unix_path"
38704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38706     new_path="$unix_path"
38707   fi
38708 
38709     fi
38710 
38711     if test "x$new_path" = x; then
38712       # It's still not found. Now this is an unrecoverable error.
38713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38714 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38715       has_space=`$ECHO "$complete" | $GREP " "`
38716       if test "x$has_space" != x; then
38717         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38718 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38719       fi
38720       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38721     fi
38722   fi
38723 
38724   # Now new_path has a complete unix path to the binary
38725   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38726     # Keep paths in /bin as-is, but remove trailing .exe if any
38727     new_path="${new_path/%.exe/}"
38728     # Do not save /bin paths to all_fixpath_prefixes!
38729   else
38730     # Not in mixed or Windows style, start by that.
38731     new_path=`cmd //c echo $new_path`
38732 
38733   input_path="$new_path"
38734   # Check if we need to convert this using DOS-style short mode. If the path
38735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38736   # take no chances and rewrite it.
38737   # Note: m4 eats our [], so we need to use [ and ] instead.
38738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38739   if test "x$has_forbidden_chars" != x; then
38740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38742   fi
38743 
38744     # Output is in $new_path
38745 
38746   windows_path="$new_path"
38747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38748     unix_path=`$CYGPATH -u "$windows_path"`
38749     new_path="$unix_path"
38750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38752     new_path="$unix_path"
38753   fi
38754 
38755     # remove trailing .exe if any
38756     new_path="${new_path/%.exe/}"
38757 
38758     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38759     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38760   fi
38761 
38762   else
38763     # We're on a posix platform. Hooray! :)
38764     # First separate the path from the arguments. This will split at the first
38765     # space.
38766     complete="$BUILD_CC"
38767     path="${complete%% *}"
38768     tmp="$complete EOL"
38769     arguments="${tmp#* }"
38770 
38771     # Cannot rely on the command "which" here since it doesn't always work.
38772     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38773     if test -z "$is_absolute_path"; then
38774       # Path to executable is not absolute. Find it.
38775       IFS_save="$IFS"
38776       IFS=:
38777       for p in $PATH; do
38778         if test -f "$p/$path" && test -x "$p/$path"; then
38779           new_path="$p/$path"
38780           break
38781         fi
38782       done
38783       IFS="$IFS_save"
38784     else
38785       # This is an absolute path, we can use it without further modifications.
38786       new_path="$path"
38787     fi
38788 
38789     if test "x$new_path" = x; then
38790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38791 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38792       has_space=`$ECHO "$complete" | $GREP " "`
38793       if test "x$has_space" != x; then
38794         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38795 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38796       fi
38797       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38798     fi
38799   fi
38800 
38801   # Now join together the path and the arguments once again
38802   if test "x$arguments" != xEOL; then
38803     new_complete="$new_path ${arguments% *}"
38804   else
38805     new_complete="$new_path"
38806   fi
38807 
38808   if test "x$complete" != "x$new_complete"; then
38809     BUILD_CC="$new_complete"
38810     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
38811 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
38812   fi
38813 
38814 
38815 
38816   # Publish this variable in the help.
38817 
38818 
38819   if test "x$BUILD_CXX" = x; then
38820     # The variable is not set by user, try to locate tool using the code snippet
38821     for ac_prog in cl CC g++
38822 do
38823   # Extract the first word of "$ac_prog", so it can be a program name with args.
38824 set dummy $ac_prog; ac_word=$2
38825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38826 $as_echo_n "checking for $ac_word... " >&6; }
38827 if ${ac_cv_path_BUILD_CXX+:} false; then :
38828   $as_echo_n "(cached) " >&6
38829 else
38830   case $BUILD_CXX in
38831   [\\/]* | ?:[\\/]*)
38832   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
38833   ;;
38834   *)
38835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38836 for as_dir in $PATH
38837 do
38838   IFS=$as_save_IFS
38839   test -z "$as_dir" && as_dir=.
38840     for ac_exec_ext in '' $ac_executable_extensions; do
38841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38842     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
38843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38844     break 2
38845   fi
38846 done
38847   done
38848 IFS=$as_save_IFS
38849 
38850   ;;
38851 esac
38852 fi
38853 BUILD_CXX=$ac_cv_path_BUILD_CXX
38854 if test -n "$BUILD_CXX"; then
38855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
38856 $as_echo "$BUILD_CXX" >&6; }
38857 else
38858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38859 $as_echo "no" >&6; }
38860 fi
38861 
38862 
38863   test -n "$BUILD_CXX" && break
38864 done
38865 
38866   else
38867     # The variable is set, but is it from the command line or the environment?
38868 
38869     # Try to remove the string !BUILD_CXX! from our list.
38870     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
38871     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38872       # If it failed, the variable was not from the command line. Ignore it,
38873       # but warn the user (except for BASH, which is always set by the calling BASH).
38874       if test "xBUILD_CXX" != xBASH; then
38875         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
38876 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
38877       fi
38878       # Try to locate tool using the code snippet
38879       for ac_prog in cl CC g++
38880 do
38881   # Extract the first word of "$ac_prog", so it can be a program name with args.
38882 set dummy $ac_prog; ac_word=$2
38883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38884 $as_echo_n "checking for $ac_word... " >&6; }
38885 if ${ac_cv_path_BUILD_CXX+:} false; then :
38886   $as_echo_n "(cached) " >&6
38887 else
38888   case $BUILD_CXX in
38889   [\\/]* | ?:[\\/]*)
38890   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
38891   ;;
38892   *)
38893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38894 for as_dir in $PATH
38895 do
38896   IFS=$as_save_IFS
38897   test -z "$as_dir" && as_dir=.
38898     for ac_exec_ext in '' $ac_executable_extensions; do
38899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38900     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
38901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38902     break 2
38903   fi
38904 done
38905   done
38906 IFS=$as_save_IFS
38907 
38908   ;;
38909 esac
38910 fi
38911 BUILD_CXX=$ac_cv_path_BUILD_CXX
38912 if test -n "$BUILD_CXX"; then
38913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
38914 $as_echo "$BUILD_CXX" >&6; }
38915 else
38916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38917 $as_echo "no" >&6; }
38918 fi
38919 
38920 
38921   test -n "$BUILD_CXX" && break
38922 done
38923 
38924     else
38925       # If it succeeded, then it was overridden by the user. We will use it
38926       # for the tool.
38927 
38928       # First remove it from the list of overridden variables, so we can test
38929       # for unknown variables in the end.
38930       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38931 
38932       # Check if the provided tool contains a complete path.
38933       tool_specified="$BUILD_CXX"
38934       tool_basename="${tool_specified##*/}"
38935       if test "x$tool_basename" = "x$tool_specified"; then
38936         # A command without a complete path is provided, search $PATH.
38937         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
38938 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
38939         # Extract the first word of "$tool_basename", so it can be a program name with args.
38940 set dummy $tool_basename; ac_word=$2
38941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38942 $as_echo_n "checking for $ac_word... " >&6; }
38943 if ${ac_cv_path_BUILD_CXX+:} false; then :
38944   $as_echo_n "(cached) " >&6
38945 else
38946   case $BUILD_CXX in
38947   [\\/]* | ?:[\\/]*)
38948   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
38949   ;;
38950   *)
38951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38952 for as_dir in $PATH
38953 do
38954   IFS=$as_save_IFS
38955   test -z "$as_dir" && as_dir=.
38956     for ac_exec_ext in '' $ac_executable_extensions; do
38957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38958     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
38959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38960     break 2
38961   fi
38962 done
38963   done
38964 IFS=$as_save_IFS
38965 
38966   ;;
38967 esac
38968 fi
38969 BUILD_CXX=$ac_cv_path_BUILD_CXX
38970 if test -n "$BUILD_CXX"; then
38971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
38972 $as_echo "$BUILD_CXX" >&6; }
38973 else
38974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38975 $as_echo "no" >&6; }
38976 fi
38977 
38978 
38979         if test "x$BUILD_CXX" = x; then
38980           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38981         fi
38982       else
38983         # Otherwise we believe it is a complete path. Use it as it is.
38984         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
38985 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
38986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
38987 $as_echo_n "checking for BUILD_CXX... " >&6; }
38988         if test ! -x "$tool_specified"; then
38989           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38990 $as_echo "not found" >&6; }
38991           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
38992         fi
38993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38994 $as_echo "$tool_specified" >&6; }
38995       fi
38996     fi
38997   fi
38998 
38999 
39000 
39001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39002 
39003   # First separate the path from the arguments. This will split at the first
39004   # space.
39005   complete="$BUILD_CXX"
39006   path="${complete%% *}"
39007   tmp="$complete EOL"
39008   arguments="${tmp#* }"
39009 
39010   # Input might be given as Windows format, start by converting to
39011   # unix format.
39012   new_path=`$CYGPATH -u "$path"`
39013 
39014   # Now try to locate executable using which
39015   new_path=`$WHICH "$new_path" 2> /dev/null`
39016   # bat and cmd files are not always considered executable in cygwin causing which
39017   # to not find them
39018   if test "x$new_path" = x \
39019       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39020       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39021     new_path=`$CYGPATH -u "$path"`
39022   fi
39023   if test "x$new_path" = x; then
39024     # Oops. Which didn't find the executable.
39025     # The splitting of arguments from the executable at a space might have been incorrect,
39026     # since paths with space are more likely in Windows. Give it another try with the whole
39027     # argument.
39028     path="$complete"
39029     arguments="EOL"
39030     new_path=`$CYGPATH -u "$path"`
39031     new_path=`$WHICH "$new_path" 2> /dev/null`
39032     # bat and cmd files are not always considered executable in cygwin causing which
39033     # to not find them
39034     if test "x$new_path" = x \
39035         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39036         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39037       new_path=`$CYGPATH -u "$path"`
39038     fi
39039     if test "x$new_path" = x; then
39040       # It's still not found. Now this is an unrecoverable error.
39041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39042 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39043       has_space=`$ECHO "$complete" | $GREP " "`
39044       if test "x$has_space" != x; then
39045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39047       fi
39048       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39049     fi
39050   fi
39051 
39052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39055   # "foo.exe" is OK but "foo" is an error.
39056   #
39057   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39058   # It is also a way to make sure we got the proper file name for the real test later on.
39059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39060   if test "x$test_shortpath" = x; then
39061     # Short path failed, file does not exist as specified.
39062     # Try adding .exe or .cmd
39063     if test -f "${new_path}.exe"; then
39064       input_to_shortpath="${new_path}.exe"
39065     elif test -f "${new_path}.cmd"; then
39066       input_to_shortpath="${new_path}.cmd"
39067     else
39068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39069 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39070       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39071 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39072       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39073     fi
39074   else
39075     input_to_shortpath="$new_path"
39076   fi
39077 
39078   # Call helper function which possibly converts this using DOS-style short mode.
39079   # If so, the updated path is stored in $new_path.
39080   new_path="$input_to_shortpath"
39081 
39082   input_path="$input_to_shortpath"
39083   # Check if we need to convert this using DOS-style short mode. If the path
39084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39085   # take no chances and rewrite it.
39086   # Note: m4 eats our [], so we need to use [ and ] instead.
39087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39088   if test "x$has_forbidden_chars" != x; then
39089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39093       # Going to short mode and back again did indeed matter. Since short mode is
39094       # case insensitive, let's make it lowercase to improve readability.
39095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39096       # Now convert it back to Unix-style (cygpath)
39097       input_path=`$CYGPATH -u "$shortmode_path"`
39098       new_path="$input_path"
39099     fi
39100   fi
39101 
39102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39103   if test "x$test_cygdrive_prefix" = x; then
39104     # As a simple fix, exclude /usr/bin since it's not a real path.
39105     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39107       # a path prefixed by /cygdrive for fixpath to work.
39108       new_path="$CYGWIN_ROOT_PATH$input_path"
39109     fi
39110   fi
39111 
39112   # remove trailing .exe if any
39113   new_path="${new_path/%.exe/}"
39114 
39115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39116 
39117   # First separate the path from the arguments. This will split at the first
39118   # space.
39119   complete="$BUILD_CXX"
39120   path="${complete%% *}"
39121   tmp="$complete EOL"
39122   arguments="${tmp#* }"
39123 
39124   # Input might be given as Windows format, start by converting to
39125   # unix format.
39126   new_path="$path"
39127 
39128   windows_path="$new_path"
39129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130     unix_path=`$CYGPATH -u "$windows_path"`
39131     new_path="$unix_path"
39132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134     new_path="$unix_path"
39135   fi
39136 
39137 
39138   # Now try to locate executable using which
39139   new_path=`$WHICH "$new_path" 2> /dev/null`
39140 
39141   if test "x$new_path" = x; then
39142     # Oops. Which didn't find the executable.
39143     # The splitting of arguments from the executable at a space might have been incorrect,
39144     # since paths with space are more likely in Windows. Give it another try with the whole
39145     # argument.
39146     path="$complete"
39147     arguments="EOL"
39148     new_path="$path"
39149 
39150   windows_path="$new_path"
39151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39152     unix_path=`$CYGPATH -u "$windows_path"`
39153     new_path="$unix_path"
39154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39156     new_path="$unix_path"
39157   fi
39158 
39159 
39160     new_path=`$WHICH "$new_path" 2> /dev/null`
39161     # bat and cmd files are not always considered executable in MSYS causing which
39162     # to not find them
39163     if test "x$new_path" = x \
39164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39166       new_path="$path"
39167 
39168   windows_path="$new_path"
39169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170     unix_path=`$CYGPATH -u "$windows_path"`
39171     new_path="$unix_path"
39172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174     new_path="$unix_path"
39175   fi
39176 
39177     fi
39178 
39179     if test "x$new_path" = x; then
39180       # It's still not found. Now this is an unrecoverable error.
39181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39182 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39183       has_space=`$ECHO "$complete" | $GREP " "`
39184       if test "x$has_space" != x; then
39185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39187       fi
39188       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39189     fi
39190   fi
39191 
39192   # Now new_path has a complete unix path to the binary
39193   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39194     # Keep paths in /bin as-is, but remove trailing .exe if any
39195     new_path="${new_path/%.exe/}"
39196     # Do not save /bin paths to all_fixpath_prefixes!
39197   else
39198     # Not in mixed or Windows style, start by that.
39199     new_path=`cmd //c echo $new_path`
39200 
39201   input_path="$new_path"
39202   # Check if we need to convert this using DOS-style short mode. If the path
39203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39204   # take no chances and rewrite it.
39205   # Note: m4 eats our [], so we need to use [ and ] instead.
39206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39207   if test "x$has_forbidden_chars" != x; then
39208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39209     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39210   fi
39211 
39212     # Output is in $new_path
39213 
39214   windows_path="$new_path"
39215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39216     unix_path=`$CYGPATH -u "$windows_path"`
39217     new_path="$unix_path"
39218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39220     new_path="$unix_path"
39221   fi
39222 
39223     # remove trailing .exe if any
39224     new_path="${new_path/%.exe/}"
39225 
39226     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39227     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39228   fi
39229 
39230   else
39231     # We're on a posix platform. Hooray! :)
39232     # First separate the path from the arguments. This will split at the first
39233     # space.
39234     complete="$BUILD_CXX"
39235     path="${complete%% *}"
39236     tmp="$complete EOL"
39237     arguments="${tmp#* }"
39238 
39239     # Cannot rely on the command "which" here since it doesn't always work.
39240     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39241     if test -z "$is_absolute_path"; then
39242       # Path to executable is not absolute. Find it.
39243       IFS_save="$IFS"
39244       IFS=:
39245       for p in $PATH; do
39246         if test -f "$p/$path" && test -x "$p/$path"; then
39247           new_path="$p/$path"
39248           break
39249         fi
39250       done
39251       IFS="$IFS_save"
39252     else
39253       # This is an absolute path, we can use it without further modifications.
39254       new_path="$path"
39255     fi
39256 
39257     if test "x$new_path" = x; then
39258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39259 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39260       has_space=`$ECHO "$complete" | $GREP " "`
39261       if test "x$has_space" != x; then
39262         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39263 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39264       fi
39265       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39266     fi
39267   fi
39268 
39269   # Now join together the path and the arguments once again
39270   if test "x$arguments" != xEOL; then
39271     new_complete="$new_path ${arguments% *}"
39272   else
39273     new_complete="$new_path"
39274   fi
39275 
39276   if test "x$complete" != "x$new_complete"; then
39277     BUILD_CXX="$new_complete"
39278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39279 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39280   fi
39281 
39282 
39283 
39284   # Publish this variable in the help.
39285 
39286 
39287   if test "x$BUILD_LD" = x; then
39288     # The variable is not set by user, try to locate tool using the code snippet
39289     for ac_prog in ld
39290 do
39291   # Extract the first word of "$ac_prog", so it can be a program name with args.
39292 set dummy $ac_prog; ac_word=$2
39293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39294 $as_echo_n "checking for $ac_word... " >&6; }
39295 if ${ac_cv_path_BUILD_LD+:} false; then :
39296   $as_echo_n "(cached) " >&6
39297 else
39298   case $BUILD_LD in
39299   [\\/]* | ?:[\\/]*)
39300   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39301   ;;
39302   *)
39303   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39304 for as_dir in $PATH
39305 do
39306   IFS=$as_save_IFS
39307   test -z "$as_dir" && as_dir=.
39308     for ac_exec_ext in '' $ac_executable_extensions; do
39309   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39310     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39311     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39312     break 2
39313   fi
39314 done
39315   done
39316 IFS=$as_save_IFS
39317 
39318   ;;
39319 esac
39320 fi
39321 BUILD_LD=$ac_cv_path_BUILD_LD
39322 if test -n "$BUILD_LD"; then
39323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39324 $as_echo "$BUILD_LD" >&6; }
39325 else
39326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39327 $as_echo "no" >&6; }
39328 fi
39329 
39330 
39331   test -n "$BUILD_LD" && break
39332 done
39333 
39334   else
39335     # The variable is set, but is it from the command line or the environment?
39336 
39337     # Try to remove the string !BUILD_LD! from our list.
39338     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39339     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39340       # If it failed, the variable was not from the command line. Ignore it,
39341       # but warn the user (except for BASH, which is always set by the calling BASH).
39342       if test "xBUILD_LD" != xBASH; then
39343         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39344 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39345       fi
39346       # Try to locate tool using the code snippet
39347       for ac_prog in ld
39348 do
39349   # Extract the first word of "$ac_prog", so it can be a program name with args.
39350 set dummy $ac_prog; ac_word=$2
39351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39352 $as_echo_n "checking for $ac_word... " >&6; }
39353 if ${ac_cv_path_BUILD_LD+:} false; then :
39354   $as_echo_n "(cached) " >&6
39355 else
39356   case $BUILD_LD in
39357   [\\/]* | ?:[\\/]*)
39358   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39359   ;;
39360   *)
39361   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39362 for as_dir in $PATH
39363 do
39364   IFS=$as_save_IFS
39365   test -z "$as_dir" && as_dir=.
39366     for ac_exec_ext in '' $ac_executable_extensions; do
39367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39368     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39370     break 2
39371   fi
39372 done
39373   done
39374 IFS=$as_save_IFS
39375 
39376   ;;
39377 esac
39378 fi
39379 BUILD_LD=$ac_cv_path_BUILD_LD
39380 if test -n "$BUILD_LD"; then
39381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39382 $as_echo "$BUILD_LD" >&6; }
39383 else
39384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39385 $as_echo "no" >&6; }
39386 fi
39387 
39388 
39389   test -n "$BUILD_LD" && break
39390 done
39391 
39392     else
39393       # If it succeeded, then it was overridden by the user. We will use it
39394       # for the tool.
39395 
39396       # First remove it from the list of overridden variables, so we can test
39397       # for unknown variables in the end.
39398       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39399 
39400       # Check if the provided tool contains a complete path.
39401       tool_specified="$BUILD_LD"
39402       tool_basename="${tool_specified##*/}"
39403       if test "x$tool_basename" = "x$tool_specified"; then
39404         # A command without a complete path is provided, search $PATH.
39405         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39406 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39407         # Extract the first word of "$tool_basename", so it can be a program name with args.
39408 set dummy $tool_basename; ac_word=$2
39409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39410 $as_echo_n "checking for $ac_word... " >&6; }
39411 if ${ac_cv_path_BUILD_LD+:} false; then :
39412   $as_echo_n "(cached) " >&6
39413 else
39414   case $BUILD_LD in
39415   [\\/]* | ?:[\\/]*)
39416   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39417   ;;
39418   *)
39419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39420 for as_dir in $PATH
39421 do
39422   IFS=$as_save_IFS
39423   test -z "$as_dir" && as_dir=.
39424     for ac_exec_ext in '' $ac_executable_extensions; do
39425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39426     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39428     break 2
39429   fi
39430 done
39431   done
39432 IFS=$as_save_IFS
39433 
39434   ;;
39435 esac
39436 fi
39437 BUILD_LD=$ac_cv_path_BUILD_LD
39438 if test -n "$BUILD_LD"; then
39439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39440 $as_echo "$BUILD_LD" >&6; }
39441 else
39442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39443 $as_echo "no" >&6; }
39444 fi
39445 
39446 
39447         if test "x$BUILD_LD" = x; then
39448           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39449         fi
39450       else
39451         # Otherwise we believe it is a complete path. Use it as it is.
39452         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39453 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39454         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39455 $as_echo_n "checking for BUILD_LD... " >&6; }
39456         if test ! -x "$tool_specified"; then
39457           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39458 $as_echo "not found" >&6; }
39459           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39460         fi
39461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39462 $as_echo "$tool_specified" >&6; }
39463       fi
39464     fi
39465   fi
39466 
39467 
39468 
39469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39470 
39471   # First separate the path from the arguments. This will split at the first
39472   # space.
39473   complete="$BUILD_LD"
39474   path="${complete%% *}"
39475   tmp="$complete EOL"
39476   arguments="${tmp#* }"
39477 
39478   # Input might be given as Windows format, start by converting to
39479   # unix format.
39480   new_path=`$CYGPATH -u "$path"`
39481 
39482   # Now try to locate executable using which
39483   new_path=`$WHICH "$new_path" 2> /dev/null`
39484   # bat and cmd files are not always considered executable in cygwin causing which
39485   # to not find them
39486   if test "x$new_path" = x \
39487       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39488       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39489     new_path=`$CYGPATH -u "$path"`
39490   fi
39491   if test "x$new_path" = x; then
39492     # Oops. Which didn't find the executable.
39493     # The splitting of arguments from the executable at a space might have been incorrect,
39494     # since paths with space are more likely in Windows. Give it another try with the whole
39495     # argument.
39496     path="$complete"
39497     arguments="EOL"
39498     new_path=`$CYGPATH -u "$path"`
39499     new_path=`$WHICH "$new_path" 2> /dev/null`
39500     # bat and cmd files are not always considered executable in cygwin causing which
39501     # to not find them
39502     if test "x$new_path" = x \
39503         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39504         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39505       new_path=`$CYGPATH -u "$path"`
39506     fi
39507     if test "x$new_path" = x; then
39508       # It's still not found. Now this is an unrecoverable error.
39509       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39510 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39511       has_space=`$ECHO "$complete" | $GREP " "`
39512       if test "x$has_space" != x; then
39513         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39514 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39515       fi
39516       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39517     fi
39518   fi
39519 
39520   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39521   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39522   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39523   # "foo.exe" is OK but "foo" is an error.
39524   #
39525   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39526   # It is also a way to make sure we got the proper file name for the real test later on.
39527   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39528   if test "x$test_shortpath" = x; then
39529     # Short path failed, file does not exist as specified.
39530     # Try adding .exe or .cmd
39531     if test -f "${new_path}.exe"; then
39532       input_to_shortpath="${new_path}.exe"
39533     elif test -f "${new_path}.cmd"; then
39534       input_to_shortpath="${new_path}.cmd"
39535     else
39536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39537 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39538       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39539 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39540       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39541     fi
39542   else
39543     input_to_shortpath="$new_path"
39544   fi
39545 
39546   # Call helper function which possibly converts this using DOS-style short mode.
39547   # If so, the updated path is stored in $new_path.
39548   new_path="$input_to_shortpath"
39549 
39550   input_path="$input_to_shortpath"
39551   # Check if we need to convert this using DOS-style short mode. If the path
39552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39553   # take no chances and rewrite it.
39554   # Note: m4 eats our [], so we need to use [ and ] instead.
39555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39556   if test "x$has_forbidden_chars" != x; then
39557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39558     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39559     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39560     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39561       # Going to short mode and back again did indeed matter. Since short mode is
39562       # case insensitive, let's make it lowercase to improve readability.
39563       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39564       # Now convert it back to Unix-style (cygpath)
39565       input_path=`$CYGPATH -u "$shortmode_path"`
39566       new_path="$input_path"
39567     fi
39568   fi
39569 
39570   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39571   if test "x$test_cygdrive_prefix" = x; then
39572     # As a simple fix, exclude /usr/bin since it's not a real path.
39573     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39574       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39575       # a path prefixed by /cygdrive for fixpath to work.
39576       new_path="$CYGWIN_ROOT_PATH$input_path"
39577     fi
39578   fi
39579 
39580   # remove trailing .exe if any
39581   new_path="${new_path/%.exe/}"
39582 
39583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39584 
39585   # First separate the path from the arguments. This will split at the first
39586   # space.
39587   complete="$BUILD_LD"
39588   path="${complete%% *}"
39589   tmp="$complete EOL"
39590   arguments="${tmp#* }"
39591 
39592   # Input might be given as Windows format, start by converting to
39593   # unix format.
39594   new_path="$path"
39595 
39596   windows_path="$new_path"
39597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39598     unix_path=`$CYGPATH -u "$windows_path"`
39599     new_path="$unix_path"
39600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39602     new_path="$unix_path"
39603   fi
39604 
39605 
39606   # Now try to locate executable using which
39607   new_path=`$WHICH "$new_path" 2> /dev/null`
39608 
39609   if test "x$new_path" = x; then
39610     # Oops. Which didn't find the executable.
39611     # The splitting of arguments from the executable at a space might have been incorrect,
39612     # since paths with space are more likely in Windows. Give it another try with the whole
39613     # argument.
39614     path="$complete"
39615     arguments="EOL"
39616     new_path="$path"
39617 
39618   windows_path="$new_path"
39619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39620     unix_path=`$CYGPATH -u "$windows_path"`
39621     new_path="$unix_path"
39622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39624     new_path="$unix_path"
39625   fi
39626 
39627 
39628     new_path=`$WHICH "$new_path" 2> /dev/null`
39629     # bat and cmd files are not always considered executable in MSYS causing which
39630     # to not find them
39631     if test "x$new_path" = x \
39632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39634       new_path="$path"
39635 
39636   windows_path="$new_path"
39637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39638     unix_path=`$CYGPATH -u "$windows_path"`
39639     new_path="$unix_path"
39640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39642     new_path="$unix_path"
39643   fi
39644 
39645     fi
39646 
39647     if test "x$new_path" = x; then
39648       # It's still not found. Now this is an unrecoverable error.
39649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39650 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39651       has_space=`$ECHO "$complete" | $GREP " "`
39652       if test "x$has_space" != x; then
39653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39655       fi
39656       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39657     fi
39658   fi
39659 
39660   # Now new_path has a complete unix path to the binary
39661   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39662     # Keep paths in /bin as-is, but remove trailing .exe if any
39663     new_path="${new_path/%.exe/}"
39664     # Do not save /bin paths to all_fixpath_prefixes!
39665   else
39666     # Not in mixed or Windows style, start by that.
39667     new_path=`cmd //c echo $new_path`
39668 
39669   input_path="$new_path"
39670   # Check if we need to convert this using DOS-style short mode. If the path
39671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39672   # take no chances and rewrite it.
39673   # Note: m4 eats our [], so we need to use [ and ] instead.
39674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39675   if test "x$has_forbidden_chars" != x; then
39676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39678   fi
39679 
39680     # Output is in $new_path
39681 
39682   windows_path="$new_path"
39683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39684     unix_path=`$CYGPATH -u "$windows_path"`
39685     new_path="$unix_path"
39686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39688     new_path="$unix_path"
39689   fi
39690 
39691     # remove trailing .exe if any
39692     new_path="${new_path/%.exe/}"
39693 
39694     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39695     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39696   fi
39697 
39698   else
39699     # We're on a posix platform. Hooray! :)
39700     # First separate the path from the arguments. This will split at the first
39701     # space.
39702     complete="$BUILD_LD"
39703     path="${complete%% *}"
39704     tmp="$complete EOL"
39705     arguments="${tmp#* }"
39706 
39707     # Cannot rely on the command "which" here since it doesn't always work.
39708     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39709     if test -z "$is_absolute_path"; then
39710       # Path to executable is not absolute. Find it.
39711       IFS_save="$IFS"
39712       IFS=:
39713       for p in $PATH; do
39714         if test -f "$p/$path" && test -x "$p/$path"; then
39715           new_path="$p/$path"
39716           break
39717         fi
39718       done
39719       IFS="$IFS_save"
39720     else
39721       # This is an absolute path, we can use it without further modifications.
39722       new_path="$path"
39723     fi
39724 
39725     if test "x$new_path" = x; then
39726       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39727 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39728       has_space=`$ECHO "$complete" | $GREP " "`
39729       if test "x$has_space" != x; then
39730         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39732       fi
39733       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39734     fi
39735   fi
39736 
39737   # Now join together the path and the arguments once again
39738   if test "x$arguments" != xEOL; then
39739     new_complete="$new_path ${arguments% *}"
39740   else
39741     new_complete="$new_path"
39742   fi
39743 
39744   if test "x$complete" != "x$new_complete"; then
39745     BUILD_LD="$new_complete"
39746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
39747 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
39748   fi
39749 
39750   else
39751     # If we are not cross compiling, use the normal target compilers for
39752     # building the build platform executables.
39753     BUILD_CC="$CC"
39754     BUILD_CXX="$CXX"
39755     BUILD_LD="$LD"
39756   fi
39757 
39758 
39759   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39760     # For hotspot, we need these in Windows mixed path,
39761     # so rewrite them all. Need added .exe suffix.
39762     HOTSPOT_CXX="$CXX.exe"
39763     HOTSPOT_LD="$LD.exe"
39764     HOTSPOT_MT="$MT.exe"
39765     HOTSPOT_RC="$RC.exe"
39766 
39767   unix_path="$HOTSPOT_CXX"
39768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39769     windows_path=`$CYGPATH -m "$unix_path"`
39770     HOTSPOT_CXX="$windows_path"
39771   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39772     windows_path=`cmd //c echo $unix_path`
39773     HOTSPOT_CXX="$windows_path"
39774   fi
39775 
39776 
39777   unix_path="$HOTSPOT_LD"
39778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39779     windows_path=`$CYGPATH -m "$unix_path"`
39780     HOTSPOT_LD="$windows_path"
39781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39782     windows_path=`cmd //c echo $unix_path`
39783     HOTSPOT_LD="$windows_path"
39784   fi
39785 
39786 
39787   unix_path="$HOTSPOT_MT"
39788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39789     windows_path=`$CYGPATH -m "$unix_path"`
39790     HOTSPOT_MT="$windows_path"
39791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39792     windows_path=`cmd //c echo $unix_path`
39793     HOTSPOT_MT="$windows_path"
39794   fi
39795 
39796 
39797   unix_path="$HOTSPOT_RC"
39798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39799     windows_path=`$CYGPATH -m "$unix_path"`
39800     HOTSPOT_RC="$windows_path"
39801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39802     windows_path=`cmd //c echo $unix_path`
39803     HOTSPOT_RC="$windows_path"
39804   fi
39805 
39806 
39807 
39808   else
39809     HOTSPOT_CXX="$CXX"
39810     HOTSPOT_LD="$LD"
39811   fi
39812 
39813 
39814 
39815   if test  "x$TOOLCHAIN_TYPE" = xclang; then
39816     USE_CLANG=true
39817   fi
39818 
39819 
39820   # LDEXE is the linker to use, when creating executables. Not really used.
39821   # FIXME: These should just be removed!
39822   LDEXE="$LD"
39823   LDEXECXX="$LDCXX"
39824 
39825 
39826 
39827 
39828   # The package path is used only on macosx?
39829   # FIXME: clean this up, and/or move it elsewhere.
39830   PACKAGE_PATH=/opt/local
39831 
39832 
39833   # Check for extra potential brokenness.
39834   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39835     # On Windows, double-check that we got the right compiler.
39836     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
39837     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
39838     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
39839       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
39840         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
39841       fi
39842     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
39843       if test "x$COMPILER_CPU_TEST" != "xx64"; then
39844         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
39845       fi
39846     fi
39847   fi
39848 
39849   if test "x$TOOLCHAIN_TYPE" = xgcc; then
39850     # If this is a --hash-style=gnu system, use --hash-style=both, why?
39851     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
39852     # This is later checked when setting flags.
39853   fi
39854 
39855   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
39856   # in executable.'
39857   USING_BROKEN_SUSE_LD=no
39858   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
39859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
39860 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
39861     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
39862     echo "int main() { }" > main.c
39863     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
39864       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39865 $as_echo "no" >&6; }
39866       USING_BROKEN_SUSE_LD=no
39867     else
39868       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39869 $as_echo "yes" >&6; }
39870       USING_BROKEN_SUSE_LD=yes
39871     fi
39872     rm -rf version-script.map main.c
39873   fi
39874 
39875 
39876 
39877 # Setup the JTReg Regression Test Harness.
39878 
39879 
39880 # Check whether --with-jtreg was given.
39881 if test "${with_jtreg+set}" = set; then :
39882   withval=$with_jtreg;
39883 else
39884   with_jtreg=no
39885 fi
39886 
39887 
39888   if test "x$with_jtreg" = xno; then
39889     # jtreg disabled
39890     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
39891 $as_echo_n "checking for jtreg... " >&6; }
39892     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39893 $as_echo "no" >&6; }
39894   else
39895     if test "x$with_jtreg" != xyes; then
39896       # with path specified.
39897       JT_HOME="$with_jtreg"
39898     fi
39899 
39900     if test "x$JT_HOME" != x; then
39901       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
39902 $as_echo_n "checking for jtreg... " >&6; }
39903 
39904       # use JT_HOME enviroment var.
39905 
39906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907 
39908   # Input might be given as Windows format, start by converting to
39909   # unix format.
39910   path="$JT_HOME"
39911   new_path=`$CYGPATH -u "$path"`
39912 
39913   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39914   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39915   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39916   # "foo.exe" is OK but "foo" is an error.
39917   #
39918   # This test is therefore slightly more accurate than "test -f" to check for file precense.
39919   # It is also a way to make sure we got the proper file name for the real test later on.
39920   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39921   if test "x$test_shortpath" = x; then
39922     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
39923 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
39924     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
39925   fi
39926 
39927   # Call helper function which possibly converts this using DOS-style short mode.
39928   # If so, the updated path is stored in $new_path.
39929 
39930   input_path="$new_path"
39931   # Check if we need to convert this using DOS-style short mode. If the path
39932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39933   # take no chances and rewrite it.
39934   # Note: m4 eats our [], so we need to use [ and ] instead.
39935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39936   if test "x$has_forbidden_chars" != x; then
39937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39941       # Going to short mode and back again did indeed matter. Since short mode is
39942       # case insensitive, let's make it lowercase to improve readability.
39943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39944       # Now convert it back to Unix-style (cygpath)
39945       input_path=`$CYGPATH -u "$shortmode_path"`
39946       new_path="$input_path"
39947     fi
39948   fi
39949 
39950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39951   if test "x$test_cygdrive_prefix" = x; then
39952     # As a simple fix, exclude /usr/bin since it's not a real path.
39953     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
39954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39955       # a path prefixed by /cygdrive for fixpath to work.
39956       new_path="$CYGWIN_ROOT_PATH$input_path"
39957     fi
39958   fi
39959 
39960 
39961   if test "x$path" != "x$new_path"; then
39962     JT_HOME="$new_path"
39963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
39964 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
39965   fi
39966 
39967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39968 
39969   path="$JT_HOME"
39970   has_colon=`$ECHO $path | $GREP ^.:`
39971   new_path="$path"
39972   if test "x$has_colon" = x; then
39973     # Not in mixed or Windows style, start by that.
39974     new_path=`cmd //c echo $path`
39975   fi
39976 
39977 
39978   input_path="$new_path"
39979   # Check if we need to convert this using DOS-style short mode. If the path
39980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39981   # take no chances and rewrite it.
39982   # Note: m4 eats our [], so we need to use [ and ] instead.
39983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39984   if test "x$has_forbidden_chars" != x; then
39985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39986     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39987   fi
39988 
39989 
39990   windows_path="$new_path"
39991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39992     unix_path=`$CYGPATH -u "$windows_path"`
39993     new_path="$unix_path"
39994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39996     new_path="$unix_path"
39997   fi
39998 
39999   if test "x$path" != "x$new_path"; then
40000     JT_HOME="$new_path"
40001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40002 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40003   fi
40004 
40005   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40006   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40007 
40008   else
40009     # We're on a posix platform. Hooray! :)
40010     path="$JT_HOME"
40011     has_space=`$ECHO "$path" | $GREP " "`
40012     if test "x$has_space" != x; then
40013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40014 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40015       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40016     fi
40017 
40018     # Use eval to expand a potential ~
40019     eval path="$path"
40020     if test ! -f "$path" && test ! -d "$path"; then
40021       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40022     fi
40023 
40024     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40025   fi
40026 
40027 
40028       # jtreg win32 script works for everybody
40029       JTREGEXE="$JT_HOME/bin/jtreg"
40030 
40031       if test ! -f "$JTREGEXE"; then
40032         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40033       fi
40034 
40035       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40036 $as_echo "$JTREGEXE" >&6; }
40037     else
40038       # try to find jtreg on path
40039 
40040 
40041 
40042   # Publish this variable in the help.
40043 
40044 
40045   if test "x$JTREGEXE" = x; then
40046     # The variable is not set by user, try to locate tool using the code snippet
40047     for ac_prog in jtreg
40048 do
40049   # Extract the first word of "$ac_prog", so it can be a program name with args.
40050 set dummy $ac_prog; ac_word=$2
40051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40052 $as_echo_n "checking for $ac_word... " >&6; }
40053 if ${ac_cv_path_JTREGEXE+:} false; then :
40054   $as_echo_n "(cached) " >&6
40055 else
40056   case $JTREGEXE in
40057   [\\/]* | ?:[\\/]*)
40058   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40059   ;;
40060   *)
40061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40062 for as_dir in $PATH
40063 do
40064   IFS=$as_save_IFS
40065   test -z "$as_dir" && as_dir=.
40066     for ac_exec_ext in '' $ac_executable_extensions; do
40067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40068     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40070     break 2
40071   fi
40072 done
40073   done
40074 IFS=$as_save_IFS
40075 
40076   ;;
40077 esac
40078 fi
40079 JTREGEXE=$ac_cv_path_JTREGEXE
40080 if test -n "$JTREGEXE"; then
40081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40082 $as_echo "$JTREGEXE" >&6; }
40083 else
40084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40085 $as_echo "no" >&6; }
40086 fi
40087 
40088 
40089   test -n "$JTREGEXE" && break
40090 done
40091 
40092   else
40093     # The variable is set, but is it from the command line or the environment?
40094 
40095     # Try to remove the string !JTREGEXE! from our list.
40096     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40097     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40098       # If it failed, the variable was not from the command line. Ignore it,
40099       # but warn the user (except for BASH, which is always set by the calling BASH).
40100       if test "xJTREGEXE" != xBASH; then
40101         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40102 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40103       fi
40104       # Try to locate tool using the code snippet
40105       for ac_prog in jtreg
40106 do
40107   # Extract the first word of "$ac_prog", so it can be a program name with args.
40108 set dummy $ac_prog; ac_word=$2
40109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40110 $as_echo_n "checking for $ac_word... " >&6; }
40111 if ${ac_cv_path_JTREGEXE+:} false; then :
40112   $as_echo_n "(cached) " >&6
40113 else
40114   case $JTREGEXE in
40115   [\\/]* | ?:[\\/]*)
40116   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40117   ;;
40118   *)
40119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40120 for as_dir in $PATH
40121 do
40122   IFS=$as_save_IFS
40123   test -z "$as_dir" && as_dir=.
40124     for ac_exec_ext in '' $ac_executable_extensions; do
40125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40126     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40128     break 2
40129   fi
40130 done
40131   done
40132 IFS=$as_save_IFS
40133 
40134   ;;
40135 esac
40136 fi
40137 JTREGEXE=$ac_cv_path_JTREGEXE
40138 if test -n "$JTREGEXE"; then
40139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40140 $as_echo "$JTREGEXE" >&6; }
40141 else
40142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40143 $as_echo "no" >&6; }
40144 fi
40145 
40146 
40147   test -n "$JTREGEXE" && break
40148 done
40149 
40150     else
40151       # If it succeeded, then it was overridden by the user. We will use it
40152       # for the tool.
40153 
40154       # First remove it from the list of overridden variables, so we can test
40155       # for unknown variables in the end.
40156       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40157 
40158       # Check if the provided tool contains a complete path.
40159       tool_specified="$JTREGEXE"
40160       tool_basename="${tool_specified##*/}"
40161       if test "x$tool_basename" = "x$tool_specified"; then
40162         # A command without a complete path is provided, search $PATH.
40163         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40164 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40165         # Extract the first word of "$tool_basename", so it can be a program name with args.
40166 set dummy $tool_basename; ac_word=$2
40167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40168 $as_echo_n "checking for $ac_word... " >&6; }
40169 if ${ac_cv_path_JTREGEXE+:} false; then :
40170   $as_echo_n "(cached) " >&6
40171 else
40172   case $JTREGEXE in
40173   [\\/]* | ?:[\\/]*)
40174   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40175   ;;
40176   *)
40177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40178 for as_dir in $PATH
40179 do
40180   IFS=$as_save_IFS
40181   test -z "$as_dir" && as_dir=.
40182     for ac_exec_ext in '' $ac_executable_extensions; do
40183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40184     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40186     break 2
40187   fi
40188 done
40189   done
40190 IFS=$as_save_IFS
40191 
40192   ;;
40193 esac
40194 fi
40195 JTREGEXE=$ac_cv_path_JTREGEXE
40196 if test -n "$JTREGEXE"; then
40197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40198 $as_echo "$JTREGEXE" >&6; }
40199 else
40200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40201 $as_echo "no" >&6; }
40202 fi
40203 
40204 
40205         if test "x$JTREGEXE" = x; then
40206           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40207         fi
40208       else
40209         # Otherwise we believe it is a complete path. Use it as it is.
40210         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40211 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40212         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40213 $as_echo_n "checking for JTREGEXE... " >&6; }
40214         if test ! -x "$tool_specified"; then
40215           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40216 $as_echo "not found" >&6; }
40217           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40218         fi
40219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40220 $as_echo "$tool_specified" >&6; }
40221       fi
40222     fi
40223   fi
40224 
40225 
40226 
40227   if test "x$JTREGEXE" = x; then
40228     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40229   fi
40230 
40231 
40232       JT_HOME="`$DIRNAME $JTREGEXE`"
40233     fi
40234   fi
40235 
40236 
40237 
40238 
40239 
40240 
40241   # Option used to tell the compiler whether to create 32- or 64-bit executables
40242   if test "x$TOOLCHAIN_TYPE" = xxlc; then
40243     COMPILER_TARGET_BITS_FLAG="-q"
40244   else
40245     COMPILER_TARGET_BITS_FLAG="-m"
40246   fi
40247 
40248 
40249   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40250   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40251     ARFLAGS="-r"
40252   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40253     ARFLAGS="-X64"
40254   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40255     # lib.exe is used as AR to create static libraries.
40256     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40257   else
40258     ARFLAGS=""
40259   fi
40260 
40261 
40262   ## Setup strip.
40263   # FIXME: should this really be per platform, or should it be per toolchain type?
40264   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40265   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40266   if test "x$OPENJDK_TARGET_OS" = xlinux; then
40267     STRIPFLAGS="-g"
40268   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40269     STRIPFLAGS="-x"
40270   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40271     STRIPFLAGS="-S"
40272   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40273     STRIPFLAGS="-X32_64"
40274   fi
40275 
40276   if test "x$OPENJDK_TARGET_OS" != xwindows; then
40277     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40278   fi
40279 
40280 
40281   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40282     # FIXME: break out into MCSFLAGS
40283     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40284   fi
40285 
40286 
40287   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40288     CC_OUT_OPTION=-Fo
40289     EXE_OUT_OPTION=-out:
40290     LD_OUT_OPTION=-out:
40291     AR_OUT_OPTION=-out:
40292   else
40293     # The option used to specify the target .o,.a or .so file.
40294     # When compiling, how to specify the to be created object file.
40295     CC_OUT_OPTION='-o$(SPACE)'
40296     # When linking, how to specify the to be created executable.
40297     EXE_OUT_OPTION='-o$(SPACE)'
40298     # When linking, how to specify the to be created dynamically linkable library.
40299     LD_OUT_OPTION='-o$(SPACE)'
40300     # When archiving, how to specify the to be create static archive for object files.
40301     AR_OUT_OPTION='rcs$(SPACE)'
40302   fi
40303 
40304 
40305 
40306 
40307 
40308   # On Windows, we need to set RC flags.
40309   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40310     RC_FLAGS="-nologo -l 0x409 -r"
40311     if test "x$VARIANT" = xOPT; then
40312       RC_FLAGS="$RC_FLAGS -d NDEBUG"
40313     fi
40314 
40315     # The version variables used to create RC_FLAGS may be overridden
40316     # in a custom configure script, or possibly the command line.
40317     # Let those variables be expanded at make time in spec.gmk.
40318     # The \$ are escaped to the shell, and the $(...) variables
40319     # are evaluated by make.
40320     RC_FLAGS="$RC_FLAGS \
40321         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40322         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40323         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40324         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40325         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40326         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40327         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40328   fi
40329 
40330 
40331   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40332     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40333     CCXXFLAGS="$CCXXFLAGS -nologo"
40334   fi
40335 
40336   if test "x$SYSROOT" != "x"; then
40337     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40338       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40339         # Solaris Studio does not have a concept of sysroot. Instead we must
40340         # make sure the default include and lib dirs are appended to each
40341         # compile and link command line.
40342         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40343         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40344             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40345             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40346       fi
40347     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40348       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40349       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40350     elif test "x$TOOLCHAIN_TYPE" = xclang; then
40351       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40352       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40353     fi
40354     # Propagate the sysroot args to hotspot
40355     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40356     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40357     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40358   fi
40359 
40360 
40361 
40362 
40363 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40364 
40365 # Now we can test some aspects on the target using configure macros.
40366 
40367 
40368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40369 $as_echo_n "checking for ANSI C header files... " >&6; }
40370 if ${ac_cv_header_stdc+:} false; then :
40371   $as_echo_n "(cached) " >&6
40372 else
40373   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40374 /* end confdefs.h.  */
40375 #include <stdlib.h>
40376 #include <stdarg.h>
40377 #include <string.h>
40378 #include <float.h>
40379 
40380 int
40381 main ()
40382 {
40383 
40384   ;
40385   return 0;
40386 }
40387 _ACEOF
40388 if ac_fn_cxx_try_compile "$LINENO"; then :
40389   ac_cv_header_stdc=yes
40390 else
40391   ac_cv_header_stdc=no
40392 fi
40393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40394 
40395 if test $ac_cv_header_stdc = yes; then
40396   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40398 /* end confdefs.h.  */
40399 #include <string.h>
40400 
40401 _ACEOF
40402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40403   $EGREP "memchr" >/dev/null 2>&1; then :
40404 
40405 else
40406   ac_cv_header_stdc=no
40407 fi
40408 rm -f conftest*
40409 
40410 fi
40411 
40412 if test $ac_cv_header_stdc = yes; then
40413   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40415 /* end confdefs.h.  */
40416 #include <stdlib.h>
40417 
40418 _ACEOF
40419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40420   $EGREP "free" >/dev/null 2>&1; then :
40421 
40422 else
40423   ac_cv_header_stdc=no
40424 fi
40425 rm -f conftest*
40426 
40427 fi
40428 
40429 if test $ac_cv_header_stdc = yes; then
40430   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40431   if test "$cross_compiling" = yes; then :
40432   :
40433 else
40434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40435 /* end confdefs.h.  */
40436 #include <ctype.h>
40437 #include <stdlib.h>
40438 #if ((' ' & 0x0FF) == 0x020)
40439 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40440 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40441 #else
40442 # define ISLOWER(c) \
40443                    (('a' <= (c) && (c) <= 'i') \
40444                      || ('j' <= (c) && (c) <= 'r') \
40445                      || ('s' <= (c) && (c) <= 'z'))
40446 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40447 #endif
40448 
40449 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40450 int
40451 main ()
40452 {
40453   int i;
40454   for (i = 0; i < 256; i++)
40455     if (XOR (islower (i), ISLOWER (i))
40456         || toupper (i) != TOUPPER (i))
40457       return 2;
40458   return 0;
40459 }
40460 _ACEOF
40461 if ac_fn_cxx_try_run "$LINENO"; then :
40462 
40463 else
40464   ac_cv_header_stdc=no
40465 fi
40466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40467   conftest.$ac_objext conftest.beam conftest.$ac_ext
40468 fi
40469 
40470 fi
40471 fi
40472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40473 $as_echo "$ac_cv_header_stdc" >&6; }
40474 if test $ac_cv_header_stdc = yes; then
40475 
40476 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
40477 
40478 fi
40479 
40480 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
40481 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40482                   inttypes.h stdint.h unistd.h
40483 do :
40484   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40485 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40486 "
40487 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40488   cat >>confdefs.h <<_ACEOF
40489 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40490 _ACEOF
40491 
40492 fi
40493 
40494 done
40495 
40496 
40497 
40498   ###############################################################################
40499   #
40500   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40501   # (The JVM can use 32 or 64 bit Java pointers but that decision
40502   # is made at runtime.)
40503   #
40504 
40505   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40506     # Always specify -m flag on Solaris
40507     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40508 
40509   # When we add flags to the "official" CFLAGS etc, we need to
40510   # keep track of these additions in ADDED_CFLAGS etc. These
40511   # will later be checked to make sure only controlled additions
40512   # have been made to CFLAGS etc.
40513   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40514   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40515   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40516 
40517   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40518   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40519   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40520 
40521   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40522   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40523   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40524 
40525   elif test "x$COMPILE_TYPE" = xreduced; then
40526     if test "x$OPENJDK_TARGET_OS" != xwindows; then
40527       # Specify -m if running reduced on other Posix platforms
40528 
40529   # When we add flags to the "official" CFLAGS etc, we need to
40530   # keep track of these additions in ADDED_CFLAGS etc. These
40531   # will later be checked to make sure only controlled additions
40532   # have been made to CFLAGS etc.
40533   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40534   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40535   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40536 
40537   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40538   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40539   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40540 
40541   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40542   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40543   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40544 
40545     fi
40546   fi
40547 
40548   # Make compilation sanity check
40549   for ac_header in stdio.h
40550 do :
40551   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40552 if test "x$ac_cv_header_stdio_h" = xyes; then :
40553   cat >>confdefs.h <<_ACEOF
40554 #define HAVE_STDIO_H 1
40555 _ACEOF
40556 
40557 else
40558 
40559     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40560 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40561     if test "x$COMPILE_TYPE" = xreduced; then
40562       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40563 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40564     elif test "x$COMPILE_TYPE" = xcross; then
40565       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40566 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40567     fi
40568     as_fn_error $? "Cannot continue." "$LINENO" 5
40569 
40570 fi
40571 
40572 done
40573 
40574 
40575   # The cast to long int works around a bug in the HP C Compiler
40576 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40577 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40578 # This bug is HP SR number 8606223364.
40579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40580 $as_echo_n "checking size of int *... " >&6; }
40581 if ${ac_cv_sizeof_int_p+:} false; then :
40582   $as_echo_n "(cached) " >&6
40583 else
40584   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40585 
40586 else
40587   if test "$ac_cv_type_int_p" = yes; then
40588      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40589 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40590 as_fn_error 77 "cannot compute sizeof (int *)
40591 See \`config.log' for more details" "$LINENO" 5; }
40592    else
40593      ac_cv_sizeof_int_p=0
40594    fi
40595 fi
40596 
40597 fi
40598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40599 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40600 
40601 
40602 
40603 cat >>confdefs.h <<_ACEOF
40604 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40605 _ACEOF
40606 
40607 
40608 
40609   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40610   if test "x$ac_cv_sizeof_int_p" = x; then
40611     # The test failed, lets stick to the assumed value.
40612     { $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
40613 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40614   else
40615     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40616 
40617     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40618       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40619       # Let's try to implicitely set the compilers target architecture and retry the test
40620       { $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
40621 $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;}
40622       { $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
40623 $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;}
40624 
40625   # When we add flags to the "official" CFLAGS etc, we need to
40626   # keep track of these additions in ADDED_CFLAGS etc. These
40627   # will later be checked to make sure only controlled additions
40628   # have been made to CFLAGS etc.
40629   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40630   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40631   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40632 
40633   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40634   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40635   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40636 
40637   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40638   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40639   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40640 
40641 
40642       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40643       unset ac_cv_sizeof_int_p
40644       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40645       cat >>confdefs.h <<_ACEOF
40646 #undef SIZEOF_INT_P
40647 _ACEOF
40648 
40649       # The cast to long int works around a bug in the HP C Compiler
40650 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40651 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40652 # This bug is HP SR number 8606223364.
40653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40654 $as_echo_n "checking size of int *... " >&6; }
40655 if ${ac_cv_sizeof_int_p+:} false; then :
40656   $as_echo_n "(cached) " >&6
40657 else
40658   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40659 
40660 else
40661   if test "$ac_cv_type_int_p" = yes; then
40662      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40663 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40664 as_fn_error 77 "cannot compute sizeof (int *)
40665 See \`config.log' for more details" "$LINENO" 5; }
40666    else
40667      ac_cv_sizeof_int_p=0
40668    fi
40669 fi
40670 
40671 fi
40672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40673 $as_echo "$ac_cv_sizeof_int_p" >&6; }
40674 
40675 
40676 
40677 cat >>confdefs.h <<_ACEOF
40678 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
40679 _ACEOF
40680 
40681 
40682 
40683       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40684 
40685       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40686         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
40687       fi
40688     fi
40689   fi
40690 
40691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40692 $as_echo_n "checking for target address size... " >&6; }
40693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40694 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40695 
40696 
40697   ###############################################################################
40698   #
40699   # Is the target little of big endian?
40700   #
40701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40702 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40703 if ${ac_cv_c_bigendian+:} false; then :
40704   $as_echo_n "(cached) " >&6
40705 else
40706   ac_cv_c_bigendian=unknown
40707     # See if we're dealing with a universal compiler.
40708     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40709 /* end confdefs.h.  */
40710 #ifndef __APPLE_CC__
40711                not a universal capable compiler
40712              #endif
40713              typedef int dummy;
40714 
40715 _ACEOF
40716 if ac_fn_cxx_try_compile "$LINENO"; then :
40717 
40718         # Check for potential -arch flags.  It is not universal unless
40719         # there are at least two -arch flags with different values.
40720         ac_arch=
40721         ac_prev=
40722         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40723          if test -n "$ac_prev"; then
40724            case $ac_word in
40725              i?86 | x86_64 | ppc | ppc64)
40726                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40727                  ac_arch=$ac_word
40728                else
40729                  ac_cv_c_bigendian=universal
40730                  break
40731                fi
40732                ;;
40733            esac
40734            ac_prev=
40735          elif test "x$ac_word" = "x-arch"; then
40736            ac_prev=arch
40737          fi
40738        done
40739 fi
40740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40741     if test $ac_cv_c_bigendian = unknown; then
40742       # See if sys/param.h defines the BYTE_ORDER macro.
40743       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40744 /* end confdefs.h.  */
40745 #include <sys/types.h>
40746              #include <sys/param.h>
40747 
40748 int
40749 main ()
40750 {
40751 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
40752                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
40753                      && LITTLE_ENDIAN)
40754               bogus endian macros
40755              #endif
40756 
40757   ;
40758   return 0;
40759 }
40760 _ACEOF
40761 if ac_fn_cxx_try_compile "$LINENO"; then :
40762   # It does; now see whether it defined to BIG_ENDIAN or not.
40763          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40764 /* end confdefs.h.  */
40765 #include <sys/types.h>
40766                 #include <sys/param.h>
40767 
40768 int
40769 main ()
40770 {
40771 #if BYTE_ORDER != BIG_ENDIAN
40772                  not big endian
40773                 #endif
40774 
40775   ;
40776   return 0;
40777 }
40778 _ACEOF
40779 if ac_fn_cxx_try_compile "$LINENO"; then :
40780   ac_cv_c_bigendian=yes
40781 else
40782   ac_cv_c_bigendian=no
40783 fi
40784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40785 fi
40786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40787     fi
40788     if test $ac_cv_c_bigendian = unknown; then
40789       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
40790       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40791 /* end confdefs.h.  */
40792 #include <limits.h>
40793 
40794 int
40795 main ()
40796 {
40797 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
40798               bogus endian macros
40799              #endif
40800 
40801   ;
40802   return 0;
40803 }
40804 _ACEOF
40805 if ac_fn_cxx_try_compile "$LINENO"; then :
40806   # It does; now see whether it defined to _BIG_ENDIAN or not.
40807          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40808 /* end confdefs.h.  */
40809 #include <limits.h>
40810 
40811 int
40812 main ()
40813 {
40814 #ifndef _BIG_ENDIAN
40815                  not big endian
40816                 #endif
40817 
40818   ;
40819   return 0;
40820 }
40821 _ACEOF
40822 if ac_fn_cxx_try_compile "$LINENO"; then :
40823   ac_cv_c_bigendian=yes
40824 else
40825   ac_cv_c_bigendian=no
40826 fi
40827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40828 fi
40829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40830     fi
40831     if test $ac_cv_c_bigendian = unknown; then
40832       # Compile a test program.
40833       if test "$cross_compiling" = yes; then :
40834   # Try to guess by grepping values from an object file.
40835          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40836 /* end confdefs.h.  */
40837 short int ascii_mm[] =
40838                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40839                 short int ascii_ii[] =
40840                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40841                 int use_ascii (int i) {
40842                   return ascii_mm[i] + ascii_ii[i];
40843                 }
40844                 short int ebcdic_ii[] =
40845                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40846                 short int ebcdic_mm[] =
40847                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40848                 int use_ebcdic (int i) {
40849                   return ebcdic_mm[i] + ebcdic_ii[i];
40850                 }
40851                 extern int foo;
40852 
40853 int
40854 main ()
40855 {
40856 return use_ascii (foo) == use_ebcdic (foo);
40857   ;
40858   return 0;
40859 }
40860 _ACEOF
40861 if ac_fn_cxx_try_compile "$LINENO"; then :
40862   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
40863               ac_cv_c_bigendian=yes
40864             fi
40865             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40866               if test "$ac_cv_c_bigendian" = unknown; then
40867                 ac_cv_c_bigendian=no
40868               else
40869                 # finding both strings is unlikely to happen, but who knows?
40870                 ac_cv_c_bigendian=unknown
40871               fi
40872             fi
40873 fi
40874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40875 else
40876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40877 /* end confdefs.h.  */
40878 $ac_includes_default
40879 int
40880 main ()
40881 {
40882 
40883              /* Are we little or big endian?  From Harbison&Steele.  */
40884              union
40885              {
40886                long int l;
40887                char c[sizeof (long int)];
40888              } u;
40889              u.l = 1;
40890              return u.c[sizeof (long int) - 1] == 1;
40891 
40892   ;
40893   return 0;
40894 }
40895 _ACEOF
40896 if ac_fn_cxx_try_run "$LINENO"; then :
40897   ac_cv_c_bigendian=no
40898 else
40899   ac_cv_c_bigendian=yes
40900 fi
40901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40902   conftest.$ac_objext conftest.beam conftest.$ac_ext
40903 fi
40904 
40905     fi
40906 fi
40907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
40908 $as_echo "$ac_cv_c_bigendian" >&6; }
40909  case $ac_cv_c_bigendian in #(
40910    yes)
40911      ENDIAN="big";; #(
40912    no)
40913      ENDIAN="little" ;; #(
40914    universal)
40915      ENDIAN="universal_endianness"
40916      ;; #(
40917    *)
40918      ENDIAN="unknown" ;;
40919  esac
40920 
40921 
40922   if test "x$ENDIAN" = xuniversal_endianness; then
40923     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
40924   fi
40925   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
40926     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
40927   fi
40928 
40929 
40930 # Configure flags for the tools
40931 
40932   ###############################################################################
40933   #
40934   # How to compile shared libraries.
40935   #
40936 
40937   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40938     PICFLAG="-fPIC"
40939     C_FLAG_REORDER=''
40940     CXX_FLAG_REORDER=''
40941 
40942     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40943       # Linking is different on MacOSX
40944       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
40945       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
40946       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
40947       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
40948       SET_SHARED_LIBRARY_MAPFILE=''
40949     else
40950       # Default works for linux, might work on other platforms as well.
40951       SHARED_LIBRARY_FLAGS='-shared'
40952       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
40953       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
40954       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
40955       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
40956     fi
40957   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40958     PICFLAG="-KPIC"
40959     C_FLAG_REORDER='-xF'
40960     CXX_FLAG_REORDER='-xF'
40961     SHARED_LIBRARY_FLAGS="-G"
40962     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
40963     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
40964     SET_SHARED_LIBRARY_NAME=''
40965     SET_SHARED_LIBRARY_MAPFILE='-M$1'
40966   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
40967     PICFLAG="-qpic=large"
40968     C_FLAG_REORDER=''
40969     CXX_FLAG_REORDER=''
40970     SHARED_LIBRARY_FLAGS="-qmkshrobj"
40971     SET_EXECUTABLE_ORIGIN=""
40972     SET_SHARED_LIBRARY_ORIGIN=''
40973     SET_SHARED_LIBRARY_NAME=''
40974     SET_SHARED_LIBRARY_MAPFILE=''
40975   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40976     PICFLAG=""
40977     C_FLAG_REORDER=''
40978     CXX_FLAG_REORDER=''
40979     SHARED_LIBRARY_FLAGS="-LD"
40980     SET_EXECUTABLE_ORIGIN=''
40981     SET_SHARED_LIBRARY_ORIGIN=''
40982     SET_SHARED_LIBRARY_NAME=''
40983     SET_SHARED_LIBRARY_MAPFILE=''
40984   fi
40985 
40986 
40987 
40988 
40989 
40990 
40991 
40992 
40993 
40994   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40995     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
40996     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
40997     CFLAGS_JDKLIB_EXTRA='-xstrconst'
40998   fi
40999   # The (cross) compiler is now configured, we can now test capabilities
41000   # of the target platform.
41001 
41002 
41003 
41004   ###############################################################################
41005   #
41006   # Setup the opt flags for different compilers
41007   # and different operating systems.
41008   #
41009 
41010   # FIXME: this was indirectly the old default, but just inherited.
41011   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41012   #   C_FLAG_DEPS="-MMD -MF"
41013   # fi
41014 
41015   # Generate make dependency files
41016   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41017     C_FLAG_DEPS="-MMD -MF"
41018   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41019     C_FLAG_DEPS="-xMMD -xMF"
41020   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41021     C_FLAG_DEPS="-qmakedep=gcc -MF"
41022   fi
41023   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41024 
41025 
41026 
41027   # Debug symbols
41028   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41029     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41030       CFLAGS_DEBUG_SYMBOLS="-g1"
41031       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41032     else
41033       CFLAGS_DEBUG_SYMBOLS="-g"
41034       CXXFLAGS_DEBUG_SYMBOLS="-g"
41035     fi
41036   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41037     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41038     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41039   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41040     CFLAGS_DEBUG_SYMBOLS="-g"
41041     CXXFLAGS_DEBUG_SYMBOLS="-g"
41042   fi
41043 
41044 
41045 
41046   # Optimization levels
41047   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41048     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41049 
41050     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41051       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41052       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41053       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41054       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41055       C_O_FLAG_NONE="-xregs=no%frameptr"
41056       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41057       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41058       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41059       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41060       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41061         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41062         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41063       fi
41064     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41065       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41066       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41067       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41068       C_O_FLAG_NONE=""
41069       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41070       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41071       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41072       CXX_O_FLAG_NONE=""
41073     fi
41074   else
41075     # The remaining toolchains share opt flags between CC and CXX;
41076     # setup for C and duplicate afterwards.
41077     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41078       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41079         # On MacOSX we optimize for size, something
41080         # we should do for all platforms?
41081         C_O_FLAG_HIGHEST="-Os"
41082         C_O_FLAG_HI="-Os"
41083         C_O_FLAG_NORM="-Os"
41084         C_O_FLAG_NONE=""
41085       else
41086         C_O_FLAG_HIGHEST="-O3"
41087         C_O_FLAG_HI="-O3"
41088         C_O_FLAG_NORM="-O2"
41089         C_O_FLAG_NONE="-O0"
41090       fi
41091     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41092       C_O_FLAG_HIGHEST="-O3"
41093       C_O_FLAG_HI="-O3 -qstrict"
41094       C_O_FLAG_NORM="-O2"
41095       C_O_FLAG_NONE=""
41096     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41097       C_O_FLAG_HIGHEST="-O2"
41098       C_O_FLAG_HI="-O1"
41099       C_O_FLAG_NORM="-O1"
41100       C_O_FLAG_NONE="-Od"
41101     fi
41102     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41103     CXX_O_FLAG_HI="$C_O_FLAG_HI"
41104     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41105     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41106   fi
41107 
41108 
41109 
41110 
41111 
41112 
41113 
41114 
41115 
41116 
41117 
41118   # Special extras...
41119   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41120     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41121       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41122       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41123     fi
41124   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41125     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41126     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41127     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41128   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41129     CXXSTD_CXXFLAG="-std=gnu++98"
41130 
41131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
41132 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
41133   supports=yes
41134 
41135   saved_cxxflags="$CXXFLAGS"
41136   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
41137   ac_ext=cpp
41138 ac_cpp='$CXXCPP $CPPFLAGS'
41139 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41140 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41141 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41142 
41143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41144 /* end confdefs.h.  */
41145 int i;
41146 _ACEOF
41147 if ac_fn_cxx_try_compile "$LINENO"; then :
41148 
41149 else
41150   supports=no
41151 fi
41152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41153   ac_ext=cpp
41154 ac_cpp='$CXXCPP $CPPFLAGS'
41155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41158 
41159   CXXFLAGS="$saved_cxxflags"
41160 
41161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41162 $as_echo "$supports" >&6; }
41163   if test "x$supports" = "xyes" ; then
41164     :
41165   else
41166     CXXSTD_CXXFLAG=""
41167   fi
41168 
41169     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
41170     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
41171 
41172   fi
41173 
41174   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41175     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41176 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41177   fi
41178 
41179   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41180     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41181 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41182   fi
41183 
41184   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41185     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41186 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41187   fi
41188 
41189 
41190 # Check whether --with-extra-cflags was given.
41191 if test "${with_extra_cflags+set}" = set; then :
41192   withval=$with_extra_cflags;
41193 fi
41194 
41195 
41196 
41197 # Check whether --with-extra-cxxflags was given.
41198 if test "${with_extra_cxxflags+set}" = set; then :
41199   withval=$with_extra_cxxflags;
41200 fi
41201 
41202 
41203 
41204 # Check whether --with-extra-ldflags was given.
41205 if test "${with_extra_ldflags+set}" = set; then :
41206   withval=$with_extra_ldflags;
41207 fi
41208 
41209 
41210   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41211   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41212   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41213 
41214   # Hotspot needs these set in their legacy form
41215   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41216   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41217   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41218 
41219 
41220 
41221 
41222 
41223   ###############################################################################
41224   #
41225   # Now setup the CFLAGS and LDFLAGS for the JDK build.
41226   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41227   #
41228 
41229   # Setup compiler/platform specific flags to CFLAGS_JDK,
41230   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41231   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41232     # these options are used for both C and C++ compiles
41233     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41234         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41235     case $OPENJDK_TARGET_CPU_ARCH in
41236       arm )
41237         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41238         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41239         ;;
41240       ppc )
41241         # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41242         ;;
41243       * )
41244         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41245         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41246         ;;
41247     esac
41248 
41249   REFERENCE_VERSION=6
41250 
41251   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
41252     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
41253   fi
41254 
41255   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
41256     as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
41257   fi
41258 
41259   # Version comparison method inspired by http://stackoverflow.com/a/24067243
41260   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
41261 
41262   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
41263 
41264   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
41265   # runs afoul of the more aggressive versions of these optimisations.
41266   # Notably, value range propagation now assumes that the this pointer of C++
41267   # member functions is non-null.
41268   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
41269 
41270 
41271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41272 $as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41273   supports=yes
41274 
41275   saved_cflags="$CFLAGS"
41276   CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41277   ac_ext=c
41278 ac_cpp='$CPP $CPPFLAGS'
41279 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41280 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41281 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41282 
41283 
41284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41285 /* end confdefs.h.  */
41286 int i;
41287 _ACEOF
41288 if ac_fn_c_try_compile "$LINENO"; then :
41289 
41290 else
41291   supports=no
41292 fi
41293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41294   ac_ext=cpp
41295 ac_cpp='$CXXCPP $CPPFLAGS'
41296 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41297 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41298 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41299 
41300   CFLAGS="$saved_cflags"
41301 
41302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41303 $as_echo "$supports" >&6; }
41304   if test "x$supports" = "xyes" ; then
41305     C_COMP_SUPPORTS="yes"
41306   else
41307     C_COMP_SUPPORTS="no"
41308   fi
41309 
41310 
41311   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41312 $as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41313   supports=yes
41314 
41315   saved_cxxflags="$CXXFLAGS"
41316   CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
41317   ac_ext=cpp
41318 ac_cpp='$CXXCPP $CPPFLAGS'
41319 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41320 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41321 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41322 
41323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41324 /* end confdefs.h.  */
41325 int i;
41326 _ACEOF
41327 if ac_fn_cxx_try_compile "$LINENO"; then :
41328 
41329 else
41330   supports=no
41331 fi
41332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41333   ac_ext=cpp
41334 ac_cpp='$CXXCPP $CPPFLAGS'
41335 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41336 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41337 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41338 
41339   CXXFLAGS="$saved_cxxflags"
41340 
41341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41342 $as_echo "$supports" >&6; }
41343   if test "x$supports" = "xyes" ; then
41344     CXX_COMP_SUPPORTS="yes"
41345   else
41346     CXX_COMP_SUPPORTS="no"
41347   fi
41348 
41349 
41350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
41351 $as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
41352   supports=no
41353   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41354 
41355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41356 $as_echo "$supports" >&6; }
41357   if test "x$supports" = "xyes" ; then
41358     :
41359   else
41360     NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
41361   fi
41362 
41363 
41364   NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
41365 
41366 
41367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41368 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41369   supports=yes
41370 
41371   saved_cflags="$CFLAGS"
41372   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
41373   ac_ext=c
41374 ac_cpp='$CPP $CPPFLAGS'
41375 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41376 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41377 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41378 
41379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41380 /* end confdefs.h.  */
41381 int i;
41382 _ACEOF
41383 if ac_fn_c_try_compile "$LINENO"; then :
41384 
41385 else
41386   supports=no
41387 fi
41388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41389   ac_ext=cpp
41390 ac_cpp='$CXXCPP $CPPFLAGS'
41391 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41392 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41393 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41394 
41395   CFLAGS="$saved_cflags"
41396 
41397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41398 $as_echo "$supports" >&6; }
41399   if test "x$supports" = "xyes" ; then
41400     C_COMP_SUPPORTS="yes"
41401   else
41402     C_COMP_SUPPORTS="no"
41403   fi
41404 
41405 
41406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41407 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41408   supports=yes
41409 
41410   saved_cxxflags="$CXXFLAGS"
41411   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
41412   ac_ext=cpp
41413 ac_cpp='$CXXCPP $CPPFLAGS'
41414 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41415 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41416 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41417 
41418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41419 /* end confdefs.h.  */
41420 int i;
41421 _ACEOF
41422 if ac_fn_cxx_try_compile "$LINENO"; then :
41423 
41424 else
41425   supports=no
41426 fi
41427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41428   ac_ext=cpp
41429 ac_cpp='$CXXCPP $CPPFLAGS'
41430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41433 
41434   CXXFLAGS="$saved_cxxflags"
41435 
41436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41437 $as_echo "$supports" >&6; }
41438   if test "x$supports" = "xyes" ; then
41439     CXX_COMP_SUPPORTS="yes"
41440   else
41441     CXX_COMP_SUPPORTS="no"
41442   fi
41443 
41444 
41445   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
41446 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
41447   supports=no
41448   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41449 
41450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41451 $as_echo "$supports" >&6; }
41452   if test "x$supports" = "xyes" ; then
41453     :
41454   else
41455     NO_LIFETIME_DSE_CFLAG=""
41456   fi
41457 
41458   CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
41459 
41460 
41461 
41462   else
41463     :
41464   fi
41465 
41466   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41467     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41468     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41469       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41470       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41471     fi
41472 
41473     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41474     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41475   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41476     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41477     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41478   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41479     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK \
41480         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41481         -DWIN32_LEAN_AND_MEAN \
41482         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41483         -DWIN32 -DIAL"
41484     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41485       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41486     else
41487       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41488     fi
41489     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
41490     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
41491     # studio.
41492     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
41493       CXXFLAGS_JDK="$CXXFLAGS_JDK \
41494           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
41495     fi
41496   fi
41497 
41498   ###############################################################################
41499 
41500   # Adjust flags according to debug level.
41501   case $DEBUG_LEVEL in
41502     fastdebug )
41503       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41504       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41505       C_O_FLAG_HI="$C_O_FLAG_NORM"
41506       C_O_FLAG_NORM="$C_O_FLAG_NORM"
41507       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41508       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41509       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41510       ;;
41511     slowdebug )
41512       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41513       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41514       C_O_FLAG_HI="$C_O_FLAG_NONE"
41515       C_O_FLAG_NORM="$C_O_FLAG_NONE"
41516       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41517       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41518       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41519       ;;
41520   esac
41521 
41522   # Setup LP64
41523   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41524 
41525   # Set some common defines. These works for all compilers, but assume
41526   # -D is universally accepted.
41527 
41528   # Setup endianness
41529   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41530     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41531     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41532     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41533     #   Note: -Dmacro         is the same as    #define macro 1
41534     #         -Dmacro=        is the same as    #define macro
41535     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41536       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41537     else
41538       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41539     fi
41540   else
41541     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41542     # are defined in the system?
41543     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41544       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41545     else
41546       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41547     fi
41548   fi
41549 
41550   # Setup target OS define. Use OS target name but in upper case.
41551   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41552   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41553 
41554   # Setup target CPU
41555   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41556 
41557   # Setup debug/release defines
41558   if test "x$DEBUG_LEVEL" = xrelease; then
41559     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41560     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41561       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41562     fi
41563   else
41564     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41565   fi
41566 
41567   # Setup release name
41568   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41569 
41570 
41571   # Set some additional per-OS defines.
41572   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41573     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41574   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41575     # FIXME: PPC64 should not be here.
41576     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41577   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41578     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41579   fi
41580 
41581   # Additional macosx handling
41582   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41583     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41584       # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41585       # FIXME: clean this up, and/or move it elsewhere.
41586 
41587       # Setting these parameters makes it an error to link to macosx APIs that are
41588       # newer than the given OS version and makes the linked binaries compatible
41589       # even if built on a newer version of the OS.
41590       # The expected format is X.Y.Z
41591       MACOSX_VERSION_MIN=10.7.0
41592 
41593 
41594       # The macro takes the version with no dots, ex: 1070
41595       # Let the flags variables get resolved in make for easier override on make
41596       # command line.
41597       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41598       LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41599     fi
41600   fi
41601 
41602   # Setup some hard coded includes
41603   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41604       -I${JDK_OUTPUTDIR}/include \
41605       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41606       -I${JDK_TOPDIR}/src/share/javavm/export \
41607       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41608       -I${JDK_TOPDIR}/src/share/native/common \
41609       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41610 
41611   # The shared libraries are compiled using the picflag.
41612   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41613   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41614 
41615   # Executable flags
41616   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41617   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41618 
41619 
41620 
41621 
41622 
41623 
41624   # Setup LDFLAGS et al.
41625   #
41626   # Now this is odd. The JDK native libraries have to link against libjvm.so
41627   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41628   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41629   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41630   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41631   # libraries will link to whatever is in memory. Yuck.
41632   #
41633   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41634   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41635     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41636     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41637       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41638     fi
41639     # TODO: make -debug optional "--disable-full-debug-symbols"
41640     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41641     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41642     LDFLAGS_JDKLIB_SUFFIX=""
41643     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41644       LDFLAGS_STACK_SIZE=1048576
41645     else
41646       LDFLAGS_STACK_SIZE=327680
41647     fi
41648     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41649   else
41650     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41651       # If this is a --hash-style=gnu system, use --hash-style=both, why?
41652       # We have previously set HAS_GNU_HASH if this is the case
41653       if test -n "$HAS_GNU_HASH"; then
41654         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41655       fi
41656       if test "x$OPENJDK_TARGET_OS" = xlinux; then
41657         # And since we now know that the linker is gnu, then add -z defs, to forbid
41658         # undefined symbols in object files.
41659         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41660         if test "x$DEBUG_LEVEL" = "xrelease"; then
41661           # When building release libraries, tell the linker optimize them.
41662           # Should this be supplied to the OSS linker as well?
41663           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41664         fi
41665       fi
41666     fi
41667 
41668     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41669       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41670       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41671     fi
41672 
41673     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41674         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41675 
41676     # On some platforms (mac) the linker warns about non existing -L dirs.
41677     # Add server first if available. Linking aginst client does not always produce the same results.
41678     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41679     # Default to server for other variants.
41680     if test "x$JVM_VARIANT_SERVER" = xtrue; then
41681       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41682     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41683       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41684     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41685       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41686     else
41687       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41688     fi
41689 
41690     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41691     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41692       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41693     fi
41694 
41695     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41696     if test "x$OPENJDK_TARGET_OS" = xlinux; then
41697       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41698     fi
41699   fi
41700 
41701 
41702 
41703 
41704 
41705 
41706 
41707   # Some Zero and Shark settings.
41708   # ZERO_ARCHFLAG tells the compiler which mode to build for
41709   case "${OPENJDK_TARGET_CPU}" in
41710     s390)
41711       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41712       ;;
41713     *)
41714       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41715   esac
41716 
41717 
41718   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
41719 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41720   supports=yes
41721 
41722   saved_cflags="$CFLAGS"
41723   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41724   ac_ext=c
41725 ac_cpp='$CPP $CPPFLAGS'
41726 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41727 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41728 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41729 
41730   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41731 /* end confdefs.h.  */
41732 int i;
41733 _ACEOF
41734 if ac_fn_c_try_compile "$LINENO"; then :
41735 
41736 else
41737   supports=no
41738 fi
41739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41740   ac_ext=cpp
41741 ac_cpp='$CXXCPP $CPPFLAGS'
41742 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41743 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41744 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41745 
41746   CFLAGS="$saved_cflags"
41747 
41748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41749 $as_echo "$supports" >&6; }
41750   if test "x$supports" = "xyes" ; then
41751     C_COMP_SUPPORTS="yes"
41752   else
41753     C_COMP_SUPPORTS="no"
41754   fi
41755 
41756 
41757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
41758 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41759   supports=yes
41760 
41761   saved_cxxflags="$CXXFLAGS"
41762   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41763   ac_ext=cpp
41764 ac_cpp='$CXXCPP $CPPFLAGS'
41765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41768 
41769   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41770 /* end confdefs.h.  */
41771 int i;
41772 _ACEOF
41773 if ac_fn_cxx_try_compile "$LINENO"; then :
41774 
41775 else
41776   supports=no
41777 fi
41778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41779   ac_ext=cpp
41780 ac_cpp='$CXXCPP $CPPFLAGS'
41781 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41782 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41783 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41784 
41785   CXXFLAGS="$saved_cxxflags"
41786 
41787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41788 $as_echo "$supports" >&6; }
41789   if test "x$supports" = "xyes" ; then
41790     CXX_COMP_SUPPORTS="yes"
41791   else
41792     CXX_COMP_SUPPORTS="no"
41793   fi
41794 
41795 
41796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
41797 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
41798   supports=no
41799   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41800 
41801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41802 $as_echo "$supports" >&6; }
41803   if test "x$supports" = "xyes" ; then
41804     :
41805   else
41806     ZERO_ARCHFLAG=""
41807   fi
41808 
41809 
41810 
41811   # Check that the compiler supports -mX (or -qX on AIX) flags
41812   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41813 
41814 
41815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41816 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41817   supports=yes
41818 
41819   saved_cflags="$CFLAGS"
41820   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41821   ac_ext=c
41822 ac_cpp='$CPP $CPPFLAGS'
41823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41826 
41827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41828 /* end confdefs.h.  */
41829 int i;
41830 _ACEOF
41831 if ac_fn_c_try_compile "$LINENO"; then :
41832 
41833 else
41834   supports=no
41835 fi
41836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41837   ac_ext=cpp
41838 ac_cpp='$CXXCPP $CPPFLAGS'
41839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41842 
41843   CFLAGS="$saved_cflags"
41844 
41845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41846 $as_echo "$supports" >&6; }
41847   if test "x$supports" = "xyes" ; then
41848     C_COMP_SUPPORTS="yes"
41849   else
41850     C_COMP_SUPPORTS="no"
41851   fi
41852 
41853 
41854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41855 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41856   supports=yes
41857 
41858   saved_cxxflags="$CXXFLAGS"
41859   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41860   ac_ext=cpp
41861 ac_cpp='$CXXCPP $CPPFLAGS'
41862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41865 
41866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41867 /* end confdefs.h.  */
41868 int i;
41869 _ACEOF
41870 if ac_fn_cxx_try_compile "$LINENO"; then :
41871 
41872 else
41873   supports=no
41874 fi
41875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41876   ac_ext=cpp
41877 ac_cpp='$CXXCPP $CPPFLAGS'
41878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41879 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41881 
41882   CXXFLAGS="$saved_cxxflags"
41883 
41884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41885 $as_echo "$supports" >&6; }
41886   if test "x$supports" = "xyes" ; then
41887     CXX_COMP_SUPPORTS="yes"
41888   else
41889     CXX_COMP_SUPPORTS="no"
41890   fi
41891 
41892 
41893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41894 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41895   supports=no
41896   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
41897 
41898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41899 $as_echo "$supports" >&6; }
41900   if test "x$supports" = "xyes" ; then
41901     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41902   else
41903     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41904   fi
41905 
41906 
41907 
41908 
41909 # Setup debug symbols (need objcopy from the toolchain for that)
41910 
41911   #
41912   # ENABLE_DEBUG_SYMBOLS
41913   # This must be done after the toolchain is setup, since we're looking at objcopy.
41914   #
41915   # Check whether --enable-debug-symbols was given.
41916 if test "${enable_debug_symbols+set}" = set; then :
41917   enableval=$enable_debug_symbols;
41918 fi
41919 
41920 
41921   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41922 $as_echo_n "checking if we should generate debug symbols... " >&6; }
41923 
41924   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41925     # explicit enabling of enable-debug-symbols and can't find objcopy
41926     #   this is an error
41927     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41928   fi
41929 
41930   if test "x$enable_debug_symbols" = "xyes"; then
41931     ENABLE_DEBUG_SYMBOLS=true
41932   elif test "x$enable_debug_symbols" = "xno"; then
41933     ENABLE_DEBUG_SYMBOLS=false
41934   else
41935     # Default is on if objcopy is found
41936     if test "x$OBJCOPY" != x; then
41937       ENABLE_DEBUG_SYMBOLS=true
41938     # MacOS X and Windows don't use objcopy but default is on for those OSes
41939     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41940       ENABLE_DEBUG_SYMBOLS=true
41941     else
41942       ENABLE_DEBUG_SYMBOLS=false
41943     fi
41944   fi
41945 
41946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41947 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41948 
41949   #
41950   # ZIP_DEBUGINFO_FILES
41951   #
41952   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41953 $as_echo_n "checking if we should zip debug-info files... " >&6; }
41954   # Check whether --enable-zip-debug-info was given.
41955 if test "${enable_zip_debug_info+set}" = set; then :
41956   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41957 else
41958   enable_zip_debug_info="yes"
41959 fi
41960 
41961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41962 $as_echo "${enable_zip_debug_info}" >&6; }
41963 
41964   if test "x${enable_zip_debug_info}" = "xno"; then
41965     ZIP_DEBUGINFO_FILES=false
41966   else
41967     ZIP_DEBUGINFO_FILES=true
41968   fi
41969 
41970 
41971 
41972 
41973 
41974 ###############################################################################
41975 #
41976 # Check dependencies for external and internal libraries.
41977 #
41978 ###############################################################################
41979 
41980 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41981 
41982   # When using cygwin or msys, we need a wrapper binary that renames
41983   # /cygdrive/c/ arguments into c:/ arguments and peeks into
41984   # @files and rewrites these too! This wrapper binary is
41985   # called fixpath.
41986   FIXPATH=
41987   if test "x$OPENJDK_BUILD_OS" = xwindows; then
41988     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41989 $as_echo_n "checking if fixpath can be created... " >&6; }
41990     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
41991     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
41992     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
41993       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
41994       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
41995       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
41996       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
41997     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
41998       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
41999       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42000 
42001       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42002       # @ was chosen as separator to minimize risk of other tools messing around with it
42003       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42004       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42005 
42006       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42007     fi
42008     rm -f $OUTPUT_ROOT/fixpath*
42009     cd $OUTPUT_ROOT
42010     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42011     cd $CURDIR
42012 
42013     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42014       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42015 $as_echo "no" >&6; }
42016       cat $OUTPUT_ROOT/fixpath1.log
42017       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42018     fi
42019     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42020 $as_echo "yes" >&6; }
42021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42022 $as_echo_n "checking if fixpath.exe works... " >&6; }
42023     cd $OUTPUT_ROOT
42024     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42025     cd $CURDIR
42026     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42028 $as_echo "no" >&6; }
42029       cat $OUTPUT_ROOT/fixpath2.log
42030       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42031     fi
42032     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42033 $as_echo "yes" >&6; }
42034     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42035   fi
42036 
42037 
42038 
42039 
42040 
42041 
42042   ###############################################################################
42043   #
42044   # OS specific settings that we never will need to probe.
42045   #
42046   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42048 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42049     PULSE_NOT_NEEDED=yes
42050     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42051 $as_echo "pulse" >&6; }
42052   fi
42053 
42054   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42056 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42057     ALSA_NOT_NEEDED=yes
42058     PULSE_NOT_NEEDED=yes
42059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42060 $as_echo "alsa pulse" >&6; }
42061   fi
42062 
42063   if test "x$OPENJDK_TARGET_OS" = xaix; then
42064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42065 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42066     ALSA_NOT_NEEDED=yes
42067     PULSE_NOT_NEEDED=yes
42068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42069 $as_echo "alsa pulse" >&6; }
42070   fi
42071 
42072 
42073   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42075 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42076     CUPS_NOT_NEEDED=yes
42077     ALSA_NOT_NEEDED=yes
42078     PULSE_NOT_NEEDED=yes
42079     X11_NOT_NEEDED=yes
42080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42081 $as_echo "alsa cups pulse x11" >&6; }
42082   fi
42083 
42084   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42086 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42087     ALSA_NOT_NEEDED=yes
42088     PULSE_NOT_NEEDED=yes
42089     X11_NOT_NEEDED=yes
42090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42091 $as_echo "alsa pulse x11" >&6; }
42092   fi
42093 
42094   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42096 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42097     ALSA_NOT_NEEDED=yes
42098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42099 $as_echo "alsa" >&6; }
42100   fi
42101 
42102   if test "x$OPENJDK" = "xfalse"; then
42103     FREETYPE_NOT_NEEDED=yes
42104   fi
42105 
42106   if test "x$SUPPORT_HEADFUL" = xno; then
42107     X11_NOT_NEEDED=yes
42108   fi
42109 
42110   # Deprecated and now ignored
42111 
42112   # Check whether --enable-macosx-runtime-support was given.
42113 if test "${enable_macosx_runtime_support+set}" = set; then :
42114   enableval=$enable_macosx_runtime_support;
42115 fi
42116 
42117   if test "x$enable_macosx_runtime_support" != x; then
42118     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42119 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42120   fi
42121 
42122 
42123 
42124 
42125   ###############################################################################
42126   #
42127   # Check for X Windows
42128   #
42129 
42130   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42131   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42132   # --x-libraries for the sysroot, if that seems to be correct.
42133   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42134     if test "x$SYSROOT" != "x"; then
42135       if test "x$x_includes" = xNONE; then
42136         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42137           x_includes="$SYSROOT/usr/X11R6/include"
42138         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42139           x_includes="$SYSROOT/usr/include"
42140         fi
42141       fi
42142       if test "x$x_libraries" = xNONE; then
42143         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42144           x_libraries="$SYSROOT/usr/X11R6/lib"
42145         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42146           x_libraries="$SYSROOT/usr/lib64"
42147         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42148           x_libraries="$SYSROOT/usr/lib"
42149         fi
42150       fi
42151     fi
42152   fi
42153 
42154   # Now let autoconf do it's magic
42155   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42156 $as_echo_n "checking for X... " >&6; }
42157 
42158 
42159 # Check whether --with-x was given.
42160 if test "${with_x+set}" = set; then :
42161   withval=$with_x;
42162 fi
42163 
42164 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42165 if test "x$with_x" = xno; then
42166   # The user explicitly disabled X.
42167   have_x=disabled
42168 else
42169   case $x_includes,$x_libraries in #(
42170     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42171     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42172   $as_echo_n "(cached) " >&6
42173 else
42174   # One or both of the vars are not set, and there is no cached value.
42175 ac_x_includes=no ac_x_libraries=no
42176 rm -f -r conftest.dir
42177 if mkdir conftest.dir; then
42178   cd conftest.dir
42179   cat >Imakefile <<'_ACEOF'
42180 incroot:
42181         @echo incroot='${INCROOT}'
42182 usrlibdir:
42183         @echo usrlibdir='${USRLIBDIR}'
42184 libdir:
42185         @echo libdir='${LIBDIR}'
42186 _ACEOF
42187   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42188     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42189     for ac_var in incroot usrlibdir libdir; do
42190       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42191     done
42192     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42193     for ac_extension in a so sl dylib la dll; do
42194       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42195          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42196         ac_im_usrlibdir=$ac_im_libdir; break
42197       fi
42198     done
42199     # Screen out bogus values from the imake configuration.  They are
42200     # bogus both because they are the default anyway, and because
42201     # using them would break gcc on systems where it needs fixed includes.
42202     case $ac_im_incroot in
42203         /usr/include) ac_x_includes= ;;
42204         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42205     esac
42206     case $ac_im_usrlibdir in
42207         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42208         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42209     esac
42210   fi
42211   cd ..
42212   rm -f -r conftest.dir
42213 fi
42214 
42215 # Standard set of common directories for X headers.
42216 # Check X11 before X11Rn because it is often a symlink to the current release.
42217 ac_x_header_dirs='
42218 /usr/X11/include
42219 /usr/X11R7/include
42220 /usr/X11R6/include
42221 /usr/X11R5/include
42222 /usr/X11R4/include
42223 
42224 /usr/include/X11
42225 /usr/include/X11R7
42226 /usr/include/X11R6
42227 /usr/include/X11R5
42228 /usr/include/X11R4
42229 
42230 /usr/local/X11/include
42231 /usr/local/X11R7/include
42232 /usr/local/X11R6/include
42233 /usr/local/X11R5/include
42234 /usr/local/X11R4/include
42235 
42236 /usr/local/include/X11
42237 /usr/local/include/X11R7
42238 /usr/local/include/X11R6
42239 /usr/local/include/X11R5
42240 /usr/local/include/X11R4
42241 
42242 /usr/X386/include
42243 /usr/x386/include
42244 /usr/XFree86/include/X11
42245 
42246 /usr/include
42247 /usr/local/include
42248 /usr/unsupported/include
42249 /usr/athena/include
42250 /usr/local/x11r5/include
42251 /usr/lpp/Xamples/include
42252 
42253 /usr/openwin/include
42254 /usr/openwin/share/include'
42255 
42256 if test "$ac_x_includes" = no; then
42257   # Guess where to find include files, by looking for Xlib.h.
42258   # First, try using that file with no special directory specified.
42259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42260 /* end confdefs.h.  */
42261 #include <X11/Xlib.h>
42262 _ACEOF
42263 if ac_fn_cxx_try_cpp "$LINENO"; then :
42264   # We can compile using X headers with no special include directory.
42265 ac_x_includes=
42266 else
42267   for ac_dir in $ac_x_header_dirs; do
42268   if test -r "$ac_dir/X11/Xlib.h"; then
42269     ac_x_includes=$ac_dir
42270     break
42271   fi
42272 done
42273 fi
42274 rm -f conftest.err conftest.i conftest.$ac_ext
42275 fi # $ac_x_includes = no
42276 
42277 if test "$ac_x_libraries" = no; then
42278   # Check for the libraries.
42279   # See if we find them without any special options.
42280   # Don't add to $LIBS permanently.
42281   ac_save_LIBS=$LIBS
42282   LIBS="-lX11 $LIBS"
42283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42284 /* end confdefs.h.  */
42285 #include <X11/Xlib.h>
42286 int
42287 main ()
42288 {
42289 XrmInitialize ()
42290   ;
42291   return 0;
42292 }
42293 _ACEOF
42294 if ac_fn_cxx_try_link "$LINENO"; then :
42295   LIBS=$ac_save_LIBS
42296 # We can link X programs with no special library path.
42297 ac_x_libraries=
42298 else
42299   LIBS=$ac_save_LIBS
42300 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42301 do
42302   # Don't even attempt the hair of trying to link an X program!
42303   for ac_extension in a so sl dylib la dll; do
42304     if test -r "$ac_dir/libX11.$ac_extension"; then
42305       ac_x_libraries=$ac_dir
42306       break 2
42307     fi
42308   done
42309 done
42310 fi
42311 rm -f core conftest.err conftest.$ac_objext \
42312     conftest$ac_exeext conftest.$ac_ext
42313 fi # $ac_x_libraries = no
42314 
42315 case $ac_x_includes,$ac_x_libraries in #(
42316   no,* | *,no | *\'*)
42317     # Didn't find X, or a directory has "'" in its name.
42318     ac_cv_have_x="have_x=no";; #(
42319   *)
42320     # Record where we found X for the cache.
42321     ac_cv_have_x="have_x=yes\
42322         ac_x_includes='$ac_x_includes'\
42323         ac_x_libraries='$ac_x_libraries'"
42324 esac
42325 fi
42326 ;; #(
42327     *) have_x=yes;;
42328   esac
42329   eval "$ac_cv_have_x"
42330 fi # $with_x != no
42331 
42332 if test "$have_x" != yes; then
42333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42334 $as_echo "$have_x" >&6; }
42335   no_x=yes
42336 else
42337   # If each of the values was on the command line, it overrides each guess.
42338   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42339   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42340   # Update the cache value to reflect the command line values.
42341   ac_cv_have_x="have_x=yes\
42342         ac_x_includes='$x_includes'\
42343         ac_x_libraries='$x_libraries'"
42344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42345 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42346 fi
42347 
42348   if test "$no_x" = yes; then
42349   # Not all programs may use this symbol, but it does not hurt to define it.
42350 
42351 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42352 
42353   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42354 else
42355   if test -n "$x_includes"; then
42356     X_CFLAGS="$X_CFLAGS -I$x_includes"
42357   fi
42358 
42359   # It would also be nice to do this for all -L options, not just this one.
42360   if test -n "$x_libraries"; then
42361     X_LIBS="$X_LIBS -L$x_libraries"
42362     # For Solaris; some versions of Sun CC require a space after -R and
42363     # others require no space.  Words are not sufficient . . . .
42364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42365 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
42366     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42367     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42368     ac_cxx_werror_flag=yes
42369     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42370 /* end confdefs.h.  */
42371 
42372 int
42373 main ()
42374 {
42375 
42376   ;
42377   return 0;
42378 }
42379 _ACEOF
42380 if ac_fn_cxx_try_link "$LINENO"; then :
42381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42382 $as_echo "no" >&6; }
42383        X_LIBS="$X_LIBS -R$x_libraries"
42384 else
42385   LIBS="$ac_xsave_LIBS -R $x_libraries"
42386        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42387 /* end confdefs.h.  */
42388 
42389 int
42390 main ()
42391 {
42392 
42393   ;
42394   return 0;
42395 }
42396 _ACEOF
42397 if ac_fn_cxx_try_link "$LINENO"; then :
42398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42399 $as_echo "yes" >&6; }
42400           X_LIBS="$X_LIBS -R $x_libraries"
42401 else
42402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42403 $as_echo "neither works" >&6; }
42404 fi
42405 rm -f core conftest.err conftest.$ac_objext \
42406     conftest$ac_exeext conftest.$ac_ext
42407 fi
42408 rm -f core conftest.err conftest.$ac_objext \
42409     conftest$ac_exeext conftest.$ac_ext
42410     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42411     LIBS=$ac_xsave_LIBS
42412   fi
42413 
42414   # Check for system-dependent libraries X programs must link with.
42415   # Do this before checking for the system-independent R6 libraries
42416   # (-lICE), since we may need -lsocket or whatever for X linking.
42417 
42418   if test "$ISC" = yes; then
42419     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42420   else
42421     # Martyn Johnson says this is needed for Ultrix, if the X
42422     # libraries were built with DECnet support.  And Karl Berry says
42423     # the Alpha needs dnet_stub (dnet does not exist).
42424     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42425     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42426 /* end confdefs.h.  */
42427 
42428 /* Override any GCC internal prototype to avoid an error.
42429    Use char because int might match the return type of a GCC
42430    builtin and then its argument prototype would still apply.  */
42431 #ifdef __cplusplus
42432 extern "C"
42433 #endif
42434 char XOpenDisplay ();
42435 int
42436 main ()
42437 {
42438 return XOpenDisplay ();
42439   ;
42440   return 0;
42441 }
42442 _ACEOF
42443 if ac_fn_cxx_try_link "$LINENO"; then :
42444 
42445 else
42446   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42447 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42448 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42449   $as_echo_n "(cached) " >&6
42450 else
42451   ac_check_lib_save_LIBS=$LIBS
42452 LIBS="-ldnet  $LIBS"
42453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42454 /* end confdefs.h.  */
42455 
42456 /* Override any GCC internal prototype to avoid an error.
42457    Use char because int might match the return type of a GCC
42458    builtin and then its argument prototype would still apply.  */
42459 #ifdef __cplusplus
42460 extern "C"
42461 #endif
42462 char dnet_ntoa ();
42463 int
42464 main ()
42465 {
42466 return dnet_ntoa ();
42467   ;
42468   return 0;
42469 }
42470 _ACEOF
42471 if ac_fn_cxx_try_link "$LINENO"; then :
42472   ac_cv_lib_dnet_dnet_ntoa=yes
42473 else
42474   ac_cv_lib_dnet_dnet_ntoa=no
42475 fi
42476 rm -f core conftest.err conftest.$ac_objext \
42477     conftest$ac_exeext conftest.$ac_ext
42478 LIBS=$ac_check_lib_save_LIBS
42479 fi
42480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42481 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42482 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42483   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42484 fi
42485 
42486     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42487       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42488 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42489 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42490   $as_echo_n "(cached) " >&6
42491 else
42492   ac_check_lib_save_LIBS=$LIBS
42493 LIBS="-ldnet_stub  $LIBS"
42494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42495 /* end confdefs.h.  */
42496 
42497 /* Override any GCC internal prototype to avoid an error.
42498    Use char because int might match the return type of a GCC
42499    builtin and then its argument prototype would still apply.  */
42500 #ifdef __cplusplus
42501 extern "C"
42502 #endif
42503 char dnet_ntoa ();
42504 int
42505 main ()
42506 {
42507 return dnet_ntoa ();
42508   ;
42509   return 0;
42510 }
42511 _ACEOF
42512 if ac_fn_cxx_try_link "$LINENO"; then :
42513   ac_cv_lib_dnet_stub_dnet_ntoa=yes
42514 else
42515   ac_cv_lib_dnet_stub_dnet_ntoa=no
42516 fi
42517 rm -f core conftest.err conftest.$ac_objext \
42518     conftest$ac_exeext conftest.$ac_ext
42519 LIBS=$ac_check_lib_save_LIBS
42520 fi
42521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42522 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42523 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42524   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42525 fi
42526 
42527     fi
42528 fi
42529 rm -f core conftest.err conftest.$ac_objext \
42530     conftest$ac_exeext conftest.$ac_ext
42531     LIBS="$ac_xsave_LIBS"
42532 
42533     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42534     # to get the SysV transport functions.
42535     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42536     # needs -lnsl.
42537     # The nsl library prevents programs from opening the X display
42538     # on Irix 5.2, according to T.E. Dickey.
42539     # The functions gethostbyname, getservbyname, and inet_addr are
42540     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42541     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42542 if test "x$ac_cv_func_gethostbyname" = xyes; then :
42543 
42544 fi
42545 
42546     if test $ac_cv_func_gethostbyname = no; then
42547       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42548 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42549 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42550   $as_echo_n "(cached) " >&6
42551 else
42552   ac_check_lib_save_LIBS=$LIBS
42553 LIBS="-lnsl  $LIBS"
42554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42555 /* end confdefs.h.  */
42556 
42557 /* Override any GCC internal prototype to avoid an error.
42558    Use char because int might match the return type of a GCC
42559    builtin and then its argument prototype would still apply.  */
42560 #ifdef __cplusplus
42561 extern "C"
42562 #endif
42563 char gethostbyname ();
42564 int
42565 main ()
42566 {
42567 return gethostbyname ();
42568   ;
42569   return 0;
42570 }
42571 _ACEOF
42572 if ac_fn_cxx_try_link "$LINENO"; then :
42573   ac_cv_lib_nsl_gethostbyname=yes
42574 else
42575   ac_cv_lib_nsl_gethostbyname=no
42576 fi
42577 rm -f core conftest.err conftest.$ac_objext \
42578     conftest$ac_exeext conftest.$ac_ext
42579 LIBS=$ac_check_lib_save_LIBS
42580 fi
42581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42582 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42583 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42584   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42585 fi
42586 
42587       if test $ac_cv_lib_nsl_gethostbyname = no; then
42588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42589 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42590 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42591   $as_echo_n "(cached) " >&6
42592 else
42593   ac_check_lib_save_LIBS=$LIBS
42594 LIBS="-lbsd  $LIBS"
42595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42596 /* end confdefs.h.  */
42597 
42598 /* Override any GCC internal prototype to avoid an error.
42599    Use char because int might match the return type of a GCC
42600    builtin and then its argument prototype would still apply.  */
42601 #ifdef __cplusplus
42602 extern "C"
42603 #endif
42604 char gethostbyname ();
42605 int
42606 main ()
42607 {
42608 return gethostbyname ();
42609   ;
42610   return 0;
42611 }
42612 _ACEOF
42613 if ac_fn_cxx_try_link "$LINENO"; then :
42614   ac_cv_lib_bsd_gethostbyname=yes
42615 else
42616   ac_cv_lib_bsd_gethostbyname=no
42617 fi
42618 rm -f core conftest.err conftest.$ac_objext \
42619     conftest$ac_exeext conftest.$ac_ext
42620 LIBS=$ac_check_lib_save_LIBS
42621 fi
42622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42623 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42624 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42625   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42626 fi
42627 
42628       fi
42629     fi
42630 
42631     # lieder@skyler.mavd.honeywell.com says without -lsocket,
42632     # socket/setsockopt and other routines are undefined under SCO ODT
42633     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42634     # on later versions), says Simon Leinen: it contains gethostby*
42635     # variants that don't use the name server (or something).  -lsocket
42636     # must be given before -lnsl if both are needed.  We assume that
42637     # if connect needs -lnsl, so does gethostbyname.
42638     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42639 if test "x$ac_cv_func_connect" = xyes; then :
42640 
42641 fi
42642 
42643     if test $ac_cv_func_connect = no; then
42644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42645 $as_echo_n "checking for connect in -lsocket... " >&6; }
42646 if ${ac_cv_lib_socket_connect+:} false; then :
42647   $as_echo_n "(cached) " >&6
42648 else
42649   ac_check_lib_save_LIBS=$LIBS
42650 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42652 /* end confdefs.h.  */
42653 
42654 /* Override any GCC internal prototype to avoid an error.
42655    Use char because int might match the return type of a GCC
42656    builtin and then its argument prototype would still apply.  */
42657 #ifdef __cplusplus
42658 extern "C"
42659 #endif
42660 char connect ();
42661 int
42662 main ()
42663 {
42664 return connect ();
42665   ;
42666   return 0;
42667 }
42668 _ACEOF
42669 if ac_fn_cxx_try_link "$LINENO"; then :
42670   ac_cv_lib_socket_connect=yes
42671 else
42672   ac_cv_lib_socket_connect=no
42673 fi
42674 rm -f core conftest.err conftest.$ac_objext \
42675     conftest$ac_exeext conftest.$ac_ext
42676 LIBS=$ac_check_lib_save_LIBS
42677 fi
42678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42679 $as_echo "$ac_cv_lib_socket_connect" >&6; }
42680 if test "x$ac_cv_lib_socket_connect" = xyes; then :
42681   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42682 fi
42683 
42684     fi
42685 
42686     # Guillermo Gomez says -lposix is necessary on A/UX.
42687     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42688 if test "x$ac_cv_func_remove" = xyes; then :
42689 
42690 fi
42691 
42692     if test $ac_cv_func_remove = no; then
42693       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42694 $as_echo_n "checking for remove in -lposix... " >&6; }
42695 if ${ac_cv_lib_posix_remove+:} false; then :
42696   $as_echo_n "(cached) " >&6
42697 else
42698   ac_check_lib_save_LIBS=$LIBS
42699 LIBS="-lposix  $LIBS"
42700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42701 /* end confdefs.h.  */
42702 
42703 /* Override any GCC internal prototype to avoid an error.
42704    Use char because int might match the return type of a GCC
42705    builtin and then its argument prototype would still apply.  */
42706 #ifdef __cplusplus
42707 extern "C"
42708 #endif
42709 char remove ();
42710 int
42711 main ()
42712 {
42713 return remove ();
42714   ;
42715   return 0;
42716 }
42717 _ACEOF
42718 if ac_fn_cxx_try_link "$LINENO"; then :
42719   ac_cv_lib_posix_remove=yes
42720 else
42721   ac_cv_lib_posix_remove=no
42722 fi
42723 rm -f core conftest.err conftest.$ac_objext \
42724     conftest$ac_exeext conftest.$ac_ext
42725 LIBS=$ac_check_lib_save_LIBS
42726 fi
42727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42728 $as_echo "$ac_cv_lib_posix_remove" >&6; }
42729 if test "x$ac_cv_lib_posix_remove" = xyes; then :
42730   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42731 fi
42732 
42733     fi
42734 
42735     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42736     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42737 if test "x$ac_cv_func_shmat" = xyes; then :
42738 
42739 fi
42740 
42741     if test $ac_cv_func_shmat = no; then
42742       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42743 $as_echo_n "checking for shmat in -lipc... " >&6; }
42744 if ${ac_cv_lib_ipc_shmat+:} false; then :
42745   $as_echo_n "(cached) " >&6
42746 else
42747   ac_check_lib_save_LIBS=$LIBS
42748 LIBS="-lipc  $LIBS"
42749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42750 /* end confdefs.h.  */
42751 
42752 /* Override any GCC internal prototype to avoid an error.
42753    Use char because int might match the return type of a GCC
42754    builtin and then its argument prototype would still apply.  */
42755 #ifdef __cplusplus
42756 extern "C"
42757 #endif
42758 char shmat ();
42759 int
42760 main ()
42761 {
42762 return shmat ();
42763   ;
42764   return 0;
42765 }
42766 _ACEOF
42767 if ac_fn_cxx_try_link "$LINENO"; then :
42768   ac_cv_lib_ipc_shmat=yes
42769 else
42770   ac_cv_lib_ipc_shmat=no
42771 fi
42772 rm -f core conftest.err conftest.$ac_objext \
42773     conftest$ac_exeext conftest.$ac_ext
42774 LIBS=$ac_check_lib_save_LIBS
42775 fi
42776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42777 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42778 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42779   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42780 fi
42781 
42782     fi
42783   fi
42784 
42785   # Check for libraries that X11R6 Xt/Xaw programs need.
42786   ac_save_LDFLAGS=$LDFLAGS
42787   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42788   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42789   # check for ICE first), but we must link in the order -lSM -lICE or
42790   # we get undefined symbols.  So assume we have SM if we have ICE.
42791   # These have to be linked with before -lX11, unlike the other
42792   # libraries we check for below, so use a different variable.
42793   # John Interrante, Karl Berry
42794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42795 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42796 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42797   $as_echo_n "(cached) " >&6
42798 else
42799   ac_check_lib_save_LIBS=$LIBS
42800 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42802 /* end confdefs.h.  */
42803 
42804 /* Override any GCC internal prototype to avoid an error.
42805    Use char because int might match the return type of a GCC
42806    builtin and then its argument prototype would still apply.  */
42807 #ifdef __cplusplus
42808 extern "C"
42809 #endif
42810 char IceConnectionNumber ();
42811 int
42812 main ()
42813 {
42814 return IceConnectionNumber ();
42815   ;
42816   return 0;
42817 }
42818 _ACEOF
42819 if ac_fn_cxx_try_link "$LINENO"; then :
42820   ac_cv_lib_ICE_IceConnectionNumber=yes
42821 else
42822   ac_cv_lib_ICE_IceConnectionNumber=no
42823 fi
42824 rm -f core conftest.err conftest.$ac_objext \
42825     conftest$ac_exeext conftest.$ac_ext
42826 LIBS=$ac_check_lib_save_LIBS
42827 fi
42828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42829 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42830 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42831   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42832 fi
42833 
42834   LDFLAGS=$ac_save_LDFLAGS
42835 
42836 fi
42837 
42838 
42839   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42840   # this doesn't make sense so we remove it.
42841   if test "x$COMPILE_TYPE" = xcross; then
42842     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42843   fi
42844 
42845   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42846 
42847   # Print a helpful message on how to acquire the necessary build dependency.
42848   # x11 is the help tag: freetype, cups, pulse, alsa etc
42849   MISSING_DEPENDENCY=x11
42850 
42851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42852     cygwin_help $MISSING_DEPENDENCY
42853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42854     msys_help $MISSING_DEPENDENCY
42855   else
42856     PKGHANDLER_COMMAND=
42857 
42858     case $PKGHANDLER in
42859       apt-get)
42860         apt_help     $MISSING_DEPENDENCY ;;
42861       yum)
42862         yum_help     $MISSING_DEPENDENCY ;;
42863       port)
42864         port_help    $MISSING_DEPENDENCY ;;
42865       pkgutil)
42866         pkgutil_help $MISSING_DEPENDENCY ;;
42867       pkgadd)
42868         pkgadd_help  $MISSING_DEPENDENCY ;;
42869     esac
42870 
42871     if test "x$PKGHANDLER_COMMAND" != x; then
42872       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42873     fi
42874   fi
42875 
42876     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42877   fi
42878 
42879 
42880   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42881     OPENWIN_HOME="/usr/openwin"
42882     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
42883     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
42884         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
42885         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
42886         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
42887   fi
42888 
42889   #
42890   # Weird Sol10 something check...TODO change to try compile
42891   #
42892   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42893     if test "`uname -r`" = "5.10"; then
42894       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42895         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42896       fi
42897     fi
42898   fi
42899 
42900   ac_ext=c
42901 ac_cpp='$CPP $CPPFLAGS'
42902 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42903 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42904 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42905 
42906   OLD_CFLAGS="$CFLAGS"
42907   CFLAGS="$CFLAGS $X_CFLAGS"
42908 
42909   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42910   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42911 do :
42912   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42913 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42914         # include <X11/Xlib.h>
42915         # include <X11/Xutil.h>
42916 
42917 
42918 "
42919 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42920   cat >>confdefs.h <<_ACEOF
42921 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42922 _ACEOF
42923  X11_A_OK=yes
42924 else
42925   X11_A_OK=no; break
42926 fi
42927 
42928 done
42929 
42930 
42931   CFLAGS="$OLD_CFLAGS"
42932   ac_ext=cpp
42933 ac_cpp='$CXXCPP $CPPFLAGS'
42934 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42935 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42936 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42937 
42938 
42939   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42940 
42941   # Print a helpful message on how to acquire the necessary build dependency.
42942   # x11 is the help tag: freetype, cups, pulse, alsa etc
42943   MISSING_DEPENDENCY=x11
42944 
42945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42946     cygwin_help $MISSING_DEPENDENCY
42947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42948     msys_help $MISSING_DEPENDENCY
42949   else
42950     PKGHANDLER_COMMAND=
42951 
42952     case $PKGHANDLER in
42953       apt-get)
42954         apt_help     $MISSING_DEPENDENCY ;;
42955       yum)
42956         yum_help     $MISSING_DEPENDENCY ;;
42957       port)
42958         port_help    $MISSING_DEPENDENCY ;;
42959       pkgutil)
42960         pkgutil_help $MISSING_DEPENDENCY ;;
42961       pkgadd)
42962         pkgadd_help  $MISSING_DEPENDENCY ;;
42963     esac
42964 
42965     if test "x$PKGHANDLER_COMMAND" != x; then
42966       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42967     fi
42968   fi
42969 
42970     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42971   fi
42972 
42973 
42974 
42975 
42976 
42977 
42978   ###############################################################################
42979   #
42980   # The common unix printing system cups is used to print from java.
42981   #
42982 
42983 # Check whether --with-cups was given.
42984 if test "${with_cups+set}" = set; then :
42985   withval=$with_cups;
42986 fi
42987 
42988 
42989 # Check whether --with-cups-include was given.
42990 if test "${with_cups_include+set}" = set; then :
42991   withval=$with_cups_include;
42992 fi
42993 
42994 
42995   if test "x$CUPS_NOT_NEEDED" = xyes; then
42996     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
42997       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
42998 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
42999     fi
43000     CUPS_CFLAGS=
43001   else
43002     CUPS_FOUND=no
43003 
43004     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43005       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43006     fi
43007 
43008     if test "x${with_cups}" != x; then
43009       CUPS_CFLAGS="-I${with_cups}/include"
43010       CUPS_FOUND=yes
43011     fi
43012     if test "x${with_cups_include}" != x; then
43013       CUPS_CFLAGS="-I${with_cups_include}"
43014       CUPS_FOUND=yes
43015     fi
43016     if test "x$CUPS_FOUND" = xno; then
43017 
43018 
43019   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43020     # Source the builddeps file again, to make sure it uses the latest variables!
43021     . $builddepsfile
43022     # Look for a target and build machine specific resource!
43023     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43024     if test "x$resource" = x; then
43025       # Ok, lets instead look for a target specific resource
43026       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43027     fi
43028     if test "x$resource" = x; then
43029       # Ok, lets instead look for a build specific resource
43030       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43031     fi
43032     if test "x$resource" = x; then
43033       # Ok, lets instead look for a generic resource
43034       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43035       resource=${builddep_cups}
43036     fi
43037     if test "x$resource" != x; then
43038       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43039 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43040       # If the resource in the builddeps.conf file is an existing directory,
43041       # for example /java/linux/cups
43042       if test -d ${resource}; then
43043         depdir=${resource}
43044       else
43045 
43046   # cups is for example mymodule
43047   # $resource is for example libs/general/libmymod_1_2_3.zip
43048   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43049   # $with_builddeps_dir is for example /localhome/builddeps
43050   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43051   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43052   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43053   filename=`basename $resource`
43054   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43055   filebase=${filename%%.*}
43056   extension=${filename#*.}
43057   installdir=$with_builddeps_dir/$filebase
43058   if test ! -f $installdir/$filename.unpacked; then
43059     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43060 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43061     if test ! -d $installdir; then
43062       mkdir -p $installdir
43063     fi
43064     if test ! -d $installdir; then
43065       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43066     fi
43067     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43068     touch $tmpfile
43069     if test ! -f $tmpfile; then
43070       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43071     fi
43072 
43073   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43074   # $tmpfile is the local file name for the downloaded file.
43075   VALID_TOOL=no
43076   if test "x$BDEPS_FTP" = xwget; then
43077     VALID_TOOL=yes
43078     wget -O $tmpfile $with_builddeps_server/$resource
43079   fi
43080   if test "x$BDEPS_FTP" = xlftp; then
43081     VALID_TOOL=yes
43082     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43083   fi
43084   if test "x$BDEPS_FTP" = xftp; then
43085     VALID_TOOL=yes
43086     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43087     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43088     FTPUSERPWD=${FTPSERVER%%@*}
43089     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43090       FTPUSER=${userpwd%%:*}
43091       FTPPWD=${userpwd#*@}
43092       FTPSERVER=${FTPSERVER#*@}
43093     else
43094       FTPUSER=ftp
43095       FTPPWD=ftp
43096     fi
43097     # the "pass" command does not work on some
43098     # ftp clients (read ftp.exe) but if it works,
43099     # passive mode is better!
43100     ( \
43101         echo "user $FTPUSER $FTPPWD"        ; \
43102         echo "pass"                         ; \
43103         echo "bin"                          ; \
43104         echo "get $FTPPATH $tmpfile"              ; \
43105     ) | ftp -in $FTPSERVER
43106   fi
43107   if test "x$VALID_TOOL" != xyes; then
43108     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43109   fi
43110 
43111     mv $tmpfile $installdir/$filename
43112     if test ! -s $installdir/$filename; then
43113       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43114     fi
43115     case "$extension" in
43116       zip)  echo "Unzipping $installdir/$filename..."
43117         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43118         ;;
43119       tar.gz) echo "Untaring $installdir/$filename..."
43120         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43121         ;;
43122       tgz) echo "Untaring $installdir/$filename..."
43123         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43124         ;;
43125       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43126         ;;
43127     esac
43128   fi
43129   if test -f $installdir/$filename.unpacked; then
43130     depdir=$installdir
43131   fi
43132 
43133       fi
43134       # Source the builddeps file again, because in the previous command, the depdir
43135       # was updated to point at the current build dependency install directory.
43136       . $builddepsfile
43137       # Now extract variables from the builddeps.conf files.
43138       theroot=${builddep_cups_ROOT}
43139       thecflags=${builddep_cups_CFLAGS}
43140       thelibs=${builddep_cups_LIBS}
43141       if test "x$depdir" = x; then
43142         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43143       fi
43144       CUPS=$depdir
43145       if test "x$theroot" != x; then
43146         CUPS="$theroot"
43147       fi
43148       if test "x$thecflags" != x; then
43149         CUPS_CFLAGS="$thecflags"
43150       fi
43151       if test "x$thelibs" != x; then
43152         CUPS_LIBS="$thelibs"
43153       fi
43154       CUPS_FOUND=yes
43155 
43156     fi
43157 
43158   fi
43159 
43160     fi
43161     if test "x$CUPS_FOUND" = xno; then
43162       # Are the cups headers installed in the default /usr/include location?
43163       for ac_header in cups/cups.h cups/ppd.h
43164 do :
43165   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43166 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43167 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43168   cat >>confdefs.h <<_ACEOF
43169 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43170 _ACEOF
43171 
43172             CUPS_FOUND=yes
43173             CUPS_CFLAGS=
43174             DEFAULT_CUPS=yes
43175 
43176 
43177 fi
43178 
43179 done
43180 
43181     fi
43182     if test "x$CUPS_FOUND" = xno; then
43183       # Getting nervous now? Lets poke around for standard Solaris third-party
43184       # package installation locations.
43185       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43186 $as_echo_n "checking for cups headers... " >&6; }
43187       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43188         # An SFW package seems to be installed!
43189         CUPS_FOUND=yes
43190         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43191       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43192         # A CSW package seems to be installed!
43193         CUPS_FOUND=yes
43194         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43195       fi
43196       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43197 $as_echo "$CUPS_FOUND" >&6; }
43198     fi
43199     if test "x$CUPS_FOUND" = xno; then
43200 
43201   # Print a helpful message on how to acquire the necessary build dependency.
43202   # cups is the help tag: freetype, cups, pulse, alsa etc
43203   MISSING_DEPENDENCY=cups
43204 
43205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43206     cygwin_help $MISSING_DEPENDENCY
43207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43208     msys_help $MISSING_DEPENDENCY
43209   else
43210     PKGHANDLER_COMMAND=
43211 
43212     case $PKGHANDLER in
43213       apt-get)
43214         apt_help     $MISSING_DEPENDENCY ;;
43215       yum)
43216         yum_help     $MISSING_DEPENDENCY ;;
43217       port)
43218         port_help    $MISSING_DEPENDENCY ;;
43219       pkgutil)
43220         pkgutil_help $MISSING_DEPENDENCY ;;
43221       pkgadd)
43222         pkgadd_help  $MISSING_DEPENDENCY ;;
43223     esac
43224 
43225     if test "x$PKGHANDLER_COMMAND" != x; then
43226       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43227     fi
43228   fi
43229 
43230       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43231     fi
43232   fi
43233 
43234 
43235 
43236 
43237 
43238 
43239   ###############################################################################
43240   #
43241   # The ubiquitous freetype library is used to render fonts.
43242   #
43243 
43244 # Check whether --with-freetype was given.
43245 if test "${with_freetype+set}" = set; then :
43246   withval=$with_freetype;
43247 fi
43248 
43249 
43250 # Check whether --with-freetype-include was given.
43251 if test "${with_freetype_include+set}" = set; then :
43252   withval=$with_freetype_include;
43253 fi
43254 
43255 
43256 # Check whether --with-freetype-lib was given.
43257 if test "${with_freetype_lib+set}" = set; then :
43258   withval=$with_freetype_lib;
43259 fi
43260 
43261 
43262 # Check whether --with-freetype-src was given.
43263 if test "${with_freetype_src+set}" = set; then :
43264   withval=$with_freetype_src;
43265 fi
43266 
43267   # Check whether --enable-freetype-bundling was given.
43268 if test "${enable_freetype_bundling+set}" = set; then :
43269   enableval=$enable_freetype_bundling;
43270 fi
43271 
43272 
43273   FREETYPE_CFLAGS=
43274   FREETYPE_LIBS=
43275   FREETYPE_BUNDLE_LIB_PATH=
43276 
43277   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43278     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
43279       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43280 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43281     fi
43282     if test "x$enable_freetype_bundling" != x; then
43283       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43284 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43285     fi
43286   else
43287     # freetype is needed to build; go get it!
43288 
43289     BUNDLE_FREETYPE="$enable_freetype_bundling"
43290 
43291     if  test "x$with_freetype_src" != x; then
43292       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43293         # Try to build freetype if --with-freetype-src was given on Windows
43294 
43295   FREETYPE_SRC_PATH="$with_freetype_src"
43296   BUILD_FREETYPE=yes
43297 
43298   # Check if the freetype sources are acessible..
43299   if ! test -d $FREETYPE_SRC_PATH; then
43300     { $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
43301 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
43302     BUILD_FREETYPE=no
43303   fi
43304   # ..and contain a vc2010 project file
43305   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
43306   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
43307     { $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
43308 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
43309     BUILD_FREETYPE=no
43310   fi
43311   # Now check if configure found a version of 'msbuild.exe'
43312   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
43313     { $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
43314 $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;}
43315     BUILD_FREETYPE=no
43316   fi
43317 
43318   # Ready to go..
43319   if test "x$BUILD_FREETYPE" = xyes; then
43320 
43321     # msbuild requires trailing slashes for output directories
43322     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
43323     freetype_lib_path_unix="$freetype_lib_path"
43324     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
43325 
43326   unix_path="$vcxproj_path"
43327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43328     windows_path=`$CYGPATH -m "$unix_path"`
43329     vcxproj_path="$windows_path"
43330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43331     windows_path=`cmd //c echo $unix_path`
43332     vcxproj_path="$windows_path"
43333   fi
43334 
43335 
43336   unix_path="$freetype_lib_path"
43337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43338     windows_path=`$CYGPATH -m "$unix_path"`
43339     freetype_lib_path="$windows_path"
43340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43341     windows_path=`cmd //c echo $unix_path`
43342     freetype_lib_path="$windows_path"
43343   fi
43344 
43345 
43346   unix_path="$freetype_obj_path"
43347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43348     windows_path=`$CYGPATH -m "$unix_path"`
43349     freetype_obj_path="$windows_path"
43350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43351     windows_path=`cmd //c echo $unix_path`
43352     freetype_obj_path="$windows_path"
43353   fi
43354 
43355     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43356       freetype_platform=x64
43357     else
43358       freetype_platform=win32
43359     fi
43360 
43361     # The original freetype project file is for VS 2010 (i.e. 'v100'),
43362     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
43363     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
43364     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
43365     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
43366 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
43367 
43368     # First we try to build the freetype.dll
43369     $ECHO -e "@echo off\n"\
43370              "$MSBUILD $vcxproj_path "\
43371                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43372                        "/p:Configuration=\"Release Multithreaded\" "\
43373                        "/p:Platform=$freetype_platform "\
43374                        "/p:ConfigurationType=DynamicLibrary "\
43375                        "/p:TargetName=freetype "\
43376                        "/p:OutDir=\"$freetype_lib_path\" "\
43377                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
43378     cmd /c freetype.bat
43379 
43380     if test -s "$freetype_lib_path_unix/freetype.dll"; then
43381       # If that succeeds we also build freetype.lib
43382       $ECHO -e "@echo off\n"\
43383                "$MSBUILD $vcxproj_path "\
43384                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
43385                          "/p:Configuration=\"Release Multithreaded\" "\
43386                          "/p:Platform=$freetype_platform "\
43387                          "/p:ConfigurationType=StaticLibrary "\
43388                          "/p:TargetName=freetype "\
43389                          "/p:OutDir=\"$freetype_lib_path\" "\
43390                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
43391       cmd /c freetype.bat
43392 
43393       if test -s "$freetype_lib_path_unix/freetype.lib"; then
43394         # Once we build both, lib and dll, set freetype lib and include path appropriately
43395         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
43396         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
43397         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
43398 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
43399       else
43400         BUILD_FREETYPE=no
43401       fi
43402     else
43403       BUILD_FREETYPE=no
43404     fi
43405   fi
43406 
43407         if test "x$BUILD_FREETYPE" = xyes; then
43408           # Okay, we built it. Check that it works.
43409 
43410   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43411   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43412   METHOD="--with-freetype-src"
43413 
43414   # First check if the files exists.
43415   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43416     # We found an arbitrary include file. That's a good sign.
43417     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43418 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43419     FOUND_FREETYPE=yes
43420 
43421     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43422     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43423       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43424 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43425       FOUND_FREETYPE=no
43426     else
43427       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43428         # On Windows, we will need both .lib and .dll file.
43429         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43430           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43431 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43432           FOUND_FREETYPE=no
43433         fi
43434       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
43435         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43436         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43437       fi
43438     fi
43439   fi
43440 
43441   if test "x$FOUND_FREETYPE" = xyes; then
43442 
43443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43444 
43445   # Input might be given as Windows format, start by converting to
43446   # unix format.
43447   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43448   new_path=`$CYGPATH -u "$path"`
43449 
43450   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43451   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43452   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43453   # "foo.exe" is OK but "foo" is an error.
43454   #
43455   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43456   # It is also a way to make sure we got the proper file name for the real test later on.
43457   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43458   if test "x$test_shortpath" = x; then
43459     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43460 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43461     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43462   fi
43463 
43464   # Call helper function which possibly converts this using DOS-style short mode.
43465   # If so, the updated path is stored in $new_path.
43466 
43467   input_path="$new_path"
43468   # Check if we need to convert this using DOS-style short mode. If the path
43469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43470   # take no chances and rewrite it.
43471   # Note: m4 eats our [], so we need to use [ and ] instead.
43472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43473   if test "x$has_forbidden_chars" != x; then
43474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43478       # Going to short mode and back again did indeed matter. Since short mode is
43479       # case insensitive, let's make it lowercase to improve readability.
43480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43481       # Now convert it back to Unix-style (cygpath)
43482       input_path=`$CYGPATH -u "$shortmode_path"`
43483       new_path="$input_path"
43484     fi
43485   fi
43486 
43487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43488   if test "x$test_cygdrive_prefix" = x; then
43489     # As a simple fix, exclude /usr/bin since it's not a real path.
43490     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43492       # a path prefixed by /cygdrive for fixpath to work.
43493       new_path="$CYGWIN_ROOT_PATH$input_path"
43494     fi
43495   fi
43496 
43497 
43498   if test "x$path" != "x$new_path"; then
43499     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43501 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43502   fi
43503 
43504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43505 
43506   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43507   has_colon=`$ECHO $path | $GREP ^.:`
43508   new_path="$path"
43509   if test "x$has_colon" = x; then
43510     # Not in mixed or Windows style, start by that.
43511     new_path=`cmd //c echo $path`
43512   fi
43513 
43514 
43515   input_path="$new_path"
43516   # Check if we need to convert this using DOS-style short mode. If the path
43517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43518   # take no chances and rewrite it.
43519   # Note: m4 eats our [], so we need to use [ and ] instead.
43520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43521   if test "x$has_forbidden_chars" != x; then
43522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43523     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43524   fi
43525 
43526 
43527   windows_path="$new_path"
43528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43529     unix_path=`$CYGPATH -u "$windows_path"`
43530     new_path="$unix_path"
43531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43533     new_path="$unix_path"
43534   fi
43535 
43536   if test "x$path" != "x$new_path"; then
43537     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43540   fi
43541 
43542   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43543   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43544 
43545   else
43546     # We're on a posix platform. Hooray! :)
43547     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43548     has_space=`$ECHO "$path" | $GREP " "`
43549     if test "x$has_space" != x; then
43550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43551 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43552       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43553     fi
43554 
43555     # Use eval to expand a potential ~
43556     eval path="$path"
43557     if test ! -f "$path" && test ! -d "$path"; then
43558       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43559     fi
43560 
43561     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43562   fi
43563 
43564 
43565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43566 
43567   # Input might be given as Windows format, start by converting to
43568   # unix format.
43569   path="$POTENTIAL_FREETYPE_LIB_PATH"
43570   new_path=`$CYGPATH -u "$path"`
43571 
43572   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43573   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43574   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43575   # "foo.exe" is OK but "foo" is an error.
43576   #
43577   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43578   # It is also a way to make sure we got the proper file name for the real test later on.
43579   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43580   if test "x$test_shortpath" = x; then
43581     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43582 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43583     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43584   fi
43585 
43586   # Call helper function which possibly converts this using DOS-style short mode.
43587   # If so, the updated path is stored in $new_path.
43588 
43589   input_path="$new_path"
43590   # Check if we need to convert this using DOS-style short mode. If the path
43591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43592   # take no chances and rewrite it.
43593   # Note: m4 eats our [], so we need to use [ and ] instead.
43594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43595   if test "x$has_forbidden_chars" != x; then
43596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43597     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43598     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43599     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43600       # Going to short mode and back again did indeed matter. Since short mode is
43601       # case insensitive, let's make it lowercase to improve readability.
43602       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43603       # Now convert it back to Unix-style (cygpath)
43604       input_path=`$CYGPATH -u "$shortmode_path"`
43605       new_path="$input_path"
43606     fi
43607   fi
43608 
43609   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43610   if test "x$test_cygdrive_prefix" = x; then
43611     # As a simple fix, exclude /usr/bin since it's not a real path.
43612     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43613       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43614       # a path prefixed by /cygdrive for fixpath to work.
43615       new_path="$CYGWIN_ROOT_PATH$input_path"
43616     fi
43617   fi
43618 
43619 
43620   if test "x$path" != "x$new_path"; then
43621     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43622     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43623 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43624   fi
43625 
43626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43627 
43628   path="$POTENTIAL_FREETYPE_LIB_PATH"
43629   has_colon=`$ECHO $path | $GREP ^.:`
43630   new_path="$path"
43631   if test "x$has_colon" = x; then
43632     # Not in mixed or Windows style, start by that.
43633     new_path=`cmd //c echo $path`
43634   fi
43635 
43636 
43637   input_path="$new_path"
43638   # Check if we need to convert this using DOS-style short mode. If the path
43639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43640   # take no chances and rewrite it.
43641   # Note: m4 eats our [], so we need to use [ and ] instead.
43642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43643   if test "x$has_forbidden_chars" != x; then
43644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43645     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43646   fi
43647 
43648 
43649   windows_path="$new_path"
43650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43651     unix_path=`$CYGPATH -u "$windows_path"`
43652     new_path="$unix_path"
43653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43655     new_path="$unix_path"
43656   fi
43657 
43658   if test "x$path" != "x$new_path"; then
43659     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43660     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43661 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43662   fi
43663 
43664   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43665   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43666 
43667   else
43668     # We're on a posix platform. Hooray! :)
43669     path="$POTENTIAL_FREETYPE_LIB_PATH"
43670     has_space=`$ECHO "$path" | $GREP " "`
43671     if test "x$has_space" != x; then
43672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43673 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43674       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43675     fi
43676 
43677     # Use eval to expand a potential ~
43678     eval path="$path"
43679     if test ! -f "$path" && test ! -d "$path"; then
43680       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43681     fi
43682 
43683     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43684   fi
43685 
43686 
43687     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43688     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43689 $as_echo_n "checking for freetype includes... " >&6; }
43690     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43691 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43692     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43693     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43694 $as_echo_n "checking for freetype libraries... " >&6; }
43695     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43696 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43697   fi
43698 
43699           if test "x$FOUND_FREETYPE" != xyes; then
43700             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
43701           fi
43702         else
43703           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
43704 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
43705           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
43706         fi
43707       else
43708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
43709 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
43710       fi
43711     fi
43712 
43713     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43714       # User has specified settings
43715 
43716       if test "x$BUNDLE_FREETYPE" = x; then
43717         # If not specified, default is to bundle freetype
43718         BUNDLE_FREETYPE=yes
43719       fi
43720 
43721       if test "x$with_freetype" != x; then
43722         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43723         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43724       fi
43725 
43726       # Allow --with-freetype-lib and --with-freetype-include to override
43727       if test "x$with_freetype_include" != x; then
43728         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43729       fi
43730       if test "x$with_freetype_lib" != x; then
43731         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43732       fi
43733 
43734       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43735         # Okay, we got it. Check that it works.
43736 
43737   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43738   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43739   METHOD="--with-freetype"
43740 
43741   # First check if the files exists.
43742   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43743     # We found an arbitrary include file. That's a good sign.
43744     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43745 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43746     FOUND_FREETYPE=yes
43747 
43748     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43749     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43750       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43751 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43752       FOUND_FREETYPE=no
43753     else
43754       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43755         # On Windows, we will need both .lib and .dll file.
43756         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43757           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43758 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43759           FOUND_FREETYPE=no
43760         fi
43761       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
43762         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43763         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43764       fi
43765     fi
43766   fi
43767 
43768   if test "x$FOUND_FREETYPE" = xyes; then
43769 
43770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43771 
43772   # Input might be given as Windows format, start by converting to
43773   # unix format.
43774   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43775   new_path=`$CYGPATH -u "$path"`
43776 
43777   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43778   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43779   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43780   # "foo.exe" is OK but "foo" is an error.
43781   #
43782   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43783   # It is also a way to make sure we got the proper file name for the real test later on.
43784   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43785   if test "x$test_shortpath" = x; then
43786     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43787 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43788     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43789   fi
43790 
43791   # Call helper function which possibly converts this using DOS-style short mode.
43792   # If so, the updated path is stored in $new_path.
43793 
43794   input_path="$new_path"
43795   # Check if we need to convert this using DOS-style short mode. If the path
43796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43797   # take no chances and rewrite it.
43798   # Note: m4 eats our [], so we need to use [ and ] instead.
43799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43800   if test "x$has_forbidden_chars" != x; then
43801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43805       # Going to short mode and back again did indeed matter. Since short mode is
43806       # case insensitive, let's make it lowercase to improve readability.
43807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43808       # Now convert it back to Unix-style (cygpath)
43809       input_path=`$CYGPATH -u "$shortmode_path"`
43810       new_path="$input_path"
43811     fi
43812   fi
43813 
43814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43815   if test "x$test_cygdrive_prefix" = x; then
43816     # As a simple fix, exclude /usr/bin since it's not a real path.
43817     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43819       # a path prefixed by /cygdrive for fixpath to work.
43820       new_path="$CYGWIN_ROOT_PATH$input_path"
43821     fi
43822   fi
43823 
43824 
43825   if test "x$path" != "x$new_path"; then
43826     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43827     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43828 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43829   fi
43830 
43831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43832 
43833   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43834   has_colon=`$ECHO $path | $GREP ^.:`
43835   new_path="$path"
43836   if test "x$has_colon" = x; then
43837     # Not in mixed or Windows style, start by that.
43838     new_path=`cmd //c echo $path`
43839   fi
43840 
43841 
43842   input_path="$new_path"
43843   # Check if we need to convert this using DOS-style short mode. If the path
43844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43845   # take no chances and rewrite it.
43846   # Note: m4 eats our [], so we need to use [ and ] instead.
43847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43848   if test "x$has_forbidden_chars" != x; then
43849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43850     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43851   fi
43852 
43853 
43854   windows_path="$new_path"
43855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43856     unix_path=`$CYGPATH -u "$windows_path"`
43857     new_path="$unix_path"
43858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43860     new_path="$unix_path"
43861   fi
43862 
43863   if test "x$path" != "x$new_path"; then
43864     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43865     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43866 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43867   fi
43868 
43869   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43870   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43871 
43872   else
43873     # We're on a posix platform. Hooray! :)
43874     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43875     has_space=`$ECHO "$path" | $GREP " "`
43876     if test "x$has_space" != x; then
43877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43878 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43879       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43880     fi
43881 
43882     # Use eval to expand a potential ~
43883     eval path="$path"
43884     if test ! -f "$path" && test ! -d "$path"; then
43885       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43886     fi
43887 
43888     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43889   fi
43890 
43891 
43892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43893 
43894   # Input might be given as Windows format, start by converting to
43895   # unix format.
43896   path="$POTENTIAL_FREETYPE_LIB_PATH"
43897   new_path=`$CYGPATH -u "$path"`
43898 
43899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43902   # "foo.exe" is OK but "foo" is an error.
43903   #
43904   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43905   # It is also a way to make sure we got the proper file name for the real test later on.
43906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43907   if test "x$test_shortpath" = x; then
43908     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43909 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43910     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43911   fi
43912 
43913   # Call helper function which possibly converts this using DOS-style short mode.
43914   # If so, the updated path is stored in $new_path.
43915 
43916   input_path="$new_path"
43917   # Check if we need to convert this using DOS-style short mode. If the path
43918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43919   # take no chances and rewrite it.
43920   # Note: m4 eats our [], so we need to use [ and ] instead.
43921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43922   if test "x$has_forbidden_chars" != x; then
43923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43924     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43925     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43926     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43927       # Going to short mode and back again did indeed matter. Since short mode is
43928       # case insensitive, let's make it lowercase to improve readability.
43929       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43930       # Now convert it back to Unix-style (cygpath)
43931       input_path=`$CYGPATH -u "$shortmode_path"`
43932       new_path="$input_path"
43933     fi
43934   fi
43935 
43936   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43937   if test "x$test_cygdrive_prefix" = x; then
43938     # As a simple fix, exclude /usr/bin since it's not a real path.
43939     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43940       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43941       # a path prefixed by /cygdrive for fixpath to work.
43942       new_path="$CYGWIN_ROOT_PATH$input_path"
43943     fi
43944   fi
43945 
43946 
43947   if test "x$path" != "x$new_path"; then
43948     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43949     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43950 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43951   fi
43952 
43953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43954 
43955   path="$POTENTIAL_FREETYPE_LIB_PATH"
43956   has_colon=`$ECHO $path | $GREP ^.:`
43957   new_path="$path"
43958   if test "x$has_colon" = x; then
43959     # Not in mixed or Windows style, start by that.
43960     new_path=`cmd //c echo $path`
43961   fi
43962 
43963 
43964   input_path="$new_path"
43965   # Check if we need to convert this using DOS-style short mode. If the path
43966   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43967   # take no chances and rewrite it.
43968   # Note: m4 eats our [], so we need to use [ and ] instead.
43969   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43970   if test "x$has_forbidden_chars" != x; then
43971     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43972     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43973   fi
43974 
43975 
43976   windows_path="$new_path"
43977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43978     unix_path=`$CYGPATH -u "$windows_path"`
43979     new_path="$unix_path"
43980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43982     new_path="$unix_path"
43983   fi
43984 
43985   if test "x$path" != "x$new_path"; then
43986     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43987     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43988 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43989   fi
43990 
43991   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43992   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43993 
43994   else
43995     # We're on a posix platform. Hooray! :)
43996     path="$POTENTIAL_FREETYPE_LIB_PATH"
43997     has_space=`$ECHO "$path" | $GREP " "`
43998     if test "x$has_space" != x; then
43999       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44000 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44001       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44002     fi
44003 
44004     # Use eval to expand a potential ~
44005     eval path="$path"
44006     if test ! -f "$path" && test ! -d "$path"; then
44007       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44008     fi
44009 
44010     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44011   fi
44012 
44013 
44014     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44016 $as_echo_n "checking for freetype includes... " >&6; }
44017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44018 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44019     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44021 $as_echo_n "checking for freetype libraries... " >&6; }
44022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44023 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44024   fi
44025 
44026         if test "x$FOUND_FREETYPE" != xyes; then
44027           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44028         fi
44029       else
44030         # User specified only one of lib or include. This is an error.
44031         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44032           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44033 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44034           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44035         else
44036           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44037 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44038           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44039         fi
44040       fi
44041     else
44042       # User did not specify settings, but we need freetype. Try to locate it.
44043 
44044       if test "x$BUNDLE_FREETYPE" = x; then
44045         # If not specified, default is to bundle freetype only on windows
44046         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44047           BUNDLE_FREETYPE=yes
44048         else
44049           BUNDLE_FREETYPE=no
44050         fi
44051       fi
44052 
44053       if test "x$FOUND_FREETYPE" != xyes; then
44054         # Check builddeps
44055 
44056 
44057   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44058     # Source the builddeps file again, to make sure it uses the latest variables!
44059     . $builddepsfile
44060     # Look for a target and build machine specific resource!
44061     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44062     if test "x$resource" = x; then
44063       # Ok, lets instead look for a target specific resource
44064       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44065     fi
44066     if test "x$resource" = x; then
44067       # Ok, lets instead look for a build specific resource
44068       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44069     fi
44070     if test "x$resource" = x; then
44071       # Ok, lets instead look for a generic resource
44072       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44073       resource=${builddep_freetype2}
44074     fi
44075     if test "x$resource" != x; then
44076       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44077 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44078       # If the resource in the builddeps.conf file is an existing directory,
44079       # for example /java/linux/cups
44080       if test -d ${resource}; then
44081         depdir=${resource}
44082       else
44083 
44084   # freetype2 is for example mymodule
44085   # $resource is for example libs/general/libmymod_1_2_3.zip
44086   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44087   # $with_builddeps_dir is for example /localhome/builddeps
44088   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44089   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44090   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44091   filename=`basename $resource`
44092   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44093   filebase=${filename%%.*}
44094   extension=${filename#*.}
44095   installdir=$with_builddeps_dir/$filebase
44096   if test ! -f $installdir/$filename.unpacked; then
44097     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44098 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44099     if test ! -d $installdir; then
44100       mkdir -p $installdir
44101     fi
44102     if test ! -d $installdir; then
44103       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44104     fi
44105     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44106     touch $tmpfile
44107     if test ! -f $tmpfile; then
44108       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44109     fi
44110 
44111   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44112   # $tmpfile is the local file name for the downloaded file.
44113   VALID_TOOL=no
44114   if test "x$BDEPS_FTP" = xwget; then
44115     VALID_TOOL=yes
44116     wget -O $tmpfile $with_builddeps_server/$resource
44117   fi
44118   if test "x$BDEPS_FTP" = xlftp; then
44119     VALID_TOOL=yes
44120     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44121   fi
44122   if test "x$BDEPS_FTP" = xftp; then
44123     VALID_TOOL=yes
44124     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44125     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44126     FTPUSERPWD=${FTPSERVER%%@*}
44127     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44128       FTPUSER=${userpwd%%:*}
44129       FTPPWD=${userpwd#*@}
44130       FTPSERVER=${FTPSERVER#*@}
44131     else
44132       FTPUSER=ftp
44133       FTPPWD=ftp
44134     fi
44135     # the "pass" command does not work on some
44136     # ftp clients (read ftp.exe) but if it works,
44137     # passive mode is better!
44138     ( \
44139         echo "user $FTPUSER $FTPPWD"        ; \
44140         echo "pass"                         ; \
44141         echo "bin"                          ; \
44142         echo "get $FTPPATH $tmpfile"              ; \
44143     ) | ftp -in $FTPSERVER
44144   fi
44145   if test "x$VALID_TOOL" != xyes; then
44146     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44147   fi
44148 
44149     mv $tmpfile $installdir/$filename
44150     if test ! -s $installdir/$filename; then
44151       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44152     fi
44153     case "$extension" in
44154       zip)  echo "Unzipping $installdir/$filename..."
44155         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44156         ;;
44157       tar.gz) echo "Untaring $installdir/$filename..."
44158         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44159         ;;
44160       tgz) echo "Untaring $installdir/$filename..."
44161         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44162         ;;
44163       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44164         ;;
44165     esac
44166   fi
44167   if test -f $installdir/$filename.unpacked; then
44168     depdir=$installdir
44169   fi
44170 
44171       fi
44172       # Source the builddeps file again, because in the previous command, the depdir
44173       # was updated to point at the current build dependency install directory.
44174       . $builddepsfile
44175       # Now extract variables from the builddeps.conf files.
44176       theroot=${builddep_freetype2_ROOT}
44177       thecflags=${builddep_freetype2_CFLAGS}
44178       thelibs=${builddep_freetype2_LIBS}
44179       if test "x$depdir" = x; then
44180         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44181       fi
44182       FREETYPE=$depdir
44183       if test "x$theroot" != x; then
44184         FREETYPE="$theroot"
44185       fi
44186       if test "x$thecflags" != x; then
44187         FREETYPE_CFLAGS="$thecflags"
44188       fi
44189       if test "x$thelibs" != x; then
44190         FREETYPE_LIBS="$thelibs"
44191       fi
44192       FOUND_FREETYPE=yes
44193       else FOUND_FREETYPE=no
44194 
44195     fi
44196     else FOUND_FREETYPE=no
44197 
44198   fi
44199 
44200         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44201         if test "x$FOUND_FREETYPE" = xyes; then
44202           if test "x$BUNDLE_FREETYPE" = xyes; then
44203             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44204 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44205             FOUND_FREETYPE=no
44206           else
44207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44208 $as_echo_n "checking for freetype... " >&6; }
44209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44210 $as_echo "yes (using builddeps)" >&6; }
44211           fi
44212         fi
44213       fi
44214 
44215       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44216       if test "x$SYSROOT" = x; then
44217         if test "x$FOUND_FREETYPE" != xyes; then
44218           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44219           if test "x$PKG_CONFIG" != x; then
44220 
44221 pkg_failed=no
44222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44223 $as_echo_n "checking for FREETYPE... " >&6; }
44224 
44225 if test -n "$FREETYPE_CFLAGS"; then
44226     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44227  elif test -n "$PKG_CONFIG"; then
44228     if test -n "$PKG_CONFIG" && \
44229     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44230   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44231   ac_status=$?
44232   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44233   test $ac_status = 0; }; then
44234   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44235 else
44236   pkg_failed=yes
44237 fi
44238  else
44239     pkg_failed=untried
44240 fi
44241 if test -n "$FREETYPE_LIBS"; then
44242     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44243  elif test -n "$PKG_CONFIG"; then
44244     if test -n "$PKG_CONFIG" && \
44245     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44246   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44247   ac_status=$?
44248   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44249   test $ac_status = 0; }; then
44250   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44251 else
44252   pkg_failed=yes
44253 fi
44254  else
44255     pkg_failed=untried
44256 fi
44257 
44258 
44259 
44260 if test $pkg_failed = yes; then
44261 
44262 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44263         _pkg_short_errors_supported=yes
44264 else
44265         _pkg_short_errors_supported=no
44266 fi
44267         if test $_pkg_short_errors_supported = yes; then
44268                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44269         else
44270                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44271         fi
44272         # Put the nasty error message in config.log where it belongs
44273         echo "$FREETYPE_PKG_ERRORS" >&5
44274 
44275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44276 $as_echo "no" >&6; }
44277                 FOUND_FREETYPE=no
44278 elif test $pkg_failed = untried; then
44279         FOUND_FREETYPE=no
44280 else
44281         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44282         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44284 $as_echo "yes" >&6; }
44285         FOUND_FREETYPE=yes
44286 fi
44287             if test "x$FOUND_FREETYPE" = xyes; then
44288               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44289               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44290               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44291               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44292                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44293               fi
44294               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44295               if test "x$BUNDLE_FREETYPE" = xyes; then
44296                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44297 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44298                 FOUND_FREETYPE=no
44299               else
44300                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44301 $as_echo_n "checking for freetype... " >&6; }
44302                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44303 $as_echo "yes (using pkg-config)" >&6; }
44304               fi
44305             fi
44306           fi
44307         fi
44308       fi
44309 
44310       if test "x$FOUND_FREETYPE" != xyes; then
44311         # Check in well-known locations
44312         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44313           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44314 
44315   windows_path="$FREETYPE_BASE_DIR"
44316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44317     unix_path=`$CYGPATH -u "$windows_path"`
44318     FREETYPE_BASE_DIR="$unix_path"
44319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44321     FREETYPE_BASE_DIR="$unix_path"
44322   fi
44323 
44324 
44325   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44326   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44327   METHOD="well-known location"
44328 
44329   # First check if the files exists.
44330   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44331     # We found an arbitrary include file. That's a good sign.
44332     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44333 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44334     FOUND_FREETYPE=yes
44335 
44336     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44337     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44338       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44339 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44340       FOUND_FREETYPE=no
44341     else
44342       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44343         # On Windows, we will need both .lib and .dll file.
44344         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44345           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44346 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44347           FOUND_FREETYPE=no
44348         fi
44349       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
44350         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44351         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44352       fi
44353     fi
44354   fi
44355 
44356   if test "x$FOUND_FREETYPE" = xyes; then
44357 
44358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44359 
44360   # Input might be given as Windows format, start by converting to
44361   # unix format.
44362   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44363   new_path=`$CYGPATH -u "$path"`
44364 
44365   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44366   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44367   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44368   # "foo.exe" is OK but "foo" is an error.
44369   #
44370   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44371   # It is also a way to make sure we got the proper file name for the real test later on.
44372   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44373   if test "x$test_shortpath" = x; then
44374     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44375 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44376     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44377   fi
44378 
44379   # Call helper function which possibly converts this using DOS-style short mode.
44380   # If so, the updated path is stored in $new_path.
44381 
44382   input_path="$new_path"
44383   # Check if we need to convert this using DOS-style short mode. If the path
44384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44385   # take no chances and rewrite it.
44386   # Note: m4 eats our [], so we need to use [ and ] instead.
44387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44388   if test "x$has_forbidden_chars" != x; then
44389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44390     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44391     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44392     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44393       # Going to short mode and back again did indeed matter. Since short mode is
44394       # case insensitive, let's make it lowercase to improve readability.
44395       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44396       # Now convert it back to Unix-style (cygpath)
44397       input_path=`$CYGPATH -u "$shortmode_path"`
44398       new_path="$input_path"
44399     fi
44400   fi
44401 
44402   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44403   if test "x$test_cygdrive_prefix" = x; then
44404     # As a simple fix, exclude /usr/bin since it's not a real path.
44405     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44406       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44407       # a path prefixed by /cygdrive for fixpath to work.
44408       new_path="$CYGWIN_ROOT_PATH$input_path"
44409     fi
44410   fi
44411 
44412 
44413   if test "x$path" != "x$new_path"; then
44414     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44416 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44417   fi
44418 
44419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44420 
44421   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44422   has_colon=`$ECHO $path | $GREP ^.:`
44423   new_path="$path"
44424   if test "x$has_colon" = x; then
44425     # Not in mixed or Windows style, start by that.
44426     new_path=`cmd //c echo $path`
44427   fi
44428 
44429 
44430   input_path="$new_path"
44431   # Check if we need to convert this using DOS-style short mode. If the path
44432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44433   # take no chances and rewrite it.
44434   # Note: m4 eats our [], so we need to use [ and ] instead.
44435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44436   if test "x$has_forbidden_chars" != x; then
44437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44438     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44439   fi
44440 
44441 
44442   windows_path="$new_path"
44443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444     unix_path=`$CYGPATH -u "$windows_path"`
44445     new_path="$unix_path"
44446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44448     new_path="$unix_path"
44449   fi
44450 
44451   if test "x$path" != "x$new_path"; then
44452     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44454 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44455   fi
44456 
44457   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44458   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44459 
44460   else
44461     # We're on a posix platform. Hooray! :)
44462     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44463     has_space=`$ECHO "$path" | $GREP " "`
44464     if test "x$has_space" != x; then
44465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44466 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44467       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44468     fi
44469 
44470     # Use eval to expand a potential ~
44471     eval path="$path"
44472     if test ! -f "$path" && test ! -d "$path"; then
44473       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44474     fi
44475 
44476     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44477   fi
44478 
44479 
44480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44481 
44482   # Input might be given as Windows format, start by converting to
44483   # unix format.
44484   path="$POTENTIAL_FREETYPE_LIB_PATH"
44485   new_path=`$CYGPATH -u "$path"`
44486 
44487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44490   # "foo.exe" is OK but "foo" is an error.
44491   #
44492   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44493   # It is also a way to make sure we got the proper file name for the real test later on.
44494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44495   if test "x$test_shortpath" = x; then
44496     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44497 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44498     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44499   fi
44500 
44501   # Call helper function which possibly converts this using DOS-style short mode.
44502   # If so, the updated path is stored in $new_path.
44503 
44504   input_path="$new_path"
44505   # Check if we need to convert this using DOS-style short mode. If the path
44506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44507   # take no chances and rewrite it.
44508   # Note: m4 eats our [], so we need to use [ and ] instead.
44509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44510   if test "x$has_forbidden_chars" != x; then
44511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44515       # Going to short mode and back again did indeed matter. Since short mode is
44516       # case insensitive, let's make it lowercase to improve readability.
44517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44518       # Now convert it back to Unix-style (cygpath)
44519       input_path=`$CYGPATH -u "$shortmode_path"`
44520       new_path="$input_path"
44521     fi
44522   fi
44523 
44524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44525   if test "x$test_cygdrive_prefix" = x; then
44526     # As a simple fix, exclude /usr/bin since it's not a real path.
44527     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44529       # a path prefixed by /cygdrive for fixpath to work.
44530       new_path="$CYGWIN_ROOT_PATH$input_path"
44531     fi
44532   fi
44533 
44534 
44535   if test "x$path" != "x$new_path"; then
44536     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44538 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44539   fi
44540 
44541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44542 
44543   path="$POTENTIAL_FREETYPE_LIB_PATH"
44544   has_colon=`$ECHO $path | $GREP ^.:`
44545   new_path="$path"
44546   if test "x$has_colon" = x; then
44547     # Not in mixed or Windows style, start by that.
44548     new_path=`cmd //c echo $path`
44549   fi
44550 
44551 
44552   input_path="$new_path"
44553   # Check if we need to convert this using DOS-style short mode. If the path
44554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44555   # take no chances and rewrite it.
44556   # Note: m4 eats our [], so we need to use [ and ] instead.
44557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44558   if test "x$has_forbidden_chars" != x; then
44559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44561   fi
44562 
44563 
44564   windows_path="$new_path"
44565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44566     unix_path=`$CYGPATH -u "$windows_path"`
44567     new_path="$unix_path"
44568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44570     new_path="$unix_path"
44571   fi
44572 
44573   if test "x$path" != "x$new_path"; then
44574     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44576 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44577   fi
44578 
44579   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44580   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44581 
44582   else
44583     # We're on a posix platform. Hooray! :)
44584     path="$POTENTIAL_FREETYPE_LIB_PATH"
44585     has_space=`$ECHO "$path" | $GREP " "`
44586     if test "x$has_space" != x; then
44587       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44588 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44589       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44590     fi
44591 
44592     # Use eval to expand a potential ~
44593     eval path="$path"
44594     if test ! -f "$path" && test ! -d "$path"; then
44595       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44596     fi
44597 
44598     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44599   fi
44600 
44601 
44602     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44604 $as_echo_n "checking for freetype includes... " >&6; }
44605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44606 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44607     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44609 $as_echo_n "checking for freetype libraries... " >&6; }
44610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44611 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44612   fi
44613 
44614           if test "x$FOUND_FREETYPE" != xyes; then
44615             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44616 
44617   windows_path="$FREETYPE_BASE_DIR"
44618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44619     unix_path=`$CYGPATH -u "$windows_path"`
44620     FREETYPE_BASE_DIR="$unix_path"
44621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44623     FREETYPE_BASE_DIR="$unix_path"
44624   fi
44625 
44626 
44627   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44628   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44629   METHOD="well-known location"
44630 
44631   # First check if the files exists.
44632   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44633     # We found an arbitrary include file. That's a good sign.
44634     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44635 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44636     FOUND_FREETYPE=yes
44637 
44638     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44639     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44640       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44641 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44642       FOUND_FREETYPE=no
44643     else
44644       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44645         # On Windows, we will need both .lib and .dll file.
44646         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44647           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44648 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44649           FOUND_FREETYPE=no
44650         fi
44651       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
44652         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44653         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44654       fi
44655     fi
44656   fi
44657 
44658   if test "x$FOUND_FREETYPE" = xyes; then
44659 
44660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661 
44662   # Input might be given as Windows format, start by converting to
44663   # unix format.
44664   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44665   new_path=`$CYGPATH -u "$path"`
44666 
44667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44670   # "foo.exe" is OK but "foo" is an error.
44671   #
44672   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44673   # It is also a way to make sure we got the proper file name for the real test later on.
44674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44675   if test "x$test_shortpath" = x; then
44676     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44677 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44678     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44679   fi
44680 
44681   # Call helper function which possibly converts this using DOS-style short mode.
44682   # If so, the updated path is stored in $new_path.
44683 
44684   input_path="$new_path"
44685   # Check if we need to convert this using DOS-style short mode. If the path
44686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44687   # take no chances and rewrite it.
44688   # Note: m4 eats our [], so we need to use [ and ] instead.
44689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44690   if test "x$has_forbidden_chars" != x; then
44691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44695       # Going to short mode and back again did indeed matter. Since short mode is
44696       # case insensitive, let's make it lowercase to improve readability.
44697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44698       # Now convert it back to Unix-style (cygpath)
44699       input_path=`$CYGPATH -u "$shortmode_path"`
44700       new_path="$input_path"
44701     fi
44702   fi
44703 
44704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44705   if test "x$test_cygdrive_prefix" = x; then
44706     # As a simple fix, exclude /usr/bin since it's not a real path.
44707     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44709       # a path prefixed by /cygdrive for fixpath to work.
44710       new_path="$CYGWIN_ROOT_PATH$input_path"
44711     fi
44712   fi
44713 
44714 
44715   if test "x$path" != "x$new_path"; then
44716     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44718 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44719   fi
44720 
44721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44722 
44723   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44724   has_colon=`$ECHO $path | $GREP ^.:`
44725   new_path="$path"
44726   if test "x$has_colon" = x; then
44727     # Not in mixed or Windows style, start by that.
44728     new_path=`cmd //c echo $path`
44729   fi
44730 
44731 
44732   input_path="$new_path"
44733   # Check if we need to convert this using DOS-style short mode. If the path
44734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44735   # take no chances and rewrite it.
44736   # Note: m4 eats our [], so we need to use [ and ] instead.
44737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44738   if test "x$has_forbidden_chars" != x; then
44739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44741   fi
44742 
44743 
44744   windows_path="$new_path"
44745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746     unix_path=`$CYGPATH -u "$windows_path"`
44747     new_path="$unix_path"
44748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44750     new_path="$unix_path"
44751   fi
44752 
44753   if test "x$path" != "x$new_path"; then
44754     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44756 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44757   fi
44758 
44759   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44760   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44761 
44762   else
44763     # We're on a posix platform. Hooray! :)
44764     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44765     has_space=`$ECHO "$path" | $GREP " "`
44766     if test "x$has_space" != x; then
44767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44768 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44769       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44770     fi
44771 
44772     # Use eval to expand a potential ~
44773     eval path="$path"
44774     if test ! -f "$path" && test ! -d "$path"; then
44775       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44776     fi
44777 
44778     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44779   fi
44780 
44781 
44782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44783 
44784   # Input might be given as Windows format, start by converting to
44785   # unix format.
44786   path="$POTENTIAL_FREETYPE_LIB_PATH"
44787   new_path=`$CYGPATH -u "$path"`
44788 
44789   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44790   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44791   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44792   # "foo.exe" is OK but "foo" is an error.
44793   #
44794   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44795   # It is also a way to make sure we got the proper file name for the real test later on.
44796   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44797   if test "x$test_shortpath" = x; then
44798     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44799 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44800     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44801   fi
44802 
44803   # Call helper function which possibly converts this using DOS-style short mode.
44804   # If so, the updated path is stored in $new_path.
44805 
44806   input_path="$new_path"
44807   # Check if we need to convert this using DOS-style short mode. If the path
44808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44809   # take no chances and rewrite it.
44810   # Note: m4 eats our [], so we need to use [ and ] instead.
44811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44812   if test "x$has_forbidden_chars" != x; then
44813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44817       # Going to short mode and back again did indeed matter. Since short mode is
44818       # case insensitive, let's make it lowercase to improve readability.
44819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44820       # Now convert it back to Unix-style (cygpath)
44821       input_path=`$CYGPATH -u "$shortmode_path"`
44822       new_path="$input_path"
44823     fi
44824   fi
44825 
44826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44827   if test "x$test_cygdrive_prefix" = x; then
44828     # As a simple fix, exclude /usr/bin since it's not a real path.
44829     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44831       # a path prefixed by /cygdrive for fixpath to work.
44832       new_path="$CYGWIN_ROOT_PATH$input_path"
44833     fi
44834   fi
44835 
44836 
44837   if test "x$path" != "x$new_path"; then
44838     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44840 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44841   fi
44842 
44843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844 
44845   path="$POTENTIAL_FREETYPE_LIB_PATH"
44846   has_colon=`$ECHO $path | $GREP ^.:`
44847   new_path="$path"
44848   if test "x$has_colon" = x; then
44849     # Not in mixed or Windows style, start by that.
44850     new_path=`cmd //c echo $path`
44851   fi
44852 
44853 
44854   input_path="$new_path"
44855   # Check if we need to convert this using DOS-style short mode. If the path
44856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44857   # take no chances and rewrite it.
44858   # Note: m4 eats our [], so we need to use [ and ] instead.
44859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44860   if test "x$has_forbidden_chars" != x; then
44861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44863   fi
44864 
44865 
44866   windows_path="$new_path"
44867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44868     unix_path=`$CYGPATH -u "$windows_path"`
44869     new_path="$unix_path"
44870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44872     new_path="$unix_path"
44873   fi
44874 
44875   if test "x$path" != "x$new_path"; then
44876     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44878 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44879   fi
44880 
44881   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44882   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44883 
44884   else
44885     # We're on a posix platform. Hooray! :)
44886     path="$POTENTIAL_FREETYPE_LIB_PATH"
44887     has_space=`$ECHO "$path" | $GREP " "`
44888     if test "x$has_space" != x; then
44889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44890 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44891       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44892     fi
44893 
44894     # Use eval to expand a potential ~
44895     eval path="$path"
44896     if test ! -f "$path" && test ! -d "$path"; then
44897       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44898     fi
44899 
44900     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44901   fi
44902 
44903 
44904     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44905     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44906 $as_echo_n "checking for freetype includes... " >&6; }
44907     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44908 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44909     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44910     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44911 $as_echo_n "checking for freetype libraries... " >&6; }
44912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44913 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44914   fi
44915 
44916           fi
44917         else
44918           FREETYPE_BASE_DIR="$SYSROOT/usr"
44919 
44920   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44921   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44922   METHOD="well-known location"
44923 
44924   # First check if the files exists.
44925   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44926     # We found an arbitrary include file. That's a good sign.
44927     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44928 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44929     FOUND_FREETYPE=yes
44930 
44931     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44932     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44933       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44934 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44935       FOUND_FREETYPE=no
44936     else
44937       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44938         # On Windows, we will need both .lib and .dll file.
44939         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44940           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44941 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44942           FOUND_FREETYPE=no
44943         fi
44944       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
44945         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44946         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44947       fi
44948     fi
44949   fi
44950 
44951   if test "x$FOUND_FREETYPE" = xyes; then
44952 
44953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44954 
44955   # Input might be given as Windows format, start by converting to
44956   # unix format.
44957   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44958   new_path=`$CYGPATH -u "$path"`
44959 
44960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44963   # "foo.exe" is OK but "foo" is an error.
44964   #
44965   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44966   # It is also a way to make sure we got the proper file name for the real test later on.
44967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44968   if test "x$test_shortpath" = x; then
44969     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44970 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44971     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44972   fi
44973 
44974   # Call helper function which possibly converts this using DOS-style short mode.
44975   # If so, the updated path is stored in $new_path.
44976 
44977   input_path="$new_path"
44978   # Check if we need to convert this using DOS-style short mode. If the path
44979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44980   # take no chances and rewrite it.
44981   # Note: m4 eats our [], so we need to use [ and ] instead.
44982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44983   if test "x$has_forbidden_chars" != x; then
44984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44985     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44986     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44987     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44988       # Going to short mode and back again did indeed matter. Since short mode is
44989       # case insensitive, let's make it lowercase to improve readability.
44990       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44991       # Now convert it back to Unix-style (cygpath)
44992       input_path=`$CYGPATH -u "$shortmode_path"`
44993       new_path="$input_path"
44994     fi
44995   fi
44996 
44997   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44998   if test "x$test_cygdrive_prefix" = x; then
44999     # As a simple fix, exclude /usr/bin since it's not a real path.
45000     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45001       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45002       # a path prefixed by /cygdrive for fixpath to work.
45003       new_path="$CYGWIN_ROOT_PATH$input_path"
45004     fi
45005   fi
45006 
45007 
45008   if test "x$path" != "x$new_path"; then
45009     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45011 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45012   fi
45013 
45014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45015 
45016   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45017   has_colon=`$ECHO $path | $GREP ^.:`
45018   new_path="$path"
45019   if test "x$has_colon" = x; then
45020     # Not in mixed or Windows style, start by that.
45021     new_path=`cmd //c echo $path`
45022   fi
45023 
45024 
45025   input_path="$new_path"
45026   # Check if we need to convert this using DOS-style short mode. If the path
45027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45028   # take no chances and rewrite it.
45029   # Note: m4 eats our [], so we need to use [ and ] instead.
45030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45031   if test "x$has_forbidden_chars" != x; then
45032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45034   fi
45035 
45036 
45037   windows_path="$new_path"
45038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45039     unix_path=`$CYGPATH -u "$windows_path"`
45040     new_path="$unix_path"
45041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45043     new_path="$unix_path"
45044   fi
45045 
45046   if test "x$path" != "x$new_path"; then
45047     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45048     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45049 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45050   fi
45051 
45052   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45053   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45054 
45055   else
45056     # We're on a posix platform. Hooray! :)
45057     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45058     has_space=`$ECHO "$path" | $GREP " "`
45059     if test "x$has_space" != x; then
45060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45061 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45062       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45063     fi
45064 
45065     # Use eval to expand a potential ~
45066     eval path="$path"
45067     if test ! -f "$path" && test ! -d "$path"; then
45068       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45069     fi
45070 
45071     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45072   fi
45073 
45074 
45075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45076 
45077   # Input might be given as Windows format, start by converting to
45078   # unix format.
45079   path="$POTENTIAL_FREETYPE_LIB_PATH"
45080   new_path=`$CYGPATH -u "$path"`
45081 
45082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45085   # "foo.exe" is OK but "foo" is an error.
45086   #
45087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45088   # It is also a way to make sure we got the proper file name for the real test later on.
45089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45090   if test "x$test_shortpath" = x; then
45091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45092 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45093     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45094   fi
45095 
45096   # Call helper function which possibly converts this using DOS-style short mode.
45097   # If so, the updated path is stored in $new_path.
45098 
45099   input_path="$new_path"
45100   # Check if we need to convert this using DOS-style short mode. If the path
45101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45102   # take no chances and rewrite it.
45103   # Note: m4 eats our [], so we need to use [ and ] instead.
45104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45105   if test "x$has_forbidden_chars" != x; then
45106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45110       # Going to short mode and back again did indeed matter. Since short mode is
45111       # case insensitive, let's make it lowercase to improve readability.
45112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45113       # Now convert it back to Unix-style (cygpath)
45114       input_path=`$CYGPATH -u "$shortmode_path"`
45115       new_path="$input_path"
45116     fi
45117   fi
45118 
45119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45120   if test "x$test_cygdrive_prefix" = x; then
45121     # As a simple fix, exclude /usr/bin since it's not a real path.
45122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45124       # a path prefixed by /cygdrive for fixpath to work.
45125       new_path="$CYGWIN_ROOT_PATH$input_path"
45126     fi
45127   fi
45128 
45129 
45130   if test "x$path" != "x$new_path"; then
45131     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45133 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45134   fi
45135 
45136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137 
45138   path="$POTENTIAL_FREETYPE_LIB_PATH"
45139   has_colon=`$ECHO $path | $GREP ^.:`
45140   new_path="$path"
45141   if test "x$has_colon" = x; then
45142     # Not in mixed or Windows style, start by that.
45143     new_path=`cmd //c echo $path`
45144   fi
45145 
45146 
45147   input_path="$new_path"
45148   # Check if we need to convert this using DOS-style short mode. If the path
45149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45150   # take no chances and rewrite it.
45151   # Note: m4 eats our [], so we need to use [ and ] instead.
45152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45153   if test "x$has_forbidden_chars" != x; then
45154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45156   fi
45157 
45158 
45159   windows_path="$new_path"
45160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45161     unix_path=`$CYGPATH -u "$windows_path"`
45162     new_path="$unix_path"
45163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45165     new_path="$unix_path"
45166   fi
45167 
45168   if test "x$path" != "x$new_path"; then
45169     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45171 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45172   fi
45173 
45174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45176 
45177   else
45178     # We're on a posix platform. Hooray! :)
45179     path="$POTENTIAL_FREETYPE_LIB_PATH"
45180     has_space=`$ECHO "$path" | $GREP " "`
45181     if test "x$has_space" != x; then
45182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45183 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45184       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45185     fi
45186 
45187     # Use eval to expand a potential ~
45188     eval path="$path"
45189     if test ! -f "$path" && test ! -d "$path"; then
45190       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45191     fi
45192 
45193     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45194   fi
45195 
45196 
45197     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45199 $as_echo_n "checking for freetype includes... " >&6; }
45200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45201 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45202     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45204 $as_echo_n "checking for freetype libraries... " >&6; }
45205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45206 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45207   fi
45208 
45209 
45210           if test "x$FOUND_FREETYPE" != xyes; then
45211             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45212 
45213   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45214   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45215   METHOD="well-known location"
45216 
45217   # First check if the files exists.
45218   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45219     # We found an arbitrary include file. That's a good sign.
45220     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45221 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45222     FOUND_FREETYPE=yes
45223 
45224     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45225     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45226       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45227 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45228       FOUND_FREETYPE=no
45229     else
45230       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45231         # On Windows, we will need both .lib and .dll file.
45232         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45233           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45234 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45235           FOUND_FREETYPE=no
45236         fi
45237       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
45238         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45239         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45240       fi
45241     fi
45242   fi
45243 
45244   if test "x$FOUND_FREETYPE" = xyes; then
45245 
45246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45247 
45248   # Input might be given as Windows format, start by converting to
45249   # unix format.
45250   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45251   new_path=`$CYGPATH -u "$path"`
45252 
45253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45256   # "foo.exe" is OK but "foo" is an error.
45257   #
45258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45259   # It is also a way to make sure we got the proper file name for the real test later on.
45260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45261   if test "x$test_shortpath" = x; then
45262     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45263 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45264     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45265   fi
45266 
45267   # Call helper function which possibly converts this using DOS-style short mode.
45268   # If so, the updated path is stored in $new_path.
45269 
45270   input_path="$new_path"
45271   # Check if we need to convert this using DOS-style short mode. If the path
45272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45273   # take no chances and rewrite it.
45274   # Note: m4 eats our [], so we need to use [ and ] instead.
45275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45276   if test "x$has_forbidden_chars" != x; then
45277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45281       # Going to short mode and back again did indeed matter. Since short mode is
45282       # case insensitive, let's make it lowercase to improve readability.
45283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45284       # Now convert it back to Unix-style (cygpath)
45285       input_path=`$CYGPATH -u "$shortmode_path"`
45286       new_path="$input_path"
45287     fi
45288   fi
45289 
45290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45291   if test "x$test_cygdrive_prefix" = x; then
45292     # As a simple fix, exclude /usr/bin since it's not a real path.
45293     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45295       # a path prefixed by /cygdrive for fixpath to work.
45296       new_path="$CYGWIN_ROOT_PATH$input_path"
45297     fi
45298   fi
45299 
45300 
45301   if test "x$path" != "x$new_path"; then
45302     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45304 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45305   fi
45306 
45307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45308 
45309   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45310   has_colon=`$ECHO $path | $GREP ^.:`
45311   new_path="$path"
45312   if test "x$has_colon" = x; then
45313     # Not in mixed or Windows style, start by that.
45314     new_path=`cmd //c echo $path`
45315   fi
45316 
45317 
45318   input_path="$new_path"
45319   # Check if we need to convert this using DOS-style short mode. If the path
45320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45321   # take no chances and rewrite it.
45322   # Note: m4 eats our [], so we need to use [ and ] instead.
45323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45324   if test "x$has_forbidden_chars" != x; then
45325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45327   fi
45328 
45329 
45330   windows_path="$new_path"
45331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45332     unix_path=`$CYGPATH -u "$windows_path"`
45333     new_path="$unix_path"
45334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45336     new_path="$unix_path"
45337   fi
45338 
45339   if test "x$path" != "x$new_path"; then
45340     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45342 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45343   fi
45344 
45345   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45346   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45347 
45348   else
45349     # We're on a posix platform. Hooray! :)
45350     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45351     has_space=`$ECHO "$path" | $GREP " "`
45352     if test "x$has_space" != x; then
45353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45354 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45355       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45356     fi
45357 
45358     # Use eval to expand a potential ~
45359     eval path="$path"
45360     if test ! -f "$path" && test ! -d "$path"; then
45361       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45362     fi
45363 
45364     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45365   fi
45366 
45367 
45368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45369 
45370   # Input might be given as Windows format, start by converting to
45371   # unix format.
45372   path="$POTENTIAL_FREETYPE_LIB_PATH"
45373   new_path=`$CYGPATH -u "$path"`
45374 
45375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45378   # "foo.exe" is OK but "foo" is an error.
45379   #
45380   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45381   # It is also a way to make sure we got the proper file name for the real test later on.
45382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45383   if test "x$test_shortpath" = x; then
45384     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45385 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45386     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45387   fi
45388 
45389   # Call helper function which possibly converts this using DOS-style short mode.
45390   # If so, the updated path is stored in $new_path.
45391 
45392   input_path="$new_path"
45393   # Check if we need to convert this using DOS-style short mode. If the path
45394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45395   # take no chances and rewrite it.
45396   # Note: m4 eats our [], so we need to use [ and ] instead.
45397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45398   if test "x$has_forbidden_chars" != x; then
45399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45400     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45401     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45402     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45403       # Going to short mode and back again did indeed matter. Since short mode is
45404       # case insensitive, let's make it lowercase to improve readability.
45405       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45406       # Now convert it back to Unix-style (cygpath)
45407       input_path=`$CYGPATH -u "$shortmode_path"`
45408       new_path="$input_path"
45409     fi
45410   fi
45411 
45412   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45413   if test "x$test_cygdrive_prefix" = x; then
45414     # As a simple fix, exclude /usr/bin since it's not a real path.
45415     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45416       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45417       # a path prefixed by /cygdrive for fixpath to work.
45418       new_path="$CYGWIN_ROOT_PATH$input_path"
45419     fi
45420   fi
45421 
45422 
45423   if test "x$path" != "x$new_path"; then
45424     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45426 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45427   fi
45428 
45429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45430 
45431   path="$POTENTIAL_FREETYPE_LIB_PATH"
45432   has_colon=`$ECHO $path | $GREP ^.:`
45433   new_path="$path"
45434   if test "x$has_colon" = x; then
45435     # Not in mixed or Windows style, start by that.
45436     new_path=`cmd //c echo $path`
45437   fi
45438 
45439 
45440   input_path="$new_path"
45441   # Check if we need to convert this using DOS-style short mode. If the path
45442   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45443   # take no chances and rewrite it.
45444   # Note: m4 eats our [], so we need to use [ and ] instead.
45445   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45446   if test "x$has_forbidden_chars" != x; then
45447     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45448     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45449   fi
45450 
45451 
45452   windows_path="$new_path"
45453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45454     unix_path=`$CYGPATH -u "$windows_path"`
45455     new_path="$unix_path"
45456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45458     new_path="$unix_path"
45459   fi
45460 
45461   if test "x$path" != "x$new_path"; then
45462     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45463     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45464 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45465   fi
45466 
45467   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45468   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45469 
45470   else
45471     # We're on a posix platform. Hooray! :)
45472     path="$POTENTIAL_FREETYPE_LIB_PATH"
45473     has_space=`$ECHO "$path" | $GREP " "`
45474     if test "x$has_space" != x; then
45475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45476 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45477       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45478     fi
45479 
45480     # Use eval to expand a potential ~
45481     eval path="$path"
45482     if test ! -f "$path" && test ! -d "$path"; then
45483       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45484     fi
45485 
45486     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45487   fi
45488 
45489 
45490     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45492 $as_echo_n "checking for freetype includes... " >&6; }
45493     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45494 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45495     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45497 $as_echo_n "checking for freetype libraries... " >&6; }
45498     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45499 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45500   fi
45501 
45502           fi
45503 
45504           if test "x$FOUND_FREETYPE" != xyes; then
45505             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45506 
45507   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45508   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45509   METHOD="well-known location"
45510 
45511   # First check if the files exists.
45512   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45513     # We found an arbitrary include file. That's a good sign.
45514     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45515 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45516     FOUND_FREETYPE=yes
45517 
45518     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45519     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45520       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45521 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45522       FOUND_FREETYPE=no
45523     else
45524       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45525         # On Windows, we will need both .lib and .dll file.
45526         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45527           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45528 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45529           FOUND_FREETYPE=no
45530         fi
45531       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
45532         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45533         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45534       fi
45535     fi
45536   fi
45537 
45538   if test "x$FOUND_FREETYPE" = xyes; then
45539 
45540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45541 
45542   # Input might be given as Windows format, start by converting to
45543   # unix format.
45544   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45545   new_path=`$CYGPATH -u "$path"`
45546 
45547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45550   # "foo.exe" is OK but "foo" is an error.
45551   #
45552   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45553   # It is also a way to make sure we got the proper file name for the real test later on.
45554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45555   if test "x$test_shortpath" = x; then
45556     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45557 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45558     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45559   fi
45560 
45561   # Call helper function which possibly converts this using DOS-style short mode.
45562   # If so, the updated path is stored in $new_path.
45563 
45564   input_path="$new_path"
45565   # Check if we need to convert this using DOS-style short mode. If the path
45566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45567   # take no chances and rewrite it.
45568   # Note: m4 eats our [], so we need to use [ and ] instead.
45569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45570   if test "x$has_forbidden_chars" != x; then
45571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45572     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45573     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45574     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45575       # Going to short mode and back again did indeed matter. Since short mode is
45576       # case insensitive, let's make it lowercase to improve readability.
45577       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45578       # Now convert it back to Unix-style (cygpath)
45579       input_path=`$CYGPATH -u "$shortmode_path"`
45580       new_path="$input_path"
45581     fi
45582   fi
45583 
45584   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45585   if test "x$test_cygdrive_prefix" = x; then
45586     # As a simple fix, exclude /usr/bin since it's not a real path.
45587     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45588       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45589       # a path prefixed by /cygdrive for fixpath to work.
45590       new_path="$CYGWIN_ROOT_PATH$input_path"
45591     fi
45592   fi
45593 
45594 
45595   if test "x$path" != "x$new_path"; then
45596     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45598 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45599   fi
45600 
45601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45602 
45603   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45604   has_colon=`$ECHO $path | $GREP ^.:`
45605   new_path="$path"
45606   if test "x$has_colon" = x; then
45607     # Not in mixed or Windows style, start by that.
45608     new_path=`cmd //c echo $path`
45609   fi
45610 
45611 
45612   input_path="$new_path"
45613   # Check if we need to convert this using DOS-style short mode. If the path
45614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45615   # take no chances and rewrite it.
45616   # Note: m4 eats our [], so we need to use [ and ] instead.
45617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45618   if test "x$has_forbidden_chars" != x; then
45619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45621   fi
45622 
45623 
45624   windows_path="$new_path"
45625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45626     unix_path=`$CYGPATH -u "$windows_path"`
45627     new_path="$unix_path"
45628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45630     new_path="$unix_path"
45631   fi
45632 
45633   if test "x$path" != "x$new_path"; then
45634     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45636 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45637   fi
45638 
45639   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45640   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45641 
45642   else
45643     # We're on a posix platform. Hooray! :)
45644     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45645     has_space=`$ECHO "$path" | $GREP " "`
45646     if test "x$has_space" != x; then
45647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45648 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45649       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45650     fi
45651 
45652     # Use eval to expand a potential ~
45653     eval path="$path"
45654     if test ! -f "$path" && test ! -d "$path"; then
45655       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45656     fi
45657 
45658     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45659   fi
45660 
45661 
45662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45663 
45664   # Input might be given as Windows format, start by converting to
45665   # unix format.
45666   path="$POTENTIAL_FREETYPE_LIB_PATH"
45667   new_path=`$CYGPATH -u "$path"`
45668 
45669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45672   # "foo.exe" is OK but "foo" is an error.
45673   #
45674   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45675   # It is also a way to make sure we got the proper file name for the real test later on.
45676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45677   if test "x$test_shortpath" = x; then
45678     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45679 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45680     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45681   fi
45682 
45683   # Call helper function which possibly converts this using DOS-style short mode.
45684   # If so, the updated path is stored in $new_path.
45685 
45686   input_path="$new_path"
45687   # Check if we need to convert this using DOS-style short mode. If the path
45688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45689   # take no chances and rewrite it.
45690   # Note: m4 eats our [], so we need to use [ and ] instead.
45691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45692   if test "x$has_forbidden_chars" != x; then
45693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45697       # Going to short mode and back again did indeed matter. Since short mode is
45698       # case insensitive, let's make it lowercase to improve readability.
45699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45700       # Now convert it back to Unix-style (cygpath)
45701       input_path=`$CYGPATH -u "$shortmode_path"`
45702       new_path="$input_path"
45703     fi
45704   fi
45705 
45706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45707   if test "x$test_cygdrive_prefix" = x; then
45708     # As a simple fix, exclude /usr/bin since it's not a real path.
45709     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45711       # a path prefixed by /cygdrive for fixpath to work.
45712       new_path="$CYGWIN_ROOT_PATH$input_path"
45713     fi
45714   fi
45715 
45716 
45717   if test "x$path" != "x$new_path"; then
45718     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45720 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45721   fi
45722 
45723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45724 
45725   path="$POTENTIAL_FREETYPE_LIB_PATH"
45726   has_colon=`$ECHO $path | $GREP ^.:`
45727   new_path="$path"
45728   if test "x$has_colon" = x; then
45729     # Not in mixed or Windows style, start by that.
45730     new_path=`cmd //c echo $path`
45731   fi
45732 
45733 
45734   input_path="$new_path"
45735   # Check if we need to convert this using DOS-style short mode. If the path
45736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45737   # take no chances and rewrite it.
45738   # Note: m4 eats our [], so we need to use [ and ] instead.
45739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45740   if test "x$has_forbidden_chars" != x; then
45741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45743   fi
45744 
45745 
45746   windows_path="$new_path"
45747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45748     unix_path=`$CYGPATH -u "$windows_path"`
45749     new_path="$unix_path"
45750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45752     new_path="$unix_path"
45753   fi
45754 
45755   if test "x$path" != "x$new_path"; then
45756     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45758 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45759   fi
45760 
45761   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45762   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45763 
45764   else
45765     # We're on a posix platform. Hooray! :)
45766     path="$POTENTIAL_FREETYPE_LIB_PATH"
45767     has_space=`$ECHO "$path" | $GREP " "`
45768     if test "x$has_space" != x; then
45769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45770 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45771       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45772     fi
45773 
45774     # Use eval to expand a potential ~
45775     eval path="$path"
45776     if test ! -f "$path" && test ! -d "$path"; then
45777       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45778     fi
45779 
45780     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45781   fi
45782 
45783 
45784     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45785     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45786 $as_echo_n "checking for freetype includes... " >&6; }
45787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45788 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45789     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45791 $as_echo_n "checking for freetype libraries... " >&6; }
45792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45793 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45794   fi
45795 
45796           fi
45797 
45798           if test "x$FOUND_FREETYPE" != xyes; then
45799             FREETYPE_BASE_DIR="$SYSROOT/usr"
45800             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45801 
45802   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45803   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45804   METHOD="well-known location"
45805 
45806   # First check if the files exists.
45807   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45808     # We found an arbitrary include file. That's a good sign.
45809     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45810 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45811     FOUND_FREETYPE=yes
45812 
45813     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45814     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45815       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45816 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45817       FOUND_FREETYPE=no
45818     else
45819       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45820         # On Windows, we will need both .lib and .dll file.
45821         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45822           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45823 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45824           FOUND_FREETYPE=no
45825         fi
45826       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
45827         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45828         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45829       fi
45830     fi
45831   fi
45832 
45833   if test "x$FOUND_FREETYPE" = xyes; then
45834 
45835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45836 
45837   # Input might be given as Windows format, start by converting to
45838   # unix format.
45839   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45840   new_path=`$CYGPATH -u "$path"`
45841 
45842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45845   # "foo.exe" is OK but "foo" is an error.
45846   #
45847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45848   # It is also a way to make sure we got the proper file name for the real test later on.
45849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45850   if test "x$test_shortpath" = x; then
45851     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45852 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45853     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45854   fi
45855 
45856   # Call helper function which possibly converts this using DOS-style short mode.
45857   # If so, the updated path is stored in $new_path.
45858 
45859   input_path="$new_path"
45860   # Check if we need to convert this using DOS-style short mode. If the path
45861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45862   # take no chances and rewrite it.
45863   # Note: m4 eats our [], so we need to use [ and ] instead.
45864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45865   if test "x$has_forbidden_chars" != x; then
45866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45870       # Going to short mode and back again did indeed matter. Since short mode is
45871       # case insensitive, let's make it lowercase to improve readability.
45872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45873       # Now convert it back to Unix-style (cygpath)
45874       input_path=`$CYGPATH -u "$shortmode_path"`
45875       new_path="$input_path"
45876     fi
45877   fi
45878 
45879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45880   if test "x$test_cygdrive_prefix" = x; then
45881     # As a simple fix, exclude /usr/bin since it's not a real path.
45882     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45884       # a path prefixed by /cygdrive for fixpath to work.
45885       new_path="$CYGWIN_ROOT_PATH$input_path"
45886     fi
45887   fi
45888 
45889 
45890   if test "x$path" != "x$new_path"; then
45891     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45894   fi
45895 
45896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45897 
45898   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45899   has_colon=`$ECHO $path | $GREP ^.:`
45900   new_path="$path"
45901   if test "x$has_colon" = x; then
45902     # Not in mixed or Windows style, start by that.
45903     new_path=`cmd //c echo $path`
45904   fi
45905 
45906 
45907   input_path="$new_path"
45908   # Check if we need to convert this using DOS-style short mode. If the path
45909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45910   # take no chances and rewrite it.
45911   # Note: m4 eats our [], so we need to use [ and ] instead.
45912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45913   if test "x$has_forbidden_chars" != x; then
45914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45915     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45916   fi
45917 
45918 
45919   windows_path="$new_path"
45920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45921     unix_path=`$CYGPATH -u "$windows_path"`
45922     new_path="$unix_path"
45923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45925     new_path="$unix_path"
45926   fi
45927 
45928   if test "x$path" != "x$new_path"; then
45929     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45931 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45932   fi
45933 
45934   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45935   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45936 
45937   else
45938     # We're on a posix platform. Hooray! :)
45939     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45940     has_space=`$ECHO "$path" | $GREP " "`
45941     if test "x$has_space" != x; then
45942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45943 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45944       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45945     fi
45946 
45947     # Use eval to expand a potential ~
45948     eval path="$path"
45949     if test ! -f "$path" && test ! -d "$path"; then
45950       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45951     fi
45952 
45953     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45954   fi
45955 
45956 
45957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45958 
45959   # Input might be given as Windows format, start by converting to
45960   # unix format.
45961   path="$POTENTIAL_FREETYPE_LIB_PATH"
45962   new_path=`$CYGPATH -u "$path"`
45963 
45964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45967   # "foo.exe" is OK but "foo" is an error.
45968   #
45969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45970   # It is also a way to make sure we got the proper file name for the real test later on.
45971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45972   if test "x$test_shortpath" = x; then
45973     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45974 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45975     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45976   fi
45977 
45978   # Call helper function which possibly converts this using DOS-style short mode.
45979   # If so, the updated path is stored in $new_path.
45980 
45981   input_path="$new_path"
45982   # Check if we need to convert this using DOS-style short mode. If the path
45983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45984   # take no chances and rewrite it.
45985   # Note: m4 eats our [], so we need to use [ and ] instead.
45986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45987   if test "x$has_forbidden_chars" != x; then
45988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45992       # Going to short mode and back again did indeed matter. Since short mode is
45993       # case insensitive, let's make it lowercase to improve readability.
45994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45995       # Now convert it back to Unix-style (cygpath)
45996       input_path=`$CYGPATH -u "$shortmode_path"`
45997       new_path="$input_path"
45998     fi
45999   fi
46000 
46001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46002   if test "x$test_cygdrive_prefix" = x; then
46003     # As a simple fix, exclude /usr/bin since it's not a real path.
46004     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46006       # a path prefixed by /cygdrive for fixpath to work.
46007       new_path="$CYGWIN_ROOT_PATH$input_path"
46008     fi
46009   fi
46010 
46011 
46012   if test "x$path" != "x$new_path"; then
46013     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46014     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46015 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46016   fi
46017 
46018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46019 
46020   path="$POTENTIAL_FREETYPE_LIB_PATH"
46021   has_colon=`$ECHO $path | $GREP ^.:`
46022   new_path="$path"
46023   if test "x$has_colon" = x; then
46024     # Not in mixed or Windows style, start by that.
46025     new_path=`cmd //c echo $path`
46026   fi
46027 
46028 
46029   input_path="$new_path"
46030   # Check if we need to convert this using DOS-style short mode. If the path
46031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46032   # take no chances and rewrite it.
46033   # Note: m4 eats our [], so we need to use [ and ] instead.
46034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46035   if test "x$has_forbidden_chars" != x; then
46036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46037     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46038   fi
46039 
46040 
46041   windows_path="$new_path"
46042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46043     unix_path=`$CYGPATH -u "$windows_path"`
46044     new_path="$unix_path"
46045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46047     new_path="$unix_path"
46048   fi
46049 
46050   if test "x$path" != "x$new_path"; then
46051     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46053 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46054   fi
46055 
46056   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46057   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46058 
46059   else
46060     # We're on a posix platform. Hooray! :)
46061     path="$POTENTIAL_FREETYPE_LIB_PATH"
46062     has_space=`$ECHO "$path" | $GREP " "`
46063     if test "x$has_space" != x; then
46064       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46065 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46066       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46067     fi
46068 
46069     # Use eval to expand a potential ~
46070     eval path="$path"
46071     if test ! -f "$path" && test ! -d "$path"; then
46072       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46073     fi
46074 
46075     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46076   fi
46077 
46078 
46079     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46081 $as_echo_n "checking for freetype includes... " >&6; }
46082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46083 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46084     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46086 $as_echo_n "checking for freetype libraries... " >&6; }
46087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46088 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46089   fi
46090 
46091             else
46092 
46093   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46094   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46095   METHOD="well-known location"
46096 
46097   # First check if the files exists.
46098   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46099     # We found an arbitrary include file. That's a good sign.
46100     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46101 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46102     FOUND_FREETYPE=yes
46103 
46104     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46105     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46106       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46107 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46108       FOUND_FREETYPE=no
46109     else
46110       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46111         # On Windows, we will need both .lib and .dll file.
46112         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46113           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46114 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46115           FOUND_FREETYPE=no
46116         fi
46117       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
46118         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46119         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46120       fi
46121     fi
46122   fi
46123 
46124   if test "x$FOUND_FREETYPE" = xyes; then
46125 
46126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46127 
46128   # Input might be given as Windows format, start by converting to
46129   # unix format.
46130   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46131   new_path=`$CYGPATH -u "$path"`
46132 
46133   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46134   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46135   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46136   # "foo.exe" is OK but "foo" is an error.
46137   #
46138   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46139   # It is also a way to make sure we got the proper file name for the real test later on.
46140   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46141   if test "x$test_shortpath" = x; then
46142     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46143 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46144     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46145   fi
46146 
46147   # Call helper function which possibly converts this using DOS-style short mode.
46148   # If so, the updated path is stored in $new_path.
46149 
46150   input_path="$new_path"
46151   # Check if we need to convert this using DOS-style short mode. If the path
46152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46153   # take no chances and rewrite it.
46154   # Note: m4 eats our [], so we need to use [ and ] instead.
46155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46156   if test "x$has_forbidden_chars" != x; then
46157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46158     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46159     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46160     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46161       # Going to short mode and back again did indeed matter. Since short mode is
46162       # case insensitive, let's make it lowercase to improve readability.
46163       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46164       # Now convert it back to Unix-style (cygpath)
46165       input_path=`$CYGPATH -u "$shortmode_path"`
46166       new_path="$input_path"
46167     fi
46168   fi
46169 
46170   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46171   if test "x$test_cygdrive_prefix" = x; then
46172     # As a simple fix, exclude /usr/bin since it's not a real path.
46173     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46174       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46175       # a path prefixed by /cygdrive for fixpath to work.
46176       new_path="$CYGWIN_ROOT_PATH$input_path"
46177     fi
46178   fi
46179 
46180 
46181   if test "x$path" != "x$new_path"; then
46182     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46184 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46185   fi
46186 
46187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46188 
46189   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46190   has_colon=`$ECHO $path | $GREP ^.:`
46191   new_path="$path"
46192   if test "x$has_colon" = x; then
46193     # Not in mixed or Windows style, start by that.
46194     new_path=`cmd //c echo $path`
46195   fi
46196 
46197 
46198   input_path="$new_path"
46199   # Check if we need to convert this using DOS-style short mode. If the path
46200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46201   # take no chances and rewrite it.
46202   # Note: m4 eats our [], so we need to use [ and ] instead.
46203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46204   if test "x$has_forbidden_chars" != x; then
46205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46206     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46207   fi
46208 
46209 
46210   windows_path="$new_path"
46211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46212     unix_path=`$CYGPATH -u "$windows_path"`
46213     new_path="$unix_path"
46214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46216     new_path="$unix_path"
46217   fi
46218 
46219   if test "x$path" != "x$new_path"; then
46220     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46221     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46222 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46223   fi
46224 
46225   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46226   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46227 
46228   else
46229     # We're on a posix platform. Hooray! :)
46230     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46231     has_space=`$ECHO "$path" | $GREP " "`
46232     if test "x$has_space" != x; then
46233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46234 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46235       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46236     fi
46237 
46238     # Use eval to expand a potential ~
46239     eval path="$path"
46240     if test ! -f "$path" && test ! -d "$path"; then
46241       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46242     fi
46243 
46244     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46245   fi
46246 
46247 
46248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46249 
46250   # Input might be given as Windows format, start by converting to
46251   # unix format.
46252   path="$POTENTIAL_FREETYPE_LIB_PATH"
46253   new_path=`$CYGPATH -u "$path"`
46254 
46255   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46256   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46257   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46258   # "foo.exe" is OK but "foo" is an error.
46259   #
46260   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46261   # It is also a way to make sure we got the proper file name for the real test later on.
46262   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46263   if test "x$test_shortpath" = x; then
46264     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46265 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46266     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46267   fi
46268 
46269   # Call helper function which possibly converts this using DOS-style short mode.
46270   # If so, the updated path is stored in $new_path.
46271 
46272   input_path="$new_path"
46273   # Check if we need to convert this using DOS-style short mode. If the path
46274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46275   # take no chances and rewrite it.
46276   # Note: m4 eats our [], so we need to use [ and ] instead.
46277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46278   if test "x$has_forbidden_chars" != x; then
46279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46283       # Going to short mode and back again did indeed matter. Since short mode is
46284       # case insensitive, let's make it lowercase to improve readability.
46285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46286       # Now convert it back to Unix-style (cygpath)
46287       input_path=`$CYGPATH -u "$shortmode_path"`
46288       new_path="$input_path"
46289     fi
46290   fi
46291 
46292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46293   if test "x$test_cygdrive_prefix" = x; then
46294     # As a simple fix, exclude /usr/bin since it's not a real path.
46295     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46297       # a path prefixed by /cygdrive for fixpath to work.
46298       new_path="$CYGWIN_ROOT_PATH$input_path"
46299     fi
46300   fi
46301 
46302 
46303   if test "x$path" != "x$new_path"; then
46304     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46305     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46306 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46307   fi
46308 
46309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310 
46311   path="$POTENTIAL_FREETYPE_LIB_PATH"
46312   has_colon=`$ECHO $path | $GREP ^.:`
46313   new_path="$path"
46314   if test "x$has_colon" = x; then
46315     # Not in mixed or Windows style, start by that.
46316     new_path=`cmd //c echo $path`
46317   fi
46318 
46319 
46320   input_path="$new_path"
46321   # Check if we need to convert this using DOS-style short mode. If the path
46322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46323   # take no chances and rewrite it.
46324   # Note: m4 eats our [], so we need to use [ and ] instead.
46325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46326   if test "x$has_forbidden_chars" != x; then
46327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46328     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46329   fi
46330 
46331 
46332   windows_path="$new_path"
46333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334     unix_path=`$CYGPATH -u "$windows_path"`
46335     new_path="$unix_path"
46336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46338     new_path="$unix_path"
46339   fi
46340 
46341   if test "x$path" != "x$new_path"; then
46342     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46343     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46344 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46345   fi
46346 
46347   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46348   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46349 
46350   else
46351     # We're on a posix platform. Hooray! :)
46352     path="$POTENTIAL_FREETYPE_LIB_PATH"
46353     has_space=`$ECHO "$path" | $GREP " "`
46354     if test "x$has_space" != x; then
46355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46356 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46357       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46358     fi
46359 
46360     # Use eval to expand a potential ~
46361     eval path="$path"
46362     if test ! -f "$path" && test ! -d "$path"; then
46363       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46364     fi
46365 
46366     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46367   fi
46368 
46369 
46370     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46372 $as_echo_n "checking for freetype includes... " >&6; }
46373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46374 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46375     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46377 $as_echo_n "checking for freetype libraries... " >&6; }
46378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46379 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46380   fi
46381 
46382               if test "x$FOUND_FREETYPE" != xyes; then
46383 
46384   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46385   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46386   METHOD="well-known location"
46387 
46388   # First check if the files exists.
46389   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46390     # We found an arbitrary include file. That's a good sign.
46391     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46392 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46393     FOUND_FREETYPE=yes
46394 
46395     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46396     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46397       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46398 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46399       FOUND_FREETYPE=no
46400     else
46401       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46402         # On Windows, we will need both .lib and .dll file.
46403         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46404           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46405 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46406           FOUND_FREETYPE=no
46407         fi
46408       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
46409         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46410         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46411       fi
46412     fi
46413   fi
46414 
46415   if test "x$FOUND_FREETYPE" = xyes; then
46416 
46417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46418 
46419   # Input might be given as Windows format, start by converting to
46420   # unix format.
46421   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46422   new_path=`$CYGPATH -u "$path"`
46423 
46424   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46425   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46426   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46427   # "foo.exe" is OK but "foo" is an error.
46428   #
46429   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46430   # It is also a way to make sure we got the proper file name for the real test later on.
46431   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46432   if test "x$test_shortpath" = x; then
46433     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46434 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46435     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46436   fi
46437 
46438   # Call helper function which possibly converts this using DOS-style short mode.
46439   # If so, the updated path is stored in $new_path.
46440 
46441   input_path="$new_path"
46442   # Check if we need to convert this using DOS-style short mode. If the path
46443   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46444   # take no chances and rewrite it.
46445   # Note: m4 eats our [], so we need to use [ and ] instead.
46446   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46447   if test "x$has_forbidden_chars" != x; then
46448     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46449     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46450     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46451     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46452       # Going to short mode and back again did indeed matter. Since short mode is
46453       # case insensitive, let's make it lowercase to improve readability.
46454       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46455       # Now convert it back to Unix-style (cygpath)
46456       input_path=`$CYGPATH -u "$shortmode_path"`
46457       new_path="$input_path"
46458     fi
46459   fi
46460 
46461   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46462   if test "x$test_cygdrive_prefix" = x; then
46463     # As a simple fix, exclude /usr/bin since it's not a real path.
46464     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46465       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46466       # a path prefixed by /cygdrive for fixpath to work.
46467       new_path="$CYGWIN_ROOT_PATH$input_path"
46468     fi
46469   fi
46470 
46471 
46472   if test "x$path" != "x$new_path"; then
46473     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46474     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46475 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46476   fi
46477 
46478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46479 
46480   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46481   has_colon=`$ECHO $path | $GREP ^.:`
46482   new_path="$path"
46483   if test "x$has_colon" = x; then
46484     # Not in mixed or Windows style, start by that.
46485     new_path=`cmd //c echo $path`
46486   fi
46487 
46488 
46489   input_path="$new_path"
46490   # Check if we need to convert this using DOS-style short mode. If the path
46491   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46492   # take no chances and rewrite it.
46493   # Note: m4 eats our [], so we need to use [ and ] instead.
46494   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46495   if test "x$has_forbidden_chars" != x; then
46496     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46497     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46498   fi
46499 
46500 
46501   windows_path="$new_path"
46502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46503     unix_path=`$CYGPATH -u "$windows_path"`
46504     new_path="$unix_path"
46505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46507     new_path="$unix_path"
46508   fi
46509 
46510   if test "x$path" != "x$new_path"; then
46511     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46513 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46514   fi
46515 
46516   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46517   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46518 
46519   else
46520     # We're on a posix platform. Hooray! :)
46521     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46522     has_space=`$ECHO "$path" | $GREP " "`
46523     if test "x$has_space" != x; then
46524       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46525 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46526       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46527     fi
46528 
46529     # Use eval to expand a potential ~
46530     eval path="$path"
46531     if test ! -f "$path" && test ! -d "$path"; then
46532       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46533     fi
46534 
46535     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46536   fi
46537 
46538 
46539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46540 
46541   # Input might be given as Windows format, start by converting to
46542   # unix format.
46543   path="$POTENTIAL_FREETYPE_LIB_PATH"
46544   new_path=`$CYGPATH -u "$path"`
46545 
46546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46549   # "foo.exe" is OK but "foo" is an error.
46550   #
46551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46552   # It is also a way to make sure we got the proper file name for the real test later on.
46553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46554   if test "x$test_shortpath" = x; then
46555     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46556 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46557     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46558   fi
46559 
46560   # Call helper function which possibly converts this using DOS-style short mode.
46561   # If so, the updated path is stored in $new_path.
46562 
46563   input_path="$new_path"
46564   # Check if we need to convert this using DOS-style short mode. If the path
46565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46566   # take no chances and rewrite it.
46567   # Note: m4 eats our [], so we need to use [ and ] instead.
46568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46569   if test "x$has_forbidden_chars" != x; then
46570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46574       # Going to short mode and back again did indeed matter. Since short mode is
46575       # case insensitive, let's make it lowercase to improve readability.
46576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46577       # Now convert it back to Unix-style (cygpath)
46578       input_path=`$CYGPATH -u "$shortmode_path"`
46579       new_path="$input_path"
46580     fi
46581   fi
46582 
46583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46584   if test "x$test_cygdrive_prefix" = x; then
46585     # As a simple fix, exclude /usr/bin since it's not a real path.
46586     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46588       # a path prefixed by /cygdrive for fixpath to work.
46589       new_path="$CYGWIN_ROOT_PATH$input_path"
46590     fi
46591   fi
46592 
46593 
46594   if test "x$path" != "x$new_path"; then
46595     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46597 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46598   fi
46599 
46600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46601 
46602   path="$POTENTIAL_FREETYPE_LIB_PATH"
46603   has_colon=`$ECHO $path | $GREP ^.:`
46604   new_path="$path"
46605   if test "x$has_colon" = x; then
46606     # Not in mixed or Windows style, start by that.
46607     new_path=`cmd //c echo $path`
46608   fi
46609 
46610 
46611   input_path="$new_path"
46612   # Check if we need to convert this using DOS-style short mode. If the path
46613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46614   # take no chances and rewrite it.
46615   # Note: m4 eats our [], so we need to use [ and ] instead.
46616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46617   if test "x$has_forbidden_chars" != x; then
46618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46620   fi
46621 
46622 
46623   windows_path="$new_path"
46624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46625     unix_path=`$CYGPATH -u "$windows_path"`
46626     new_path="$unix_path"
46627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46629     new_path="$unix_path"
46630   fi
46631 
46632   if test "x$path" != "x$new_path"; then
46633     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46635 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46636   fi
46637 
46638   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46639   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46640 
46641   else
46642     # We're on a posix platform. Hooray! :)
46643     path="$POTENTIAL_FREETYPE_LIB_PATH"
46644     has_space=`$ECHO "$path" | $GREP " "`
46645     if test "x$has_space" != x; then
46646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46647 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46648       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46649     fi
46650 
46651     # Use eval to expand a potential ~
46652     eval path="$path"
46653     if test ! -f "$path" && test ! -d "$path"; then
46654       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46655     fi
46656 
46657     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46658   fi
46659 
46660 
46661     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46662     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46663 $as_echo_n "checking for freetype includes... " >&6; }
46664     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46665 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46666     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46667     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46668 $as_echo_n "checking for freetype libraries... " >&6; }
46669     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46670 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46671   fi
46672 
46673               fi
46674             fi
46675           fi
46676         fi
46677       fi # end check in well-known locations
46678 
46679       if test "x$FOUND_FREETYPE" != xyes; then
46680 
46681   # Print a helpful message on how to acquire the necessary build dependency.
46682   # freetype is the help tag: freetype, cups, pulse, alsa etc
46683   MISSING_DEPENDENCY=freetype
46684 
46685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46686     cygwin_help $MISSING_DEPENDENCY
46687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46688     msys_help $MISSING_DEPENDENCY
46689   else
46690     PKGHANDLER_COMMAND=
46691 
46692     case $PKGHANDLER in
46693       apt-get)
46694         apt_help     $MISSING_DEPENDENCY ;;
46695       yum)
46696         yum_help     $MISSING_DEPENDENCY ;;
46697       port)
46698         port_help    $MISSING_DEPENDENCY ;;
46699       pkgutil)
46700         pkgutil_help $MISSING_DEPENDENCY ;;
46701       pkgadd)
46702         pkgadd_help  $MISSING_DEPENDENCY ;;
46703     esac
46704 
46705     if test "x$PKGHANDLER_COMMAND" != x; then
46706       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46707     fi
46708   fi
46709 
46710         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46711       fi
46712     fi # end user specified settings
46713 
46714     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46715     if test "x$FREETYPE_CFLAGS" = x; then
46716 
46717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46718 
46719   # Input might be given as Windows format, start by converting to
46720   # unix format.
46721   path="$FREETYPE_INCLUDE_PATH"
46722   new_path=`$CYGPATH -u "$path"`
46723 
46724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46727   # "foo.exe" is OK but "foo" is an error.
46728   #
46729   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46730   # It is also a way to make sure we got the proper file name for the real test later on.
46731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46732   if test "x$test_shortpath" = x; then
46733     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46734 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46735     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46736   fi
46737 
46738   # Call helper function which possibly converts this using DOS-style short mode.
46739   # If so, the updated path is stored in $new_path.
46740 
46741   input_path="$new_path"
46742   # Check if we need to convert this using DOS-style short mode. If the path
46743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46744   # take no chances and rewrite it.
46745   # Note: m4 eats our [], so we need to use [ and ] instead.
46746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46747   if test "x$has_forbidden_chars" != x; then
46748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46752       # Going to short mode and back again did indeed matter. Since short mode is
46753       # case insensitive, let's make it lowercase to improve readability.
46754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46755       # Now convert it back to Unix-style (cygpath)
46756       input_path=`$CYGPATH -u "$shortmode_path"`
46757       new_path="$input_path"
46758     fi
46759   fi
46760 
46761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46762   if test "x$test_cygdrive_prefix" = x; then
46763     # As a simple fix, exclude /usr/bin since it's not a real path.
46764     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46766       # a path prefixed by /cygdrive for fixpath to work.
46767       new_path="$CYGWIN_ROOT_PATH$input_path"
46768     fi
46769   fi
46770 
46771 
46772   if test "x$path" != "x$new_path"; then
46773     FREETYPE_INCLUDE_PATH="$new_path"
46774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46775 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46776   fi
46777 
46778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46779 
46780   path="$FREETYPE_INCLUDE_PATH"
46781   has_colon=`$ECHO $path | $GREP ^.:`
46782   new_path="$path"
46783   if test "x$has_colon" = x; then
46784     # Not in mixed or Windows style, start by that.
46785     new_path=`cmd //c echo $path`
46786   fi
46787 
46788 
46789   input_path="$new_path"
46790   # Check if we need to convert this using DOS-style short mode. If the path
46791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46792   # take no chances and rewrite it.
46793   # Note: m4 eats our [], so we need to use [ and ] instead.
46794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46795   if test "x$has_forbidden_chars" != x; then
46796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46797     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46798   fi
46799 
46800 
46801   windows_path="$new_path"
46802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46803     unix_path=`$CYGPATH -u "$windows_path"`
46804     new_path="$unix_path"
46805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46807     new_path="$unix_path"
46808   fi
46809 
46810   if test "x$path" != "x$new_path"; then
46811     FREETYPE_INCLUDE_PATH="$new_path"
46812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46813 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46814   fi
46815 
46816   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46817   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46818 
46819   else
46820     # We're on a posix platform. Hooray! :)
46821     path="$FREETYPE_INCLUDE_PATH"
46822     has_space=`$ECHO "$path" | $GREP " "`
46823     if test "x$has_space" != x; then
46824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46825 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46826       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46827     fi
46828 
46829     # Use eval to expand a potential ~
46830     eval path="$path"
46831     if test ! -f "$path" && test ! -d "$path"; then
46832       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46833     fi
46834 
46835     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46836   fi
46837 
46838       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46839         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46840       else
46841         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46842       fi
46843     fi
46844 
46845     if test "x$FREETYPE_LIBS" = x; then
46846 
46847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46848 
46849   # Input might be given as Windows format, start by converting to
46850   # unix format.
46851   path="$FREETYPE_LIB_PATH"
46852   new_path=`$CYGPATH -u "$path"`
46853 
46854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46857   # "foo.exe" is OK but "foo" is an error.
46858   #
46859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46860   # It is also a way to make sure we got the proper file name for the real test later on.
46861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46862   if test "x$test_shortpath" = x; then
46863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46864 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46865     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46866   fi
46867 
46868   # Call helper function which possibly converts this using DOS-style short mode.
46869   # If so, the updated path is stored in $new_path.
46870 
46871   input_path="$new_path"
46872   # Check if we need to convert this using DOS-style short mode. If the path
46873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46874   # take no chances and rewrite it.
46875   # Note: m4 eats our [], so we need to use [ and ] instead.
46876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46877   if test "x$has_forbidden_chars" != x; then
46878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46882       # Going to short mode and back again did indeed matter. Since short mode is
46883       # case insensitive, let's make it lowercase to improve readability.
46884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46885       # Now convert it back to Unix-style (cygpath)
46886       input_path=`$CYGPATH -u "$shortmode_path"`
46887       new_path="$input_path"
46888     fi
46889   fi
46890 
46891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46892   if test "x$test_cygdrive_prefix" = x; then
46893     # As a simple fix, exclude /usr/bin since it's not a real path.
46894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46896       # a path prefixed by /cygdrive for fixpath to work.
46897       new_path="$CYGWIN_ROOT_PATH$input_path"
46898     fi
46899   fi
46900 
46901 
46902   if test "x$path" != "x$new_path"; then
46903     FREETYPE_LIB_PATH="$new_path"
46904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46905 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46906   fi
46907 
46908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46909 
46910   path="$FREETYPE_LIB_PATH"
46911   has_colon=`$ECHO $path | $GREP ^.:`
46912   new_path="$path"
46913   if test "x$has_colon" = x; then
46914     # Not in mixed or Windows style, start by that.
46915     new_path=`cmd //c echo $path`
46916   fi
46917 
46918 
46919   input_path="$new_path"
46920   # Check if we need to convert this using DOS-style short mode. If the path
46921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46922   # take no chances and rewrite it.
46923   # Note: m4 eats our [], so we need to use [ and ] instead.
46924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46925   if test "x$has_forbidden_chars" != x; then
46926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46928   fi
46929 
46930 
46931   windows_path="$new_path"
46932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46933     unix_path=`$CYGPATH -u "$windows_path"`
46934     new_path="$unix_path"
46935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46937     new_path="$unix_path"
46938   fi
46939 
46940   if test "x$path" != "x$new_path"; then
46941     FREETYPE_LIB_PATH="$new_path"
46942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46943 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46944   fi
46945 
46946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46948 
46949   else
46950     # We're on a posix platform. Hooray! :)
46951     path="$FREETYPE_LIB_PATH"
46952     has_space=`$ECHO "$path" | $GREP " "`
46953     if test "x$has_space" != x; then
46954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46955 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46956       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46957     fi
46958 
46959     # Use eval to expand a potential ~
46960     eval path="$path"
46961     if test ! -f "$path" && test ! -d "$path"; then
46962       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46963     fi
46964 
46965     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46966   fi
46967 
46968       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46969         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46970       else
46971         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46972       fi
46973     fi
46974 
46975     # Try to compile it
46976     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46977 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
46978     ac_ext=cpp
46979 ac_cpp='$CXXCPP $CPPFLAGS'
46980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46983 
46984     PREV_CXXCFLAGS="$CXXFLAGS"
46985     PREV_LIBS="$LIBS"
46986     PREV_CXX="$CXX"
46987     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46988     LIBS="$LIBS $FREETYPE_LIBS"
46989     CXX="$FIXPATH $CXX"
46990     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46991 /* end confdefs.h.  */
46992 
46993           #include<ft2build.h>
46994           #include FT_FREETYPE_H
46995           int main () {
46996             FT_Init_FreeType(NULL);
46997             return 0;
46998           }
46999 
47000 _ACEOF
47001 if ac_fn_cxx_try_link "$LINENO"; then :
47002 
47003           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47004 $as_echo "yes" >&6; }
47005 
47006 else
47007 
47008           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47009 $as_echo "no" >&6; }
47010           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47011 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47012           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47013 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47014 
47015 
47016   # Print a helpful message on how to acquire the necessary build dependency.
47017   # freetype is the help tag: freetype, cups, pulse, alsa etc
47018   MISSING_DEPENDENCY=freetype
47019 
47020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47021     cygwin_help $MISSING_DEPENDENCY
47022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47023     msys_help $MISSING_DEPENDENCY
47024   else
47025     PKGHANDLER_COMMAND=
47026 
47027     case $PKGHANDLER in
47028       apt-get)
47029         apt_help     $MISSING_DEPENDENCY ;;
47030       yum)
47031         yum_help     $MISSING_DEPENDENCY ;;
47032       port)
47033         port_help    $MISSING_DEPENDENCY ;;
47034       pkgutil)
47035         pkgutil_help $MISSING_DEPENDENCY ;;
47036       pkgadd)
47037         pkgadd_help  $MISSING_DEPENDENCY ;;
47038     esac
47039 
47040     if test "x$PKGHANDLER_COMMAND" != x; then
47041       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47042     fi
47043   fi
47044 
47045 
47046           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47047 
47048 
47049 fi
47050 rm -f core conftest.err conftest.$ac_objext \
47051     conftest$ac_exeext conftest.$ac_ext
47052     CXXCFLAGS="$PREV_CXXFLAGS"
47053     LIBS="$PREV_LIBS"
47054     CXX="$PREV_CXX"
47055     ac_ext=cpp
47056 ac_cpp='$CXXCPP $CPPFLAGS'
47057 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47058 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47059 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47060 
47061 
47062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47063 $as_echo_n "checking if we should bundle freetype... " >&6; }
47064     if test "x$BUNDLE_FREETYPE" = xyes; then
47065       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47066     fi
47067     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47068 $as_echo "$BUNDLE_FREETYPE" >&6; }
47069 
47070   fi # end freetype needed
47071 
47072 
47073 
47074 
47075 
47076 
47077 
47078   ###############################################################################
47079   #
47080   # Check for alsa headers and libraries. Used on Linux/GNU systems.
47081   #
47082 
47083 # Check whether --with-alsa was given.
47084 if test "${with_alsa+set}" = set; then :
47085   withval=$with_alsa;
47086 fi
47087 
47088 
47089 # Check whether --with-alsa-include was given.
47090 if test "${with_alsa_include+set}" = set; then :
47091   withval=$with_alsa_include;
47092 fi
47093 
47094 
47095 # Check whether --with-alsa-lib was given.
47096 if test "${with_alsa_lib+set}" = set; then :
47097   withval=$with_alsa_lib;
47098 fi
47099 
47100 
47101   if test "x$ALSA_NOT_NEEDED" = xyes; then
47102     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47103       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47104 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47105     fi
47106     ALSA_CFLAGS=
47107     ALSA_LIBS=
47108   else
47109     ALSA_FOUND=no
47110 
47111     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47112       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47113     fi
47114 
47115     if test "x${with_alsa}" != x; then
47116       ALSA_LIBS="-L${with_alsa}/lib -lasound"
47117       ALSA_CFLAGS="-I${with_alsa}/include"
47118       ALSA_FOUND=yes
47119     fi
47120     if test "x${with_alsa_include}" != x; then
47121       ALSA_CFLAGS="-I${with_alsa_include}"
47122       ALSA_FOUND=yes
47123     fi
47124     if test "x${with_alsa_lib}" != x; then
47125       ALSA_LIBS="-L${with_alsa_lib} -lasound"
47126       ALSA_FOUND=yes
47127     fi
47128     if test "x$ALSA_FOUND" = xno; then
47129 
47130 
47131   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47132     # Source the builddeps file again, to make sure it uses the latest variables!
47133     . $builddepsfile
47134     # Look for a target and build machine specific resource!
47135     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47136     if test "x$resource" = x; then
47137       # Ok, lets instead look for a target specific resource
47138       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47139     fi
47140     if test "x$resource" = x; then
47141       # Ok, lets instead look for a build specific resource
47142       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47143     fi
47144     if test "x$resource" = x; then
47145       # Ok, lets instead look for a generic resource
47146       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47147       resource=${builddep_alsa}
47148     fi
47149     if test "x$resource" != x; then
47150       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47151 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47152       # If the resource in the builddeps.conf file is an existing directory,
47153       # for example /java/linux/cups
47154       if test -d ${resource}; then
47155         depdir=${resource}
47156       else
47157 
47158   # alsa is for example mymodule
47159   # $resource is for example libs/general/libmymod_1_2_3.zip
47160   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47161   # $with_builddeps_dir is for example /localhome/builddeps
47162   # depdir is the name of the variable into which we store the depdir, eg MYMOD
47163   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47164   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47165   filename=`basename $resource`
47166   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47167   filebase=${filename%%.*}
47168   extension=${filename#*.}
47169   installdir=$with_builddeps_dir/$filebase
47170   if test ! -f $installdir/$filename.unpacked; then
47171     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47172 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47173     if test ! -d $installdir; then
47174       mkdir -p $installdir
47175     fi
47176     if test ! -d $installdir; then
47177       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47178     fi
47179     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47180     touch $tmpfile
47181     if test ! -f $tmpfile; then
47182       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47183     fi
47184 
47185   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47186   # $tmpfile is the local file name for the downloaded file.
47187   VALID_TOOL=no
47188   if test "x$BDEPS_FTP" = xwget; then
47189     VALID_TOOL=yes
47190     wget -O $tmpfile $with_builddeps_server/$resource
47191   fi
47192   if test "x$BDEPS_FTP" = xlftp; then
47193     VALID_TOOL=yes
47194     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47195   fi
47196   if test "x$BDEPS_FTP" = xftp; then
47197     VALID_TOOL=yes
47198     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47199     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47200     FTPUSERPWD=${FTPSERVER%%@*}
47201     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47202       FTPUSER=${userpwd%%:*}
47203       FTPPWD=${userpwd#*@}
47204       FTPSERVER=${FTPSERVER#*@}
47205     else
47206       FTPUSER=ftp
47207       FTPPWD=ftp
47208     fi
47209     # the "pass" command does not work on some
47210     # ftp clients (read ftp.exe) but if it works,
47211     # passive mode is better!
47212     ( \
47213         echo "user $FTPUSER $FTPPWD"        ; \
47214         echo "pass"                         ; \
47215         echo "bin"                          ; \
47216         echo "get $FTPPATH $tmpfile"              ; \
47217     ) | ftp -in $FTPSERVER
47218   fi
47219   if test "x$VALID_TOOL" != xyes; then
47220     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47221   fi
47222 
47223     mv $tmpfile $installdir/$filename
47224     if test ! -s $installdir/$filename; then
47225       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47226     fi
47227     case "$extension" in
47228       zip)  echo "Unzipping $installdir/$filename..."
47229         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47230         ;;
47231       tar.gz) echo "Untaring $installdir/$filename..."
47232         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47233         ;;
47234       tgz) echo "Untaring $installdir/$filename..."
47235         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47236         ;;
47237       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47238         ;;
47239     esac
47240   fi
47241   if test -f $installdir/$filename.unpacked; then
47242     depdir=$installdir
47243   fi
47244 
47245       fi
47246       # Source the builddeps file again, because in the previous command, the depdir
47247       # was updated to point at the current build dependency install directory.
47248       . $builddepsfile
47249       # Now extract variables from the builddeps.conf files.
47250       theroot=${builddep_alsa_ROOT}
47251       thecflags=${builddep_alsa_CFLAGS}
47252       thelibs=${builddep_alsa_LIBS}
47253       if test "x$depdir" = x; then
47254         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47255       fi
47256       ALSA=$depdir
47257       if test "x$theroot" != x; then
47258         ALSA="$theroot"
47259       fi
47260       if test "x$thecflags" != x; then
47261         ALSA_CFLAGS="$thecflags"
47262       fi
47263       if test "x$thelibs" != x; then
47264         ALSA_LIBS="$thelibs"
47265       fi
47266       ALSA_FOUND=yes
47267       else ALSA_FOUND=no
47268 
47269     fi
47270     else ALSA_FOUND=no
47271 
47272   fi
47273 
47274     fi
47275     # Do not try pkg-config if we have a sysroot set.
47276     if test "x$SYSROOT" = x; then
47277       if test "x$ALSA_FOUND" = xno; then
47278 
47279 pkg_failed=no
47280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47281 $as_echo_n "checking for ALSA... " >&6; }
47282 
47283 if test -n "$ALSA_CFLAGS"; then
47284     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47285  elif test -n "$PKG_CONFIG"; then
47286     if test -n "$PKG_CONFIG" && \
47287     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47288   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47289   ac_status=$?
47290   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47291   test $ac_status = 0; }; then
47292   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47293 else
47294   pkg_failed=yes
47295 fi
47296  else
47297     pkg_failed=untried
47298 fi
47299 if test -n "$ALSA_LIBS"; then
47300     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47301  elif test -n "$PKG_CONFIG"; then
47302     if test -n "$PKG_CONFIG" && \
47303     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47304   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47305   ac_status=$?
47306   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47307   test $ac_status = 0; }; then
47308   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47309 else
47310   pkg_failed=yes
47311 fi
47312  else
47313     pkg_failed=untried
47314 fi
47315 
47316 
47317 
47318 if test $pkg_failed = yes; then
47319 
47320 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47321         _pkg_short_errors_supported=yes
47322 else
47323         _pkg_short_errors_supported=no
47324 fi
47325         if test $_pkg_short_errors_supported = yes; then
47326                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47327         else
47328                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47329         fi
47330         # Put the nasty error message in config.log where it belongs
47331         echo "$ALSA_PKG_ERRORS" >&5
47332 
47333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47334 $as_echo "no" >&6; }
47335                 ALSA_FOUND=no
47336 elif test $pkg_failed = untried; then
47337         ALSA_FOUND=no
47338 else
47339         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47340         ALSA_LIBS=$pkg_cv_ALSA_LIBS
47341         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47342 $as_echo "yes" >&6; }
47343         ALSA_FOUND=yes
47344 fi
47345       fi
47346     fi
47347     if test "x$ALSA_FOUND" = xno; then
47348       for ac_header in alsa/asoundlib.h
47349 do :
47350   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47351 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47352   cat >>confdefs.h <<_ACEOF
47353 #define HAVE_ALSA_ASOUNDLIB_H 1
47354 _ACEOF
47355 
47356             ALSA_FOUND=yes
47357             ALSA_CFLAGS=-Iignoreme
47358             ALSA_LIBS=-lasound
47359             DEFAULT_ALSA=yes
47360 
47361 else
47362   ALSA_FOUND=no
47363 fi
47364 
47365 done
47366 
47367     fi
47368     if test "x$ALSA_FOUND" = xno; then
47369 
47370   # Print a helpful message on how to acquire the necessary build dependency.
47371   # alsa is the help tag: freetype, cups, pulse, alsa etc
47372   MISSING_DEPENDENCY=alsa
47373 
47374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47375     cygwin_help $MISSING_DEPENDENCY
47376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47377     msys_help $MISSING_DEPENDENCY
47378   else
47379     PKGHANDLER_COMMAND=
47380 
47381     case $PKGHANDLER in
47382       apt-get)
47383         apt_help     $MISSING_DEPENDENCY ;;
47384       yum)
47385         yum_help     $MISSING_DEPENDENCY ;;
47386       port)
47387         port_help    $MISSING_DEPENDENCY ;;
47388       pkgutil)
47389         pkgutil_help $MISSING_DEPENDENCY ;;
47390       pkgadd)
47391         pkgadd_help  $MISSING_DEPENDENCY ;;
47392     esac
47393 
47394     if test "x$PKGHANDLER_COMMAND" != x; then
47395       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47396     fi
47397   fi
47398 
47399       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47400     fi
47401   fi
47402 
47403 
47404 
47405 
47406 
47407 
47408   ###############################################################################
47409   #
47410   # Check for the jpeg library
47411   #
47412 
47413   USE_EXTERNAL_LIBJPEG=true
47414   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47415 $as_echo_n "checking for main in -ljpeg... " >&6; }
47416 if ${ac_cv_lib_jpeg_main+:} false; then :
47417   $as_echo_n "(cached) " >&6
47418 else
47419   ac_check_lib_save_LIBS=$LIBS
47420 LIBS="-ljpeg  $LIBS"
47421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47422 /* end confdefs.h.  */
47423 
47424 
47425 int
47426 main ()
47427 {
47428 return main ();
47429   ;
47430   return 0;
47431 }
47432 _ACEOF
47433 if ac_fn_cxx_try_link "$LINENO"; then :
47434   ac_cv_lib_jpeg_main=yes
47435 else
47436   ac_cv_lib_jpeg_main=no
47437 fi
47438 rm -f core conftest.err conftest.$ac_objext \
47439     conftest$ac_exeext conftest.$ac_ext
47440 LIBS=$ac_check_lib_save_LIBS
47441 fi
47442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47443 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
47444 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47445   cat >>confdefs.h <<_ACEOF
47446 #define HAVE_LIBJPEG 1
47447 _ACEOF
47448 
47449   LIBS="-ljpeg $LIBS"
47450 
47451 else
47452    USE_EXTERNAL_LIBJPEG=false
47453       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47454 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47455 
47456 fi
47457 
47458 
47459 
47460   ###############################################################################
47461   #
47462   # Check for the gif library
47463   #
47464 
47465 
47466 # Check whether --with-giflib was given.
47467 if test "${with_giflib+set}" = set; then :
47468   withval=$with_giflib;
47469 fi
47470 
47471 
47472 
47473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47474 $as_echo_n "checking for which giflib to use... " >&6; }
47475 
47476   # default is bundled
47477   DEFAULT_GIFLIB=bundled
47478 
47479   #
47480   # if user didn't specify, use DEFAULT_GIFLIB
47481   #
47482   if test "x${with_giflib}" = "x"; then
47483     with_giflib=${DEFAULT_GIFLIB}
47484   fi
47485 
47486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47487 $as_echo "${with_giflib}" >&6; }
47488 
47489   if test "x${with_giflib}" = "xbundled"; then
47490     USE_EXTERNAL_LIBGIF=false
47491   elif test "x${with_giflib}" = "xsystem"; then
47492     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47493 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47494 
47495 else
47496    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47497 fi
47498 
47499 
47500     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47501 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47502 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47503   $as_echo_n "(cached) " >&6
47504 else
47505   ac_check_lib_save_LIBS=$LIBS
47506 LIBS="-lgif  $LIBS"
47507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47508 /* end confdefs.h.  */
47509 
47510 /* Override any GCC internal prototype to avoid an error.
47511    Use char because int might match the return type of a GCC
47512    builtin and then its argument prototype would still apply.  */
47513 #ifdef __cplusplus
47514 extern "C"
47515 #endif
47516 char DGifGetCode ();
47517 int
47518 main ()
47519 {
47520 return DGifGetCode ();
47521   ;
47522   return 0;
47523 }
47524 _ACEOF
47525 if ac_fn_cxx_try_link "$LINENO"; then :
47526   ac_cv_lib_gif_DGifGetCode=yes
47527 else
47528   ac_cv_lib_gif_DGifGetCode=no
47529 fi
47530 rm -f core conftest.err conftest.$ac_objext \
47531     conftest$ac_exeext conftest.$ac_ext
47532 LIBS=$ac_check_lib_save_LIBS
47533 fi
47534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47535 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47536 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47537   cat >>confdefs.h <<_ACEOF
47538 #define HAVE_LIBGIF 1
47539 _ACEOF
47540 
47541   LIBS="-lgif $LIBS"
47542 
47543 else
47544    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47545 fi
47546 
47547 
47548     USE_EXTERNAL_LIBGIF=true
47549   else
47550     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47551   fi
47552 
47553 
47554   ###############################################################################
47555   #
47556   # Check for the zlib library
47557   #
47558 
47559 
47560 # Check whether --with-zlib was given.
47561 if test "${with_zlib+set}" = set; then :
47562   withval=$with_zlib;
47563 fi
47564 
47565 
47566   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47567 $as_echo_n "checking for compress in -lz... " >&6; }
47568 if ${ac_cv_lib_z_compress+:} false; then :
47569   $as_echo_n "(cached) " >&6
47570 else
47571   ac_check_lib_save_LIBS=$LIBS
47572 LIBS="-lz  $LIBS"
47573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47574 /* end confdefs.h.  */
47575 
47576 /* Override any GCC internal prototype to avoid an error.
47577    Use char because int might match the return type of a GCC
47578    builtin and then its argument prototype would still apply.  */
47579 #ifdef __cplusplus
47580 extern "C"
47581 #endif
47582 char compress ();
47583 int
47584 main ()
47585 {
47586 return compress ();
47587   ;
47588   return 0;
47589 }
47590 _ACEOF
47591 if ac_fn_cxx_try_link "$LINENO"; then :
47592   ac_cv_lib_z_compress=yes
47593 else
47594   ac_cv_lib_z_compress=no
47595 fi
47596 rm -f core conftest.err conftest.$ac_objext \
47597     conftest$ac_exeext conftest.$ac_ext
47598 LIBS=$ac_check_lib_save_LIBS
47599 fi
47600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47601 $as_echo "$ac_cv_lib_z_compress" >&6; }
47602 if test "x$ac_cv_lib_z_compress" = xyes; then :
47603    ZLIB_FOUND=yes
47604 else
47605    ZLIB_FOUND=no
47606 fi
47607 
47608 
47609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47610 $as_echo_n "checking for which zlib to use... " >&6; }
47611 
47612   DEFAULT_ZLIB=bundled
47613   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47614     #
47615     # On macosx default is system...on others default is
47616     #
47617     DEFAULT_ZLIB=system
47618   fi
47619 
47620   if test "x${ZLIB_FOUND}" != "xyes"; then
47621     #
47622     # If we don't find any system...set default to bundled
47623     #
47624     DEFAULT_ZLIB=bundled
47625   fi
47626 
47627   #
47628   # If user didn't specify, use DEFAULT_ZLIB
47629   #
47630   if test "x${with_zlib}" = "x"; then
47631     with_zlib=${DEFAULT_ZLIB}
47632   fi
47633 
47634   if test "x${with_zlib}" = "xbundled"; then
47635     USE_EXTERNAL_LIBZ=false
47636     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47637 $as_echo "bundled" >&6; }
47638   elif test "x${with_zlib}" = "xsystem"; then
47639     if test "x${ZLIB_FOUND}" = "xyes"; then
47640       USE_EXTERNAL_LIBZ=true
47641       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47642 $as_echo "system" >&6; }
47643     else
47644       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47645 $as_echo "system not found" >&6; }
47646       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47647     fi
47648   else
47649     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47650   fi
47651 
47652 
47653 
47654   ###############################################################################
47655   LIBZIP_CAN_USE_MMAP=true
47656 
47657 
47658 
47659   ###############################################################################
47660   #
47661   # Check if altzone exists in time.h
47662   #
47663 
47664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47665 /* end confdefs.h.  */
47666 #include <time.h>
47667 int
47668 main ()
47669 {
47670 return (int)altzone;
47671   ;
47672   return 0;
47673 }
47674 _ACEOF
47675 if ac_fn_cxx_try_link "$LINENO"; then :
47676   has_altzone=yes
47677 else
47678   has_altzone=no
47679 fi
47680 rm -f core conftest.err conftest.$ac_objext \
47681     conftest$ac_exeext conftest.$ac_ext
47682   if test "x$has_altzone" = xyes; then
47683 
47684 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47685 
47686   fi
47687 
47688   ###############################################################################
47689   #
47690   # Check the maths library
47691   #
47692 
47693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47694 $as_echo_n "checking for cos in -lm... " >&6; }
47695 if ${ac_cv_lib_m_cos+:} false; then :
47696   $as_echo_n "(cached) " >&6
47697 else
47698   ac_check_lib_save_LIBS=$LIBS
47699 LIBS="-lm  $LIBS"
47700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47701 /* end confdefs.h.  */
47702 
47703 /* Override any GCC internal prototype to avoid an error.
47704    Use char because int might match the return type of a GCC
47705    builtin and then its argument prototype would still apply.  */
47706 #ifdef __cplusplus
47707 extern "C"
47708 #endif
47709 char cos ();
47710 int
47711 main ()
47712 {
47713 return cos ();
47714   ;
47715   return 0;
47716 }
47717 _ACEOF
47718 if ac_fn_cxx_try_link "$LINENO"; then :
47719   ac_cv_lib_m_cos=yes
47720 else
47721   ac_cv_lib_m_cos=no
47722 fi
47723 rm -f core conftest.err conftest.$ac_objext \
47724     conftest$ac_exeext conftest.$ac_ext
47725 LIBS=$ac_check_lib_save_LIBS
47726 fi
47727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47728 $as_echo "$ac_cv_lib_m_cos" >&6; }
47729 if test "x$ac_cv_lib_m_cos" = xyes; then :
47730   cat >>confdefs.h <<_ACEOF
47731 #define HAVE_LIBM 1
47732 _ACEOF
47733 
47734   LIBS="-lm $LIBS"
47735 
47736 else
47737 
47738         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47739 $as_echo "$as_me: Maths library was not found" >&6;}
47740 
47741 
47742 fi
47743 
47744 
47745 
47746   ###############################################################################
47747   #
47748   # Check for libdl.so
47749 
47750   save_LIBS="$LIBS"
47751   LIBS=""
47752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47753 $as_echo_n "checking for dlopen in -ldl... " >&6; }
47754 if ${ac_cv_lib_dl_dlopen+:} false; then :
47755   $as_echo_n "(cached) " >&6
47756 else
47757   ac_check_lib_save_LIBS=$LIBS
47758 LIBS="-ldl  $LIBS"
47759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47760 /* end confdefs.h.  */
47761 
47762 /* Override any GCC internal prototype to avoid an error.
47763    Use char because int might match the return type of a GCC
47764    builtin and then its argument prototype would still apply.  */
47765 #ifdef __cplusplus
47766 extern "C"
47767 #endif
47768 char dlopen ();
47769 int
47770 main ()
47771 {
47772 return dlopen ();
47773   ;
47774   return 0;
47775 }
47776 _ACEOF
47777 if ac_fn_cxx_try_link "$LINENO"; then :
47778   ac_cv_lib_dl_dlopen=yes
47779 else
47780   ac_cv_lib_dl_dlopen=no
47781 fi
47782 rm -f core conftest.err conftest.$ac_objext \
47783     conftest$ac_exeext conftest.$ac_ext
47784 LIBS=$ac_check_lib_save_LIBS
47785 fi
47786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47787 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47788 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47789   cat >>confdefs.h <<_ACEOF
47790 #define HAVE_LIBDL 1
47791 _ACEOF
47792 
47793   LIBS="-ldl $LIBS"
47794 
47795 fi
47796 
47797   LIBDL="$LIBS"
47798 
47799   LIBS="$save_LIBS"
47800 
47801 
47802   ###############################################################################
47803   #
47804   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47805   # dynamic build is configured on command line.
47806   #
47807 
47808 # Check whether --with-stdc++lib was given.
47809 if test "${with_stdc__lib+set}" = set; then :
47810   withval=$with_stdc__lib;
47811         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47812                 && test "x$with_stdc__lib" != xdefault; then
47813           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47814         fi
47815 
47816 else
47817   with_stdc__lib=default
47818 
47819 fi
47820 
47821 
47822   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47823     # Test if -lstdc++ works.
47824     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47825 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47826     ac_ext=cpp
47827 ac_cpp='$CXXCPP $CPPFLAGS'
47828 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47829 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47830 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47831 
47832     OLD_CXXFLAGS="$CXXFLAGS"
47833     CXXFLAGS="$CXXFLAGS -lstdc++"
47834     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47835 /* end confdefs.h.  */
47836 
47837 int
47838 main ()
47839 {
47840 return 0;
47841   ;
47842   return 0;
47843 }
47844 _ACEOF
47845 if ac_fn_cxx_try_link "$LINENO"; then :
47846   has_dynamic_libstdcxx=yes
47847 else
47848   has_dynamic_libstdcxx=no
47849 fi
47850 rm -f core conftest.err conftest.$ac_objext \
47851     conftest$ac_exeext conftest.$ac_ext
47852     CXXFLAGS="$OLD_CXXFLAGS"
47853     ac_ext=cpp
47854 ac_cpp='$CXXCPP $CPPFLAGS'
47855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47858 
47859     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47860 $as_echo "$has_dynamic_libstdcxx" >&6; }
47861 
47862     # Test if stdc++ can be linked statically.
47863     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47864 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47865     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47866     ac_ext=cpp
47867 ac_cpp='$CXXCPP $CPPFLAGS'
47868 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47869 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47870 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47871 
47872     OLD_LIBS="$LIBS"
47873     OLD_CXX="$CXX"
47874     LIBS="$STATIC_STDCXX_FLAGS"
47875     CXX="$CC"
47876     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47877 /* end confdefs.h.  */
47878 
47879 int
47880 main ()
47881 {
47882 return 0;
47883   ;
47884   return 0;
47885 }
47886 _ACEOF
47887 if ac_fn_cxx_try_link "$LINENO"; then :
47888   has_static_libstdcxx=yes
47889 else
47890   has_static_libstdcxx=no
47891 fi
47892 rm -f core conftest.err conftest.$ac_objext \
47893     conftest$ac_exeext conftest.$ac_ext
47894     LIBS="$OLD_LIBS"
47895     CXX="$OLD_CXX"
47896     ac_ext=cpp
47897 ac_cpp='$CXXCPP $CPPFLAGS'
47898 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47899 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47900 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47901 
47902     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47903 $as_echo "$has_static_libstdcxx" >&6; }
47904 
47905     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47906       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47907     fi
47908 
47909     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47910       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47911     fi
47912 
47913     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47914       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47915     fi
47916 
47917     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47918 $as_echo_n "checking how to link with libstdc++... " >&6; }
47919     # If dynamic was requested, it's available since it would fail above otherwise.
47920     # If dynamic wasn't requested, go with static unless it isn't available.
47921     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47922       LIBCXX="$LIBCXX -lstdc++"
47923       LDCXX="$CXX"
47924       STATIC_CXX_SETTING="STATIC_CXX=false"
47925       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47926 $as_echo "dynamic" >&6; }
47927     else
47928       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47929       LDCXX="$CC"
47930       STATIC_CXX_SETTING="STATIC_CXX=true"
47931       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47932 $as_echo "static" >&6; }
47933     fi
47934   fi
47935 
47936 
47937   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47938     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47939 
47940 pkg_failed=no
47941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47942 $as_echo_n "checking for LIBFFI... " >&6; }
47943 
47944 if test -n "$LIBFFI_CFLAGS"; then
47945     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47946  elif test -n "$PKG_CONFIG"; then
47947     if test -n "$PKG_CONFIG" && \
47948     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47949   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47950   ac_status=$?
47951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47952   test $ac_status = 0; }; then
47953   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47954 else
47955   pkg_failed=yes
47956 fi
47957  else
47958     pkg_failed=untried
47959 fi
47960 if test -n "$LIBFFI_LIBS"; then
47961     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47962  elif test -n "$PKG_CONFIG"; then
47963     if test -n "$PKG_CONFIG" && \
47964     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47965   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47966   ac_status=$?
47967   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47968   test $ac_status = 0; }; then
47969   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47970 else
47971   pkg_failed=yes
47972 fi
47973  else
47974     pkg_failed=untried
47975 fi
47976 
47977 
47978 
47979 if test $pkg_failed = yes; then
47980 
47981 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47982         _pkg_short_errors_supported=yes
47983 else
47984         _pkg_short_errors_supported=no
47985 fi
47986         if test $_pkg_short_errors_supported = yes; then
47987                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47988         else
47989                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47990         fi
47991         # Put the nasty error message in config.log where it belongs
47992         echo "$LIBFFI_PKG_ERRORS" >&5
47993 
47994         as_fn_error $? "Package requirements (libffi) were not met:
47995 
47996 $LIBFFI_PKG_ERRORS
47997 
47998 Consider adjusting the PKG_CONFIG_PATH environment variable if you
47999 installed software in a non-standard prefix.
48000 
48001 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48002 and LIBFFI_LIBS to avoid the need to call pkg-config.
48003 See the pkg-config man page for more details.
48004 " "$LINENO" 5
48005 elif test $pkg_failed = untried; then
48006         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48008 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48009 is in your PATH or set the PKG_CONFIG environment variable to the full
48010 path to pkg-config.
48011 
48012 Alternatively, you may set the environment variables LIBFFI_CFLAGS
48013 and LIBFFI_LIBS to avoid the need to call pkg-config.
48014 See the pkg-config man page for more details.
48015 
48016 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48017 See \`config.log' for more details" "$LINENO" 5; }
48018 else
48019         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48020         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48021         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48022 $as_echo "yes" >&6; }
48023         :
48024 fi
48025 
48026   fi
48027 
48028   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48029     # Extract the first word of "llvm-config", so it can be a program name with args.
48030 set dummy llvm-config; ac_word=$2
48031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48032 $as_echo_n "checking for $ac_word... " >&6; }
48033 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48034   $as_echo_n "(cached) " >&6
48035 else
48036   if test -n "$LLVM_CONFIG"; then
48037   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48038 else
48039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48040 for as_dir in $PATH
48041 do
48042   IFS=$as_save_IFS
48043   test -z "$as_dir" && as_dir=.
48044     for ac_exec_ext in '' $ac_executable_extensions; do
48045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48046     ac_cv_prog_LLVM_CONFIG="llvm-config"
48047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48048     break 2
48049   fi
48050 done
48051   done
48052 IFS=$as_save_IFS
48053 
48054 fi
48055 fi
48056 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48057 if test -n "$LLVM_CONFIG"; then
48058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48059 $as_echo "$LLVM_CONFIG" >&6; }
48060 else
48061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48062 $as_echo "no" >&6; }
48063 fi
48064 
48065 
48066 
48067     if test "x$LLVM_CONFIG" != xllvm-config; then
48068       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48069     fi
48070 
48071     llvm_components="jit mcjit engine nativecodegen native"
48072     unset LLVM_CFLAGS
48073     for flag in $("$LLVM_CONFIG" --cxxflags); do
48074       if echo "${flag}" | grep -q '^-[ID]'; then
48075         if test "${flag}" != "-D_DEBUG" ; then
48076           if test "${LLVM_CFLAGS}" != "" ; then
48077             LLVM_CFLAGS="${LLVM_CFLAGS} "
48078           fi
48079           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48080         fi
48081       fi
48082     done
48083     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48084     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48085 
48086     unset LLVM_LDFLAGS
48087     for flag in $("${LLVM_CONFIG}" --ldflags); do
48088       if echo "${flag}" | grep -q '^-L'; then
48089         if test "${LLVM_LDFLAGS}" != ""; then
48090           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48091         fi
48092         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48093       fi
48094     done
48095 
48096     unset LLVM_LIBS
48097     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48098       if echo "${flag}" | grep -q '^-l'; then
48099         if test "${LLVM_LIBS}" != ""; then
48100           LLVM_LIBS="${LLVM_LIBS} "
48101         fi
48102         LLVM_LIBS="${LLVM_LIBS}${flag}"
48103       fi
48104     done
48105 
48106 
48107 
48108 
48109   fi
48110 
48111   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48112   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48113     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48114   fi
48115 
48116   # TODO better (platform agnostic) test
48117   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48118     LIBCXX="-lstdc++"
48119   fi
48120 
48121 
48122 
48123 
48124   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48125 
48126 
48127 # Check whether --with-msvcr-dll was given.
48128 if test "${with_msvcr_dll+set}" = set; then :
48129   withval=$with_msvcr_dll;
48130 fi
48131 
48132 
48133   if test "x$with_msvcr_dll" != x; then
48134     # If given explicitely by user, do not probe. If not present, fail directly.
48135 
48136   DLL_NAME="$MSVCR_NAME"
48137   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48138   METHOD="--with-msvcr-dll"
48139   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48140     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48141 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48142 
48143     # Need to check if the found msvcr is correct architecture
48144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48145 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48146     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48147     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48148       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48149       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48150       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48151         CORRECT_MSVCR_ARCH="PE32 executable"
48152       else
48153         CORRECT_MSVCR_ARCH="PE32+ executable"
48154       fi
48155     else
48156       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48157         CORRECT_MSVCR_ARCH=386
48158       else
48159         CORRECT_MSVCR_ARCH=x86-64
48160       fi
48161     fi
48162     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48163       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48164 $as_echo "ok" >&6; }
48165       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48166 
48167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48168 
48169   # Input might be given as Windows format, start by converting to
48170   # unix format.
48171   path="$MSVC_DLL"
48172   new_path=`$CYGPATH -u "$path"`
48173 
48174   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48175   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48176   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48177   # "foo.exe" is OK but "foo" is an error.
48178   #
48179   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48180   # It is also a way to make sure we got the proper file name for the real test later on.
48181   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48182   if test "x$test_shortpath" = x; then
48183     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48184 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48185     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48186   fi
48187 
48188   # Call helper function which possibly converts this using DOS-style short mode.
48189   # If so, the updated path is stored in $new_path.
48190 
48191   input_path="$new_path"
48192   # Check if we need to convert this using DOS-style short mode. If the path
48193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48194   # take no chances and rewrite it.
48195   # Note: m4 eats our [], so we need to use [ and ] instead.
48196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48197   if test "x$has_forbidden_chars" != x; then
48198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48199     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48200     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48201     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48202       # Going to short mode and back again did indeed matter. Since short mode is
48203       # case insensitive, let's make it lowercase to improve readability.
48204       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48205       # Now convert it back to Unix-style (cygpath)
48206       input_path=`$CYGPATH -u "$shortmode_path"`
48207       new_path="$input_path"
48208     fi
48209   fi
48210 
48211   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48212   if test "x$test_cygdrive_prefix" = x; then
48213     # As a simple fix, exclude /usr/bin since it's not a real path.
48214     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48215       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48216       # a path prefixed by /cygdrive for fixpath to work.
48217       new_path="$CYGWIN_ROOT_PATH$input_path"
48218     fi
48219   fi
48220 
48221 
48222   if test "x$path" != "x$new_path"; then
48223     MSVC_DLL="$new_path"
48224     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48225 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48226   fi
48227 
48228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48229 
48230   path="$MSVC_DLL"
48231   has_colon=`$ECHO $path | $GREP ^.:`
48232   new_path="$path"
48233   if test "x$has_colon" = x; then
48234     # Not in mixed or Windows style, start by that.
48235     new_path=`cmd //c echo $path`
48236   fi
48237 
48238 
48239   input_path="$new_path"
48240   # Check if we need to convert this using DOS-style short mode. If the path
48241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48242   # take no chances and rewrite it.
48243   # Note: m4 eats our [], so we need to use [ and ] instead.
48244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48245   if test "x$has_forbidden_chars" != x; then
48246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48247     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48248   fi
48249 
48250 
48251   windows_path="$new_path"
48252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48253     unix_path=`$CYGPATH -u "$windows_path"`
48254     new_path="$unix_path"
48255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48257     new_path="$unix_path"
48258   fi
48259 
48260   if test "x$path" != "x$new_path"; then
48261     MSVC_DLL="$new_path"
48262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48263 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48264   fi
48265 
48266   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48267   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48268 
48269   else
48270     # We're on a posix platform. Hooray! :)
48271     path="$MSVC_DLL"
48272     has_space=`$ECHO "$path" | $GREP " "`
48273     if test "x$has_space" != x; then
48274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48275 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48276       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48277     fi
48278 
48279     # Use eval to expand a potential ~
48280     eval path="$path"
48281     if test ! -f "$path" && test ! -d "$path"; then
48282       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48283     fi
48284 
48285     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48286   fi
48287 
48288       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48289 $as_echo_n "checking for $DLL_NAME... " >&6; }
48290       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48291 $as_echo "$MSVC_DLL" >&6; }
48292     else
48293       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48294 $as_echo "incorrect, ignoring" >&6; }
48295       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48296 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48297     fi
48298   fi
48299 
48300     if test "x$MSVC_DLL" = x; then
48301       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48302     fi
48303     MSVCR_DLL="$MSVC_DLL"
48304   elif test "x$DEVKIT_MSVCR_DLL" != x; then
48305 
48306   DLL_NAME="$MSVCR_NAME"
48307   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48308   METHOD="devkit"
48309   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48310     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48311 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48312 
48313     # Need to check if the found msvcr is correct architecture
48314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48315 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48316     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48317     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48318       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48319       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48320       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48321         CORRECT_MSVCR_ARCH="PE32 executable"
48322       else
48323         CORRECT_MSVCR_ARCH="PE32+ executable"
48324       fi
48325     else
48326       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48327         CORRECT_MSVCR_ARCH=386
48328       else
48329         CORRECT_MSVCR_ARCH=x86-64
48330       fi
48331     fi
48332     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48333       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48334 $as_echo "ok" >&6; }
48335       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48336 
48337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48338 
48339   # Input might be given as Windows format, start by converting to
48340   # unix format.
48341   path="$MSVC_DLL"
48342   new_path=`$CYGPATH -u "$path"`
48343 
48344   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48345   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48346   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48347   # "foo.exe" is OK but "foo" is an error.
48348   #
48349   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48350   # It is also a way to make sure we got the proper file name for the real test later on.
48351   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48352   if test "x$test_shortpath" = x; then
48353     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48354 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48355     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48356   fi
48357 
48358   # Call helper function which possibly converts this using DOS-style short mode.
48359   # If so, the updated path is stored in $new_path.
48360 
48361   input_path="$new_path"
48362   # Check if we need to convert this using DOS-style short mode. If the path
48363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48364   # take no chances and rewrite it.
48365   # Note: m4 eats our [], so we need to use [ and ] instead.
48366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48367   if test "x$has_forbidden_chars" != x; then
48368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48372       # Going to short mode and back again did indeed matter. Since short mode is
48373       # case insensitive, let's make it lowercase to improve readability.
48374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48375       # Now convert it back to Unix-style (cygpath)
48376       input_path=`$CYGPATH -u "$shortmode_path"`
48377       new_path="$input_path"
48378     fi
48379   fi
48380 
48381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48382   if test "x$test_cygdrive_prefix" = x; then
48383     # As a simple fix, exclude /usr/bin since it's not a real path.
48384     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48386       # a path prefixed by /cygdrive for fixpath to work.
48387       new_path="$CYGWIN_ROOT_PATH$input_path"
48388     fi
48389   fi
48390 
48391 
48392   if test "x$path" != "x$new_path"; then
48393     MSVC_DLL="$new_path"
48394     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48395 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48396   fi
48397 
48398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48399 
48400   path="$MSVC_DLL"
48401   has_colon=`$ECHO $path | $GREP ^.:`
48402   new_path="$path"
48403   if test "x$has_colon" = x; then
48404     # Not in mixed or Windows style, start by that.
48405     new_path=`cmd //c echo $path`
48406   fi
48407 
48408 
48409   input_path="$new_path"
48410   # Check if we need to convert this using DOS-style short mode. If the path
48411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48412   # take no chances and rewrite it.
48413   # Note: m4 eats our [], so we need to use [ and ] instead.
48414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48415   if test "x$has_forbidden_chars" != x; then
48416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48417     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48418   fi
48419 
48420 
48421   windows_path="$new_path"
48422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48423     unix_path=`$CYGPATH -u "$windows_path"`
48424     new_path="$unix_path"
48425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48427     new_path="$unix_path"
48428   fi
48429 
48430   if test "x$path" != "x$new_path"; then
48431     MSVC_DLL="$new_path"
48432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48433 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48434   fi
48435 
48436   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48437   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48438 
48439   else
48440     # We're on a posix platform. Hooray! :)
48441     path="$MSVC_DLL"
48442     has_space=`$ECHO "$path" | $GREP " "`
48443     if test "x$has_space" != x; then
48444       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48445 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48446       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48447     fi
48448 
48449     # Use eval to expand a potential ~
48450     eval path="$path"
48451     if test ! -f "$path" && test ! -d "$path"; then
48452       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48453     fi
48454 
48455     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48456   fi
48457 
48458       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48459 $as_echo_n "checking for $DLL_NAME... " >&6; }
48460       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48461 $as_echo "$MSVC_DLL" >&6; }
48462     else
48463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48464 $as_echo "incorrect, ignoring" >&6; }
48465       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48466 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48467     fi
48468   fi
48469 
48470     if test "x$MSVC_DLL" = x; then
48471       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48472     fi
48473     MSVCR_DLL="$MSVC_DLL"
48474   else
48475 
48476   DLL_NAME="${MSVCR_NAME}"
48477   MSVC_DLL=
48478 
48479   if test "x$MSVC_DLL" = x; then
48480     # Probe: Using well-known location from Visual Studio 10.0
48481     if test "x$VCINSTALLDIR" != x; then
48482       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48483 
48484   windows_path="$CYGWIN_VC_INSTALL_DIR"
48485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48486     unix_path=`$CYGPATH -u "$windows_path"`
48487     CYGWIN_VC_INSTALL_DIR="$unix_path"
48488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48490     CYGWIN_VC_INSTALL_DIR="$unix_path"
48491   fi
48492 
48493       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48494         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48495       else
48496         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48497       fi
48498       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48499 
48500   DLL_NAME="$DLL_NAME"
48501   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48502   METHOD="well-known location in VCINSTALLDIR"
48503   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48504     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48505 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48506 
48507     # Need to check if the found msvcr is correct architecture
48508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48509 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48510     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48512       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48513       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48514       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48515         CORRECT_MSVCR_ARCH="PE32 executable"
48516       else
48517         CORRECT_MSVCR_ARCH="PE32+ executable"
48518       fi
48519     else
48520       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48521         CORRECT_MSVCR_ARCH=386
48522       else
48523         CORRECT_MSVCR_ARCH=x86-64
48524       fi
48525     fi
48526     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48527       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48528 $as_echo "ok" >&6; }
48529       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48530 
48531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48532 
48533   # Input might be given as Windows format, start by converting to
48534   # unix format.
48535   path="$MSVC_DLL"
48536   new_path=`$CYGPATH -u "$path"`
48537 
48538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48541   # "foo.exe" is OK but "foo" is an error.
48542   #
48543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48544   # It is also a way to make sure we got the proper file name for the real test later on.
48545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48546   if test "x$test_shortpath" = x; then
48547     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48548 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48549     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48550   fi
48551 
48552   # Call helper function which possibly converts this using DOS-style short mode.
48553   # If so, the updated path is stored in $new_path.
48554 
48555   input_path="$new_path"
48556   # Check if we need to convert this using DOS-style short mode. If the path
48557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48558   # take no chances and rewrite it.
48559   # Note: m4 eats our [], so we need to use [ and ] instead.
48560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48561   if test "x$has_forbidden_chars" != x; then
48562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48566       # Going to short mode and back again did indeed matter. Since short mode is
48567       # case insensitive, let's make it lowercase to improve readability.
48568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48569       # Now convert it back to Unix-style (cygpath)
48570       input_path=`$CYGPATH -u "$shortmode_path"`
48571       new_path="$input_path"
48572     fi
48573   fi
48574 
48575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48576   if test "x$test_cygdrive_prefix" = x; then
48577     # As a simple fix, exclude /usr/bin since it's not a real path.
48578     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48580       # a path prefixed by /cygdrive for fixpath to work.
48581       new_path="$CYGWIN_ROOT_PATH$input_path"
48582     fi
48583   fi
48584 
48585 
48586   if test "x$path" != "x$new_path"; then
48587     MSVC_DLL="$new_path"
48588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48589 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48590   fi
48591 
48592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48593 
48594   path="$MSVC_DLL"
48595   has_colon=`$ECHO $path | $GREP ^.:`
48596   new_path="$path"
48597   if test "x$has_colon" = x; then
48598     # Not in mixed or Windows style, start by that.
48599     new_path=`cmd //c echo $path`
48600   fi
48601 
48602 
48603   input_path="$new_path"
48604   # Check if we need to convert this using DOS-style short mode. If the path
48605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48606   # take no chances and rewrite it.
48607   # Note: m4 eats our [], so we need to use [ and ] instead.
48608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48609   if test "x$has_forbidden_chars" != x; then
48610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48612   fi
48613 
48614 
48615   windows_path="$new_path"
48616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48617     unix_path=`$CYGPATH -u "$windows_path"`
48618     new_path="$unix_path"
48619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48621     new_path="$unix_path"
48622   fi
48623 
48624   if test "x$path" != "x$new_path"; then
48625     MSVC_DLL="$new_path"
48626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48627 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48628   fi
48629 
48630   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48631   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48632 
48633   else
48634     # We're on a posix platform. Hooray! :)
48635     path="$MSVC_DLL"
48636     has_space=`$ECHO "$path" | $GREP " "`
48637     if test "x$has_space" != x; then
48638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48639 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48640       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48641     fi
48642 
48643     # Use eval to expand a potential ~
48644     eval path="$path"
48645     if test ! -f "$path" && test ! -d "$path"; then
48646       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48647     fi
48648 
48649     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48650   fi
48651 
48652       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48653 $as_echo_n "checking for $DLL_NAME... " >&6; }
48654       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48655 $as_echo "$MSVC_DLL" >&6; }
48656     else
48657       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48658 $as_echo "incorrect, ignoring" >&6; }
48659       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48660 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48661     fi
48662   fi
48663 
48664     fi
48665   fi
48666 
48667   if test "x$MSVC_DLL" = x; then
48668     # Probe: Check in the Boot JDK directory.
48669     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48670 
48671   DLL_NAME="$DLL_NAME"
48672   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48673   METHOD="well-known location in Boot JDK"
48674   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48675     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48676 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48677 
48678     # Need to check if the found msvcr is correct architecture
48679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48680 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48681     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48683       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48684       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48685       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48686         CORRECT_MSVCR_ARCH="PE32 executable"
48687       else
48688         CORRECT_MSVCR_ARCH="PE32+ executable"
48689       fi
48690     else
48691       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48692         CORRECT_MSVCR_ARCH=386
48693       else
48694         CORRECT_MSVCR_ARCH=x86-64
48695       fi
48696     fi
48697     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48698       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48699 $as_echo "ok" >&6; }
48700       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48701 
48702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48703 
48704   # Input might be given as Windows format, start by converting to
48705   # unix format.
48706   path="$MSVC_DLL"
48707   new_path=`$CYGPATH -u "$path"`
48708 
48709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48712   # "foo.exe" is OK but "foo" is an error.
48713   #
48714   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48715   # It is also a way to make sure we got the proper file name for the real test later on.
48716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48717   if test "x$test_shortpath" = x; then
48718     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48719 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48720     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48721   fi
48722 
48723   # Call helper function which possibly converts this using DOS-style short mode.
48724   # If so, the updated path is stored in $new_path.
48725 
48726   input_path="$new_path"
48727   # Check if we need to convert this using DOS-style short mode. If the path
48728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48729   # take no chances and rewrite it.
48730   # Note: m4 eats our [], so we need to use [ and ] instead.
48731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48732   if test "x$has_forbidden_chars" != x; then
48733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48734     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48735     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48736     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48737       # Going to short mode and back again did indeed matter. Since short mode is
48738       # case insensitive, let's make it lowercase to improve readability.
48739       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48740       # Now convert it back to Unix-style (cygpath)
48741       input_path=`$CYGPATH -u "$shortmode_path"`
48742       new_path="$input_path"
48743     fi
48744   fi
48745 
48746   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48747   if test "x$test_cygdrive_prefix" = x; then
48748     # As a simple fix, exclude /usr/bin since it's not a real path.
48749     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48750       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48751       # a path prefixed by /cygdrive for fixpath to work.
48752       new_path="$CYGWIN_ROOT_PATH$input_path"
48753     fi
48754   fi
48755 
48756 
48757   if test "x$path" != "x$new_path"; then
48758     MSVC_DLL="$new_path"
48759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48760 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48761   fi
48762 
48763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48764 
48765   path="$MSVC_DLL"
48766   has_colon=`$ECHO $path | $GREP ^.:`
48767   new_path="$path"
48768   if test "x$has_colon" = x; then
48769     # Not in mixed or Windows style, start by that.
48770     new_path=`cmd //c echo $path`
48771   fi
48772 
48773 
48774   input_path="$new_path"
48775   # Check if we need to convert this using DOS-style short mode. If the path
48776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48777   # take no chances and rewrite it.
48778   # Note: m4 eats our [], so we need to use [ and ] instead.
48779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48780   if test "x$has_forbidden_chars" != x; then
48781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48782     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48783   fi
48784 
48785 
48786   windows_path="$new_path"
48787   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48788     unix_path=`$CYGPATH -u "$windows_path"`
48789     new_path="$unix_path"
48790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48791     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48792     new_path="$unix_path"
48793   fi
48794 
48795   if test "x$path" != "x$new_path"; then
48796     MSVC_DLL="$new_path"
48797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48798 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48799   fi
48800 
48801   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48802   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48803 
48804   else
48805     # We're on a posix platform. Hooray! :)
48806     path="$MSVC_DLL"
48807     has_space=`$ECHO "$path" | $GREP " "`
48808     if test "x$has_space" != x; then
48809       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48810 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48811       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48812     fi
48813 
48814     # Use eval to expand a potential ~
48815     eval path="$path"
48816     if test ! -f "$path" && test ! -d "$path"; then
48817       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48818     fi
48819 
48820     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48821   fi
48822 
48823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48824 $as_echo_n "checking for $DLL_NAME... " >&6; }
48825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48826 $as_echo "$MSVC_DLL" >&6; }
48827     else
48828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48829 $as_echo "incorrect, ignoring" >&6; }
48830       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48831 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48832     fi
48833   fi
48834 
48835   fi
48836 
48837   if test "x$MSVC_DLL" = x; then
48838     # Probe: Look in the Windows system32 directory
48839     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48840 
48841   windows_path="$CYGWIN_SYSTEMROOT"
48842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48843     unix_path=`$CYGPATH -u "$windows_path"`
48844     CYGWIN_SYSTEMROOT="$unix_path"
48845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48847     CYGWIN_SYSTEMROOT="$unix_path"
48848   fi
48849 
48850     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48851 
48852   DLL_NAME="$DLL_NAME"
48853   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48854   METHOD="well-known location in SYSTEMROOT"
48855   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48856     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48857 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48858 
48859     # Need to check if the found msvcr is correct architecture
48860     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48861 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48862     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48863     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48864       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48865       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48866       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48867         CORRECT_MSVCR_ARCH="PE32 executable"
48868       else
48869         CORRECT_MSVCR_ARCH="PE32+ executable"
48870       fi
48871     else
48872       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48873         CORRECT_MSVCR_ARCH=386
48874       else
48875         CORRECT_MSVCR_ARCH=x86-64
48876       fi
48877     fi
48878     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48879       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48880 $as_echo "ok" >&6; }
48881       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48882 
48883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48884 
48885   # Input might be given as Windows format, start by converting to
48886   # unix format.
48887   path="$MSVC_DLL"
48888   new_path=`$CYGPATH -u "$path"`
48889 
48890   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48891   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48892   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48893   # "foo.exe" is OK but "foo" is an error.
48894   #
48895   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48896   # It is also a way to make sure we got the proper file name for the real test later on.
48897   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48898   if test "x$test_shortpath" = x; then
48899     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48900 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48901     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48902   fi
48903 
48904   # Call helper function which possibly converts this using DOS-style short mode.
48905   # If so, the updated path is stored in $new_path.
48906 
48907   input_path="$new_path"
48908   # Check if we need to convert this using DOS-style short mode. If the path
48909   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48910   # take no chances and rewrite it.
48911   # Note: m4 eats our [], so we need to use [ and ] instead.
48912   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48913   if test "x$has_forbidden_chars" != x; then
48914     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48915     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48916     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48917     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48918       # Going to short mode and back again did indeed matter. Since short mode is
48919       # case insensitive, let's make it lowercase to improve readability.
48920       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48921       # Now convert it back to Unix-style (cygpath)
48922       input_path=`$CYGPATH -u "$shortmode_path"`
48923       new_path="$input_path"
48924     fi
48925   fi
48926 
48927   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48928   if test "x$test_cygdrive_prefix" = x; then
48929     # As a simple fix, exclude /usr/bin since it's not a real path.
48930     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48931       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48932       # a path prefixed by /cygdrive for fixpath to work.
48933       new_path="$CYGWIN_ROOT_PATH$input_path"
48934     fi
48935   fi
48936 
48937 
48938   if test "x$path" != "x$new_path"; then
48939     MSVC_DLL="$new_path"
48940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48941 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48942   fi
48943 
48944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48945 
48946   path="$MSVC_DLL"
48947   has_colon=`$ECHO $path | $GREP ^.:`
48948   new_path="$path"
48949   if test "x$has_colon" = x; then
48950     # Not in mixed or Windows style, start by that.
48951     new_path=`cmd //c echo $path`
48952   fi
48953 
48954 
48955   input_path="$new_path"
48956   # Check if we need to convert this using DOS-style short mode. If the path
48957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48958   # take no chances and rewrite it.
48959   # Note: m4 eats our [], so we need to use [ and ] instead.
48960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48961   if test "x$has_forbidden_chars" != x; then
48962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48963     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48964   fi
48965 
48966 
48967   windows_path="$new_path"
48968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48969     unix_path=`$CYGPATH -u "$windows_path"`
48970     new_path="$unix_path"
48971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48973     new_path="$unix_path"
48974   fi
48975 
48976   if test "x$path" != "x$new_path"; then
48977     MSVC_DLL="$new_path"
48978     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48979 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48980   fi
48981 
48982   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48983   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48984 
48985   else
48986     # We're on a posix platform. Hooray! :)
48987     path="$MSVC_DLL"
48988     has_space=`$ECHO "$path" | $GREP " "`
48989     if test "x$has_space" != x; then
48990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48991 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48992       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48993     fi
48994 
48995     # Use eval to expand a potential ~
48996     eval path="$path"
48997     if test ! -f "$path" && test ! -d "$path"; then
48998       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48999     fi
49000 
49001     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49002   fi
49003 
49004       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49005 $as_echo_n "checking for $DLL_NAME... " >&6; }
49006       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49007 $as_echo "$MSVC_DLL" >&6; }
49008     else
49009       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49010 $as_echo "incorrect, ignoring" >&6; }
49011       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49012 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49013     fi
49014   fi
49015 
49016   fi
49017 
49018   if test "x$MSVC_DLL" = x; then
49019     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49020     if test "x$VS100COMNTOOLS" != x; then
49021       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49022 
49023   windows_path="$CYGWIN_VS_TOOLS_DIR"
49024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49025     unix_path=`$CYGPATH -u "$windows_path"`
49026     CYGWIN_VS_TOOLS_DIR="$unix_path"
49027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49029     CYGWIN_VS_TOOLS_DIR="$unix_path"
49030   fi
49031 
49032       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49033         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49034             | $GREP -i /x64/ | $HEAD --lines 1`
49035       else
49036         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49037             | $GREP -i /x86/ | $HEAD --lines 1`
49038       fi
49039 
49040   DLL_NAME="$DLL_NAME"
49041   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49042   METHOD="search of VS100COMNTOOLS"
49043   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49044     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49045 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49046 
49047     # Need to check if the found msvcr is correct architecture
49048     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49049 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49050     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49051     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49052       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49053       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49054       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49055         CORRECT_MSVCR_ARCH="PE32 executable"
49056       else
49057         CORRECT_MSVCR_ARCH="PE32+ executable"
49058       fi
49059     else
49060       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49061         CORRECT_MSVCR_ARCH=386
49062       else
49063         CORRECT_MSVCR_ARCH=x86-64
49064       fi
49065     fi
49066     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49068 $as_echo "ok" >&6; }
49069       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49070 
49071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49072 
49073   # Input might be given as Windows format, start by converting to
49074   # unix format.
49075   path="$MSVC_DLL"
49076   new_path=`$CYGPATH -u "$path"`
49077 
49078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49081   # "foo.exe" is OK but "foo" is an error.
49082   #
49083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49084   # It is also a way to make sure we got the proper file name for the real test later on.
49085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49086   if test "x$test_shortpath" = x; then
49087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49088 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49089     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49090   fi
49091 
49092   # Call helper function which possibly converts this using DOS-style short mode.
49093   # If so, the updated path is stored in $new_path.
49094 
49095   input_path="$new_path"
49096   # Check if we need to convert this using DOS-style short mode. If the path
49097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49098   # take no chances and rewrite it.
49099   # Note: m4 eats our [], so we need to use [ and ] instead.
49100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49101   if test "x$has_forbidden_chars" != x; then
49102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49106       # Going to short mode and back again did indeed matter. Since short mode is
49107       # case insensitive, let's make it lowercase to improve readability.
49108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49109       # Now convert it back to Unix-style (cygpath)
49110       input_path=`$CYGPATH -u "$shortmode_path"`
49111       new_path="$input_path"
49112     fi
49113   fi
49114 
49115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49116   if test "x$test_cygdrive_prefix" = x; then
49117     # As a simple fix, exclude /usr/bin since it's not a real path.
49118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49120       # a path prefixed by /cygdrive for fixpath to work.
49121       new_path="$CYGWIN_ROOT_PATH$input_path"
49122     fi
49123   fi
49124 
49125 
49126   if test "x$path" != "x$new_path"; then
49127     MSVC_DLL="$new_path"
49128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49129 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49130   fi
49131 
49132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49133 
49134   path="$MSVC_DLL"
49135   has_colon=`$ECHO $path | $GREP ^.:`
49136   new_path="$path"
49137   if test "x$has_colon" = x; then
49138     # Not in mixed or Windows style, start by that.
49139     new_path=`cmd //c echo $path`
49140   fi
49141 
49142 
49143   input_path="$new_path"
49144   # Check if we need to convert this using DOS-style short mode. If the path
49145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49146   # take no chances and rewrite it.
49147   # Note: m4 eats our [], so we need to use [ and ] instead.
49148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49149   if test "x$has_forbidden_chars" != x; then
49150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49152   fi
49153 
49154 
49155   windows_path="$new_path"
49156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49157     unix_path=`$CYGPATH -u "$windows_path"`
49158     new_path="$unix_path"
49159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49161     new_path="$unix_path"
49162   fi
49163 
49164   if test "x$path" != "x$new_path"; then
49165     MSVC_DLL="$new_path"
49166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49167 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49168   fi
49169 
49170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49172 
49173   else
49174     # We're on a posix platform. Hooray! :)
49175     path="$MSVC_DLL"
49176     has_space=`$ECHO "$path" | $GREP " "`
49177     if test "x$has_space" != x; then
49178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49179 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49180       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49181     fi
49182 
49183     # Use eval to expand a potential ~
49184     eval path="$path"
49185     if test ! -f "$path" && test ! -d "$path"; then
49186       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49187     fi
49188 
49189     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49190   fi
49191 
49192       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49193 $as_echo_n "checking for $DLL_NAME... " >&6; }
49194       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49195 $as_echo "$MSVC_DLL" >&6; }
49196     else
49197       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49198 $as_echo "incorrect, ignoring" >&6; }
49199       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49200 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49201     fi
49202   fi
49203 
49204     fi
49205   fi
49206 
49207   if test "x$MSVC_DLL" = x; then
49208     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49209     # (This was the original behaviour; kept since it might turn something up)
49210     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49211       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49212         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49213           | $GREP x64 | $HEAD --lines 1`
49214       else
49215         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49216           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49217         if test "x$POSSIBLE_MSVC_DLL" = x; then
49218           # We're grasping at straws now...
49219           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49220               | $HEAD --lines 1`
49221         fi
49222       fi
49223 
49224 
49225   DLL_NAME="$DLL_NAME"
49226   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49227   METHOD="search of VCINSTALLDIR"
49228   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49229     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49230 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49231 
49232     # Need to check if the found msvcr is correct architecture
49233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49234 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49235     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49236     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49237       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49238       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49239       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49240         CORRECT_MSVCR_ARCH="PE32 executable"
49241       else
49242         CORRECT_MSVCR_ARCH="PE32+ executable"
49243       fi
49244     else
49245       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49246         CORRECT_MSVCR_ARCH=386
49247       else
49248         CORRECT_MSVCR_ARCH=x86-64
49249       fi
49250     fi
49251     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49253 $as_echo "ok" >&6; }
49254       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49255 
49256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49257 
49258   # Input might be given as Windows format, start by converting to
49259   # unix format.
49260   path="$MSVC_DLL"
49261   new_path=`$CYGPATH -u "$path"`
49262 
49263   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49264   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49265   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49266   # "foo.exe" is OK but "foo" is an error.
49267   #
49268   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49269   # It is also a way to make sure we got the proper file name for the real test later on.
49270   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49271   if test "x$test_shortpath" = x; then
49272     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49273 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49274     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49275   fi
49276 
49277   # Call helper function which possibly converts this using DOS-style short mode.
49278   # If so, the updated path is stored in $new_path.
49279 
49280   input_path="$new_path"
49281   # Check if we need to convert this using DOS-style short mode. If the path
49282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49283   # take no chances and rewrite it.
49284   # Note: m4 eats our [], so we need to use [ and ] instead.
49285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49286   if test "x$has_forbidden_chars" != x; then
49287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49288     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49289     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49290     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49291       # Going to short mode and back again did indeed matter. Since short mode is
49292       # case insensitive, let's make it lowercase to improve readability.
49293       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49294       # Now convert it back to Unix-style (cygpath)
49295       input_path=`$CYGPATH -u "$shortmode_path"`
49296       new_path="$input_path"
49297     fi
49298   fi
49299 
49300   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49301   if test "x$test_cygdrive_prefix" = x; then
49302     # As a simple fix, exclude /usr/bin since it's not a real path.
49303     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49304       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49305       # a path prefixed by /cygdrive for fixpath to work.
49306       new_path="$CYGWIN_ROOT_PATH$input_path"
49307     fi
49308   fi
49309 
49310 
49311   if test "x$path" != "x$new_path"; then
49312     MSVC_DLL="$new_path"
49313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49314 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49315   fi
49316 
49317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49318 
49319   path="$MSVC_DLL"
49320   has_colon=`$ECHO $path | $GREP ^.:`
49321   new_path="$path"
49322   if test "x$has_colon" = x; then
49323     # Not in mixed or Windows style, start by that.
49324     new_path=`cmd //c echo $path`
49325   fi
49326 
49327 
49328   input_path="$new_path"
49329   # Check if we need to convert this using DOS-style short mode. If the path
49330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49331   # take no chances and rewrite it.
49332   # Note: m4 eats our [], so we need to use [ and ] instead.
49333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49334   if test "x$has_forbidden_chars" != x; then
49335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49336     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49337   fi
49338 
49339 
49340   windows_path="$new_path"
49341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49342     unix_path=`$CYGPATH -u "$windows_path"`
49343     new_path="$unix_path"
49344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49346     new_path="$unix_path"
49347   fi
49348 
49349   if test "x$path" != "x$new_path"; then
49350     MSVC_DLL="$new_path"
49351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49352 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49353   fi
49354 
49355   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49356   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49357 
49358   else
49359     # We're on a posix platform. Hooray! :)
49360     path="$MSVC_DLL"
49361     has_space=`$ECHO "$path" | $GREP " "`
49362     if test "x$has_space" != x; then
49363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49364 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49365       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49366     fi
49367 
49368     # Use eval to expand a potential ~
49369     eval path="$path"
49370     if test ! -f "$path" && test ! -d "$path"; then
49371       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49372     fi
49373 
49374     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49375   fi
49376 
49377       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49378 $as_echo_n "checking for $DLL_NAME... " >&6; }
49379       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49380 $as_echo "$MSVC_DLL" >&6; }
49381     else
49382       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49383 $as_echo "incorrect, ignoring" >&6; }
49384       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49385 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49386     fi
49387   fi
49388 
49389     fi
49390   fi
49391 
49392   if test "x$MSVC_DLL" = x; then
49393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49394 $as_echo_n "checking for $DLL_NAME... " >&6; }
49395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49396 $as_echo "no" >&6; }
49397     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49398   fi
49399 
49400     MSVCR_DLL="$MSVC_DLL"
49401   fi
49402 
49403 
49404 
49405 # Check whether --with-msvcp-dll was given.
49406 if test "${with_msvcp_dll+set}" = set; then :
49407   withval=$with_msvcp_dll;
49408 fi
49409 
49410 
49411   if test "x$MSVCP_NAME" != "x"; then
49412     if test "x$with_msvcp_dll" != x; then
49413       # If given explicitely by user, do not probe. If not present, fail directly.
49414 
49415   DLL_NAME="$MSVCP_NAME"
49416   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49417   METHOD="--with-msvcp-dll"
49418   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49419     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49420 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49421 
49422     # Need to check if the found msvcr is correct architecture
49423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49424 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49425     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49426     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49427       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49428       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49429       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49430         CORRECT_MSVCR_ARCH="PE32 executable"
49431       else
49432         CORRECT_MSVCR_ARCH="PE32+ executable"
49433       fi
49434     else
49435       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49436         CORRECT_MSVCR_ARCH=386
49437       else
49438         CORRECT_MSVCR_ARCH=x86-64
49439       fi
49440     fi
49441     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49442       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49443 $as_echo "ok" >&6; }
49444       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49445 
49446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49447 
49448   # Input might be given as Windows format, start by converting to
49449   # unix format.
49450   path="$MSVC_DLL"
49451   new_path=`$CYGPATH -u "$path"`
49452 
49453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49456   # "foo.exe" is OK but "foo" is an error.
49457   #
49458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49459   # It is also a way to make sure we got the proper file name for the real test later on.
49460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49461   if test "x$test_shortpath" = x; then
49462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49463 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49464     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49465   fi
49466 
49467   # Call helper function which possibly converts this using DOS-style short mode.
49468   # If so, the updated path is stored in $new_path.
49469 
49470   input_path="$new_path"
49471   # Check if we need to convert this using DOS-style short mode. If the path
49472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49473   # take no chances and rewrite it.
49474   # Note: m4 eats our [], so we need to use [ and ] instead.
49475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49476   if test "x$has_forbidden_chars" != x; then
49477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49481       # Going to short mode and back again did indeed matter. Since short mode is
49482       # case insensitive, let's make it lowercase to improve readability.
49483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49484       # Now convert it back to Unix-style (cygpath)
49485       input_path=`$CYGPATH -u "$shortmode_path"`
49486       new_path="$input_path"
49487     fi
49488   fi
49489 
49490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49491   if test "x$test_cygdrive_prefix" = x; then
49492     # As a simple fix, exclude /usr/bin since it's not a real path.
49493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49495       # a path prefixed by /cygdrive for fixpath to work.
49496       new_path="$CYGWIN_ROOT_PATH$input_path"
49497     fi
49498   fi
49499 
49500 
49501   if test "x$path" != "x$new_path"; then
49502     MSVC_DLL="$new_path"
49503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49504 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49505   fi
49506 
49507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49508 
49509   path="$MSVC_DLL"
49510   has_colon=`$ECHO $path | $GREP ^.:`
49511   new_path="$path"
49512   if test "x$has_colon" = x; then
49513     # Not in mixed or Windows style, start by that.
49514     new_path=`cmd //c echo $path`
49515   fi
49516 
49517 
49518   input_path="$new_path"
49519   # Check if we need to convert this using DOS-style short mode. If the path
49520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49521   # take no chances and rewrite it.
49522   # Note: m4 eats our [], so we need to use [ and ] instead.
49523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49524   if test "x$has_forbidden_chars" != x; then
49525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49527   fi
49528 
49529 
49530   windows_path="$new_path"
49531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49532     unix_path=`$CYGPATH -u "$windows_path"`
49533     new_path="$unix_path"
49534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49536     new_path="$unix_path"
49537   fi
49538 
49539   if test "x$path" != "x$new_path"; then
49540     MSVC_DLL="$new_path"
49541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49542 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49543   fi
49544 
49545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49547 
49548   else
49549     # We're on a posix platform. Hooray! :)
49550     path="$MSVC_DLL"
49551     has_space=`$ECHO "$path" | $GREP " "`
49552     if test "x$has_space" != x; then
49553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49554 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49555       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49556     fi
49557 
49558     # Use eval to expand a potential ~
49559     eval path="$path"
49560     if test ! -f "$path" && test ! -d "$path"; then
49561       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49562     fi
49563 
49564     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49565   fi
49566 
49567       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49568 $as_echo_n "checking for $DLL_NAME... " >&6; }
49569       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49570 $as_echo "$MSVC_DLL" >&6; }
49571     else
49572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49573 $as_echo "incorrect, ignoring" >&6; }
49574       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49575 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49576     fi
49577   fi
49578 
49579       if test "x$MSVC_DLL" = x; then
49580         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49581       fi
49582       MSVCP_DLL="$MSVC_DLL"
49583     elif test "x$DEVKIT_MSVCP_DLL" != x; then
49584 
49585   DLL_NAME="$MSVCP_NAME"
49586   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49587   METHOD="devkit"
49588   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49589     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49590 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49591 
49592     # Need to check if the found msvcr is correct architecture
49593     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49594 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49595     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49596     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49597       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49598       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49599       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49600         CORRECT_MSVCR_ARCH="PE32 executable"
49601       else
49602         CORRECT_MSVCR_ARCH="PE32+ executable"
49603       fi
49604     else
49605       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49606         CORRECT_MSVCR_ARCH=386
49607       else
49608         CORRECT_MSVCR_ARCH=x86-64
49609       fi
49610     fi
49611     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49612       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49613 $as_echo "ok" >&6; }
49614       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49615 
49616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49617 
49618   # Input might be given as Windows format, start by converting to
49619   # unix format.
49620   path="$MSVC_DLL"
49621   new_path=`$CYGPATH -u "$path"`
49622 
49623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49626   # "foo.exe" is OK but "foo" is an error.
49627   #
49628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49629   # It is also a way to make sure we got the proper file name for the real test later on.
49630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49631   if test "x$test_shortpath" = x; then
49632     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49633 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49634     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49635   fi
49636 
49637   # Call helper function which possibly converts this using DOS-style short mode.
49638   # If so, the updated path is stored in $new_path.
49639 
49640   input_path="$new_path"
49641   # Check if we need to convert this using DOS-style short mode. If the path
49642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49643   # take no chances and rewrite it.
49644   # Note: m4 eats our [], so we need to use [ and ] instead.
49645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49646   if test "x$has_forbidden_chars" != x; then
49647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49651       # Going to short mode and back again did indeed matter. Since short mode is
49652       # case insensitive, let's make it lowercase to improve readability.
49653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49654       # Now convert it back to Unix-style (cygpath)
49655       input_path=`$CYGPATH -u "$shortmode_path"`
49656       new_path="$input_path"
49657     fi
49658   fi
49659 
49660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49661   if test "x$test_cygdrive_prefix" = x; then
49662     # As a simple fix, exclude /usr/bin since it's not a real path.
49663     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49665       # a path prefixed by /cygdrive for fixpath to work.
49666       new_path="$CYGWIN_ROOT_PATH$input_path"
49667     fi
49668   fi
49669 
49670 
49671   if test "x$path" != "x$new_path"; then
49672     MSVC_DLL="$new_path"
49673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49674 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49675   fi
49676 
49677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49678 
49679   path="$MSVC_DLL"
49680   has_colon=`$ECHO $path | $GREP ^.:`
49681   new_path="$path"
49682   if test "x$has_colon" = x; then
49683     # Not in mixed or Windows style, start by that.
49684     new_path=`cmd //c echo $path`
49685   fi
49686 
49687 
49688   input_path="$new_path"
49689   # Check if we need to convert this using DOS-style short mode. If the path
49690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49691   # take no chances and rewrite it.
49692   # Note: m4 eats our [], so we need to use [ and ] instead.
49693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49694   if test "x$has_forbidden_chars" != x; then
49695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49697   fi
49698 
49699 
49700   windows_path="$new_path"
49701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49702     unix_path=`$CYGPATH -u "$windows_path"`
49703     new_path="$unix_path"
49704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49706     new_path="$unix_path"
49707   fi
49708 
49709   if test "x$path" != "x$new_path"; then
49710     MSVC_DLL="$new_path"
49711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49712 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49713   fi
49714 
49715   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49716   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49717 
49718   else
49719     # We're on a posix platform. Hooray! :)
49720     path="$MSVC_DLL"
49721     has_space=`$ECHO "$path" | $GREP " "`
49722     if test "x$has_space" != x; then
49723       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49724 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49725       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49726     fi
49727 
49728     # Use eval to expand a potential ~
49729     eval path="$path"
49730     if test ! -f "$path" && test ! -d "$path"; then
49731       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49732     fi
49733 
49734     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49735   fi
49736 
49737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49738 $as_echo_n "checking for $DLL_NAME... " >&6; }
49739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49740 $as_echo "$MSVC_DLL" >&6; }
49741     else
49742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49743 $as_echo "incorrect, ignoring" >&6; }
49744       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49745 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49746     fi
49747   fi
49748 
49749       if test "x$MSVC_DLL" = x; then
49750         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49751       fi
49752       MSVCP_DLL="$MSVC_DLL"
49753     else
49754 
49755   DLL_NAME="${MSVCP_NAME}"
49756   MSVC_DLL=
49757 
49758   if test "x$MSVC_DLL" = x; then
49759     # Probe: Using well-known location from Visual Studio 10.0
49760     if test "x$VCINSTALLDIR" != x; then
49761       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49762 
49763   windows_path="$CYGWIN_VC_INSTALL_DIR"
49764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49765     unix_path=`$CYGPATH -u "$windows_path"`
49766     CYGWIN_VC_INSTALL_DIR="$unix_path"
49767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49769     CYGWIN_VC_INSTALL_DIR="$unix_path"
49770   fi
49771 
49772       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49773         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49774       else
49775         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49776       fi
49777       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49778 
49779   DLL_NAME="$DLL_NAME"
49780   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49781   METHOD="well-known location in VCINSTALLDIR"
49782   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49783     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49784 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49785 
49786     # Need to check if the found msvcr is correct architecture
49787     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49788 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49789     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49791       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49792       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49793       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49794         CORRECT_MSVCR_ARCH="PE32 executable"
49795       else
49796         CORRECT_MSVCR_ARCH="PE32+ executable"
49797       fi
49798     else
49799       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49800         CORRECT_MSVCR_ARCH=386
49801       else
49802         CORRECT_MSVCR_ARCH=x86-64
49803       fi
49804     fi
49805     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49806       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49807 $as_echo "ok" >&6; }
49808       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49809 
49810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49811 
49812   # Input might be given as Windows format, start by converting to
49813   # unix format.
49814   path="$MSVC_DLL"
49815   new_path=`$CYGPATH -u "$path"`
49816 
49817   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49818   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49819   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49820   # "foo.exe" is OK but "foo" is an error.
49821   #
49822   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49823   # It is also a way to make sure we got the proper file name for the real test later on.
49824   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49825   if test "x$test_shortpath" = x; then
49826     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49827 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49828     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49829   fi
49830 
49831   # Call helper function which possibly converts this using DOS-style short mode.
49832   # If so, the updated path is stored in $new_path.
49833 
49834   input_path="$new_path"
49835   # Check if we need to convert this using DOS-style short mode. If the path
49836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49837   # take no chances and rewrite it.
49838   # Note: m4 eats our [], so we need to use [ and ] instead.
49839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49840   if test "x$has_forbidden_chars" != x; then
49841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49842     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49843     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49844     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49845       # Going to short mode and back again did indeed matter. Since short mode is
49846       # case insensitive, let's make it lowercase to improve readability.
49847       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49848       # Now convert it back to Unix-style (cygpath)
49849       input_path=`$CYGPATH -u "$shortmode_path"`
49850       new_path="$input_path"
49851     fi
49852   fi
49853 
49854   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49855   if test "x$test_cygdrive_prefix" = x; then
49856     # As a simple fix, exclude /usr/bin since it's not a real path.
49857     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49858       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49859       # a path prefixed by /cygdrive for fixpath to work.
49860       new_path="$CYGWIN_ROOT_PATH$input_path"
49861     fi
49862   fi
49863 
49864 
49865   if test "x$path" != "x$new_path"; then
49866     MSVC_DLL="$new_path"
49867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49868 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49869   fi
49870 
49871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49872 
49873   path="$MSVC_DLL"
49874   has_colon=`$ECHO $path | $GREP ^.:`
49875   new_path="$path"
49876   if test "x$has_colon" = x; then
49877     # Not in mixed or Windows style, start by that.
49878     new_path=`cmd //c echo $path`
49879   fi
49880 
49881 
49882   input_path="$new_path"
49883   # Check if we need to convert this using DOS-style short mode. If the path
49884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49885   # take no chances and rewrite it.
49886   # Note: m4 eats our [], so we need to use [ and ] instead.
49887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49888   if test "x$has_forbidden_chars" != x; then
49889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49890     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49891   fi
49892 
49893 
49894   windows_path="$new_path"
49895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49896     unix_path=`$CYGPATH -u "$windows_path"`
49897     new_path="$unix_path"
49898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49900     new_path="$unix_path"
49901   fi
49902 
49903   if test "x$path" != "x$new_path"; then
49904     MSVC_DLL="$new_path"
49905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49906 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49907   fi
49908 
49909   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49910   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49911 
49912   else
49913     # We're on a posix platform. Hooray! :)
49914     path="$MSVC_DLL"
49915     has_space=`$ECHO "$path" | $GREP " "`
49916     if test "x$has_space" != x; then
49917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49918 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49919       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49920     fi
49921 
49922     # Use eval to expand a potential ~
49923     eval path="$path"
49924     if test ! -f "$path" && test ! -d "$path"; then
49925       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49926     fi
49927 
49928     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49929   fi
49930 
49931       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49932 $as_echo_n "checking for $DLL_NAME... " >&6; }
49933       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49934 $as_echo "$MSVC_DLL" >&6; }
49935     else
49936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49937 $as_echo "incorrect, ignoring" >&6; }
49938       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49939 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49940     fi
49941   fi
49942 
49943     fi
49944   fi
49945 
49946   if test "x$MSVC_DLL" = x; then
49947     # Probe: Check in the Boot JDK directory.
49948     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49949 
49950   DLL_NAME="$DLL_NAME"
49951   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49952   METHOD="well-known location in Boot JDK"
49953   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49954     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49955 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49956 
49957     # Need to check if the found msvcr is correct architecture
49958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49959 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49960     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49962       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49963       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49964       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49965         CORRECT_MSVCR_ARCH="PE32 executable"
49966       else
49967         CORRECT_MSVCR_ARCH="PE32+ executable"
49968       fi
49969     else
49970       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49971         CORRECT_MSVCR_ARCH=386
49972       else
49973         CORRECT_MSVCR_ARCH=x86-64
49974       fi
49975     fi
49976     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49977       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49978 $as_echo "ok" >&6; }
49979       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49980 
49981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49982 
49983   # Input might be given as Windows format, start by converting to
49984   # unix format.
49985   path="$MSVC_DLL"
49986   new_path=`$CYGPATH -u "$path"`
49987 
49988   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49989   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49990   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49991   # "foo.exe" is OK but "foo" is an error.
49992   #
49993   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49994   # It is also a way to make sure we got the proper file name for the real test later on.
49995   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49996   if test "x$test_shortpath" = x; then
49997     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49998 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49999     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50000   fi
50001 
50002   # Call helper function which possibly converts this using DOS-style short mode.
50003   # If so, the updated path is stored in $new_path.
50004 
50005   input_path="$new_path"
50006   # Check if we need to convert this using DOS-style short mode. If the path
50007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50008   # take no chances and rewrite it.
50009   # Note: m4 eats our [], so we need to use [ and ] instead.
50010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50011   if test "x$has_forbidden_chars" != x; then
50012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50013     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50014     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50015     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50016       # Going to short mode and back again did indeed matter. Since short mode is
50017       # case insensitive, let's make it lowercase to improve readability.
50018       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50019       # Now convert it back to Unix-style (cygpath)
50020       input_path=`$CYGPATH -u "$shortmode_path"`
50021       new_path="$input_path"
50022     fi
50023   fi
50024 
50025   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50026   if test "x$test_cygdrive_prefix" = x; then
50027     # As a simple fix, exclude /usr/bin since it's not a real path.
50028     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50029       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50030       # a path prefixed by /cygdrive for fixpath to work.
50031       new_path="$CYGWIN_ROOT_PATH$input_path"
50032     fi
50033   fi
50034 
50035 
50036   if test "x$path" != "x$new_path"; then
50037     MSVC_DLL="$new_path"
50038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50039 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50040   fi
50041 
50042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50043 
50044   path="$MSVC_DLL"
50045   has_colon=`$ECHO $path | $GREP ^.:`
50046   new_path="$path"
50047   if test "x$has_colon" = x; then
50048     # Not in mixed or Windows style, start by that.
50049     new_path=`cmd //c echo $path`
50050   fi
50051 
50052 
50053   input_path="$new_path"
50054   # Check if we need to convert this using DOS-style short mode. If the path
50055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50056   # take no chances and rewrite it.
50057   # Note: m4 eats our [], so we need to use [ and ] instead.
50058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50059   if test "x$has_forbidden_chars" != x; then
50060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50061     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50062   fi
50063 
50064 
50065   windows_path="$new_path"
50066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50067     unix_path=`$CYGPATH -u "$windows_path"`
50068     new_path="$unix_path"
50069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50071     new_path="$unix_path"
50072   fi
50073 
50074   if test "x$path" != "x$new_path"; then
50075     MSVC_DLL="$new_path"
50076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50077 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50078   fi
50079 
50080   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50081   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50082 
50083   else
50084     # We're on a posix platform. Hooray! :)
50085     path="$MSVC_DLL"
50086     has_space=`$ECHO "$path" | $GREP " "`
50087     if test "x$has_space" != x; then
50088       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50089 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50090       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50091     fi
50092 
50093     # Use eval to expand a potential ~
50094     eval path="$path"
50095     if test ! -f "$path" && test ! -d "$path"; then
50096       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50097     fi
50098 
50099     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50100   fi
50101 
50102       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50103 $as_echo_n "checking for $DLL_NAME... " >&6; }
50104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50105 $as_echo "$MSVC_DLL" >&6; }
50106     else
50107       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50108 $as_echo "incorrect, ignoring" >&6; }
50109       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50110 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50111     fi
50112   fi
50113 
50114   fi
50115 
50116   if test "x$MSVC_DLL" = x; then
50117     # Probe: Look in the Windows system32 directory
50118     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50119 
50120   windows_path="$CYGWIN_SYSTEMROOT"
50121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50122     unix_path=`$CYGPATH -u "$windows_path"`
50123     CYGWIN_SYSTEMROOT="$unix_path"
50124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50126     CYGWIN_SYSTEMROOT="$unix_path"
50127   fi
50128 
50129     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50130 
50131   DLL_NAME="$DLL_NAME"
50132   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50133   METHOD="well-known location in SYSTEMROOT"
50134   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50135     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50136 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50137 
50138     # Need to check if the found msvcr is correct architecture
50139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50140 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50141     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50142     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50143       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50144       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50145       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50146         CORRECT_MSVCR_ARCH="PE32 executable"
50147       else
50148         CORRECT_MSVCR_ARCH="PE32+ executable"
50149       fi
50150     else
50151       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50152         CORRECT_MSVCR_ARCH=386
50153       else
50154         CORRECT_MSVCR_ARCH=x86-64
50155       fi
50156     fi
50157     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50158       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50159 $as_echo "ok" >&6; }
50160       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50161 
50162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50163 
50164   # Input might be given as Windows format, start by converting to
50165   # unix format.
50166   path="$MSVC_DLL"
50167   new_path=`$CYGPATH -u "$path"`
50168 
50169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50172   # "foo.exe" is OK but "foo" is an error.
50173   #
50174   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50175   # It is also a way to make sure we got the proper file name for the real test later on.
50176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50177   if test "x$test_shortpath" = x; then
50178     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50179 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50180     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50181   fi
50182 
50183   # Call helper function which possibly converts this using DOS-style short mode.
50184   # If so, the updated path is stored in $new_path.
50185 
50186   input_path="$new_path"
50187   # Check if we need to convert this using DOS-style short mode. If the path
50188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50189   # take no chances and rewrite it.
50190   # Note: m4 eats our [], so we need to use [ and ] instead.
50191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50192   if test "x$has_forbidden_chars" != x; then
50193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50197       # Going to short mode and back again did indeed matter. Since short mode is
50198       # case insensitive, let's make it lowercase to improve readability.
50199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50200       # Now convert it back to Unix-style (cygpath)
50201       input_path=`$CYGPATH -u "$shortmode_path"`
50202       new_path="$input_path"
50203     fi
50204   fi
50205 
50206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50207   if test "x$test_cygdrive_prefix" = x; then
50208     # As a simple fix, exclude /usr/bin since it's not a real path.
50209     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50211       # a path prefixed by /cygdrive for fixpath to work.
50212       new_path="$CYGWIN_ROOT_PATH$input_path"
50213     fi
50214   fi
50215 
50216 
50217   if test "x$path" != "x$new_path"; then
50218     MSVC_DLL="$new_path"
50219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50220 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50221   fi
50222 
50223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50224 
50225   path="$MSVC_DLL"
50226   has_colon=`$ECHO $path | $GREP ^.:`
50227   new_path="$path"
50228   if test "x$has_colon" = x; then
50229     # Not in mixed or Windows style, start by that.
50230     new_path=`cmd //c echo $path`
50231   fi
50232 
50233 
50234   input_path="$new_path"
50235   # Check if we need to convert this using DOS-style short mode. If the path
50236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50237   # take no chances and rewrite it.
50238   # Note: m4 eats our [], so we need to use [ and ] instead.
50239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50240   if test "x$has_forbidden_chars" != x; then
50241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50242     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50243   fi
50244 
50245 
50246   windows_path="$new_path"
50247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50248     unix_path=`$CYGPATH -u "$windows_path"`
50249     new_path="$unix_path"
50250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50252     new_path="$unix_path"
50253   fi
50254 
50255   if test "x$path" != "x$new_path"; then
50256     MSVC_DLL="$new_path"
50257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50258 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50259   fi
50260 
50261   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50262   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50263 
50264   else
50265     # We're on a posix platform. Hooray! :)
50266     path="$MSVC_DLL"
50267     has_space=`$ECHO "$path" | $GREP " "`
50268     if test "x$has_space" != x; then
50269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50270 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50271       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50272     fi
50273 
50274     # Use eval to expand a potential ~
50275     eval path="$path"
50276     if test ! -f "$path" && test ! -d "$path"; then
50277       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50278     fi
50279 
50280     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50281   fi
50282 
50283       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50284 $as_echo_n "checking for $DLL_NAME... " >&6; }
50285       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50286 $as_echo "$MSVC_DLL" >&6; }
50287     else
50288       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50289 $as_echo "incorrect, ignoring" >&6; }
50290       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50291 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50292     fi
50293   fi
50294 
50295   fi
50296 
50297   if test "x$MSVC_DLL" = x; then
50298     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50299     if test "x$VS100COMNTOOLS" != x; then
50300       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50301 
50302   windows_path="$CYGWIN_VS_TOOLS_DIR"
50303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50304     unix_path=`$CYGPATH -u "$windows_path"`
50305     CYGWIN_VS_TOOLS_DIR="$unix_path"
50306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50308     CYGWIN_VS_TOOLS_DIR="$unix_path"
50309   fi
50310 
50311       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50312         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50313             | $GREP -i /x64/ | $HEAD --lines 1`
50314       else
50315         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50316             | $GREP -i /x86/ | $HEAD --lines 1`
50317       fi
50318 
50319   DLL_NAME="$DLL_NAME"
50320   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50321   METHOD="search of VS100COMNTOOLS"
50322   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50323     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50324 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50325 
50326     # Need to check if the found msvcr is correct architecture
50327     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50328 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50329     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50330     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50331       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50332       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50333       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50334         CORRECT_MSVCR_ARCH="PE32 executable"
50335       else
50336         CORRECT_MSVCR_ARCH="PE32+ executable"
50337       fi
50338     else
50339       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50340         CORRECT_MSVCR_ARCH=386
50341       else
50342         CORRECT_MSVCR_ARCH=x86-64
50343       fi
50344     fi
50345     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50346       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50347 $as_echo "ok" >&6; }
50348       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50349 
50350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50351 
50352   # Input might be given as Windows format, start by converting to
50353   # unix format.
50354   path="$MSVC_DLL"
50355   new_path=`$CYGPATH -u "$path"`
50356 
50357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50360   # "foo.exe" is OK but "foo" is an error.
50361   #
50362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50363   # It is also a way to make sure we got the proper file name for the real test later on.
50364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50365   if test "x$test_shortpath" = x; then
50366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50367 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50368     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50369   fi
50370 
50371   # Call helper function which possibly converts this using DOS-style short mode.
50372   # If so, the updated path is stored in $new_path.
50373 
50374   input_path="$new_path"
50375   # Check if we need to convert this using DOS-style short mode. If the path
50376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50377   # take no chances and rewrite it.
50378   # Note: m4 eats our [], so we need to use [ and ] instead.
50379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50380   if test "x$has_forbidden_chars" != x; then
50381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50385       # Going to short mode and back again did indeed matter. Since short mode is
50386       # case insensitive, let's make it lowercase to improve readability.
50387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50388       # Now convert it back to Unix-style (cygpath)
50389       input_path=`$CYGPATH -u "$shortmode_path"`
50390       new_path="$input_path"
50391     fi
50392   fi
50393 
50394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50395   if test "x$test_cygdrive_prefix" = x; then
50396     # As a simple fix, exclude /usr/bin since it's not a real path.
50397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50399       # a path prefixed by /cygdrive for fixpath to work.
50400       new_path="$CYGWIN_ROOT_PATH$input_path"
50401     fi
50402   fi
50403 
50404 
50405   if test "x$path" != "x$new_path"; then
50406     MSVC_DLL="$new_path"
50407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50408 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50409   fi
50410 
50411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50412 
50413   path="$MSVC_DLL"
50414   has_colon=`$ECHO $path | $GREP ^.:`
50415   new_path="$path"
50416   if test "x$has_colon" = x; then
50417     # Not in mixed or Windows style, start by that.
50418     new_path=`cmd //c echo $path`
50419   fi
50420 
50421 
50422   input_path="$new_path"
50423   # Check if we need to convert this using DOS-style short mode. If the path
50424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50425   # take no chances and rewrite it.
50426   # Note: m4 eats our [], so we need to use [ and ] instead.
50427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50428   if test "x$has_forbidden_chars" != x; then
50429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50431   fi
50432 
50433 
50434   windows_path="$new_path"
50435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50436     unix_path=`$CYGPATH -u "$windows_path"`
50437     new_path="$unix_path"
50438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50440     new_path="$unix_path"
50441   fi
50442 
50443   if test "x$path" != "x$new_path"; then
50444     MSVC_DLL="$new_path"
50445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50446 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50447   fi
50448 
50449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50451 
50452   else
50453     # We're on a posix platform. Hooray! :)
50454     path="$MSVC_DLL"
50455     has_space=`$ECHO "$path" | $GREP " "`
50456     if test "x$has_space" != x; then
50457       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50458 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50459       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50460     fi
50461 
50462     # Use eval to expand a potential ~
50463     eval path="$path"
50464     if test ! -f "$path" && test ! -d "$path"; then
50465       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50466     fi
50467 
50468     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50469   fi
50470 
50471       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50472 $as_echo_n "checking for $DLL_NAME... " >&6; }
50473       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50474 $as_echo "$MSVC_DLL" >&6; }
50475     else
50476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50477 $as_echo "incorrect, ignoring" >&6; }
50478       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50479 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50480     fi
50481   fi
50482 
50483     fi
50484   fi
50485 
50486   if test "x$MSVC_DLL" = x; then
50487     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50488     # (This was the original behaviour; kept since it might turn something up)
50489     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50490       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50491         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50492           | $GREP x64 | $HEAD --lines 1`
50493       else
50494         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50495           | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50496         if test "x$POSSIBLE_MSVC_DLL" = x; then
50497           # We're grasping at straws now...
50498           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50499               | $HEAD --lines 1`
50500         fi
50501       fi
50502 
50503 
50504   DLL_NAME="$DLL_NAME"
50505   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50506   METHOD="search of VCINSTALLDIR"
50507   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50508     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50509 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50510 
50511     # Need to check if the found msvcr is correct architecture
50512     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50513 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50514     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50515     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50516       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50517       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50518       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50519         CORRECT_MSVCR_ARCH="PE32 executable"
50520       else
50521         CORRECT_MSVCR_ARCH="PE32+ executable"
50522       fi
50523     else
50524       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50525         CORRECT_MSVCR_ARCH=386
50526       else
50527         CORRECT_MSVCR_ARCH=x86-64
50528       fi
50529     fi
50530     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50531       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50532 $as_echo "ok" >&6; }
50533       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50534 
50535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50536 
50537   # Input might be given as Windows format, start by converting to
50538   # unix format.
50539   path="$MSVC_DLL"
50540   new_path=`$CYGPATH -u "$path"`
50541 
50542   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50543   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50544   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50545   # "foo.exe" is OK but "foo" is an error.
50546   #
50547   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50548   # It is also a way to make sure we got the proper file name for the real test later on.
50549   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50550   if test "x$test_shortpath" = x; then
50551     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50552 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50553     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50554   fi
50555 
50556   # Call helper function which possibly converts this using DOS-style short mode.
50557   # If so, the updated path is stored in $new_path.
50558 
50559   input_path="$new_path"
50560   # Check if we need to convert this using DOS-style short mode. If the path
50561   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50562   # take no chances and rewrite it.
50563   # Note: m4 eats our [], so we need to use [ and ] instead.
50564   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50565   if test "x$has_forbidden_chars" != x; then
50566     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50567     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50568     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50569     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50570       # Going to short mode and back again did indeed matter. Since short mode is
50571       # case insensitive, let's make it lowercase to improve readability.
50572       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50573       # Now convert it back to Unix-style (cygpath)
50574       input_path=`$CYGPATH -u "$shortmode_path"`
50575       new_path="$input_path"
50576     fi
50577   fi
50578 
50579   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50580   if test "x$test_cygdrive_prefix" = x; then
50581     # As a simple fix, exclude /usr/bin since it's not a real path.
50582     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50583       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50584       # a path prefixed by /cygdrive for fixpath to work.
50585       new_path="$CYGWIN_ROOT_PATH$input_path"
50586     fi
50587   fi
50588 
50589 
50590   if test "x$path" != "x$new_path"; then
50591     MSVC_DLL="$new_path"
50592     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50593 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50594   fi
50595 
50596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50597 
50598   path="$MSVC_DLL"
50599   has_colon=`$ECHO $path | $GREP ^.:`
50600   new_path="$path"
50601   if test "x$has_colon" = x; then
50602     # Not in mixed or Windows style, start by that.
50603     new_path=`cmd //c echo $path`
50604   fi
50605 
50606 
50607   input_path="$new_path"
50608   # Check if we need to convert this using DOS-style short mode. If the path
50609   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50610   # take no chances and rewrite it.
50611   # Note: m4 eats our [], so we need to use [ and ] instead.
50612   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50613   if test "x$has_forbidden_chars" != x; then
50614     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50615     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50616   fi
50617 
50618 
50619   windows_path="$new_path"
50620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50621     unix_path=`$CYGPATH -u "$windows_path"`
50622     new_path="$unix_path"
50623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50625     new_path="$unix_path"
50626   fi
50627 
50628   if test "x$path" != "x$new_path"; then
50629     MSVC_DLL="$new_path"
50630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50631 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50632   fi
50633 
50634   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50635   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50636 
50637   else
50638     # We're on a posix platform. Hooray! :)
50639     path="$MSVC_DLL"
50640     has_space=`$ECHO "$path" | $GREP " "`
50641     if test "x$has_space" != x; then
50642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50643 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50644       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50645     fi
50646 
50647     # Use eval to expand a potential ~
50648     eval path="$path"
50649     if test ! -f "$path" && test ! -d "$path"; then
50650       as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50651     fi
50652 
50653     MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50654   fi
50655 
50656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50657 $as_echo_n "checking for $DLL_NAME... " >&6; }
50658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50659 $as_echo "$MSVC_DLL" >&6; }
50660     else
50661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50662 $as_echo "incorrect, ignoring" >&6; }
50663       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50664 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50665     fi
50666   fi
50667 
50668     fi
50669   fi
50670 
50671   if test "x$MSVC_DLL" = x; then
50672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50673 $as_echo_n "checking for $DLL_NAME... " >&6; }
50674     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50675 $as_echo "no" >&6; }
50676     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50677   fi
50678 
50679       MSVCP_DLL="$MSVC_DLL"
50680     fi
50681 
50682   fi
50683 
50684 
50685 
50686 # Check whether --with-dxsdk was given.
50687 if test "${with_dxsdk+set}" = set; then :
50688   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50689 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50690 fi
50691 
50692 
50693 
50694 
50695 # Check whether --with-dxsdk-lib was given.
50696 if test "${with_dxsdk_lib+set}" = set; then :
50697   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50698 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50699 fi
50700 
50701 
50702 
50703 
50704 # Check whether --with-dxsdk-include was given.
50705 if test "${with_dxsdk_include+set}" = set; then :
50706   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50707 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50708 fi
50709 
50710 
50711   fi
50712 
50713 
50714 ###############################################################################
50715 #
50716 # We need to do some final tweaking, when everything else is done.
50717 #
50718 ###############################################################################
50719 
50720 
50721   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50722 
50723 
50724   # The name of the Service Agent jar.
50725   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50726   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50727     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50728   fi
50729 
50730 
50731 
50732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50733 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50734 
50735     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
50736       ENABLE_INTREE_EC=yes
50737       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50738 $as_echo "yes" >&6; }
50739     else
50740       ENABLE_INTREE_EC=no
50741       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50742 $as_echo "no" >&6; }
50743     fi
50744 
50745 
50746 
50747 
50748 ###############################################################################
50749 #
50750 # Configure parts of the build that only affect the build performance,
50751 # not the result.
50752 #
50753 ###############################################################################
50754 
50755 
50756   # How many cores do we have on this build system?
50757 
50758 # Check whether --with-num-cores was given.
50759 if test "${with_num_cores+set}" = set; then :
50760   withval=$with_num_cores;
50761 fi
50762 
50763   if test "x$with_num_cores" = x; then
50764     # The number of cores were not specified, try to probe them.
50765 
50766   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50767 $as_echo_n "checking for number of cores... " >&6; }
50768   NUM_CORES=1
50769   FOUND_CORES=no
50770 
50771   if test -f /proc/cpuinfo; then
50772     # Looks like a Linux (or cygwin) system
50773     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50774     FOUND_CORES=yes
50775   elif test -x /usr/sbin/psrinfo; then
50776     # Looks like a Solaris system
50777     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50778     FOUND_CORES=yes
50779   elif test -x /usr/sbin/system_profiler; then
50780     # Looks like a MacOSX system
50781     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50782     FOUND_CORES=yes
50783   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50784     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50785     FOUND_CORES=yes
50786   elif test -n "$NUMBER_OF_PROCESSORS"; then
50787     # On windows, look in the env
50788     NUM_CORES=$NUMBER_OF_PROCESSORS
50789     FOUND_CORES=yes
50790   fi
50791 
50792   if test "x$FOUND_CORES" = xyes; then
50793     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50794 $as_echo "$NUM_CORES" >&6; }
50795   else
50796     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50797 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
50798     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50799 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50800   fi
50801 
50802   else
50803     NUM_CORES=$with_num_cores
50804   fi
50805 
50806 
50807 
50808   # How much memory do we have on this build system?
50809 
50810 # Check whether --with-memory-size was given.
50811 if test "${with_memory_size+set}" = set; then :
50812   withval=$with_memory_size;
50813 fi
50814 
50815   if test "x$with_memory_size" = x; then
50816     # The memory size was not specified, try to probe it.
50817 
50818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50819 $as_echo_n "checking for memory size... " >&6; }
50820   # Default to 1024 MB
50821   MEMORY_SIZE=1024
50822   FOUND_MEM=no
50823 
50824   if test -f /proc/meminfo; then
50825     # Looks like a Linux (or cygwin) system
50826     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50827     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50828     FOUND_MEM=yes
50829   elif test -x /usr/sbin/prtconf; then
50830     # Looks like a Solaris or AIX system
50831     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50832     FOUND_MEM=yes
50833   elif test -x /usr/sbin/system_profiler; then
50834     # Looks like a MacOSX system
50835     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50836     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50837     FOUND_MEM=yes
50838   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50839     # Windows, but without cygwin
50840     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50841     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50842     FOUND_MEM=yes
50843   fi
50844 
50845   if test "x$FOUND_MEM" = xyes; then
50846     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50847 $as_echo "$MEMORY_SIZE MB" >&6; }
50848   else
50849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
50850 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
50851     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50852 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50853   fi
50854 
50855   else
50856     MEMORY_SIZE=$with_memory_size
50857   fi
50858 
50859 
50860 
50861   # Provide a decent default number of parallel jobs for make depending on
50862   # number of cores, amount of memory and machine architecture.
50863 
50864 # Check whether --with-jobs was given.
50865 if test "${with_jobs+set}" = set; then :
50866   withval=$with_jobs;
50867 fi
50868 
50869   if test "x$with_jobs" = x; then
50870     # Number of jobs was not specified, calculate.
50871     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50872 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50873     # Approximate memory in GB, rounding up a bit.
50874     memory_gb=`expr $MEMORY_SIZE / 1100`
50875     # Pick the lowest of memory in gb and number of cores.
50876     if test "$memory_gb" -lt "$NUM_CORES"; then
50877       JOBS="$memory_gb"
50878     else
50879       JOBS="$NUM_CORES"
50880       # On bigger machines, leave some room for other processes to run
50881       if test "$JOBS" -gt "4"; then
50882         JOBS=`expr $JOBS '*' 90 / 100`
50883       fi
50884     fi
50885     # Cap number of jobs to 16
50886     if test "$JOBS" -gt "16"; then
50887       JOBS=16
50888     fi
50889     if test "$JOBS" -eq "0"; then
50890       JOBS=1
50891     fi
50892     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50893 $as_echo "$JOBS" >&6; }
50894   else
50895     JOBS=$with_jobs
50896   fi
50897 
50898 
50899 
50900 # Setup smart javac (after cores and memory have been setup)
50901 
50902 
50903 # Check whether --with-sjavac-server-java was given.
50904 if test "${with_sjavac_server_java+set}" = set; then :
50905   withval=$with_sjavac_server_java;
50906 fi
50907 
50908 
50909   if test "x$with_sjavac_server_java" != x; then
50910     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50911     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50912     if test "x$FOUND_VERSION" = x; then
50913       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50914     fi
50915   else
50916     SJAVAC_SERVER_JAVA=""
50917     # Hotspot specific options.
50918 
50919   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
50920   $ECHO "Command: $JAVA -verbosegc -version" >&5
50921   OUTPUT=`$JAVA -verbosegc -version 2>&1`
50922   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50923   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50924   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50925     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
50926     JVM_ARG_OK=true
50927   else
50928     $ECHO "Arg failed:" >&5
50929     $ECHO "$OUTPUT" >&5
50930     JVM_ARG_OK=false
50931   fi
50932 
50933     # JRockit specific options.
50934 
50935   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
50936   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
50937   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
50938   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50939   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50940   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50941     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
50942     JVM_ARG_OK=true
50943   else
50944     $ECHO "Arg failed:" >&5
50945     $ECHO "$OUTPUT" >&5
50946     JVM_ARG_OK=false
50947   fi
50948 
50949     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
50950   fi
50951 
50952 
50953   if test "$MEMORY_SIZE" -gt "2500"; then
50954 
50955   $ECHO "Check if jvm arg is ok: -d64" >&5
50956   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50957   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50958   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50959   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50960   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50961     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
50962     JVM_ARG_OK=true
50963   else
50964     $ECHO "Arg failed:" >&5
50965     $ECHO "$OUTPUT" >&5
50966     JVM_ARG_OK=false
50967   fi
50968 
50969     if test "$JVM_ARG_OK" = true; then
50970       JVM_64BIT=true
50971       JVM_ARG_OK=false
50972     fi
50973   fi
50974 
50975   if test "$JVM_64BIT" = true; then
50976     if test "$MEMORY_SIZE" -gt "17000"; then
50977 
50978   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
50979   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
50980   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
50981   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50982   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50983   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50984     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
50985     JVM_ARG_OK=true
50986   else
50987     $ECHO "Arg failed:" >&5
50988     $ECHO "$OUTPUT" >&5
50989     JVM_ARG_OK=false
50990   fi
50991 
50992     fi
50993     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
50994 
50995   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
50996   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
50997   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
50998   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50999   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51000   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51001     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
51002     JVM_ARG_OK=true
51003   else
51004     $ECHO "Arg failed:" >&5
51005     $ECHO "$OUTPUT" >&5
51006     JVM_ARG_OK=false
51007   fi
51008 
51009     fi
51010     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
51011 
51012   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
51013   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
51014   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
51015   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51016   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51017   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51018     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
51019     JVM_ARG_OK=true
51020   else
51021     $ECHO "Arg failed:" >&5
51022     $ECHO "$OUTPUT" >&5
51023     JVM_ARG_OK=false
51024   fi
51025 
51026     fi
51027     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
51028 
51029   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
51030   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
51031   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
51032   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51033   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51034   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51035     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
51036     JVM_ARG_OK=true
51037   else
51038     $ECHO "Arg failed:" >&5
51039     $ECHO "$OUTPUT" >&5
51040     JVM_ARG_OK=false
51041   fi
51042 
51043     fi
51044   fi
51045   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
51046 
51047   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
51048   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
51049   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
51050   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51051   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51052   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51053     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
51054     JVM_ARG_OK=true
51055   else
51056     $ECHO "Arg failed:" >&5
51057     $ECHO "$OUTPUT" >&5
51058     JVM_ARG_OK=false
51059   fi
51060 
51061   fi
51062   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
51063 
51064   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
51065   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
51066   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
51067   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51068   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51069   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51070     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
51071     JVM_ARG_OK=true
51072   else
51073     $ECHO "Arg failed:" >&5
51074     $ECHO "$OUTPUT" >&5
51075     JVM_ARG_OK=false
51076   fi
51077 
51078   fi
51079   if test "$JVM_ARG_OK" = false; then
51080 
51081   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
51082   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
51083   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
51084   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51085   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51086   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51087     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
51088     JVM_ARG_OK=true
51089   else
51090     $ECHO "Arg failed:" >&5
51091     $ECHO "$OUTPUT" >&5
51092     JVM_ARG_OK=false
51093   fi
51094 
51095   fi
51096 
51097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51098 $as_echo_n "checking whether to use sjavac... " >&6; }
51099   # Check whether --enable-sjavac was given.
51100 if test "${enable_sjavac+set}" = set; then :
51101   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51102 else
51103   ENABLE_SJAVAC='no'
51104 fi
51105 
51106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51107 $as_echo "$ENABLE_SJAVAC" >&6; }
51108 
51109 
51110   if test "x$ENABLE_SJAVAC" = xyes; then
51111     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51112   else
51113     SJAVAC_SERVER_DIR=
51114   fi
51115 
51116 
51117 
51118 # Can the C/C++ compiler use precompiled headers?
51119 
51120 
51121   ###############################################################################
51122   #
51123   # Can the C/C++ compiler use precompiled headers?
51124   #
51125   # Check whether --enable-precompiled-headers was given.
51126 if test "${enable_precompiled_headers+set}" = set; then :
51127   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51128 else
51129   ENABLE_PRECOMPH=yes
51130 fi
51131 
51132 
51133   USE_PRECOMPILED_HEADER=1
51134   if test "x$ENABLE_PRECOMPH" = xno; then
51135     USE_PRECOMPILED_HEADER=0
51136   fi
51137 
51138   if test "x$ENABLE_PRECOMPH" = xyes; then
51139     # Check that the compiler actually supports precomp headers.
51140     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51141       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51142 $as_echo_n "checking that precompiled headers work... " >&6; }
51143       echo "int alfa();" > conftest.h
51144       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51145       if test ! -f conftest.hpp.gch; then
51146         USE_PRECOMPILED_HEADER=0
51147         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51148 $as_echo "no" >&6; }
51149       else
51150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51151 $as_echo "yes" >&6; }
51152       fi
51153       rm -f conftest.h conftest.hpp.gch
51154     fi
51155   fi
51156 
51157 
51158 
51159 
51160 # Setup use of ccache, if available
51161 
51162   # Check whether --enable-ccache was given.
51163 if test "${enable_ccache+set}" = set; then :
51164   enableval=$enable_ccache;
51165 fi
51166 
51167 
51168   CCACHE=
51169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51170 $as_echo_n "checking is ccache enabled... " >&6; }
51171   ENABLE_CCACHE=$enable_ccache
51172   if test "x$enable_ccache" = xyes; then
51173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51174 $as_echo "yes" >&6; }
51175     OLD_PATH="$PATH"
51176     if test "x$TOOLCHAIN_PATH" != x; then
51177       PATH=$TOOLCHAIN_PATH:$PATH
51178     fi
51179 
51180 
51181 
51182   # Publish this variable in the help.
51183 
51184 
51185   if test "x$CCACHE" = x; then
51186     # The variable is not set by user, try to locate tool using the code snippet
51187     for ac_prog in ccache
51188 do
51189   # Extract the first word of "$ac_prog", so it can be a program name with args.
51190 set dummy $ac_prog; ac_word=$2
51191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51192 $as_echo_n "checking for $ac_word... " >&6; }
51193 if ${ac_cv_path_CCACHE+:} false; then :
51194   $as_echo_n "(cached) " >&6
51195 else
51196   case $CCACHE in
51197   [\\/]* | ?:[\\/]*)
51198   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51199   ;;
51200   *)
51201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51202 for as_dir in $PATH
51203 do
51204   IFS=$as_save_IFS
51205   test -z "$as_dir" && as_dir=.
51206     for ac_exec_ext in '' $ac_executable_extensions; do
51207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51208     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51210     break 2
51211   fi
51212 done
51213   done
51214 IFS=$as_save_IFS
51215 
51216   ;;
51217 esac
51218 fi
51219 CCACHE=$ac_cv_path_CCACHE
51220 if test -n "$CCACHE"; then
51221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51222 $as_echo "$CCACHE" >&6; }
51223 else
51224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51225 $as_echo "no" >&6; }
51226 fi
51227 
51228 
51229   test -n "$CCACHE" && break
51230 done
51231 
51232   else
51233     # The variable is set, but is it from the command line or the environment?
51234 
51235     # Try to remove the string !CCACHE! from our list.
51236     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51237     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51238       # If it failed, the variable was not from the command line. Ignore it,
51239       # but warn the user (except for BASH, which is always set by the calling BASH).
51240       if test "xCCACHE" != xBASH; then
51241         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51242 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51243       fi
51244       # Try to locate tool using the code snippet
51245       for ac_prog in ccache
51246 do
51247   # Extract the first word of "$ac_prog", so it can be a program name with args.
51248 set dummy $ac_prog; ac_word=$2
51249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51250 $as_echo_n "checking for $ac_word... " >&6; }
51251 if ${ac_cv_path_CCACHE+:} false; then :
51252   $as_echo_n "(cached) " >&6
51253 else
51254   case $CCACHE in
51255   [\\/]* | ?:[\\/]*)
51256   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51257   ;;
51258   *)
51259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51260 for as_dir in $PATH
51261 do
51262   IFS=$as_save_IFS
51263   test -z "$as_dir" && as_dir=.
51264     for ac_exec_ext in '' $ac_executable_extensions; do
51265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51266     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51268     break 2
51269   fi
51270 done
51271   done
51272 IFS=$as_save_IFS
51273 
51274   ;;
51275 esac
51276 fi
51277 CCACHE=$ac_cv_path_CCACHE
51278 if test -n "$CCACHE"; then
51279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51280 $as_echo "$CCACHE" >&6; }
51281 else
51282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51283 $as_echo "no" >&6; }
51284 fi
51285 
51286 
51287   test -n "$CCACHE" && break
51288 done
51289 
51290     else
51291       # If it succeeded, then it was overridden by the user. We will use it
51292       # for the tool.
51293 
51294       # First remove it from the list of overridden variables, so we can test
51295       # for unknown variables in the end.
51296       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51297 
51298       # Check if the provided tool contains a complete path.
51299       tool_specified="$CCACHE"
51300       tool_basename="${tool_specified##*/}"
51301       if test "x$tool_basename" = "x$tool_specified"; then
51302         # A command without a complete path is provided, search $PATH.
51303         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51304 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51305         # Extract the first word of "$tool_basename", so it can be a program name with args.
51306 set dummy $tool_basename; ac_word=$2
51307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51308 $as_echo_n "checking for $ac_word... " >&6; }
51309 if ${ac_cv_path_CCACHE+:} false; then :
51310   $as_echo_n "(cached) " >&6
51311 else
51312   case $CCACHE in
51313   [\\/]* | ?:[\\/]*)
51314   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51315   ;;
51316   *)
51317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51318 for as_dir in $PATH
51319 do
51320   IFS=$as_save_IFS
51321   test -z "$as_dir" && as_dir=.
51322     for ac_exec_ext in '' $ac_executable_extensions; do
51323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51324     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51326     break 2
51327   fi
51328 done
51329   done
51330 IFS=$as_save_IFS
51331 
51332   ;;
51333 esac
51334 fi
51335 CCACHE=$ac_cv_path_CCACHE
51336 if test -n "$CCACHE"; then
51337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51338 $as_echo "$CCACHE" >&6; }
51339 else
51340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51341 $as_echo "no" >&6; }
51342 fi
51343 
51344 
51345         if test "x$CCACHE" = x; then
51346           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51347         fi
51348       else
51349         # Otherwise we believe it is a complete path. Use it as it is.
51350         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51351 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51353 $as_echo_n "checking for CCACHE... " >&6; }
51354         if test ! -x "$tool_specified"; then
51355           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51356 $as_echo "not found" >&6; }
51357           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51358         fi
51359         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51360 $as_echo "$tool_specified" >&6; }
51361       fi
51362     fi
51363   fi
51364 
51365 
51366 
51367   if test "x$CCACHE" = x; then
51368     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51369   fi
51370 
51371 
51372     CCACHE_STATUS="enabled"
51373     PATH="$OLD_PATH"
51374   elif test "x$enable_ccache" = xno; then
51375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51376 $as_echo "no, explicitly disabled" >&6; }
51377   elif test "x$enable_ccache" = x; then
51378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51379 $as_echo "no" >&6; }
51380   else
51381     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51382 $as_echo "unknown" >&6; }
51383     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51384   fi
51385 
51386 
51387 
51388 # Check whether --with-ccache-dir was given.
51389 if test "${with_ccache_dir+set}" = set; then :
51390   withval=$with_ccache_dir;
51391 fi
51392 
51393 
51394   if test "x$with_ccache_dir" != x; then
51395     # When using a non home ccache directory, assume the use is to share ccache files
51396     # with other users. Thus change the umask.
51397     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51398     if test "x$CCACHE" = x; then
51399       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51400 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51401     fi
51402   fi
51403 
51404   if test "x$CCACHE" != x; then
51405 
51406   if test "x$CCACHE" != x; then
51407     # Only use ccache if it is 3.1.4 or later, which supports
51408     # precompiled headers.
51409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51410 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51411     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51412     if test "x$HAS_GOOD_CCACHE" = x; then
51413       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51414 $as_echo "no, disabling ccache" >&6; }
51415       CCACHE=
51416       CCACHE_STATUS="disabled"
51417     else
51418       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51419 $as_echo "yes" >&6; }
51420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51421 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51422       PUSHED_FLAGS="$CXXFLAGS"
51423       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51424       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51425 /* end confdefs.h.  */
51426 
51427 int
51428 main ()
51429 {
51430 
51431   ;
51432   return 0;
51433 }
51434 _ACEOF
51435 if ac_fn_cxx_try_compile "$LINENO"; then :
51436   CC_KNOWS_CCACHE_TRICK=yes
51437 else
51438   CC_KNOWS_CCACHE_TRICK=no
51439 fi
51440 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51441       CXXFLAGS="$PUSHED_FLAGS"
51442       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51443         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51444 $as_echo "yes" >&6; }
51445       else
51446         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51447 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
51448         CCACHE=
51449         CCACHE_STATUS="disabled"
51450       fi
51451     fi
51452   fi
51453 
51454   if test "x$CCACHE" != x; then
51455     CCACHE_SLOPPINESS=time_macros
51456     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51457     CCACHE_FLAGS=-fpch-preprocess
51458 
51459     if test "x$SET_CCACHE_DIR" != x; then
51460       mkdir -p $CCACHE_DIR > /dev/null 2>&1
51461       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51462     fi
51463   fi
51464 
51465   fi
51466 
51467 
51468 ###############################################################################
51469 #
51470 # And now the finish...
51471 #
51472 ###############################################################################
51473 
51474 # Check for some common pitfalls
51475 
51476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51477     file_to_test="$SRC_ROOT/LICENSE"
51478     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51479       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
51480     fi
51481   fi
51482 
51483 
51484   # Did user specify any unknown variables?
51485 
51486   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51487     # Replace the separating ! with spaces before presenting for end user.
51488     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51489     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51490 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51491   fi
51492 
51493 
51494   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51495 $as_echo_n "checking if build directory is on local disk... " >&6; }
51496 
51497   # df -l lists only local disks; if the given directory is not found then
51498   # a non-zero exit code is given
51499   if test "x$DF" = x; then
51500     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51501       # msys does not have df; use Windows "net use" instead.
51502       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51503       if test "x$IS_NETWORK_DISK" = x; then
51504         OUTPUT_DIR_IS_LOCAL="yes"
51505       else
51506         OUTPUT_DIR_IS_LOCAL="no"
51507       fi
51508     else
51509       # No df here, say it's local
51510       OUTPUT_DIR_IS_LOCAL="yes"
51511     fi
51512   else
51513     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51514       OUTPUT_DIR_IS_LOCAL="yes"
51515     else
51516       OUTPUT_DIR_IS_LOCAL="no"
51517     fi
51518   fi
51519 
51520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51521 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51522 
51523 
51524 
51525   # Check if the user has any old-style ALT_ variables set.
51526   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51527 
51528   # Before generating output files, test if they exist. If they do, this is a reconfigure.
51529   # Since we can't properly handle the dependencies for this, warn the user about the situation
51530   if test -e $OUTPUT_ROOT/spec.gmk; then
51531     IS_RECONFIGURE=yes
51532   else
51533     IS_RECONFIGURE=no
51534   fi
51535 
51536 
51537 # At the end, call the custom hook. (Dummy macro if no custom sources available)
51538 
51539 
51540 # We're messing a bit with internal autoconf variables to put the config.status
51541 # in the output directory instead of the current directory.
51542 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51543 
51544 # Create the actual output files. Now the main work of configure is done.
51545 cat >confcache <<\_ACEOF
51546 # This file is a shell script that caches the results of configure
51547 # tests run on this system so they can be shared between configure
51548 # scripts and configure runs, see configure's option --config-cache.
51549 # It is not useful on other systems.  If it contains results you don't
51550 # want to keep, you may remove or edit it.
51551 #
51552 # config.status only pays attention to the cache file if you give it
51553 # the --recheck option to rerun configure.
51554 #
51555 # `ac_cv_env_foo' variables (set or unset) will be overridden when
51556 # loading this file, other *unset* `ac_cv_foo' will be assigned the
51557 # following values.
51558 
51559 _ACEOF
51560 
51561 # The following way of writing the cache mishandles newlines in values,
51562 # but we know of no workaround that is simple, portable, and efficient.
51563 # So, we kill variables containing newlines.
51564 # Ultrix sh set writes to stderr and can't be redirected directly,
51565 # and sets the high bit in the cache file unless we assign to the vars.
51566 (
51567   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51568     eval ac_val=\$$ac_var
51569     case $ac_val in #(
51570     *${as_nl}*)
51571       case $ac_var in #(
51572       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51573 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51574       esac
51575       case $ac_var in #(
51576       _ | IFS | as_nl) ;; #(
51577       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51578       *) { eval $ac_var=; unset $ac_var;} ;;
51579       esac ;;
51580     esac
51581   done
51582 
51583   (set) 2>&1 |
51584     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51585     *${as_nl}ac_space=\ *)
51586       # `set' does not quote correctly, so add quotes: double-quote
51587       # substitution turns \\\\ into \\, and sed turns \\ into \.
51588       sed -n \
51589         "s/'/'\\\\''/g;
51590           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51591       ;; #(
51592     *)
51593       # `set' quotes correctly as required by POSIX, so do not add quotes.
51594       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51595       ;;
51596     esac |
51597     sort
51598 ) |
51599   sed '
51600      /^ac_cv_env_/b end
51601      t clear
51602      :clear
51603      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51604      t end
51605      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51606      :end' >>confcache
51607 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51608   if test -w "$cache_file"; then
51609     if test "x$cache_file" != "x/dev/null"; then
51610       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51611 $as_echo "$as_me: updating cache $cache_file" >&6;}
51612       if test ! -f "$cache_file" || test -h "$cache_file"; then
51613         cat confcache >"$cache_file"
51614       else
51615         case $cache_file in #(
51616         */* | ?:*)
51617           mv -f confcache "$cache_file"$$ &&
51618           mv -f "$cache_file"$$ "$cache_file" ;; #(
51619         *)
51620           mv -f confcache "$cache_file" ;;
51621         esac
51622       fi
51623     fi
51624   else
51625     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51626 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51627   fi
51628 fi
51629 rm -f confcache
51630 
51631 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51632 # Let make expand exec_prefix.
51633 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51634 
51635 DEFS=-DHAVE_CONFIG_H
51636 
51637 ac_libobjs=
51638 ac_ltlibobjs=
51639 U=
51640 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51641   # 1. Remove the extension, and $U if already installed.
51642   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51643   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51644   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51645   #    will be set to the directory where LIBOBJS objects are built.
51646   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51647   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51648 done
51649 LIBOBJS=$ac_libobjs
51650 
51651 LTLIBOBJS=$ac_ltlibobjs
51652 
51653 
51654 
51655 : "${CONFIG_STATUS=./config.status}"
51656 ac_write_fail=0
51657 ac_clean_files_save=$ac_clean_files
51658 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51659 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51660 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51661 as_write_fail=0
51662 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51663 #! $SHELL
51664 # Generated by $as_me.
51665 # Run this file to recreate the current configuration.
51666 # Compiler output produced by configure, useful for debugging
51667 # configure, is in config.log if it exists.
51668 
51669 debug=false
51670 ac_cs_recheck=false
51671 ac_cs_silent=false
51672 
51673 SHELL=\${CONFIG_SHELL-$SHELL}
51674 export SHELL
51675 _ASEOF
51676 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51677 ## -------------------- ##
51678 ## M4sh Initialization. ##
51679 ## -------------------- ##
51680 
51681 # Be more Bourne compatible
51682 DUALCASE=1; export DUALCASE # for MKS sh
51683 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51684   emulate sh
51685   NULLCMD=:
51686   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51687   # is contrary to our usage.  Disable this feature.
51688   alias -g '${1+"$@"}'='"$@"'
51689   setopt NO_GLOB_SUBST
51690 else
51691   case `(set -o) 2>/dev/null` in #(
51692   *posix*) :
51693     set -o posix ;; #(
51694   *) :
51695      ;;
51696 esac
51697 fi
51698 
51699 
51700 as_nl='
51701 '
51702 export as_nl
51703 # Printing a long string crashes Solaris 7 /usr/bin/printf.
51704 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51705 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51706 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51707 # Prefer a ksh shell builtin over an external printf program on Solaris,
51708 # but without wasting forks for bash or zsh.
51709 if test -z "$BASH_VERSION$ZSH_VERSION" \
51710     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51711   as_echo='print -r --'
51712   as_echo_n='print -rn --'
51713 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51714   as_echo='printf %s\n'
51715   as_echo_n='printf %s'
51716 else
51717   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51718     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51719     as_echo_n='/usr/ucb/echo -n'
51720   else
51721     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51722     as_echo_n_body='eval
51723       arg=$1;
51724       case $arg in #(
51725       *"$as_nl"*)
51726         expr "X$arg" : "X\\(.*\\)$as_nl";
51727         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51728       esac;
51729       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51730     '
51731     export as_echo_n_body
51732     as_echo_n='sh -c $as_echo_n_body as_echo'
51733   fi
51734   export as_echo_body
51735   as_echo='sh -c $as_echo_body as_echo'
51736 fi
51737 
51738 # The user is always right.
51739 if test "${PATH_SEPARATOR+set}" != set; then
51740   PATH_SEPARATOR=:
51741   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51742     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51743       PATH_SEPARATOR=';'
51744   }
51745 fi
51746 
51747 
51748 # IFS
51749 # We need space, tab and new line, in precisely that order.  Quoting is
51750 # there to prevent editors from complaining about space-tab.
51751 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51752 # splitting by setting IFS to empty value.)
51753 IFS=" ""        $as_nl"
51754 
51755 # Find who we are.  Look in the path if we contain no directory separator.
51756 as_myself=
51757 case $0 in #((
51758   *[\\/]* ) as_myself=$0 ;;
51759   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51760 for as_dir in $PATH
51761 do
51762   IFS=$as_save_IFS
51763   test -z "$as_dir" && as_dir=.
51764     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51765   done
51766 IFS=$as_save_IFS
51767 
51768      ;;
51769 esac
51770 # We did not find ourselves, most probably we were run as `sh COMMAND'
51771 # in which case we are not to be found in the path.
51772 if test "x$as_myself" = x; then
51773   as_myself=$0
51774 fi
51775 if test ! -f "$as_myself"; then
51776   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51777   exit 1
51778 fi
51779 
51780 # Unset variables that we do not need and which cause bugs (e.g. in
51781 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51782 # suppresses any "Segmentation fault" message there.  '((' could
51783 # trigger a bug in pdksh 5.2.14.
51784 for as_var in BASH_ENV ENV MAIL MAILPATH
51785 do eval test x\${$as_var+set} = xset \
51786   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51787 done
51788 PS1='$ '
51789 PS2='> '
51790 PS4='+ '
51791 
51792 # NLS nuisances.
51793 LC_ALL=C
51794 export LC_ALL
51795 LANGUAGE=C
51796 export LANGUAGE
51797 
51798 # CDPATH.
51799 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51800 
51801 
51802 # as_fn_error STATUS ERROR [LINENO LOG_FD]
51803 # ----------------------------------------
51804 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51805 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51806 # script with STATUS, using 1 if that was 0.
51807 as_fn_error ()
51808 {
51809   as_status=$1; test $as_status -eq 0 && as_status=1
51810   if test "$4"; then
51811     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51812     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51813   fi
51814   $as_echo "$as_me: error: $2" >&2
51815   as_fn_exit $as_status
51816 } # as_fn_error
51817 
51818 
51819 # as_fn_set_status STATUS
51820 # -----------------------
51821 # Set $? to STATUS, without forking.
51822 as_fn_set_status ()
51823 {
51824   return $1
51825 } # as_fn_set_status
51826 
51827 # as_fn_exit STATUS
51828 # -----------------
51829 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51830 as_fn_exit ()
51831 {
51832   set +e
51833   as_fn_set_status $1
51834   exit $1
51835 } # as_fn_exit
51836 
51837 # as_fn_unset VAR
51838 # ---------------
51839 # Portably unset VAR.
51840 as_fn_unset ()
51841 {
51842   { eval $1=; unset $1;}
51843 }
51844 as_unset=as_fn_unset
51845 # as_fn_append VAR VALUE
51846 # ----------------------
51847 # Append the text in VALUE to the end of the definition contained in VAR. Take
51848 # advantage of any shell optimizations that allow amortized linear growth over
51849 # repeated appends, instead of the typical quadratic growth present in naive
51850 # implementations.
51851 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51852   eval 'as_fn_append ()
51853   {
51854     eval $1+=\$2
51855   }'
51856 else
51857   as_fn_append ()
51858   {
51859     eval $1=\$$1\$2
51860   }
51861 fi # as_fn_append
51862 
51863 # as_fn_arith ARG...
51864 # ------------------
51865 # Perform arithmetic evaluation on the ARGs, and store the result in the
51866 # global $as_val. Take advantage of shells that can avoid forks. The arguments
51867 # must be portable across $(()) and expr.
51868 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51869   eval 'as_fn_arith ()
51870   {
51871     as_val=$(( $* ))
51872   }'
51873 else
51874   as_fn_arith ()
51875   {
51876     as_val=`expr "$@" || test $? -eq 1`
51877   }
51878 fi # as_fn_arith
51879 
51880 
51881 if expr a : '\(a\)' >/dev/null 2>&1 &&
51882    test "X`expr 00001 : '.*\(...\)'`" = X001; then
51883   as_expr=expr
51884 else
51885   as_expr=false
51886 fi
51887 
51888 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51889   as_basename=basename
51890 else
51891   as_basename=false
51892 fi
51893 
51894 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51895   as_dirname=dirname
51896 else
51897   as_dirname=false
51898 fi
51899 
51900 as_me=`$as_basename -- "$0" ||
51901 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51902          X"$0" : 'X\(//\)$' \| \
51903          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51904 $as_echo X/"$0" |
51905     sed '/^.*\/\([^/][^/]*\)\/*$/{
51906             s//\1/
51907             q
51908           }
51909           /^X\/\(\/\/\)$/{
51910             s//\1/
51911             q
51912           }
51913           /^X\/\(\/\).*/{
51914             s//\1/
51915             q
51916           }
51917           s/.*/./; q'`
51918 
51919 # Avoid depending upon Character Ranges.
51920 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51921 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51922 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51923 as_cr_digits='0123456789'
51924 as_cr_alnum=$as_cr_Letters$as_cr_digits
51925 
51926 ECHO_C= ECHO_N= ECHO_T=
51927 case `echo -n x` in #(((((
51928 -n*)
51929   case `echo 'xy\c'` in
51930   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
51931   xy)  ECHO_C='\c';;
51932   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51933        ECHO_T=' ';;
51934   esac;;
51935 *)
51936   ECHO_N='-n';;
51937 esac
51938 
51939 rm -f conf$$ conf$$.exe conf$$.file
51940 if test -d conf$$.dir; then
51941   rm -f conf$$.dir/conf$$.file
51942 else
51943   rm -f conf$$.dir
51944   mkdir conf$$.dir 2>/dev/null
51945 fi
51946 if (echo >conf$$.file) 2>/dev/null; then
51947   if ln -s conf$$.file conf$$ 2>/dev/null; then
51948     as_ln_s='ln -s'
51949     # ... but there are two gotchas:
51950     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51951     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51952     # In both cases, we have to default to `cp -pR'.
51953     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51954       as_ln_s='cp -pR'
51955   elif ln conf$$.file conf$$ 2>/dev/null; then
51956     as_ln_s=ln
51957   else
51958     as_ln_s='cp -pR'
51959   fi
51960 else
51961   as_ln_s='cp -pR'
51962 fi
51963 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51964 rmdir conf$$.dir 2>/dev/null
51965 
51966 
51967 # as_fn_mkdir_p
51968 # -------------
51969 # Create "$as_dir" as a directory, including parents if necessary.
51970 as_fn_mkdir_p ()
51971 {
51972 
51973   case $as_dir in #(
51974   -*) as_dir=./$as_dir;;
51975   esac
51976   test -d "$as_dir" || eval $as_mkdir_p || {
51977     as_dirs=
51978     while :; do
51979       case $as_dir in #(
51980       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51981       *) as_qdir=$as_dir;;
51982       esac
51983       as_dirs="'$as_qdir' $as_dirs"
51984       as_dir=`$as_dirname -- "$as_dir" ||
51985 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51986          X"$as_dir" : 'X\(//\)[^/]' \| \
51987          X"$as_dir" : 'X\(//\)$' \| \
51988          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51989 $as_echo X"$as_dir" |
51990     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51991             s//\1/
51992             q
51993           }
51994           /^X\(\/\/\)[^/].*/{
51995             s//\1/
51996             q
51997           }
51998           /^X\(\/\/\)$/{
51999             s//\1/
52000             q
52001           }
52002           /^X\(\/\).*/{
52003             s//\1/
52004             q
52005           }
52006           s/.*/./; q'`
52007       test -d "$as_dir" && break
52008     done
52009     test -z "$as_dirs" || eval "mkdir $as_dirs"
52010   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52011 
52012 
52013 } # as_fn_mkdir_p
52014 if mkdir -p . 2>/dev/null; then
52015   as_mkdir_p='mkdir -p "$as_dir"'
52016 else
52017   test -d ./-p && rmdir ./-p
52018   as_mkdir_p=false
52019 fi
52020 
52021 
52022 # as_fn_executable_p FILE
52023 # -----------------------
52024 # Test if FILE is an executable regular file.
52025 as_fn_executable_p ()
52026 {
52027   test -f "$1" && test -x "$1"
52028 } # as_fn_executable_p
52029 as_test_x='test -x'
52030 as_executable_p=as_fn_executable_p
52031 
52032 # Sed expression to map a string onto a valid CPP name.
52033 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52034 
52035 # Sed expression to map a string onto a valid variable name.
52036 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52037 
52038 
52039 exec 6>&1
52040 ## ----------------------------------- ##
52041 ## Main body of $CONFIG_STATUS script. ##
52042 ## ----------------------------------- ##
52043 _ASEOF
52044 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52045 
52046 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52047 # Save the log message, to keep $0 and so on meaningful, and to
52048 # report actual input values of CONFIG_FILES etc. instead of their
52049 # values after options handling.
52050 ac_log="
52051 This file was extended by OpenJDK $as_me jdk8, which was
52052 generated by GNU Autoconf 2.69.  Invocation command line was
52053 
52054   CONFIG_FILES    = $CONFIG_FILES
52055   CONFIG_HEADERS  = $CONFIG_HEADERS
52056   CONFIG_LINKS    = $CONFIG_LINKS
52057   CONFIG_COMMANDS = $CONFIG_COMMANDS
52058   $ $0 $@
52059 
52060 on `(hostname || uname -n) 2>/dev/null | sed 1q`
52061 "
52062 
52063 _ACEOF
52064 
52065 case $ac_config_files in *"
52066 "*) set x $ac_config_files; shift; ac_config_files=$*;;
52067 esac
52068 
52069 case $ac_config_headers in *"
52070 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
52071 esac
52072 
52073 
52074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52075 # Files that config.status was made for.
52076 config_files="$ac_config_files"
52077 config_headers="$ac_config_headers"
52078 
52079 _ACEOF
52080 
52081 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52082 ac_cs_usage="\
52083 \`$as_me' instantiates files and other configuration actions
52084 from templates according to the current configuration.  Unless the files
52085 and actions are specified as TAGs, all are instantiated by default.
52086 
52087 Usage: $0 [OPTION]... [TAG]...
52088 
52089   -h, --help       print this help, then exit
52090   -V, --version    print version number and configuration settings, then exit
52091       --config     print configuration, then exit
52092   -q, --quiet, --silent
52093                    do not print progress messages
52094   -d, --debug      don't remove temporary files
52095       --recheck    update $as_me by reconfiguring in the same conditions
52096       --file=FILE[:TEMPLATE]
52097                    instantiate the configuration file FILE
52098       --header=FILE[:TEMPLATE]
52099                    instantiate the configuration header FILE
52100 
52101 Configuration files:
52102 $config_files
52103 
52104 Configuration headers:
52105 $config_headers
52106 
52107 Report bugs to <build-dev@openjdk.java.net>.
52108 OpenJDK home page: <http://openjdk.java.net>."
52109 
52110 _ACEOF
52111 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52112 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52113 ac_cs_version="\\
52114 OpenJDK config.status jdk8
52115 configured by $0, generated by GNU Autoconf 2.69,
52116   with options \\"\$ac_cs_config\\"
52117 
52118 Copyright (C) 2012 Free Software Foundation, Inc.
52119 This config.status script is free software; the Free Software Foundation
52120 gives unlimited permission to copy, distribute and modify it."
52121 
52122 ac_pwd='$ac_pwd'
52123 srcdir='$srcdir'
52124 AWK='$AWK'
52125 test -n "\$AWK" || AWK=awk
52126 _ACEOF
52127 
52128 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52129 # The default lists apply if the user does not specify any file.
52130 ac_need_defaults=:
52131 while test $# != 0
52132 do
52133   case $1 in
52134   --*=?*)
52135     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52136     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52137     ac_shift=:
52138     ;;
52139   --*=)
52140     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52141     ac_optarg=
52142     ac_shift=:
52143     ;;
52144   *)
52145     ac_option=$1
52146     ac_optarg=$2
52147     ac_shift=shift
52148     ;;
52149   esac
52150 
52151   case $ac_option in
52152   # Handling of the options.
52153   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52154     ac_cs_recheck=: ;;
52155   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52156     $as_echo "$ac_cs_version"; exit ;;
52157   --config | --confi | --conf | --con | --co | --c )
52158     $as_echo "$ac_cs_config"; exit ;;
52159   --debug | --debu | --deb | --de | --d | -d )
52160     debug=: ;;
52161   --file | --fil | --fi | --f )
52162     $ac_shift
52163     case $ac_optarg in
52164     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52165     '') as_fn_error $? "missing file argument" ;;
52166     esac
52167     as_fn_append CONFIG_FILES " '$ac_optarg'"
52168     ac_need_defaults=false;;
52169   --header | --heade | --head | --hea )
52170     $ac_shift
52171     case $ac_optarg in
52172     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52173     esac
52174     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
52175     ac_need_defaults=false;;
52176   --he | --h)
52177     # Conflict between --help and --header
52178     as_fn_error $? "ambiguous option: \`$1'
52179 Try \`$0 --help' for more information.";;
52180   --help | --hel | -h )
52181     $as_echo "$ac_cs_usage"; exit ;;
52182   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52183   | -silent | --silent | --silen | --sile | --sil | --si | --s)
52184     ac_cs_silent=: ;;
52185 
52186   # This is an error.
52187   -*) as_fn_error $? "unrecognized option: \`$1'
52188 Try \`$0 --help' for more information." ;;
52189 
52190   *) as_fn_append ac_config_targets " $1"
52191      ac_need_defaults=false ;;
52192 
52193   esac
52194   shift
52195 done
52196 
52197 ac_configure_extra_args=
52198 
52199 if $ac_cs_silent; then
52200   exec 6>/dev/null
52201   ac_configure_extra_args="$ac_configure_extra_args --silent"
52202 fi
52203 
52204 _ACEOF
52205 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52206 if \$ac_cs_recheck; then
52207   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52208   shift
52209   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52210   CONFIG_SHELL='$SHELL'
52211   export CONFIG_SHELL
52212   exec "\$@"
52213 fi
52214 
52215 _ACEOF
52216 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52217 exec 5>>config.log
52218 {
52219   echo
52220   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52221 ## Running $as_me. ##
52222 _ASBOX
52223   $as_echo "$ac_log"
52224 } >&5
52225 
52226 _ACEOF
52227 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52228 _ACEOF
52229 
52230 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52231 
52232 # Handling of arguments.
52233 for ac_config_target in $ac_config_targets
52234 do
52235   case $ac_config_target in
52236     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
52237     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52238     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52239     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52240     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52241     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
52242     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52243 
52244   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52245   esac
52246 done
52247 
52248 
52249 # If the user did not use the arguments to specify the items to instantiate,
52250 # then the envvar interface is used.  Set only those that are not.
52251 # We use the long form for the default assignment because of an extremely
52252 # bizarre bug on SunOS 4.1.3.
52253 if $ac_need_defaults; then
52254   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52255   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
52256 fi
52257 
52258 # Have a temporary directory for convenience.  Make it in the build tree
52259 # simply because there is no reason against having it here, and in addition,
52260 # creating and moving files from /tmp can sometimes cause problems.
52261 # Hook for its removal unless debugging.
52262 # Note that there is a small window in which the directory will not be cleaned:
52263 # after its creation but before its name has been assigned to `$tmp'.
52264 $debug ||
52265 {
52266   tmp= ac_tmp=
52267   trap 'exit_status=$?
52268   : "${ac_tmp:=$tmp}"
52269   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52270 ' 0
52271   trap 'as_fn_exit 1' 1 2 13 15
52272 }
52273 # Create a (secure) tmp directory for tmp files.
52274 
52275 {
52276   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52277   test -d "$tmp"
52278 }  ||
52279 {
52280   tmp=./conf$$-$RANDOM
52281   (umask 077 && mkdir "$tmp")
52282 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52283 ac_tmp=$tmp
52284 
52285 # Set up the scripts for CONFIG_FILES section.
52286 # No need to generate them if there are no CONFIG_FILES.
52287 # This happens for instance with `./config.status config.h'.
52288 if test -n "$CONFIG_FILES"; then
52289 
52290 
52291 ac_cr=`echo X | tr X '\015'`
52292 # On cygwin, bash can eat \r inside `` if the user requested igncr.
52293 # But we know of no other shell where ac_cr would be empty at this
52294 # point, so we can use a bashism as a fallback.
52295 if test "x$ac_cr" = x; then
52296   eval ac_cr=\$\'\\r\'
52297 fi
52298 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52299 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52300   ac_cs_awk_cr='\\r'
52301 else
52302   ac_cs_awk_cr=$ac_cr
52303 fi
52304 
52305 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52306 _ACEOF
52307 
52308 
52309 {
52310   echo "cat >conf$$subs.awk <<_ACEOF" &&
52311   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52312   echo "_ACEOF"
52313 } >conf$$subs.sh ||
52314   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52315 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52316 ac_delim='%!_!# '
52317 for ac_last_try in false false false false false :; do
52318   . ./conf$$subs.sh ||
52319     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52320 
52321   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52322   if test $ac_delim_n = $ac_delim_num; then
52323     break
52324   elif $ac_last_try; then
52325     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52326   else
52327     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52328   fi
52329 done
52330 rm -f conf$$subs.sh
52331 
52332 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52333 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52334 _ACEOF
52335 sed -n '
52336 h
52337 s/^/S["/; s/!.*/"]=/
52338 p
52339 g
52340 s/^[^!]*!//
52341 :repl
52342 t repl
52343 s/'"$ac_delim"'$//
52344 t delim
52345 :nl
52346 h
52347 s/\(.\{148\}\)..*/\1/
52348 t more1
52349 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52350 p
52351 n
52352 b repl
52353 :more1
52354 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52355 p
52356 g
52357 s/.\{148\}//
52358 t nl
52359 :delim
52360 h
52361 s/\(.\{148\}\)..*/\1/
52362 t more2
52363 s/["\\]/\\&/g; s/^/"/; s/$/"/
52364 p
52365 b
52366 :more2
52367 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52368 p
52369 g
52370 s/.\{148\}//
52371 t delim
52372 ' <conf$$subs.awk | sed '
52373 /^[^""]/{
52374   N
52375   s/\n//
52376 }
52377 ' >>$CONFIG_STATUS || ac_write_fail=1
52378 rm -f conf$$subs.awk
52379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52380 _ACAWK
52381 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52382   for (key in S) S_is_set[key] = 1
52383   FS = ""
52384 
52385 }
52386 {
52387   line = $ 0
52388   nfields = split(line, field, "@")
52389   substed = 0
52390   len = length(field[1])
52391   for (i = 2; i < nfields; i++) {
52392     key = field[i]
52393     keylen = length(key)
52394     if (S_is_set[key]) {
52395       value = S[key]
52396       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52397       len += length(value) + length(field[++i])
52398       substed = 1
52399     } else
52400       len += 1 + keylen
52401   }
52402 
52403   print line
52404 }
52405 
52406 _ACAWK
52407 _ACEOF
52408 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52409 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52410   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52411 else
52412   cat
52413 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52414   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52415 _ACEOF
52416 
52417 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52418 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52419 # trailing colons and then remove the whole line if VPATH becomes empty
52420 # (actually we leave an empty line to preserve line numbers).
52421 if test "x$srcdir" = x.; then
52422   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
52423 h
52424 s///
52425 s/^/:/
52426 s/[      ]*$/:/
52427 s/:\$(srcdir):/:/g
52428 s/:\${srcdir}:/:/g
52429 s/:@srcdir@:/:/g
52430 s/^:*//
52431 s/:*$//
52432 x
52433 s/\(=[   ]*\).*/\1/
52434 G
52435 s/\n//
52436 s/^[^=]*=[       ]*$//
52437 }'
52438 fi
52439 
52440 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52441 fi # test -n "$CONFIG_FILES"
52442 
52443 # Set up the scripts for CONFIG_HEADERS section.
52444 # No need to generate them if there are no CONFIG_HEADERS.
52445 # This happens for instance with `./config.status Makefile'.
52446 if test -n "$CONFIG_HEADERS"; then
52447 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
52448 BEGIN {
52449 _ACEOF
52450 
52451 # Transform confdefs.h into an awk script `defines.awk', embedded as
52452 # here-document in config.status, that substitutes the proper values into
52453 # config.h.in to produce config.h.
52454 
52455 # Create a delimiter string that does not exist in confdefs.h, to ease
52456 # handling of long lines.
52457 ac_delim='%!_!# '
52458 for ac_last_try in false false :; do
52459   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
52460   if test -z "$ac_tt"; then
52461     break
52462   elif $ac_last_try; then
52463     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
52464   else
52465     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52466   fi
52467 done
52468 
52469 # For the awk script, D is an array of macro values keyed by name,
52470 # likewise P contains macro parameters if any.  Preserve backslash
52471 # newline sequences.
52472 
52473 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
52474 sed -n '
52475 s/.\{148\}/&'"$ac_delim"'/g
52476 t rset
52477 :rset
52478 s/^[     ]*#[    ]*define[       ][      ]*/ /
52479 t def
52480 d
52481 :def
52482 s/\\$//
52483 t bsnl
52484 s/["\\]/\\&/g
52485 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
52486 D["\1"]=" \3"/p
52487 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
52488 d
52489 :bsnl
52490 s/["\\]/\\&/g
52491 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
52492 D["\1"]=" \3\\\\\\n"\\/p
52493 t cont
52494 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
52495 t cont
52496 d
52497 :cont
52498 n
52499 s/.\{148\}/&'"$ac_delim"'/g
52500 t clear
52501 :clear
52502 s/\\$//
52503 t bsnlc
52504 s/["\\]/\\&/g; s/^/"/; s/$/"/p
52505 d
52506 :bsnlc
52507 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
52508 b cont
52509 ' <confdefs.h | sed '
52510 s/'"$ac_delim"'/"\\\
52511 "/g' >>$CONFIG_STATUS || ac_write_fail=1
52512 
52513 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52514   for (key in D) D_is_set[key] = 1
52515   FS = ""
52516 }
52517 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
52518   line = \$ 0
52519   split(line, arg, " ")
52520   if (arg[1] == "#") {
52521     defundef = arg[2]
52522     mac1 = arg[3]
52523   } else {
52524     defundef = substr(arg[1], 2)
52525     mac1 = arg[2]
52526   }
52527   split(mac1, mac2, "(") #)
52528   macro = mac2[1]
52529   prefix = substr(line, 1, index(line, defundef) - 1)
52530   if (D_is_set[macro]) {
52531     # Preserve the white space surrounding the "#".
52532     print prefix "define", macro P[macro] D[macro]
52533     next
52534   } else {
52535     # Replace #undef with comments.  This is necessary, for example,
52536     # in the case of _POSIX_SOURCE, which is predefined and required
52537     # on some systems where configure will not decide to define it.
52538     if (defundef == "undef") {
52539       print "/*", prefix defundef, macro, "*/"
52540       next
52541     }
52542   }
52543 }
52544 { print }
52545 _ACAWK
52546 _ACEOF
52547 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52548   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
52549 fi # test -n "$CONFIG_HEADERS"
52550 
52551 
52552 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
52553 shift
52554 for ac_tag
52555 do
52556   case $ac_tag in
52557   :[FHLC]) ac_mode=$ac_tag; continue;;
52558   esac
52559   case $ac_mode$ac_tag in
52560   :[FHL]*:*);;
52561   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52562   :[FH]-) ac_tag=-:-;;
52563   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52564   esac
52565   ac_save_IFS=$IFS
52566   IFS=:
52567   set x $ac_tag
52568   IFS=$ac_save_IFS
52569   shift
52570   ac_file=$1
52571   shift
52572 
52573   case $ac_mode in
52574   :L) ac_source=$1;;
52575   :[FH])
52576     ac_file_inputs=
52577     for ac_f
52578     do
52579       case $ac_f in
52580       -) ac_f="$ac_tmp/stdin";;
52581       *) # Look for the file first in the build tree, then in the source tree
52582          # (if the path is not absolute).  The absolute path cannot be DOS-style,
52583          # because $ac_f cannot contain `:'.
52584          test -f "$ac_f" ||
52585            case $ac_f in
52586            [\\/$]*) false;;
52587            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52588            esac ||
52589            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52590       esac
52591       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52592       as_fn_append ac_file_inputs " '$ac_f'"
52593     done
52594 
52595     # Let's still pretend it is `configure' which instantiates (i.e., don't
52596     # use $as_me), people would be surprised to read:
52597     #    /* config.h.  Generated by config.status.  */
52598     configure_input='Generated from '`
52599           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52600         `' by configure.'
52601     if test x"$ac_file" != x-; then
52602       configure_input="$ac_file.  $configure_input"
52603       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52604 $as_echo "$as_me: creating $ac_file" >&6;}
52605     fi
52606     # Neutralize special characters interpreted by sed in replacement strings.
52607     case $configure_input in #(
52608     *\&* | *\|* | *\\* )
52609        ac_sed_conf_input=`$as_echo "$configure_input" |
52610        sed 's/[\\\\&|]/\\\\&/g'`;; #(
52611     *) ac_sed_conf_input=$configure_input;;
52612     esac
52613 
52614     case $ac_tag in
52615     *:-:* | *:-) cat >"$ac_tmp/stdin" \
52616       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52617     esac
52618     ;;
52619   esac
52620 
52621   ac_dir=`$as_dirname -- "$ac_file" ||
52622 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52623          X"$ac_file" : 'X\(//\)[^/]' \| \
52624          X"$ac_file" : 'X\(//\)$' \| \
52625          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52626 $as_echo X"$ac_file" |
52627     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52628             s//\1/
52629             q
52630           }
52631           /^X\(\/\/\)[^/].*/{
52632             s//\1/
52633             q
52634           }
52635           /^X\(\/\/\)$/{
52636             s//\1/
52637             q
52638           }
52639           /^X\(\/\).*/{
52640             s//\1/
52641             q
52642           }
52643           s/.*/./; q'`
52644   as_dir="$ac_dir"; as_fn_mkdir_p
52645   ac_builddir=.
52646 
52647 case "$ac_dir" in
52648 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52649 *)
52650   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52651   # A ".." for each directory in $ac_dir_suffix.
52652   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52653   case $ac_top_builddir_sub in
52654   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52655   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52656   esac ;;
52657 esac
52658 ac_abs_top_builddir=$ac_pwd
52659 ac_abs_builddir=$ac_pwd$ac_dir_suffix
52660 # for backward compatibility:
52661 ac_top_builddir=$ac_top_build_prefix
52662 
52663 case $srcdir in
52664   .)  # We are building in place.
52665     ac_srcdir=.
52666     ac_top_srcdir=$ac_top_builddir_sub
52667     ac_abs_top_srcdir=$ac_pwd ;;
52668   [\\/]* | ?:[\\/]* )  # Absolute name.
52669     ac_srcdir=$srcdir$ac_dir_suffix;
52670     ac_top_srcdir=$srcdir
52671     ac_abs_top_srcdir=$srcdir ;;
52672   *) # Relative name.
52673     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52674     ac_top_srcdir=$ac_top_build_prefix$srcdir
52675     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52676 esac
52677 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52678 
52679 
52680   case $ac_mode in
52681   :F)
52682   #
52683   # CONFIG_FILE
52684   #
52685 
52686 _ACEOF
52687 
52688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52689 # If the template does not know about datarootdir, expand it.
52690 # FIXME: This hack should be removed a few years after 2.60.
52691 ac_datarootdir_hack=; ac_datarootdir_seen=
52692 ac_sed_dataroot='
52693 /datarootdir/ {
52694   p
52695   q
52696 }
52697 /@datadir@/p
52698 /@docdir@/p
52699 /@infodir@/p
52700 /@localedir@/p
52701 /@mandir@/p'
52702 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52703 *datarootdir*) ac_datarootdir_seen=yes;;
52704 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52705   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52706 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52707 _ACEOF
52708 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52709   ac_datarootdir_hack='
52710   s&@datadir@&$datadir&g
52711   s&@docdir@&$docdir&g
52712   s&@infodir@&$infodir&g
52713   s&@localedir@&$localedir&g
52714   s&@mandir@&$mandir&g
52715   s&\\\${datarootdir}&$datarootdir&g' ;;
52716 esac
52717 _ACEOF
52718 
52719 # Neutralize VPATH when `$srcdir' = `.'.
52720 # Shell code in configure.ac might set extrasub.
52721 # FIXME: do we really want to maintain this feature?
52722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52723 ac_sed_extra="$ac_vpsub
52724 $extrasub
52725 _ACEOF
52726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52727 :t
52728 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52729 s|@configure_input@|$ac_sed_conf_input|;t t
52730 s&@top_builddir@&$ac_top_builddir_sub&;t t
52731 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52732 s&@srcdir@&$ac_srcdir&;t t
52733 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52734 s&@top_srcdir@&$ac_top_srcdir&;t t
52735 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52736 s&@builddir@&$ac_builddir&;t t
52737 s&@abs_builddir@&$ac_abs_builddir&;t t
52738 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52739 $ac_datarootdir_hack
52740 "
52741 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52742   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52743 
52744 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52745   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52746   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52747       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52748   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52749 which seems to be undefined.  Please make sure it is defined" >&5
52750 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52751 which seems to be undefined.  Please make sure it is defined" >&2;}
52752 
52753   rm -f "$ac_tmp/stdin"
52754   case $ac_file in
52755   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52756   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52757   esac \
52758   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52759  ;;
52760   :H)
52761   #
52762   # CONFIG_HEADER
52763   #
52764   if test x"$ac_file" != x-; then
52765     {
52766       $as_echo "/* $configure_input  */" \
52767       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
52768     } >"$ac_tmp/config.h" \
52769       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52770     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
52771       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
52772 $as_echo "$as_me: $ac_file is unchanged" >&6;}
52773     else
52774       rm -f "$ac_file"
52775       mv "$ac_tmp/config.h" "$ac_file" \
52776         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52777     fi
52778   else
52779     $as_echo "/* $configure_input  */" \
52780       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
52781       || as_fn_error $? "could not create -" "$LINENO" 5
52782   fi
52783  ;;
52784 
52785 
52786   esac
52787 
52788 done # for ac_tag
52789 
52790 
52791 as_fn_exit 0
52792 _ACEOF
52793 ac_clean_files=$ac_clean_files_save
52794 
52795 test $ac_write_fail = 0 ||
52796   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52797 
52798 
52799 # configure is writing to config.log, and then calls config.status.
52800 # config.status does its own redirection, appending to config.log.
52801 # Unfortunately, on DOS this fails, as config.log is still kept open
52802 # by configure, so config.status won't be able to write to it; its
52803 # output is simply discarded.  So we exec the FD to /dev/null,
52804 # effectively closing config.log, so it can be properly (re)opened and
52805 # appended to by config.status.  When coming back to configure, we
52806 # need to make the FD available again.
52807 if test "$no_create" != yes; then
52808   ac_cs_success=:
52809   ac_config_status_args=
52810   test "$silent" = yes &&
52811     ac_config_status_args="$ac_config_status_args --quiet"
52812   exec 5>/dev/null
52813   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52814   exec 5>>config.log
52815   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52816   # would make configure fail if this is the last instruction.
52817   $ac_cs_success || as_fn_exit 1
52818 fi
52819 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52820   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52821 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52822 fi
52823 
52824 
52825 
52826 # Try to move the config.log file to the output directory.
52827 if test -e ./config.log; then
52828   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52829 fi
52830 
52831 # Make the compare script executable
52832 $CHMOD +x $OUTPUT_ROOT/compare.sh
52833 
52834 # Finally output some useful information to the user
52835 
52836   # Finally output some useful information to the user
52837 
52838   printf "\n"
52839   printf "====================================================\n"
52840   printf "A new configuration has been successfully created in\n"
52841   printf "$OUTPUT_ROOT\n"
52842   if test "x$CONFIGURE_COMMAND_LINE" != x; then
52843     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52844   else
52845     printf "using default settings.\n"
52846   fi
52847 
52848   printf "\n"
52849   printf "Configuration summary:\n"
52850   printf "* Debug level:    $DEBUG_LEVEL\n"
52851   printf "* JDK variant:    $JDK_VARIANT\n"
52852   printf "* JVM variants:   $with_jvm_variants\n"
52853   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52854 
52855   printf "\n"
52856   printf "Tools summary:\n"
52857   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52858     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52859   fi
52860   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52861   if test "x$TOOLCHAIN_VERSION" != "x"; then
52862     print_version=" $TOOLCHAIN_VERSION"
52863   fi
52864   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
52865   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52866   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52867 
52868   printf "\n"
52869   printf "Build performance summary:\n"
52870   printf "* Cores to use:   $JOBS\n"
52871   printf "* Memory limit:   $MEMORY_SIZE MB\n"
52872   if test "x$CCACHE_STATUS" != "x"; then
52873     printf "* ccache status:  $CCACHE_STATUS\n"
52874   fi
52875   printf "\n"
52876 
52877   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52878     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52879     printf "will result in longer build times.\n"
52880     printf "\n"
52881   fi
52882 
52883   if test "x$FOUND_ALT_VARIABLES" != "x"; then
52884     printf "WARNING: You have old-style ALT_ environment variables set.\n"
52885     printf "These are not respected, and will be ignored. It is recommended\n"
52886     printf "that you clean your environment. The following variables are set:\n"
52887     printf "$FOUND_ALT_VARIABLES\n"
52888     printf "\n"
52889   fi
52890 
52891   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52892     printf "WARNING: Your build output directory is not on a local disk.\n"
52893     printf "This will severely degrade build performance!\n"
52894     printf "It is recommended that you create an output directory on a local disk,\n"
52895     printf "and run the configure script again from that directory.\n"
52896     printf "\n"
52897   fi
52898 
52899   if test "x$IS_RECONFIGURE" = "xyes"; then
52900     printf "WARNING: The result of this configuration has overridden an older\n"
52901     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52902     printf "proper build. Failure to do so might result in strange build problems.\n"
52903     printf "\n"
52904   fi
52905