1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 BUILD_ICECC
 636 ICECC
 637 ICECC_WRAPPER
 638 ICECC_CREATE_ENV
 639 ICECC_CMD
 640 ENABLE_JAVAC_SERVER
 641 ENABLE_SJAVAC
 642 SJAVAC_SERVER_JAVA_FLAGS
 643 SJAVAC_SERVER_JAVA
 644 JAVA_TOOL_FLAGS_SMALL
 645 JAVA_FLAGS_SMALL
 646 JAVA_FLAGS_JAVAC
 647 JAVA_FLAGS_BIG
 648 JAVA_FLAGS
 649 JOBS
 650 MEMORY_SIZE
 651 NUM_CORES
 652 ENABLE_INTREE_EC
 653 SALIB_NAME
 654 HOTSPOT_MAKE_ARGS
 655 LIBZIP_CAN_USE_MMAP
 656 LIBDL
 657 LIBM
 658 USE_EXTERNAL_LCMS
 659 LCMS_LIBS
 660 LCMS_CFLAGS
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LIBGIF
 666 USE_EXTERNAL_LIBJPEG
 667 LLVM_LIBS
 668 LLVM_LDFLAGS
 669 LLVM_CFLAGS
 670 LLVM_CONFIG
 671 LIBFFI_LIBS
 672 LIBFFI_CFLAGS
 673 ALSA_LIBS
 674 ALSA_CFLAGS
 675 FREETYPE_BUNDLE_LIB_PATH
 676 FREETYPE_LIBS
 677 FREETYPE_CFLAGS
 678 CUPS_CFLAGS
 679 X_EXTRA_LIBS
 680 X_LIBS
 681 X_PRE_LIBS
 682 X_CFLAGS
 683 XMKMF
 684 MSVCP_DLL
 685 MSVCR_DLL
 686 LIBCXX
 687 STATIC_CXX_SETTING
 688 FIXPATH_DETACH_FLAG
 689 FIXPATH
 690 GCOV_ENABLED
 691 JAVA_DEBUG_SYMBOLS
 692 ZIP_DEBUGINFO_FILES
 693 ENABLE_DEBUG_SYMBOLS
 694 STRIP_POLICY
 695 DEBUG_BINARIES
 696 NATIVE_DEBUG_SYMBOLS
 697 CFLAGS_WARNINGS_ARE_ERRORS
 698 DISABLE_WARNING_PREFIX
 699 HOTSPOT_SET_WARNINGS_AS_ERRORS
 700 WARNINGS_AS_ERRORS
 701 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 702 ZERO_ARCHFLAG
 703 LDFLAGS_TESTEXE
 704 LDFLAGS_TESTLIB
 705 LDFLAGS_CXX_JDK
 706 JDKEXE_LIBS
 707 JDKLIB_LIBS
 708 LDFLAGS_JDKEXE
 709 LDFLAGS_JDKLIB
 710 CXXFLAGS_TESTEXE
 711 CXXFLAGS_TESTLIB
 712 CFLAGS_TESTEXE
 713 CFLAGS_TESTLIB
 714 CXXFLAGS_JDKEXE
 715 CXXFLAGS_JDKLIB
 716 CFLAGS_JDKEXE
 717 CFLAGS_JDKLIB
 718 MACOSX_VERSION_MIN
 719 CXX_O_FLAG_NONE
 720 CXX_O_FLAG_DEBUG
 721 CXX_O_FLAG_NORM
 722 CXX_O_FLAG_HI
 723 CXX_O_FLAG_HIGHEST
 724 C_O_FLAG_NONE
 725 C_O_FLAG_DEBUG
 726 C_O_FLAG_NORM
 727 C_O_FLAG_HI
 728 C_O_FLAG_HIGHEST
 729 CXXFLAGS_DEBUG_SYMBOLS
 730 CFLAGS_DEBUG_SYMBOLS
 731 CXX_FLAG_DEPS
 732 C_FLAG_DEPS
 733 SET_SHARED_LIBRARY_MAPFILE
 734 SET_SHARED_LIBRARY_NAME
 735 SET_SHARED_LIBRARY_ORIGIN
 736 SET_EXECUTABLE_ORIGIN
 737 CXX_FLAG_REORDER
 738 C_FLAG_REORDER
 739 RC_FLAGS
 740 AR_OUT_OPTION
 741 LD_OUT_OPTION
 742 EXE_OUT_OPTION
 743 CC_OUT_OPTION
 744 STRIPFLAGS
 745 ARFLAGS
 746 COMPILER_TARGET_BITS_FLAG
 747 JT_HOME
 748 JTREGEXE
 749 USING_BROKEN_SUSE_LD
 750 PACKAGE_PATH
 751 USE_CLANG
 752 HOTSPOT_LD
 753 HOTSPOT_CXX
 754 HOTSPOT_RC
 755 HOTSPOT_MT
 756 BUILD_AS
 757 BUILD_LD
 758 BUILD_AR
 759 BUILD_NM
 760 BUILD_CXX
 761 BUILD_CC
 762 BUILD_SYSROOT_LDFLAGS
 763 BUILD_SYSROOT_CFLAGS
 764 ac_ct_OBJDUMP
 765 OBJDUMP
 766 ac_ct_OBJCOPY
 767 OBJCOPY
 768 ac_ct_NM
 769 ac_ct_STRIP
 770 GNM
 771 NM
 772 STRIP
 773 MSBUILD
 774 DUMPBIN
 775 RC
 776 MT
 777 LIPO
 778 ac_ct_AR
 779 AR
 780 AS
 781 LDCXX
 782 LD
 783 CXXCPP
 784 CPP
 785 ac_ct_CXX
 786 CXXFLAGS
 787 CXX
 788 ac_ct_PROPER_COMPILER_CXX
 789 PROPER_COMPILER_CXX
 790 TOOLCHAIN_PATH_CXX
 791 POTENTIAL_CXX
 792 OBJEXT
 793 EXEEXT
 794 ac_ct_CC
 795 CPPFLAGS
 796 LDFLAGS
 797 CFLAGS
 798 CC
 799 ac_ct_PROPER_COMPILER_CC
 800 PROPER_COMPILER_CC
 801 TOOLCHAIN_PATH_CC
 802 POTENTIAL_CC
 803 VS_LIB
 804 VS_INCLUDE
 805 VS_PATH
 806 CYGWIN_LINK
 807 SYSROOT_LDFLAGS
 808 SYSROOT_CFLAGS
 809 LEGACY_EXTRA_LDFLAGS
 810 LEGACY_EXTRA_CXXFLAGS
 811 LEGACY_EXTRA_CFLAGS
 812 EXE_SUFFIX
 813 OBJ_SUFFIX
 814 STATIC_LIBRARY
 815 SHARED_LIBRARY
 816 STATIC_LIBRARY_SUFFIX
 817 SHARED_LIBRARY_SUFFIX
 818 LIBRARY_PREFIX
 819 TOOLCHAIN_TYPE
 820 STATIC_BUILD
 821 BUILD_HOTSPOT
 822 HOTSPOT_DIST
 823 BUILD_OUTPUT
 824 JDK_TOPDIR
 825 NASHORN_TOPDIR
 826 HOTSPOT_TOPDIR
 827 JAXWS_TOPDIR
 828 JAXP_TOPDIR
 829 CORBA_TOPDIR
 830 LANGTOOLS_TOPDIR
 831 BOOT_JDK_BITS
 832 JAVAC_FLAGS
 833 BOOT_JDK_SOURCETARGET
 834 JARSIGNER
 835 JAR
 836 JAVAH
 837 JAVAC
 838 JAVA
 839 BOOT_JDK
 840 JAVA_CHECK
 841 JAVAC_CHECK
 842 COOKED_BUILD_NUMBER
 843 JDK_VERSION
 844 COPYRIGHT_YEAR
 845 MACOSX_BUNDLE_ID_BASE
 846 MACOSX_BUNDLE_NAME_BASE
 847 COMPANY_NAME
 848 JDK_RC_PLATFORM_NAME
 849 PRODUCT_SUFFIX
 850 PRODUCT_NAME
 851 LAUNCHER_NAME
 852 MILESTONE
 853 JDK_BUILD_NUMBER
 854 JDK_UPDATE_VERSION
 855 JDK_MICRO_VERSION
 856 JDK_MINOR_VERSION
 857 JDK_MAJOR_VERSION
 858 USER_RELEASE_SUFFIX
 859 COMPRESS_JARS
 860 UNLIMITED_CRYPTO
 861 CACERTS_FILE
 862 TEST_IN_BUILD
 863 BUILD_HEADLESS
 864 SUPPORT_HEADFUL
 865 SUPPORT_HEADLESS
 866 OS_VERSION_MICRO
 867 OS_VERSION_MINOR
 868 OS_VERSION_MAJOR
 869 PKG_CONFIG
 870 BASH_ARGS
 871 SETFILE
 872 CODESIGN
 873 XATTR
 874 DSYMUTIL
 875 IS_GNU_TIME
 876 PATCH
 877 TIME
 878 STAT
 879 HG
 880 READELF
 881 OTOOL
 882 LDD
 883 ZIP
 884 UNZIP
 885 FIND_DELETE
 886 OUTPUT_SYNC
 887 OUTPUT_SYNC_SUPPORTED
 888 CHECK_TOOLSDIR_MAKE
 889 CHECK_TOOLSDIR_GMAKE
 890 CHECK_MAKE
 891 CHECK_GMAKE
 892 MAKE
 893 PKGHANDLER
 894 CONFIGURESUPPORT_OUTPUTDIR
 895 OUTPUT_ROOT
 896 CONF_NAME
 897 SPEC
 898 SDKROOT
 899 XCODEBUILD
 900 BUILD_VARIANT_RELEASE
 901 DEBUG_CLASSFILES
 902 FASTDEBUG
 903 VARIANT
 904 DEBUG_LEVEL
 905 MACOSX_UNIVERSAL
 906 INCLUDE_SA
 907 JVM_VARIANT_CORE
 908 JVM_VARIANT_ZEROSHARK
 909 JVM_VARIANT_ZERO
 910 JVM_VARIANT_KERNEL
 911 JVM_VARIANT_MINIMAL1
 912 JVM_VARIANT_CLIENT
 913 JVM_VARIANT_SERVER
 914 JVM_VARIANTS
 915 JVM_INTERPRETER
 916 JDK_VARIANT
 917 SET_OPENJDK
 918 CANONICAL_TOPDIR
 919 ORIGINAL_TOPDIR
 920 TOPDIR
 921 PATH_SEP
 922 ZERO_ARCHDEF
 923 DEFINE_CROSS_COMPILE_ARCH
 924 LP64
 925 OPENJDK_TARGET_OS_EXPORT_DIR
 926 OPENJDK_TARGET_CPU_JLI_CFLAGS
 927 OPENJDK_TARGET_CPU_OSARCH
 928 OPENJDK_TARGET_CPU_ISADIR
 929 OPENJDK_TARGET_CPU_LIBDIR
 930 OPENJDK_TARGET_CPU_LEGACY_LIB
 931 OPENJDK_TARGET_CPU_LEGACY
 932 REQUIRED_OS_VERSION
 933 REQUIRED_OS_NAME
 934 COMPILE_TYPE
 935 OPENJDK_TARGET_CPU_ENDIAN
 936 OPENJDK_TARGET_CPU_BITS
 937 OPENJDK_TARGET_CPU_ARCH
 938 OPENJDK_TARGET_CPU
 939 OPENJDK_TARGET_OS_ENV
 940 OPENJDK_TARGET_OS_TYPE
 941 OPENJDK_TARGET_OS
 942 OPENJDK_BUILD_CPU_ENDIAN
 943 OPENJDK_BUILD_CPU_BITS
 944 OPENJDK_BUILD_CPU_ARCH
 945 OPENJDK_BUILD_CPU
 946 OPENJDK_BUILD_OS_ENV
 947 OPENJDK_BUILD_OS_TYPE
 948 OPENJDK_BUILD_OS
 949 OPENJDK_BUILD_AUTOCONF_NAME
 950 OPENJDK_TARGET_AUTOCONF_NAME
 951 target_os
 952 target_vendor
 953 target_cpu
 954 target
 955 host_os
 956 host_vendor
 957 host_cpu
 958 host
 959 build_os
 960 build_vendor
 961 build_cpu
 962 build
 963 NICE
 964 CPIO
 965 DF
 966 READLINK
 967 CYGPATH
 968 SED
 969 FGREP
 970 EGREP
 971 GREP
 972 AWK
 973 XARGS
 974 WHICH
 975 WC
 976 UNIQ
 977 UNAME
 978 TR
 979 TOUCH
 980 TEE
 981 TAR
 982 TAIL
 983 SORT
 984 SH
 985 RMDIR
 986 RM
 987 PRINTF
 988 NAWK
 989 MV
 990 MKTEMP
 991 MKDIR
 992 LS
 993 LN
 994 HEAD
 995 FIND
 996 FILE
 997 EXPR
 998 ECHO
 999 DIRNAME
1000 DIFF
1001 DATE
1002 CUT
1003 CP
1004 COMM
1005 CMP
1006 CHMOD
1007 CAT
1008 BASH
1009 BASENAME
1010 DATE_WHEN_CONFIGURED
1011 ORIGINAL_PATH
1012 CONFIGURE_COMMAND_LINE
1013 target_alias
1014 host_alias
1015 build_alias
1016 LIBS
1017 ECHO_T
1018 ECHO_N
1019 ECHO_C
1020 DEFS
1021 mandir
1022 localedir
1023 libdir
1024 psdir
1025 pdfdir
1026 dvidir
1027 htmldir
1028 infodir
1029 docdir
1030 oldincludedir
1031 includedir
1032 localstatedir
1033 sharedstatedir
1034 sysconfdir
1035 datadir
1036 datarootdir
1037 libexecdir
1038 sbindir
1039 bindir
1040 program_transform_name
1041 prefix
1042 exec_prefix
1043 PACKAGE_URL
1044 PACKAGE_BUGREPORT
1045 PACKAGE_STRING
1046 PACKAGE_VERSION
1047 PACKAGE_TARNAME
1048 PACKAGE_NAME
1049 PATH_SEPARATOR
1050 SHELL'
1051 ac_subst_files=''
1052 ac_user_opts='
1053 enable_option_checking
1054 with_target_bits
1055 enable_openjdk_only
1056 with_custom_make_dir
1057 with_jdk_variant
1058 with_jvm_interpreter
1059 with_jvm_variants
1060 enable_debug
1061 with_debug_level
1062 with_devkit
1063 with_sys_root
1064 with_sysroot
1065 with_tools_dir
1066 with_toolchain_path
1067 with_extra_path
1068 with_sdk_name
1069 with_conf_name
1070 with_output_sync
1071 enable_headful
1072 enable_hotspot_test_in_build
1073 with_cacerts_file
1074 enable_unlimited_crypto
1075 with_milestone
1076 with_update_version
1077 with_user_release_suffix
1078 with_build_number
1079 with_copyright_year
1080 with_boot_jdk
1081 with_add_source_root
1082 with_override_source_root
1083 with_adds_and_overrides
1084 with_override_langtools
1085 with_override_corba
1086 with_override_jaxp
1087 with_override_jaxws
1088 with_override_hotspot
1089 with_override_nashorn
1090 with_override_jdk
1091 with_import_hotspot
1092 enable_static_build
1093 with_toolchain_type
1094 with_extra_cflags
1095 with_extra_cxxflags
1096 with_extra_ldflags
1097 with_toolchain_version
1098 with_build_devkit
1099 with_jtreg
1100 enable_warnings_as_errors
1101 with_native_debug_symbols
1102 enable_java_debug_symbols
1103 enable_debug_symbols
1104 enable_zip_debug_info
1105 enable_native_coverage
1106 with_stdc__lib
1107 with_msvcr_dll
1108 with_msvcp_dll
1109 with_x
1110 with_cups
1111 with_cups_include
1112 with_freetype
1113 with_freetype_include
1114 with_freetype_lib
1115 with_freetype_src
1116 enable_freetype_bundling
1117 with_alsa
1118 with_alsa_include
1119 with_alsa_lib
1120 with_libffi
1121 with_libffi_include
1122 with_libffi_lib
1123 with_libjpeg
1124 with_giflib
1125 with_libpng
1126 with_zlib
1127 with_lcms
1128 with_dxsdk
1129 with_dxsdk_lib
1130 with_dxsdk_include
1131 with_num_cores
1132 with_memory_size
1133 with_jobs
1134 with_boot_jdk_jvmargs
1135 with_sjavac_server_java
1136 enable_sjavac
1137 enable_javac_server
1138 enable_icecc
1139 enable_precompiled_headers
1140 enable_ccache
1141 with_ccache_dir
1142 '
1143       ac_precious_vars='build_alias
1144 host_alias
1145 target_alias
1146 BASENAME
1147 BASH
1148 CAT
1149 CHMOD
1150 CMP
1151 COMM
1152 CP
1153 CUT
1154 DATE
1155 DIFF
1156 DIRNAME
1157 ECHO
1158 EXPR
1159 FILE
1160 FIND
1161 HEAD
1162 LN
1163 LS
1164 MKDIR
1165 MKTEMP
1166 MV
1167 NAWK
1168 PRINTF
1169 RM
1170 RMDIR
1171 SH
1172 SORT
1173 TAIL
1174 TAR
1175 TEE
1176 TOUCH
1177 TR
1178 UNAME
1179 UNIQ
1180 WC
1181 WHICH
1182 XARGS
1183 AWK
1184 GREP
1185 EGREP
1186 FGREP
1187 SED
1188 CYGPATH
1189 READLINK
1190 DF
1191 CPIO
1192 NICE
1193 MAKE
1194 UNZIP
1195 ZIP
1196 LDD
1197 OTOOL
1198 READELF
1199 HG
1200 STAT
1201 TIME
1202 PATCH
1203 DSYMUTIL
1204 XATTR
1205 CODESIGN
1206 SETFILE
1207 PKG_CONFIG
1208 JAVA
1209 JAVAC
1210 JAVAH
1211 JAR
1212 JARSIGNER
1213 CC
1214 CFLAGS
1215 LDFLAGS
1216 LIBS
1217 CPPFLAGS
1218 CXX
1219 CXXFLAGS
1220 CCC
1221 CPP
1222 CXXCPP
1223 AS
1224 AR
1225 LIPO
1226 STRIP
1227 NM
1228 GNM
1229 OBJCOPY
1230 OBJDUMP
1231 BUILD_CC
1232 BUILD_CXX
1233 BUILD_NM
1234 BUILD_AR
1235 JTREGEXE
1236 XMKMF
1237 FREETYPE_CFLAGS
1238 FREETYPE_LIBS
1239 ALSA_CFLAGS
1240 ALSA_LIBS
1241 LIBFFI_CFLAGS
1242 LIBFFI_LIBS
1243 PNG_CFLAGS
1244 PNG_LIBS
1245 LCMS_CFLAGS
1246 LCMS_LIBS
1247 ICECC_CMD
1248 ICECC_CREATE_ENV
1249 ICECC_WRAPPER
1250 CCACHE'
1251 
1252 
1253 # Initialize some variables set by options.
1254 ac_init_help=
1255 ac_init_version=false
1256 ac_unrecognized_opts=
1257 ac_unrecognized_sep=
1258 # The variables have the same names as the options, with
1259 # dashes changed to underlines.
1260 cache_file=/dev/null
1261 exec_prefix=NONE
1262 no_create=
1263 no_recursion=
1264 prefix=NONE
1265 program_prefix=NONE
1266 program_suffix=NONE
1267 program_transform_name=s,x,x,
1268 silent=
1269 site=
1270 srcdir=
1271 verbose=
1272 x_includes=NONE
1273 x_libraries=NONE
1274 
1275 # Installation directory options.
1276 # These are left unexpanded so users can "make install exec_prefix=/foo"
1277 # and all the variables that are supposed to be based on exec_prefix
1278 # by default will actually change.
1279 # Use braces instead of parens because sh, perl, etc. also accept them.
1280 # (The list follows the same order as the GNU Coding Standards.)
1281 bindir='${exec_prefix}/bin'
1282 sbindir='${exec_prefix}/sbin'
1283 libexecdir='${exec_prefix}/libexec'
1284 datarootdir='${prefix}/share'
1285 datadir='${datarootdir}'
1286 sysconfdir='${prefix}/etc'
1287 sharedstatedir='${prefix}/com'
1288 localstatedir='${prefix}/var'
1289 includedir='${prefix}/include'
1290 oldincludedir='/usr/include'
1291 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1292 infodir='${datarootdir}/info'
1293 htmldir='${docdir}'
1294 dvidir='${docdir}'
1295 pdfdir='${docdir}'
1296 psdir='${docdir}'
1297 libdir='${exec_prefix}/lib'
1298 localedir='${datarootdir}/locale'
1299 mandir='${datarootdir}/man'
1300 
1301 ac_prev=
1302 ac_dashdash=
1303 for ac_option
1304 do
1305   # If the previous option needs an argument, assign it.
1306   if test -n "$ac_prev"; then
1307     eval $ac_prev=\$ac_option
1308     ac_prev=
1309     continue
1310   fi
1311 
1312   case $ac_option in
1313   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1314   *=)   ac_optarg= ;;
1315   *)    ac_optarg=yes ;;
1316   esac
1317 
1318   # Accept the important Cygnus configure options, so we can diagnose typos.
1319 
1320   case $ac_dashdash$ac_option in
1321   --)
1322     ac_dashdash=yes ;;
1323 
1324   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1325     ac_prev=bindir ;;
1326   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1327     bindir=$ac_optarg ;;
1328 
1329   -build | --build | --buil | --bui | --bu)
1330     ac_prev=build_alias ;;
1331   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1332     build_alias=$ac_optarg ;;
1333 
1334   -cache-file | --cache-file | --cache-fil | --cache-fi \
1335   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1336     ac_prev=cache_file ;;
1337   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1338   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1339     cache_file=$ac_optarg ;;
1340 
1341   --config-cache | -C)
1342     cache_file=config.cache ;;
1343 
1344   -datadir | --datadir | --datadi | --datad)
1345     ac_prev=datadir ;;
1346   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1347     datadir=$ac_optarg ;;
1348 
1349   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1350   | --dataroo | --dataro | --datar)
1351     ac_prev=datarootdir ;;
1352   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1353   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1354     datarootdir=$ac_optarg ;;
1355 
1356   -disable-* | --disable-*)
1357     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1358     # Reject names that are not valid shell variable names.
1359     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1360       as_fn_error $? "invalid feature name: $ac_useropt"
1361     ac_useropt_orig=$ac_useropt
1362     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1363     case $ac_user_opts in
1364       *"
1365 "enable_$ac_useropt"
1366 "*) ;;
1367       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1368          ac_unrecognized_sep=', ';;
1369     esac
1370     eval enable_$ac_useropt=no ;;
1371 
1372   -docdir | --docdir | --docdi | --doc | --do)
1373     ac_prev=docdir ;;
1374   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1375     docdir=$ac_optarg ;;
1376 
1377   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1378     ac_prev=dvidir ;;
1379   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1380     dvidir=$ac_optarg ;;
1381 
1382   -enable-* | --enable-*)
1383     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1384     # Reject names that are not valid shell variable names.
1385     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1386       as_fn_error $? "invalid feature name: $ac_useropt"
1387     ac_useropt_orig=$ac_useropt
1388     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1389     case $ac_user_opts in
1390       *"
1391 "enable_$ac_useropt"
1392 "*) ;;
1393       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1394          ac_unrecognized_sep=', ';;
1395     esac
1396     eval enable_$ac_useropt=\$ac_optarg ;;
1397 
1398   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1399   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1400   | --exec | --exe | --ex)
1401     ac_prev=exec_prefix ;;
1402   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1403   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1404   | --exec=* | --exe=* | --ex=*)
1405     exec_prefix=$ac_optarg ;;
1406 
1407   -gas | --gas | --ga | --g)
1408     # Obsolete; use --with-gas.
1409     with_gas=yes ;;
1410 
1411   -help | --help | --hel | --he | -h)
1412     ac_init_help=long ;;
1413   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1414     ac_init_help=recursive ;;
1415   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1416     ac_init_help=short ;;
1417 
1418   -host | --host | --hos | --ho)
1419     ac_prev=host_alias ;;
1420   -host=* | --host=* | --hos=* | --ho=*)
1421     host_alias=$ac_optarg ;;
1422 
1423   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1424     ac_prev=htmldir ;;
1425   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1426   | --ht=*)
1427     htmldir=$ac_optarg ;;
1428 
1429   -includedir | --includedir | --includedi | --included | --include \
1430   | --includ | --inclu | --incl | --inc)
1431     ac_prev=includedir ;;
1432   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1433   | --includ=* | --inclu=* | --incl=* | --inc=*)
1434     includedir=$ac_optarg ;;
1435 
1436   -infodir | --infodir | --infodi | --infod | --info | --inf)
1437     ac_prev=infodir ;;
1438   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1439     infodir=$ac_optarg ;;
1440 
1441   -libdir | --libdir | --libdi | --libd)
1442     ac_prev=libdir ;;
1443   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1444     libdir=$ac_optarg ;;
1445 
1446   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1447   | --libexe | --libex | --libe)
1448     ac_prev=libexecdir ;;
1449   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1450   | --libexe=* | --libex=* | --libe=*)
1451     libexecdir=$ac_optarg ;;
1452 
1453   -localedir | --localedir | --localedi | --localed | --locale)
1454     ac_prev=localedir ;;
1455   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1456     localedir=$ac_optarg ;;
1457 
1458   -localstatedir | --localstatedir | --localstatedi | --localstated \
1459   | --localstate | --localstat | --localsta | --localst | --locals)
1460     ac_prev=localstatedir ;;
1461   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1462   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1463     localstatedir=$ac_optarg ;;
1464 
1465   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1466     ac_prev=mandir ;;
1467   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1468     mandir=$ac_optarg ;;
1469 
1470   -nfp | --nfp | --nf)
1471     # Obsolete; use --without-fp.
1472     with_fp=no ;;
1473 
1474   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1475   | --no-cr | --no-c | -n)
1476     no_create=yes ;;
1477 
1478   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1479   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1480     no_recursion=yes ;;
1481 
1482   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1483   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1484   | --oldin | --oldi | --old | --ol | --o)
1485     ac_prev=oldincludedir ;;
1486   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1487   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1488   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1489     oldincludedir=$ac_optarg ;;
1490 
1491   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1492     ac_prev=prefix ;;
1493   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1494     prefix=$ac_optarg ;;
1495 
1496   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1497   | --program-pre | --program-pr | --program-p)
1498     ac_prev=program_prefix ;;
1499   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1500   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1501     program_prefix=$ac_optarg ;;
1502 
1503   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1504   | --program-suf | --program-su | --program-s)
1505     ac_prev=program_suffix ;;
1506   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1507   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1508     program_suffix=$ac_optarg ;;
1509 
1510   -program-transform-name | --program-transform-name \
1511   | --program-transform-nam | --program-transform-na \
1512   | --program-transform-n | --program-transform- \
1513   | --program-transform | --program-transfor \
1514   | --program-transfo | --program-transf \
1515   | --program-trans | --program-tran \
1516   | --progr-tra | --program-tr | --program-t)
1517     ac_prev=program_transform_name ;;
1518   -program-transform-name=* | --program-transform-name=* \
1519   | --program-transform-nam=* | --program-transform-na=* \
1520   | --program-transform-n=* | --program-transform-=* \
1521   | --program-transform=* | --program-transfor=* \
1522   | --program-transfo=* | --program-transf=* \
1523   | --program-trans=* | --program-tran=* \
1524   | --progr-tra=* | --program-tr=* | --program-t=*)
1525     program_transform_name=$ac_optarg ;;
1526 
1527   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1528     ac_prev=pdfdir ;;
1529   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1530     pdfdir=$ac_optarg ;;
1531 
1532   -psdir | --psdir | --psdi | --psd | --ps)
1533     ac_prev=psdir ;;
1534   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1535     psdir=$ac_optarg ;;
1536 
1537   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1538   | -silent | --silent | --silen | --sile | --sil)
1539     silent=yes ;;
1540 
1541   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1542     ac_prev=sbindir ;;
1543   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1544   | --sbi=* | --sb=*)
1545     sbindir=$ac_optarg ;;
1546 
1547   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1548   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1549   | --sharedst | --shareds | --shared | --share | --shar \
1550   | --sha | --sh)
1551     ac_prev=sharedstatedir ;;
1552   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1553   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1554   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1555   | --sha=* | --sh=*)
1556     sharedstatedir=$ac_optarg ;;
1557 
1558   -site | --site | --sit)
1559     ac_prev=site ;;
1560   -site=* | --site=* | --sit=*)
1561     site=$ac_optarg ;;
1562 
1563   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1564     ac_prev=srcdir ;;
1565   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1566     srcdir=$ac_optarg ;;
1567 
1568   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1569   | --syscon | --sysco | --sysc | --sys | --sy)
1570     ac_prev=sysconfdir ;;
1571   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1572   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1573     sysconfdir=$ac_optarg ;;
1574 
1575   -target | --target | --targe | --targ | --tar | --ta | --t)
1576     ac_prev=target_alias ;;
1577   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1578     target_alias=$ac_optarg ;;
1579 
1580   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1581     verbose=yes ;;
1582 
1583   -version | --version | --versio | --versi | --vers | -V)
1584     ac_init_version=: ;;
1585 
1586   -with-* | --with-*)
1587     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1588     # Reject names that are not valid shell variable names.
1589     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1590       as_fn_error $? "invalid package name: $ac_useropt"
1591     ac_useropt_orig=$ac_useropt
1592     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1593     case $ac_user_opts in
1594       *"
1595 "with_$ac_useropt"
1596 "*) ;;
1597       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1598          ac_unrecognized_sep=', ';;
1599     esac
1600     eval with_$ac_useropt=\$ac_optarg ;;
1601 
1602   -without-* | --without-*)
1603     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1604     # Reject names that are not valid shell variable names.
1605     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1606       as_fn_error $? "invalid package name: $ac_useropt"
1607     ac_useropt_orig=$ac_useropt
1608     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1609     case $ac_user_opts in
1610       *"
1611 "with_$ac_useropt"
1612 "*) ;;
1613       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1614          ac_unrecognized_sep=', ';;
1615     esac
1616     eval with_$ac_useropt=no ;;
1617 
1618   --x)
1619     # Obsolete; use --with-x.
1620     with_x=yes ;;
1621 
1622   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1623   | --x-incl | --x-inc | --x-in | --x-i)
1624     ac_prev=x_includes ;;
1625   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1626   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1627     x_includes=$ac_optarg ;;
1628 
1629   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1630   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1631     ac_prev=x_libraries ;;
1632   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1633   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1634     x_libraries=$ac_optarg ;;
1635 
1636   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1637 Try \`$0 --help' for more information"
1638     ;;
1639 
1640   *=*)
1641     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1642     # Reject names that are not valid shell variable names.
1643     case $ac_envvar in #(
1644       '' | [0-9]* | *[!_$as_cr_alnum]* )
1645       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1646     esac
1647     eval $ac_envvar=\$ac_optarg
1648     export $ac_envvar ;;
1649 
1650   *)
1651     # FIXME: should be removed in autoconf 3.0.
1652     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1653     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1654       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1655     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1656     ;;
1657 
1658   esac
1659 done
1660 
1661 if test -n "$ac_prev"; then
1662   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1663   as_fn_error $? "missing argument to $ac_option"
1664 fi
1665 
1666 if test -n "$ac_unrecognized_opts"; then
1667   case $enable_option_checking in
1668     no) ;;
1669     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1670     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1671   esac
1672 fi
1673 
1674 # Check all directory arguments for consistency.
1675 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1676                 datadir sysconfdir sharedstatedir localstatedir includedir \
1677                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1678                 libdir localedir mandir
1679 do
1680   eval ac_val=\$$ac_var
1681   # Remove trailing slashes.
1682   case $ac_val in
1683     */ )
1684       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1685       eval $ac_var=\$ac_val;;
1686   esac
1687   # Be sure to have absolute directory names.
1688   case $ac_val in
1689     [\\/$]* | ?:[\\/]* )  continue;;
1690     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1691   esac
1692   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1693 done
1694 
1695 # There might be people who depend on the old broken behavior: `$host'
1696 # used to hold the argument of --host etc.
1697 # FIXME: To remove some day.
1698 build=$build_alias
1699 host=$host_alias
1700 target=$target_alias
1701 
1702 # FIXME: To remove some day.
1703 if test "x$host_alias" != x; then
1704   if test "x$build_alias" = x; then
1705     cross_compiling=maybe
1706   elif test "x$build_alias" != "x$host_alias"; then
1707     cross_compiling=yes
1708   fi
1709 fi
1710 
1711 ac_tool_prefix=
1712 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1713 
1714 test "$silent" = yes && exec 6>/dev/null
1715 
1716 
1717 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1718 ac_ls_di=`ls -di .` &&
1719 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1720   as_fn_error $? "working directory cannot be determined"
1721 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1722   as_fn_error $? "pwd does not report name of working directory"
1723 
1724 
1725 # Find the source files, if location was not specified.
1726 if test -z "$srcdir"; then
1727   ac_srcdir_defaulted=yes
1728   # Try the directory containing this script, then the parent directory.
1729   ac_confdir=`$as_dirname -- "$as_myself" ||
1730 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1731          X"$as_myself" : 'X\(//\)[^/]' \| \
1732          X"$as_myself" : 'X\(//\)$' \| \
1733          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1734 $as_echo X"$as_myself" |
1735     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1736             s//\1/
1737             q
1738           }
1739           /^X\(\/\/\)[^/].*/{
1740             s//\1/
1741             q
1742           }
1743           /^X\(\/\/\)$/{
1744             s//\1/
1745             q
1746           }
1747           /^X\(\/\).*/{
1748             s//\1/
1749             q
1750           }
1751           s/.*/./; q'`
1752   srcdir=$ac_confdir
1753   if test ! -r "$srcdir/$ac_unique_file"; then
1754     srcdir=..
1755   fi
1756 else
1757   ac_srcdir_defaulted=no
1758 fi
1759 if test ! -r "$srcdir/$ac_unique_file"; then
1760   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1761   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1762 fi
1763 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1764 ac_abs_confdir=`(
1765         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1766         pwd)`
1767 # When building in place, set srcdir=.
1768 if test "$ac_abs_confdir" = "$ac_pwd"; then
1769   srcdir=.
1770 fi
1771 # Remove unnecessary trailing slashes from srcdir.
1772 # Double slashes in file names in object file debugging info
1773 # mess up M-x gdb in Emacs.
1774 case $srcdir in
1775 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1776 esac
1777 for ac_var in $ac_precious_vars; do
1778   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1779   eval ac_env_${ac_var}_value=\$${ac_var}
1780   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1781   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1782 done
1783 
1784 #
1785 # Report the --help message.
1786 #
1787 if test "$ac_init_help" = "long"; then
1788   # Omit some internal or obsolete options to make the list less imposing.
1789   # This message is too long to be a string in the A/UX 3.1 sh.
1790   cat <<_ACEOF
1791 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1792 
1793 Usage: $0 [OPTION]... [VAR=VALUE]...
1794 
1795 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1796 VAR=VALUE.  See below for descriptions of some of the useful variables.
1797 
1798 Defaults for the options are specified in brackets.
1799 
1800 Configuration:
1801   -h, --help              display this help and exit
1802       --help=short        display options specific to this package
1803       --help=recursive    display the short help of all the included packages
1804   -V, --version           display version information and exit
1805   -q, --quiet, --silent   do not print \`checking ...' messages
1806       --cache-file=FILE   cache test results in FILE [disabled]
1807   -C, --config-cache      alias for \`--cache-file=config.cache'
1808   -n, --no-create         do not create output files
1809       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1810 
1811 Installation directories:
1812   --prefix=PREFIX         install architecture-independent files in PREFIX
1813                           [$ac_default_prefix]
1814   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1815                           [PREFIX]
1816 
1817 By default, \`make install' will install all the files in
1818 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1819 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1820 for instance \`--prefix=\$HOME'.
1821 
1822 For better control, use the options below.
1823 
1824 Fine tuning of the installation directories:
1825   --bindir=DIR            user executables [EPREFIX/bin]
1826   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1827   --libexecdir=DIR        program executables [EPREFIX/libexec]
1828   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1829   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1830   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1831   --libdir=DIR            object code libraries [EPREFIX/lib]
1832   --includedir=DIR        C header files [PREFIX/include]
1833   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1834   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1835   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1836   --infodir=DIR           info documentation [DATAROOTDIR/info]
1837   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1838   --mandir=DIR            man documentation [DATAROOTDIR/man]
1839   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1840   --htmldir=DIR           html documentation [DOCDIR]
1841   --dvidir=DIR            dvi documentation [DOCDIR]
1842   --pdfdir=DIR            pdf documentation [DOCDIR]
1843   --psdir=DIR             ps documentation [DOCDIR]
1844 _ACEOF
1845 
1846   cat <<\_ACEOF
1847 
1848 X features:
1849   --x-includes=DIR    X include files are in DIR
1850   --x-libraries=DIR   X library files are in DIR
1851 
1852 System types:
1853   --build=BUILD     configure for building on BUILD [guessed]
1854   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1855   --target=TARGET   configure for building compilers for TARGET [HOST]
1856 _ACEOF
1857 fi
1858 
1859 if test -n "$ac_init_help"; then
1860   case $ac_init_help in
1861      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1862    esac
1863   cat <<\_ACEOF
1864 
1865 Optional Features:
1866   --disable-option-checking  ignore unrecognized --enable/--with options
1867   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1868   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1869   --enable-openjdk-only   suppress building custom source even if present
1870                           [disabled]
1871   --enable-debug          set the debug level to fastdebug (shorthand for
1872                           --with-debug-level=fastdebug) [disabled]
1873   --disable-headful       disable building headful support (graphical UI
1874                           support) [enabled]
1875   --enable-hotspot-test-in-build
1876                           run the Queens test after Hotspot build [disabled]
1877   --enable-unlimited-crypto
1878                           Enable unlimited crypto policy [disabled]
1879   --enable-static-build   enable static library build [disabled]
1880   --disable-warnings-as-errors
1881                           do not consider native warnings to be an error
1882                           [enabled]
1883   --enable-java-debug-symbols
1884                           enable generating debug symbols in java class files
1885                           [disabled]
1886   --enable-debug-symbols  Deprecated. Option is kept for backwards
1887                           compatibility and is ignored
1888   --enable-zip-debug-info Deprecated. Option is kept for backwards
1889                           compatibility and is ignored
1890   --enable-native-coverage
1891                           enable native compilation with code coverage
1892                           data[disabled]
1893   --disable-freetype-bundling
1894                           disable bundling of the freetype library with the
1895                           build result [enabled on Windows or when using
1896                           --with-freetype, disabled otherwise]
1897   --enable-sjavac         use sjavac to do fast incremental compiles
1898                           [disabled]
1899   --disable-javac-server  disable javac server [enabled]
1900   --enable-icecc          enable distribted compilation of native code using
1901                           icecc/icecream [disabled]
1902   --disable-precompiled-headers
1903                           disable using precompiled headers when compiling C++
1904                           [enabled]
1905   --enable-ccache         enable using ccache to speed up recompilations
1906                           [disabled]
1907 
1908 Optional Packages:
1909   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1910   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1911   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1912                           support it), e.g. --with-target-bits=32 [guessed]
1913   --with-custom-make-dir  Deprecated. Option is kept for backwards
1914                           compatibility and is ignored
1915   --with-jdk-variant      JDK variant to build (normal) [normal]
1916   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1917   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1918                           client, minimal1, kernel, zero, zeroshark, core)
1919                           [server]
1920   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1921                           optimized (HotSpot build only)) [release]
1922   --with-devkit           use this devkit for compilers, tools and resources
1923   --with-sys-root         alias for --with-sysroot for backwards compatability
1924   --with-sysroot          use this directory as sysroot
1925   --with-tools-dir        alias for --with-toolchain-path for backwards
1926                           compatibility
1927   --with-toolchain-path   prepend these directories when searching for
1928                           toolchain binaries (compilers etc)
1929   --with-extra-path       prepend these directories to the default path
1930   --with-sdk-name         use the platform SDK of the given name. [macosx]
1931   --with-conf-name        use this as the name of the configuration [generated
1932                           from important configuration options]
1933   --with-output-sync      set make output sync type if supported by make.
1934                           [recurse]
1935   --with-cacerts-file     specify alternative cacerts file
1936   --with-milestone        Set milestone value for build [internal]
1937   --with-update-version   Set update version value for build [b00]
1938   --with-user-release-suffix
1939                           Add a custom string to the version string if build
1940                           number is not set.[username_builddateb00]
1941   --with-build-number     Set build number value for build [b00]
1942   --with-copyright-year   Set copyright year value for build [current year]
1943   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1944   --with-add-source-root  Deprecated. Option is kept for backwards
1945                           compatibility and is ignored
1946   --with-override-source-root
1947                           Deprecated. Option is kept for backwards
1948                           compatibility and is ignored
1949   --with-adds-and-overrides
1950                           Deprecated. Option is kept for backwards
1951                           compatibility and is ignored
1952   --with-override-langtools
1953                           Deprecated. Option is kept for backwards
1954                           compatibility and is ignored
1955   --with-override-corba   Deprecated. Option is kept for backwards
1956                           compatibility and is ignored
1957   --with-override-jaxp    Deprecated. Option is kept for backwards
1958                           compatibility and is ignored
1959   --with-override-jaxws   Deprecated. Option is kept for backwards
1960                           compatibility and is ignored
1961   --with-override-hotspot Deprecated. Option is kept for backwards
1962                           compatibility and is ignored
1963   --with-override-nashorn Deprecated. Option is kept for backwards
1964                           compatibility and is ignored
1965   --with-override-jdk     Deprecated. Option is kept for backwards
1966                           compatibility and is ignored
1967   --with-import-hotspot   import hotspot binaries from this jdk image or
1968                           hotspot build dist dir instead of building from
1969                           source
1970   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1971                           to show possible values [platform dependent]
1972   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1973   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1974   --with-extra-ldflags    extra flags to be used when linking jdk
1975   --with-toolchain-version
1976                           the version of the toolchain to look for, use
1977                           '--help' to show possible values [platform
1978                           dependent]
1979   --with-build-devkit     Devkit to use for the build platform toolchain
1980   --with-jtreg            Regression Test Harness [probed]
1981   --with-native-debug-symbols
1982                           set the native debug symbol configuration (none,
1983                           internal, external, zipped) [zipped]
1984   --with-stdc++lib=<static>,<dynamic>,<default>
1985                           force linking of the C++ runtime on Linux to either
1986                           static or dynamic, default is static with dynamic as
1987                           fallback
1988   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1989                           (Windows only) [probed]
1990   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1991                           (Windows only) [probed]
1992   --with-x                use the X Window System
1993   --with-cups             specify prefix directory for the cups package
1994                           (expecting the headers under PATH/include)
1995   --with-cups-include     specify directory for the cups include files
1996   --with-freetype         specify prefix directory for the freetype package
1997                           (expecting the libraries under PATH/lib and the
1998                           headers under PATH/include)
1999   --with-freetype-include specify directory for the freetype include files
2000   --with-freetype-lib     specify directory for the freetype library
2001   --with-freetype-src     specify directory with freetype sources to
2002                           automatically build the library (experimental,
2003                           Windows-only)
2004   --with-alsa             specify prefix directory for the alsa package
2005                           (expecting the libraries under PATH/lib and the
2006                           headers under PATH/include)
2007   --with-alsa-include     specify directory for the alsa include files
2008   --with-alsa-lib         specify directory for the alsa library
2009   --with-libffi           specify prefix directory for the libffi package
2010                           (expecting the libraries under PATH/lib and the
2011                           headers under PATH/include)
2012   --with-libffi-include   specify directory for the libffi include files
2013   --with-libffi-lib       specify directory for the libffi library
2014   --with-libjpeg          use libjpeg from build system or OpenJDK source
2015                           (system, bundled) [bundled]
2016   --with-giflib           use giflib from build system or OpenJDK source
2017                           (system, bundled) [bundled]
2018   --with-libpng           use libpng from build system or OpenJDK source
2019                           (system, bundled) [bundled]
2020   --with-zlib             use zlib from build system or OpenJDK source
2021                           (system, bundled) [bundled]
2022   --with-lcms             use lcms2 from build system or OpenJDK source
2023                           (system, bundled) [bundled]
2024   --with-dxsdk            Deprecated. Option is kept for backwards
2025                           compatibility and is ignored
2026   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2027                           compatibility and is ignored
2028   --with-dxsdk-include    Deprecated. Option is kept for backwards
2029                           compatibility and is ignored
2030   --with-num-cores        number of cores in the build system, e.g.
2031                           --with-num-cores=8 [probed]
2032   --with-memory-size      memory (in MB) available in the build system, e.g.
2033                           --with-memory-size=1024 [probed]
2034   --with-jobs             number of parallel jobs to let make run [calculated
2035                           based on cores and memory]
2036   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2037                           invocations of boot JDK, overriding the default
2038                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2039                           -enableassertions"
2040   --with-sjavac-server-java
2041                           use this java binary for running the sjavac
2042                           background server [Boot JDK java]
2043   --with-ccache-dir       where to store ccache files [~/.ccache]
2044 
2045 Some influential environment variables:
2046   BASENAME    Override default value for BASENAME
2047   BASH        Override default value for BASH
2048   CAT         Override default value for CAT
2049   CHMOD       Override default value for CHMOD
2050   CMP         Override default value for CMP
2051   COMM        Override default value for COMM
2052   CP          Override default value for CP
2053   CUT         Override default value for CUT
2054   DATE        Override default value for DATE
2055   DIFF        Override default value for DIFF
2056   DIRNAME     Override default value for DIRNAME
2057   ECHO        Override default value for ECHO
2058   EXPR        Override default value for EXPR
2059   FILE        Override default value for FILE
2060   FIND        Override default value for FIND
2061   HEAD        Override default value for HEAD
2062   LN          Override default value for LN
2063   LS          Override default value for LS
2064   MKDIR       Override default value for MKDIR
2065   MKTEMP      Override default value for MKTEMP
2066   MV          Override default value for MV
2067   NAWK        Override default value for NAWK
2068   PRINTF      Override default value for PRINTF
2069   RM          Override default value for RM
2070   RMDIR       Override default value for RMDIR
2071   SH          Override default value for SH
2072   SORT        Override default value for SORT
2073   TAIL        Override default value for TAIL
2074   TAR         Override default value for TAR
2075   TEE         Override default value for TEE
2076   TOUCH       Override default value for TOUCH
2077   TR          Override default value for TR
2078   UNAME       Override default value for UNAME
2079   UNIQ        Override default value for UNIQ
2080   WC          Override default value for WC
2081   WHICH       Override default value for WHICH
2082   XARGS       Override default value for XARGS
2083   AWK         Override default value for AWK
2084   GREP        Override default value for GREP
2085   EGREP       Override default value for EGREP
2086   FGREP       Override default value for FGREP
2087   SED         Override default value for SED
2088   CYGPATH     Override default value for CYGPATH
2089   READLINK    Override default value for READLINK
2090   DF          Override default value for DF
2091   CPIO        Override default value for CPIO
2092   NICE        Override default value for NICE
2093   MAKE        Override default value for MAKE
2094   UNZIP       Override default value for UNZIP
2095   ZIP         Override default value for ZIP
2096   LDD         Override default value for LDD
2097   OTOOL       Override default value for OTOOL
2098   READELF     Override default value for READELF
2099   HG          Override default value for HG
2100   STAT        Override default value for STAT
2101   TIME        Override default value for TIME
2102   PATCH       Override default value for PATCH
2103   DSYMUTIL    Override default value for DSYMUTIL
2104   XATTR       Override default value for XATTR
2105   CODESIGN    Override default value for CODESIGN
2106   SETFILE     Override default value for SETFILE
2107   PKG_CONFIG  path to pkg-config utility
2108   JAVA        Override default value for JAVA
2109   JAVAC       Override default value for JAVAC
2110   JAVAH       Override default value for JAVAH
2111   JAR         Override default value for JAR
2112   JARSIGNER   Override default value for JARSIGNER
2113   CC          C compiler command
2114   CFLAGS      C compiler flags
2115   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2116               nonstandard directory <lib dir>
2117   LIBS        libraries to pass to the linker, e.g. -l<library>
2118   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2119               you have headers in a nonstandard directory <include dir>
2120   CXX         C++ compiler command
2121   CXXFLAGS    C++ compiler flags
2122   CPP         C preprocessor
2123   CXXCPP      C++ preprocessor
2124   AS          Override default value for AS
2125   AR          Override default value for AR
2126   LIPO        Override default value for LIPO
2127   STRIP       Override default value for STRIP
2128   NM          Override default value for NM
2129   GNM         Override default value for GNM
2130   OBJCOPY     Override default value for OBJCOPY
2131   OBJDUMP     Override default value for OBJDUMP
2132   BUILD_CC    Override default value for BUILD_CC
2133   BUILD_CXX   Override default value for BUILD_CXX
2134   BUILD_NM    Override default value for BUILD_NM
2135   BUILD_AR    Override default value for BUILD_AR
2136   JTREGEXE    Override default value for JTREGEXE
2137   XMKMF       Path to xmkmf, Makefile generator for X Window System
2138   FREETYPE_CFLAGS
2139               C compiler flags for FREETYPE, overriding pkg-config
2140   FREETYPE_LIBS
2141               linker flags for FREETYPE, overriding pkg-config
2142   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2143   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2144   LIBFFI_CFLAGS
2145               C compiler flags for LIBFFI, overriding pkg-config
2146   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2147   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2148   PNG_LIBS    linker flags for PNG, overriding pkg-config
2149   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2150   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2151   ICECC_CMD   Override default value for ICECC_CMD
2152   ICECC_CREATE_ENV
2153               Override default value for ICECC_CREATE_ENV
2154   ICECC_WRAPPER
2155               Override default value for ICECC_WRAPPER
2156   CCACHE      Override default value for CCACHE
2157 
2158 Use these variables to override the choices made by `configure' or to help
2159 it to find libraries and programs with nonstandard names/locations.
2160 
2161 Report bugs to <build-dev@openjdk.java.net>.
2162 OpenJDK home page: <http://openjdk.java.net>.
2163 _ACEOF
2164 ac_status=$?
2165 fi
2166 
2167 if test "$ac_init_help" = "recursive"; then
2168   # If there are subdirs, report their specific --help.
2169   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2170     test -d "$ac_dir" ||
2171       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2172       continue
2173     ac_builddir=.
2174 
2175 case "$ac_dir" in
2176 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2177 *)
2178   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2179   # A ".." for each directory in $ac_dir_suffix.
2180   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2181   case $ac_top_builddir_sub in
2182   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2183   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2184   esac ;;
2185 esac
2186 ac_abs_top_builddir=$ac_pwd
2187 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2188 # for backward compatibility:
2189 ac_top_builddir=$ac_top_build_prefix
2190 
2191 case $srcdir in
2192   .)  # We are building in place.
2193     ac_srcdir=.
2194     ac_top_srcdir=$ac_top_builddir_sub
2195     ac_abs_top_srcdir=$ac_pwd ;;
2196   [\\/]* | ?:[\\/]* )  # Absolute name.
2197     ac_srcdir=$srcdir$ac_dir_suffix;
2198     ac_top_srcdir=$srcdir
2199     ac_abs_top_srcdir=$srcdir ;;
2200   *) # Relative name.
2201     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2202     ac_top_srcdir=$ac_top_build_prefix$srcdir
2203     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2204 esac
2205 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2206 
2207     cd "$ac_dir" || { ac_status=$?; continue; }
2208     # Check for guested configure.
2209     if test -f "$ac_srcdir/configure.gnu"; then
2210       echo &&
2211       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2212     elif test -f "$ac_srcdir/configure"; then
2213       echo &&
2214       $SHELL "$ac_srcdir/configure" --help=recursive
2215     else
2216       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2217     fi || ac_status=$?
2218     cd "$ac_pwd" || { ac_status=$?; break; }
2219   done
2220 fi
2221 
2222 test -n "$ac_init_help" && exit $ac_status
2223 if $ac_init_version; then
2224   cat <<\_ACEOF
2225 OpenJDK configure jdk9
2226 generated by GNU Autoconf 2.69
2227 
2228 Copyright (C) 2012 Free Software Foundation, Inc.
2229 This configure script is free software; the Free Software Foundation
2230 gives unlimited permission to copy, distribute and modify it.
2231 _ACEOF
2232   exit
2233 fi
2234 
2235 ## ------------------------ ##
2236 ## Autoconf initialization. ##
2237 ## ------------------------ ##
2238 
2239 # ac_fn_c_try_compile LINENO
2240 # --------------------------
2241 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2242 ac_fn_c_try_compile ()
2243 {
2244   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245   rm -f conftest.$ac_objext
2246   if { { ac_try="$ac_compile"
2247 case "(($ac_try" in
2248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249   *) ac_try_echo=$ac_try;;
2250 esac
2251 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252 $as_echo "$ac_try_echo"; } >&5
2253   (eval "$ac_compile") 2>conftest.err
2254   ac_status=$?
2255   if test -s conftest.err; then
2256     grep -v '^ *+' conftest.err >conftest.er1
2257     cat conftest.er1 >&5
2258     mv -f conftest.er1 conftest.err
2259   fi
2260   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2261   test $ac_status = 0; } && {
2262          test -z "$ac_c_werror_flag" ||
2263          test ! -s conftest.err
2264        } && test -s conftest.$ac_objext; then :
2265   ac_retval=0
2266 else
2267   $as_echo "$as_me: failed program was:" >&5
2268 sed 's/^/| /' conftest.$ac_ext >&5
2269 
2270         ac_retval=1
2271 fi
2272   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2273   as_fn_set_status $ac_retval
2274 
2275 } # ac_fn_c_try_compile
2276 
2277 # ac_fn_cxx_try_compile LINENO
2278 # ----------------------------
2279 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2280 ac_fn_cxx_try_compile ()
2281 {
2282   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283   rm -f conftest.$ac_objext
2284   if { { ac_try="$ac_compile"
2285 case "(($ac_try" in
2286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2287   *) ac_try_echo=$ac_try;;
2288 esac
2289 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2290 $as_echo "$ac_try_echo"; } >&5
2291   (eval "$ac_compile") 2>conftest.err
2292   ac_status=$?
2293   if test -s conftest.err; then
2294     grep -v '^ *+' conftest.err >conftest.er1
2295     cat conftest.er1 >&5
2296     mv -f conftest.er1 conftest.err
2297   fi
2298   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2299   test $ac_status = 0; } && {
2300          test -z "$ac_cxx_werror_flag" ||
2301          test ! -s conftest.err
2302        } && test -s conftest.$ac_objext; then :
2303   ac_retval=0
2304 else
2305   $as_echo "$as_me: failed program was:" >&5
2306 sed 's/^/| /' conftest.$ac_ext >&5
2307 
2308         ac_retval=1
2309 fi
2310   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311   as_fn_set_status $ac_retval
2312 
2313 } # ac_fn_cxx_try_compile
2314 
2315 # ac_fn_c_try_cpp LINENO
2316 # ----------------------
2317 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2318 ac_fn_c_try_cpp ()
2319 {
2320   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321   if { { ac_try="$ac_cpp conftest.$ac_ext"
2322 case "(($ac_try" in
2323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2324   *) ac_try_echo=$ac_try;;
2325 esac
2326 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2327 $as_echo "$ac_try_echo"; } >&5
2328   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2329   ac_status=$?
2330   if test -s conftest.err; then
2331     grep -v '^ *+' conftest.err >conftest.er1
2332     cat conftest.er1 >&5
2333     mv -f conftest.er1 conftest.err
2334   fi
2335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2336   test $ac_status = 0; } > conftest.i && {
2337          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2338          test ! -s conftest.err
2339        }; then :
2340   ac_retval=0
2341 else
2342   $as_echo "$as_me: failed program was:" >&5
2343 sed 's/^/| /' conftest.$ac_ext >&5
2344 
2345     ac_retval=1
2346 fi
2347   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2348   as_fn_set_status $ac_retval
2349 
2350 } # ac_fn_c_try_cpp
2351 
2352 # ac_fn_cxx_try_cpp LINENO
2353 # ------------------------
2354 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2355 ac_fn_cxx_try_cpp ()
2356 {
2357   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2358   if { { ac_try="$ac_cpp conftest.$ac_ext"
2359 case "(($ac_try" in
2360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2361   *) ac_try_echo=$ac_try;;
2362 esac
2363 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2364 $as_echo "$ac_try_echo"; } >&5
2365   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2366   ac_status=$?
2367   if test -s conftest.err; then
2368     grep -v '^ *+' conftest.err >conftest.er1
2369     cat conftest.er1 >&5
2370     mv -f conftest.er1 conftest.err
2371   fi
2372   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2373   test $ac_status = 0; } > conftest.i && {
2374          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2375          test ! -s conftest.err
2376        }; then :
2377   ac_retval=0
2378 else
2379   $as_echo "$as_me: failed program was:" >&5
2380 sed 's/^/| /' conftest.$ac_ext >&5
2381 
2382     ac_retval=1
2383 fi
2384   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385   as_fn_set_status $ac_retval
2386 
2387 } # ac_fn_cxx_try_cpp
2388 
2389 # ac_fn_c_try_link LINENO
2390 # -----------------------
2391 # Try to link conftest.$ac_ext, and return whether this succeeded.
2392 ac_fn_c_try_link ()
2393 {
2394   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395   rm -f conftest.$ac_objext conftest$ac_exeext
2396   if { { ac_try="$ac_link"
2397 case "(($ac_try" in
2398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2399   *) ac_try_echo=$ac_try;;
2400 esac
2401 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2402 $as_echo "$ac_try_echo"; } >&5
2403   (eval "$ac_link") 2>conftest.err
2404   ac_status=$?
2405   if test -s conftest.err; then
2406     grep -v '^ *+' conftest.err >conftest.er1
2407     cat conftest.er1 >&5
2408     mv -f conftest.er1 conftest.err
2409   fi
2410   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2411   test $ac_status = 0; } && {
2412          test -z "$ac_c_werror_flag" ||
2413          test ! -s conftest.err
2414        } && test -s conftest$ac_exeext && {
2415          test "$cross_compiling" = yes ||
2416          test -x conftest$ac_exeext
2417        }; then :
2418   ac_retval=0
2419 else
2420   $as_echo "$as_me: failed program was:" >&5
2421 sed 's/^/| /' conftest.$ac_ext >&5
2422 
2423         ac_retval=1
2424 fi
2425   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2426   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2427   # interfere with the next link command; also delete a directory that is
2428   # left behind by Apple's compiler.  We do this before executing the actions.
2429   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2430   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2431   as_fn_set_status $ac_retval
2432 
2433 } # ac_fn_c_try_link
2434 
2435 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2436 # ---------------------------------------------------------
2437 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2438 # the include files in INCLUDES and setting the cache variable VAR
2439 # accordingly.
2440 ac_fn_cxx_check_header_mongrel ()
2441 {
2442   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443   if eval \${$3+:} false; then :
2444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2445 $as_echo_n "checking for $2... " >&6; }
2446 if eval \${$3+:} false; then :
2447   $as_echo_n "(cached) " >&6
2448 fi
2449 eval ac_res=\$$3
2450                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2451 $as_echo "$ac_res" >&6; }
2452 else
2453   # Is the header compilable?
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2455 $as_echo_n "checking $2 usability... " >&6; }
2456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2457 /* end confdefs.h.  */
2458 $4
2459 #include <$2>
2460 _ACEOF
2461 if ac_fn_cxx_try_compile "$LINENO"; then :
2462   ac_header_compiler=yes
2463 else
2464   ac_header_compiler=no
2465 fi
2466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2468 $as_echo "$ac_header_compiler" >&6; }
2469 
2470 # Is the header present?
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2472 $as_echo_n "checking $2 presence... " >&6; }
2473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2474 /* end confdefs.h.  */
2475 #include <$2>
2476 _ACEOF
2477 if ac_fn_cxx_try_cpp "$LINENO"; then :
2478   ac_header_preproc=yes
2479 else
2480   ac_header_preproc=no
2481 fi
2482 rm -f conftest.err conftest.i conftest.$ac_ext
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2484 $as_echo "$ac_header_preproc" >&6; }
2485 
2486 # So?  What about this header?
2487 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2488   yes:no: )
2489     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2490 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2491     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2492 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2493     ;;
2494   no:yes:* )
2495     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2496 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2497     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2498 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2499     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2500 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2501     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2502 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2503     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2504 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2505 ( $as_echo "## ----------------------------------------- ##
2506 ## Report this to build-dev@openjdk.java.net ##
2507 ## ----------------------------------------- ##"
2508      ) | sed "s/^/$as_me: WARNING:     /" >&2
2509     ;;
2510 esac
2511   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2512 $as_echo_n "checking for $2... " >&6; }
2513 if eval \${$3+:} false; then :
2514   $as_echo_n "(cached) " >&6
2515 else
2516   eval "$3=\$ac_header_compiler"
2517 fi
2518 eval ac_res=\$$3
2519                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2520 $as_echo "$ac_res" >&6; }
2521 fi
2522   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523 
2524 } # ac_fn_cxx_check_header_mongrel
2525 
2526 # ac_fn_cxx_try_run LINENO
2527 # ------------------------
2528 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2529 # that executables *can* be run.
2530 ac_fn_cxx_try_run ()
2531 {
2532   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533   if { { ac_try="$ac_link"
2534 case "(($ac_try" in
2535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536   *) ac_try_echo=$ac_try;;
2537 esac
2538 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539 $as_echo "$ac_try_echo"; } >&5
2540   (eval "$ac_link") 2>&5
2541   ac_status=$?
2542   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2544   { { case "(($ac_try" in
2545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546   *) ac_try_echo=$ac_try;;
2547 esac
2548 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549 $as_echo "$ac_try_echo"; } >&5
2550   (eval "$ac_try") 2>&5
2551   ac_status=$?
2552   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553   test $ac_status = 0; }; }; then :
2554   ac_retval=0
2555 else
2556   $as_echo "$as_me: program exited with status $ac_status" >&5
2557        $as_echo "$as_me: failed program was:" >&5
2558 sed 's/^/| /' conftest.$ac_ext >&5
2559 
2560        ac_retval=$ac_status
2561 fi
2562   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2563   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2564   as_fn_set_status $ac_retval
2565 
2566 } # ac_fn_cxx_try_run
2567 
2568 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2569 # ---------------------------------------------------------
2570 # Tests whether HEADER exists and can be compiled using the include files in
2571 # INCLUDES, setting the cache variable VAR accordingly.
2572 ac_fn_cxx_check_header_compile ()
2573 {
2574   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2575   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2576 $as_echo_n "checking for $2... " >&6; }
2577 if eval \${$3+:} false; then :
2578   $as_echo_n "(cached) " >&6
2579 else
2580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581 /* end confdefs.h.  */
2582 $4
2583 #include <$2>
2584 _ACEOF
2585 if ac_fn_cxx_try_compile "$LINENO"; then :
2586   eval "$3=yes"
2587 else
2588   eval "$3=no"
2589 fi
2590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2591 fi
2592 eval ac_res=\$$3
2593                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2594 $as_echo "$ac_res" >&6; }
2595   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2596 
2597 } # ac_fn_cxx_check_header_compile
2598 
2599 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2600 # ----------------------------------------------
2601 # Tries to find the compile-time value of EXPR in a program that includes
2602 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2603 # computed
2604 ac_fn_cxx_compute_int ()
2605 {
2606   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2607   if test "$cross_compiling" = yes; then
2608     # Depending upon the size, compute the lo and hi bounds.
2609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610 /* end confdefs.h.  */
2611 $4
2612 int
2613 main ()
2614 {
2615 static int test_array [1 - 2 * !(($2) >= 0)];
2616 test_array [0] = 0;
2617 return test_array [0];
2618 
2619   ;
2620   return 0;
2621 }
2622 _ACEOF
2623 if ac_fn_cxx_try_compile "$LINENO"; then :
2624   ac_lo=0 ac_mid=0
2625   while :; do
2626     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $4
2629 int
2630 main ()
2631 {
2632 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2633 test_array [0] = 0;
2634 return test_array [0];
2635 
2636   ;
2637   return 0;
2638 }
2639 _ACEOF
2640 if ac_fn_cxx_try_compile "$LINENO"; then :
2641   ac_hi=$ac_mid; break
2642 else
2643   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2644                         if test $ac_lo -le $ac_mid; then
2645                           ac_lo= ac_hi=
2646                           break
2647                         fi
2648                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2649 fi
2650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2651   done
2652 else
2653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2654 /* end confdefs.h.  */
2655 $4
2656 int
2657 main ()
2658 {
2659 static int test_array [1 - 2 * !(($2) < 0)];
2660 test_array [0] = 0;
2661 return test_array [0];
2662 
2663   ;
2664   return 0;
2665 }
2666 _ACEOF
2667 if ac_fn_cxx_try_compile "$LINENO"; then :
2668   ac_hi=-1 ac_mid=-1
2669   while :; do
2670     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2671 /* end confdefs.h.  */
2672 $4
2673 int
2674 main ()
2675 {
2676 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2677 test_array [0] = 0;
2678 return test_array [0];
2679 
2680   ;
2681   return 0;
2682 }
2683 _ACEOF
2684 if ac_fn_cxx_try_compile "$LINENO"; then :
2685   ac_lo=$ac_mid; break
2686 else
2687   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2688                         if test $ac_mid -le $ac_hi; then
2689                           ac_lo= ac_hi=
2690                           break
2691                         fi
2692                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2693 fi
2694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2695   done
2696 else
2697   ac_lo= ac_hi=
2698 fi
2699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2700 fi
2701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2702 # Binary search between lo and hi bounds.
2703 while test "x$ac_lo" != "x$ac_hi"; do
2704   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2706 /* end confdefs.h.  */
2707 $4
2708 int
2709 main ()
2710 {
2711 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2712 test_array [0] = 0;
2713 return test_array [0];
2714 
2715   ;
2716   return 0;
2717 }
2718 _ACEOF
2719 if ac_fn_cxx_try_compile "$LINENO"; then :
2720   ac_hi=$ac_mid
2721 else
2722   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2723 fi
2724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2725 done
2726 case $ac_lo in #((
2727 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2728 '') ac_retval=1 ;;
2729 esac
2730   else
2731     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2732 /* end confdefs.h.  */
2733 $4
2734 static long int longval () { return $2; }
2735 static unsigned long int ulongval () { return $2; }
2736 #include <stdio.h>
2737 #include <stdlib.h>
2738 int
2739 main ()
2740 {
2741 
2742   FILE *f = fopen ("conftest.val", "w");
2743   if (! f)
2744     return 1;
2745   if (($2) < 0)
2746     {
2747       long int i = longval ();
2748       if (i != ($2))
2749         return 1;
2750       fprintf (f, "%ld", i);
2751     }
2752   else
2753     {
2754       unsigned long int i = ulongval ();
2755       if (i != ($2))
2756         return 1;
2757       fprintf (f, "%lu", i);
2758     }
2759   /* Do not output a trailing newline, as this causes \r\n confusion
2760      on some platforms.  */
2761   return ferror (f) || fclose (f) != 0;
2762 
2763   ;
2764   return 0;
2765 }
2766 _ACEOF
2767 if ac_fn_cxx_try_run "$LINENO"; then :
2768   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2769 else
2770   ac_retval=1
2771 fi
2772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2773   conftest.$ac_objext conftest.beam conftest.$ac_ext
2774 rm -f conftest.val
2775 
2776   fi
2777   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778   as_fn_set_status $ac_retval
2779 
2780 } # ac_fn_cxx_compute_int
2781 
2782 # ac_fn_cxx_try_link LINENO
2783 # -------------------------
2784 # Try to link conftest.$ac_ext, and return whether this succeeded.
2785 ac_fn_cxx_try_link ()
2786 {
2787   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2788   rm -f conftest.$ac_objext conftest$ac_exeext
2789   if { { ac_try="$ac_link"
2790 case "(($ac_try" in
2791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2792   *) ac_try_echo=$ac_try;;
2793 esac
2794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2795 $as_echo "$ac_try_echo"; } >&5
2796   (eval "$ac_link") 2>conftest.err
2797   ac_status=$?
2798   if test -s conftest.err; then
2799     grep -v '^ *+' conftest.err >conftest.er1
2800     cat conftest.er1 >&5
2801     mv -f conftest.er1 conftest.err
2802   fi
2803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2804   test $ac_status = 0; } && {
2805          test -z "$ac_cxx_werror_flag" ||
2806          test ! -s conftest.err
2807        } && test -s conftest$ac_exeext && {
2808          test "$cross_compiling" = yes ||
2809          test -x conftest$ac_exeext
2810        }; then :
2811   ac_retval=0
2812 else
2813   $as_echo "$as_me: failed program was:" >&5
2814 sed 's/^/| /' conftest.$ac_ext >&5
2815 
2816         ac_retval=1
2817 fi
2818   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2819   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2820   # interfere with the next link command; also delete a directory that is
2821   # left behind by Apple's compiler.  We do this before executing the actions.
2822   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2823   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2824   as_fn_set_status $ac_retval
2825 
2826 } # ac_fn_cxx_try_link
2827 
2828 # ac_fn_cxx_check_func LINENO FUNC VAR
2829 # ------------------------------------
2830 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2831 ac_fn_cxx_check_func ()
2832 {
2833   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2835 $as_echo_n "checking for $2... " >&6; }
2836 if eval \${$3+:} false; then :
2837   $as_echo_n "(cached) " >&6
2838 else
2839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h.  */
2841 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2842    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2843 #define $2 innocuous_$2
2844 
2845 /* System header to define __stub macros and hopefully few prototypes,
2846     which can conflict with char $2 (); below.
2847     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2848     <limits.h> exists even on freestanding compilers.  */
2849 
2850 #ifdef __STDC__
2851 # include <limits.h>
2852 #else
2853 # include <assert.h>
2854 #endif
2855 
2856 #undef $2
2857 
2858 /* Override any GCC internal prototype to avoid an error.
2859    Use char because int might match the return type of a GCC
2860    builtin and then its argument prototype would still apply.  */
2861 #ifdef __cplusplus
2862 extern "C"
2863 #endif
2864 char $2 ();
2865 /* The GNU C library defines this for functions which it implements
2866     to always fail with ENOSYS.  Some functions are actually named
2867     something starting with __ and the normal name is an alias.  */
2868 #if defined __stub_$2 || defined __stub___$2
2869 choke me
2870 #endif
2871 
2872 int
2873 main ()
2874 {
2875 return $2 ();
2876   ;
2877   return 0;
2878 }
2879 _ACEOF
2880 if ac_fn_cxx_try_link "$LINENO"; then :
2881   eval "$3=yes"
2882 else
2883   eval "$3=no"
2884 fi
2885 rm -f core conftest.err conftest.$ac_objext \
2886     conftest$ac_exeext conftest.$ac_ext
2887 fi
2888 eval ac_res=\$$3
2889                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2890 $as_echo "$ac_res" >&6; }
2891   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2892 
2893 } # ac_fn_cxx_check_func
2894 
2895 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2896 # -------------------------------------------------------
2897 # Tests whether HEADER exists and can be compiled using the include files in
2898 # INCLUDES, setting the cache variable VAR accordingly.
2899 ac_fn_c_check_header_compile ()
2900 {
2901   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2903 $as_echo_n "checking for $2... " >&6; }
2904 if eval \${$3+:} false; then :
2905   $as_echo_n "(cached) " >&6
2906 else
2907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908 /* end confdefs.h.  */
2909 $4
2910 #include <$2>
2911 _ACEOF
2912 if ac_fn_c_try_compile "$LINENO"; then :
2913   eval "$3=yes"
2914 else
2915   eval "$3=no"
2916 fi
2917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2918 fi
2919 eval ac_res=\$$3
2920                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2921 $as_echo "$ac_res" >&6; }
2922   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2923 
2924 } # ac_fn_c_check_header_compile
2925 cat >config.log <<_ACEOF
2926 This file contains any messages produced by compilers while
2927 running configure, to aid debugging if configure makes a mistake.
2928 
2929 It was created by OpenJDK $as_me jdk9, which was
2930 generated by GNU Autoconf 2.69.  Invocation command line was
2931 
2932   $ $0 $@
2933 
2934 _ACEOF
2935 exec 5>>config.log
2936 {
2937 cat <<_ASUNAME
2938 ## --------- ##
2939 ## Platform. ##
2940 ## --------- ##
2941 
2942 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2943 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2944 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2945 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2946 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2947 
2948 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2949 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2950 
2951 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2952 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2953 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2954 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2955 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2956 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2957 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2958 
2959 _ASUNAME
2960 
2961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2962 for as_dir in $PATH
2963 do
2964   IFS=$as_save_IFS
2965   test -z "$as_dir" && as_dir=.
2966     $as_echo "PATH: $as_dir"
2967   done
2968 IFS=$as_save_IFS
2969 
2970 } >&5
2971 
2972 cat >&5 <<_ACEOF
2973 
2974 
2975 ## ----------- ##
2976 ## Core tests. ##
2977 ## ----------- ##
2978 
2979 _ACEOF
2980 
2981 
2982 # Keep a trace of the command line.
2983 # Strip out --no-create and --no-recursion so they do not pile up.
2984 # Strip out --silent because we don't want to record it for future runs.
2985 # Also quote any args containing shell meta-characters.
2986 # Make two passes to allow for proper duplicate-argument suppression.
2987 ac_configure_args=
2988 ac_configure_args0=
2989 ac_configure_args1=
2990 ac_must_keep_next=false
2991 for ac_pass in 1 2
2992 do
2993   for ac_arg
2994   do
2995     case $ac_arg in
2996     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2997     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2998     | -silent | --silent | --silen | --sile | --sil)
2999       continue ;;
3000     *\'*)
3001       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3002     esac
3003     case $ac_pass in
3004     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3005     2)
3006       as_fn_append ac_configure_args1 " '$ac_arg'"
3007       if test $ac_must_keep_next = true; then
3008         ac_must_keep_next=false # Got value, back to normal.
3009       else
3010         case $ac_arg in
3011           *=* | --config-cache | -C | -disable-* | --disable-* \
3012           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3013           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3014           | -with-* | --with-* | -without-* | --without-* | --x)
3015             case "$ac_configure_args0 " in
3016               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3017             esac
3018             ;;
3019           -* ) ac_must_keep_next=true ;;
3020         esac
3021       fi
3022       as_fn_append ac_configure_args " '$ac_arg'"
3023       ;;
3024     esac
3025   done
3026 done
3027 { ac_configure_args0=; unset ac_configure_args0;}
3028 { ac_configure_args1=; unset ac_configure_args1;}
3029 
3030 # When interrupted or exit'd, cleanup temporary files, and complete
3031 # config.log.  We remove comments because anyway the quotes in there
3032 # would cause problems or look ugly.
3033 # WARNING: Use '\'' to represent an apostrophe within the trap.
3034 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3035 trap 'exit_status=$?
3036   # Save into config.log some information that might help in debugging.
3037   {
3038     echo
3039 
3040     $as_echo "## ---------------- ##
3041 ## Cache variables. ##
3042 ## ---------------- ##"
3043     echo
3044     # The following way of writing the cache mishandles newlines in values,
3045 (
3046   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3047     eval ac_val=\$$ac_var
3048     case $ac_val in #(
3049     *${as_nl}*)
3050       case $ac_var in #(
3051       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3052 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3053       esac
3054       case $ac_var in #(
3055       _ | IFS | as_nl) ;; #(
3056       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3057       *) { eval $ac_var=; unset $ac_var;} ;;
3058       esac ;;
3059     esac
3060   done
3061   (set) 2>&1 |
3062     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3063     *${as_nl}ac_space=\ *)
3064       sed -n \
3065         "s/'\''/'\''\\\\'\'''\''/g;
3066           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3067       ;; #(
3068     *)
3069       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3070       ;;
3071     esac |
3072     sort
3073 )
3074     echo
3075 
3076     $as_echo "## ----------------- ##
3077 ## Output variables. ##
3078 ## ----------------- ##"
3079     echo
3080     for ac_var in $ac_subst_vars
3081     do
3082       eval ac_val=\$$ac_var
3083       case $ac_val in
3084       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3085       esac
3086       $as_echo "$ac_var='\''$ac_val'\''"
3087     done | sort
3088     echo
3089 
3090     if test -n "$ac_subst_files"; then
3091       $as_echo "## ------------------- ##
3092 ## File substitutions. ##
3093 ## ------------------- ##"
3094       echo
3095       for ac_var in $ac_subst_files
3096       do
3097         eval ac_val=\$$ac_var
3098         case $ac_val in
3099         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3100         esac
3101         $as_echo "$ac_var='\''$ac_val'\''"
3102       done | sort
3103       echo
3104     fi
3105 
3106     if test -s confdefs.h; then
3107       $as_echo "## ----------- ##
3108 ## confdefs.h. ##
3109 ## ----------- ##"
3110       echo
3111       cat confdefs.h
3112       echo
3113     fi
3114     test "$ac_signal" != 0 &&
3115       $as_echo "$as_me: caught signal $ac_signal"
3116     $as_echo "$as_me: exit $exit_status"
3117   } >&5
3118   rm -f core *.core core.conftest.* &&
3119     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3120     exit $exit_status
3121 ' 0
3122 for ac_signal in 1 2 13 15; do
3123   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3124 done
3125 ac_signal=0
3126 
3127 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3128 rm -f -r conftest* confdefs.h
3129 
3130 $as_echo "/* confdefs.h */" > confdefs.h
3131 
3132 # Predefined preprocessor variables.
3133 
3134 cat >>confdefs.h <<_ACEOF
3135 #define PACKAGE_NAME "$PACKAGE_NAME"
3136 _ACEOF
3137 
3138 cat >>confdefs.h <<_ACEOF
3139 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3140 _ACEOF
3141 
3142 cat >>confdefs.h <<_ACEOF
3143 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3144 _ACEOF
3145 
3146 cat >>confdefs.h <<_ACEOF
3147 #define PACKAGE_STRING "$PACKAGE_STRING"
3148 _ACEOF
3149 
3150 cat >>confdefs.h <<_ACEOF
3151 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3152 _ACEOF
3153 
3154 cat >>confdefs.h <<_ACEOF
3155 #define PACKAGE_URL "$PACKAGE_URL"
3156 _ACEOF
3157 
3158 
3159 # Let the site file select an alternate cache file if it wants to.
3160 # Prefer an explicitly selected file to automatically selected ones.
3161 ac_site_file1=NONE
3162 ac_site_file2=NONE
3163 if test -n "$CONFIG_SITE"; then
3164   # We do not want a PATH search for config.site.
3165   case $CONFIG_SITE in #((
3166     -*)  ac_site_file1=./$CONFIG_SITE;;
3167     */*) ac_site_file1=$CONFIG_SITE;;
3168     *)   ac_site_file1=./$CONFIG_SITE;;
3169   esac
3170 elif test "x$prefix" != xNONE; then
3171   ac_site_file1=$prefix/share/config.site
3172   ac_site_file2=$prefix/etc/config.site
3173 else
3174   ac_site_file1=$ac_default_prefix/share/config.site
3175   ac_site_file2=$ac_default_prefix/etc/config.site
3176 fi
3177 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3178 do
3179   test "x$ac_site_file" = xNONE && continue
3180   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3181     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3182 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3183     sed 's/^/| /' "$ac_site_file" >&5
3184     . "$ac_site_file" \
3185       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187 as_fn_error $? "failed to load site script $ac_site_file
3188 See \`config.log' for more details" "$LINENO" 5; }
3189   fi
3190 done
3191 
3192 if test -r "$cache_file"; then
3193   # Some versions of bash will fail to source /dev/null (special files
3194   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3195   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3196     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3197 $as_echo "$as_me: loading cache $cache_file" >&6;}
3198     case $cache_file in
3199       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3200       *)                      . "./$cache_file";;
3201     esac
3202   fi
3203 else
3204   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3205 $as_echo "$as_me: creating cache $cache_file" >&6;}
3206   >$cache_file
3207 fi
3208 
3209 # Check that the precious variables saved in the cache have kept the same
3210 # value.
3211 ac_cache_corrupted=false
3212 for ac_var in $ac_precious_vars; do
3213   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3214   eval ac_new_set=\$ac_env_${ac_var}_set
3215   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3216   eval ac_new_val=\$ac_env_${ac_var}_value
3217   case $ac_old_set,$ac_new_set in
3218     set,)
3219       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3220 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3221       ac_cache_corrupted=: ;;
3222     ,set)
3223       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3224 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3225       ac_cache_corrupted=: ;;
3226     ,);;
3227     *)
3228       if test "x$ac_old_val" != "x$ac_new_val"; then
3229         # differences in whitespace do not lead to failure.
3230         ac_old_val_w=`echo x $ac_old_val`
3231         ac_new_val_w=`echo x $ac_new_val`
3232         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3233           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3234 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3235           ac_cache_corrupted=:
3236         else
3237           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3238 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3239           eval $ac_var=\$ac_old_val
3240         fi
3241         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3242 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3243         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3244 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3245       fi;;
3246   esac
3247   # Pass precious variables to config.status.
3248   if test "$ac_new_set" = set; then
3249     case $ac_new_val in
3250     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3251     *) ac_arg=$ac_var=$ac_new_val ;;
3252     esac
3253     case " $ac_configure_args " in
3254       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3255       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3256     esac
3257   fi
3258 done
3259 if $ac_cache_corrupted; then
3260   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3261 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3262   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3263 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3264   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3265 fi
3266 ## -------------------- ##
3267 ## Main body of script. ##
3268 ## -------------------- ##
3269 
3270 ac_ext=c
3271 ac_cpp='$CPP $CPPFLAGS'
3272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3275 
3276 
3277 
3278 ac_aux_dir=
3279 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3280   if test -f "$ac_dir/install-sh"; then
3281     ac_aux_dir=$ac_dir
3282     ac_install_sh="$ac_aux_dir/install-sh -c"
3283     break
3284   elif test -f "$ac_dir/install.sh"; then
3285     ac_aux_dir=$ac_dir
3286     ac_install_sh="$ac_aux_dir/install.sh -c"
3287     break
3288   elif test -f "$ac_dir/shtool"; then
3289     ac_aux_dir=$ac_dir
3290     ac_install_sh="$ac_aux_dir/shtool install -c"
3291     break
3292   fi
3293 done
3294 if test -z "$ac_aux_dir"; then
3295   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
3296 fi
3297 
3298 # These three variables are undocumented and unsupported,
3299 # and are intended to be withdrawn in a future Autoconf release.
3300 # They can cause serious problems if a builder's source tree is in a directory
3301 # whose full name contains unusual characters.
3302 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3303 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3304 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3305 
3306 
3307 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3308 
3309 #
3310 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3311 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3312 #
3313 # This code is free software; you can redistribute it and/or modify it
3314 # under the terms of the GNU General Public License version 2 only, as
3315 # published by the Free Software Foundation.  Oracle designates this
3316 # particular file as subject to the "Classpath" exception as provided
3317 # by Oracle in the LICENSE file that accompanied this code.
3318 #
3319 # This code is distributed in the hope that it will be useful, but WITHOUT
3320 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3321 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3322 # version 2 for more details (a copy is included in the LICENSE file that
3323 # accompanied this code).
3324 #
3325 # You should have received a copy of the GNU General Public License version
3326 # 2 along with this work; if not, write to the Free Software Foundation,
3327 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3328 #
3329 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3330 # or visit www.oracle.com if you need additional information or have any
3331 # questions.
3332 #
3333 
3334 #
3335 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3336 #
3337 # This program is free software; you can redistribute it and/or modify
3338 # it under the terms of the GNU General Public License as published by
3339 # the Free Software Foundation; either version 2 of the License, or
3340 # (at your option) any later version.
3341 #
3342 # This program is distributed in the hope that it will be useful, but
3343 # WITHOUT ANY WARRANTY; without even the implied warranty of
3344 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3345 # General Public License for more details.
3346 #
3347 # You should have received a copy of the GNU General Public License
3348 # along with this program; if not, write to the Free Software
3349 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3350 #
3351 # As a special exception to the GNU General Public License, if you
3352 # distribute this file as part of a program that contains a
3353 # configuration script generated by Autoconf, you may include it under
3354 # the same distribution terms that you use for the rest of that program.
3355 
3356 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3357 # ----------------------------------
3358 # PKG_PROG_PKG_CONFIG
3359 
3360 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3361 #
3362 # Check to see whether a particular set of modules exists.  Similar
3363 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3364 #
3365 #
3366 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3367 # this or PKG_CHECK_MODULES is called, or make sure to call
3368 # PKG_CHECK_EXISTS manually
3369 # --------------------------------------------------------------
3370 
3371 
3372 
3373 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3374 # ---------------------------------------------
3375 # _PKG_CONFIG
3376 
3377 # _PKG_SHORT_ERRORS_SUPPORTED
3378 # -----------------------------
3379 # _PKG_SHORT_ERRORS_SUPPORTED
3380 
3381 
3382 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3383 # [ACTION-IF-NOT-FOUND])
3384 #
3385 #
3386 # Note that if there is a possibility the first call to
3387 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3388 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3389 #
3390 #
3391 # --------------------------------------------------------------
3392 # PKG_CHECK_MODULES
3393 
3394 
3395 # Include these first...
3396 #
3397 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3398 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3399 #
3400 # This code is free software; you can redistribute it and/or modify it
3401 # under the terms of the GNU General Public License version 2 only, as
3402 # published by the Free Software Foundation.  Oracle designates this
3403 # particular file as subject to the "Classpath" exception as provided
3404 # by Oracle in the LICENSE file that accompanied this code.
3405 #
3406 # This code is distributed in the hope that it will be useful, but WITHOUT
3407 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3408 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3409 # version 2 for more details (a copy is included in the LICENSE file that
3410 # accompanied this code).
3411 #
3412 # You should have received a copy of the GNU General Public License version
3413 # 2 along with this work; if not, write to the Free Software Foundation,
3414 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3415 #
3416 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3417 # or visit www.oracle.com if you need additional information or have any
3418 # questions.
3419 #
3420 
3421 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3422 # If so, then append $1 to $2 \
3423 # Also set JVM_ARG_OK to true/false depending on outcome.
3424 
3425 
3426 # Appends a string to a path variable, only adding the : when needed.
3427 
3428 
3429 # Prepends a string to a path variable, only adding the : when needed.
3430 
3431 
3432 # This will make sure the given variable points to a full and proper
3433 # path. This means:
3434 # 1) There will be no spaces in the path. On unix platforms,
3435 #    spaces in the path will result in an error. On Windows,
3436 #    the path will be rewritten using short-style to be space-free.
3437 # 2) The path will be absolute, and it will be in unix-style (on
3438 #     cygwin).
3439 # $1: The name of the variable to fix
3440 
3441 
3442 # This will make sure the given variable points to a executable
3443 # with a full and proper path. This means:
3444 # 1) There will be no spaces in the path. On unix platforms,
3445 #    spaces in the path will result in an error. On Windows,
3446 #    the path will be rewritten using short-style to be space-free.
3447 # 2) The path will be absolute, and it will be in unix-style (on
3448 #     cygwin).
3449 # Any arguments given to the executable is preserved.
3450 # If the input variable does not have a directory specification, then
3451 # it need to be in the PATH.
3452 # $1: The name of the variable to fix
3453 
3454 
3455 
3456 
3457 # Register a --with argument but mark it as deprecated
3458 # $1: The name of the with argument to deprecate, not including --with-
3459 
3460 
3461 # Register a --enable argument but mark it as deprecated
3462 # $1: The name of the with argument to deprecate, not including --enable-
3463 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3464 
3465 
3466 
3467 
3468 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3469 # $1: variable to check
3470 
3471 
3472 # Check that there are no unprocessed overridden variables left.
3473 # If so, they are an incorrect argument and we will exit with an error.
3474 
3475 
3476 # Setup a tool for the given variable. If correctly specified by the user,
3477 # use that value, otherwise search for the tool using the supplied code snippet.
3478 # $1: variable to set
3479 # $2: code snippet to call to look for the tool
3480 # $3: code snippet to call if variable was used to find tool
3481 
3482 
3483 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3484 # $1: variable to set
3485 # $2: executable name (or list of names) to look for
3486 
3487 
3488 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3489 # $1: variable to set
3490 # $2: executable name (or list of names) to look for
3491 
3492 
3493 # Like BASIC_PATH_PROGS but fails if no tool was found.
3494 # $1: variable to set
3495 # $2: executable name (or list of names) to look for
3496 
3497 
3498 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3499 # $1: variable to set
3500 # $2: autoconf macro to call to look for the special tool
3501 
3502 
3503 # Setup the most fundamental tools that relies on not much else to set up,
3504 # but is used by much of the early bootstrap code.
3505 
3506 
3507 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3508 
3509 
3510 # Evaluates platform specific overrides for devkit variables.
3511 # $1: Name of variable
3512 
3513 
3514 
3515 
3516 
3517 
3518 #%%% Simple tools %%%
3519 
3520 # Check if we have found a usable version of make
3521 # $1: the path to a potential make binary (or empty)
3522 # $2: the description on how we found this
3523 
3524 
3525 
3526 
3527 # Goes looking for a usable version of GNU make.
3528 
3529 
3530 
3531 
3532 
3533 
3534 # Check if build directory is on local disk. If not possible to determine,
3535 # we prefer to claim it's local.
3536 # Argument 1: directory to test
3537 # Argument 2: what to do if it is on local disk
3538 # Argument 3: what to do otherwise (remote disk or failure)
3539 
3540 
3541 # Check that source files have basic read permissions set. This might
3542 # not be the case in cygwin in certain conditions.
3543 
3544 
3545 
3546 
3547 # Check for support for specific options in bash
3548 
3549 
3550 # Code to run after AC_OUTPUT
3551 
3552 
3553 #
3554 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3555 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3556 #
3557 # This code is free software; you can redistribute it and/or modify it
3558 # under the terms of the GNU General Public License version 2 only, as
3559 # published by the Free Software Foundation.  Oracle designates this
3560 # particular file as subject to the "Classpath" exception as provided
3561 # by Oracle in the LICENSE file that accompanied this code.
3562 #
3563 # This code is distributed in the hope that it will be useful, but WITHOUT
3564 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3565 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3566 # version 2 for more details (a copy is included in the LICENSE file that
3567 # accompanied this code).
3568 #
3569 # You should have received a copy of the GNU General Public License version
3570 # 2 along with this work; if not, write to the Free Software Foundation,
3571 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3572 #
3573 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3574 # or visit www.oracle.com if you need additional information or have any
3575 # questions.
3576 #
3577 
3578 
3579 
3580 
3581 
3582 # Helper function which possibly converts a path using DOS-style short mode.
3583 # If so, the updated path is stored in $new_path.
3584 # $1: The path to check
3585 
3586 
3587 # Helper function which possibly converts a path using DOS-style short mode.
3588 # If so, the updated path is stored in $new_path.
3589 # $1: The path to check
3590 
3591 
3592 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3593 # and could probably be heavily simplified. However, all changes in this
3594 # area tend to need lot of testing in different scenarios, and in lack of
3595 # proper unit testing, cleaning this up has not been deemed worth the effort
3596 # at the moment.
3597 
3598 
3599 
3600 
3601 
3602 
3603 
3604 
3605 
3606 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3607 
3608 
3609 
3610 
3611 # ... then the rest
3612 #
3613 # Copyright (c) 2011, 2015, 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 # This file handles detection of the Boot JDK. The Boot JDK detection
3639 # process has been developed as a response to solve a complex real-world
3640 # problem. Initially, it was simple, but it has grown as platform after
3641 # platform, idiosyncracy after idiosyncracy has been supported.
3642 #
3643 # The basic idea is this:
3644 # 1) You need an acceptable *) JDK to use as a Boot JDK
3645 # 2) There are several ways to locate a JDK, that are mostly platform
3646 #    dependent **)
3647 # 3) You can have multiple JDKs installed
3648 # 4) If possible, configure should try to dig out an acceptable JDK
3649 #    automatically, without having to resort to command-line options
3650 #
3651 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3652 #     javac) and not a JRE, etc.
3653 #
3654 # **) On Windows we typically use a well-known path.
3655 #     On MacOSX we typically use the tool java_home.
3656 #     On Linux we typically find javac in the $PATH, and then follow a
3657 #     chain of symlinks that often ends up in a real JDK.
3658 #
3659 # This leads to the code where we check in different ways to locate a
3660 # JDK, and if one is found, check if it is acceptable. If not, we print
3661 # our reasons for rejecting it (useful when debugging non-working
3662 # configure situations) and continue checking the next one.
3663 ########################################################################
3664 
3665 # Execute the check given as argument, and verify the result
3666 # If the Boot JDK was previously found, do nothing
3667 # $1 A command line (typically autoconf macro) to execute
3668 
3669 
3670 # Test: Is bootjdk explicitely set by command line arguments?
3671 
3672 
3673 # Test: Is $JAVA_HOME set?
3674 
3675 
3676 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3677 
3678 
3679 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3680 # $1: Argument to the java_home binary (optional)
3681 
3682 
3683 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3684 
3685 
3686 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3687 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3688 # $1 = Path to directory containing jdk installations.
3689 # $2 = String to append to the found JDK directory to get the proper JDK home
3690 
3691 
3692 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3693 # environmental variable as base for where to look.
3694 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3695 
3696 
3697 # Test: Is there a JDK installed in default, well-known locations?
3698 
3699 
3700 # Check that a command-line tool in the Boot JDK is correct
3701 # $1 = name of variable to assign
3702 # $2 = name of binary
3703 
3704 
3705 ###############################################################################
3706 #
3707 # We need a Boot JDK to bootstrap the build.
3708 #
3709 
3710 
3711 
3712 
3713 
3714 #
3715 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3716 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3717 #
3718 # This code is free software; you can redistribute it and/or modify it
3719 # under the terms of the GNU General Public License version 2 only, as
3720 # published by the Free Software Foundation.  Oracle designates this
3721 # particular file as subject to the "Classpath" exception as provided
3722 # by Oracle in the LICENSE file that accompanied this code.
3723 #
3724 # This code is distributed in the hope that it will be useful, but WITHOUT
3725 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3726 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3727 # version 2 for more details (a copy is included in the LICENSE file that
3728 # accompanied this code).
3729 #
3730 # You should have received a copy of the GNU General Public License version
3731 # 2 along with this work; if not, write to the Free Software Foundation,
3732 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3733 #
3734 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3735 # or visit www.oracle.com if you need additional information or have any
3736 # questions.
3737 #
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 
3746 
3747 
3748 
3749 
3750 
3751 
3752 
3753 ################################################################################
3754 #
3755 # Optionally enable distributed compilation of native code using icecc/icecream
3756 #
3757 
3758 
3759 
3760 
3761 
3762 
3763 
3764 #
3765 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3766 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3767 #
3768 # This code is free software; you can redistribute it and/or modify it
3769 # under the terms of the GNU General Public License version 2 only, as
3770 # published by the Free Software Foundation.  Oracle designates this
3771 # particular file as subject to the "Classpath" exception as provided
3772 # by Oracle in the LICENSE file that accompanied this code.
3773 #
3774 # This code is distributed in the hope that it will be useful, but WITHOUT
3775 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3776 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3777 # version 2 for more details (a copy is included in the LICENSE file that
3778 # accompanied this code).
3779 #
3780 # You should have received a copy of the GNU General Public License version
3781 # 2 along with this work; if not, write to the Free Software Foundation,
3782 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3783 #
3784 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3785 # or visit www.oracle.com if you need additional information or have any
3786 # questions.
3787 #
3788 
3789 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3790 # corresponding configure arguments instead
3791 
3792 
3793 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3794 # that configure can use them while detecting compilers.
3795 # TOOLCHAIN_TYPE is available here.
3796 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3797 
3798 
3799 
3800 
3801 
3802 
3803 # Documentation on common flags used for solstudio in HIGHEST.
3804 #
3805 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3806 #          done with care, there are some assumptions below that need to
3807 #          be understood about the use of pointers, and IEEE behavior.
3808 #
3809 # -fns: Use non-standard floating point mode (not IEEE 754)
3810 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3811 # -fsingle: Use single precision floating point with 'float'
3812 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3813 #   (Source with excessing pointer casting and data access with mixed
3814 #    pointer types are not recommended)
3815 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3816 #   (If you expect perfect errno behavior, do not use this)
3817 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3818 # -xrestrict: Pointer parameters to functions do not overlap
3819 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3820 #    If you pass in multiple pointers to the same data, do not use this)
3821 # -xlibmil: Inline some library routines
3822 #   (If you expect perfect errno behavior, do not use this)
3823 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3824 #   (If you expect perfect errno behavior, do not use this)
3825 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3826 
3827     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3828     # Bug?
3829     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3830     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3831     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3832     #fi
3833 
3834 
3835 
3836 
3837 
3838 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839 #                                   [RUN-IF-FALSE])
3840 # ------------------------------------------------------------
3841 # Check that the c and c++ compilers support an argument
3842 
3843 
3844 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3845 #                                    [RUN-IF-FALSE])
3846 # ------------------------------------------------------------
3847 # Check that the linker support an argument
3848 
3849 
3850 
3851 
3852 #
3853 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3854 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3855 #
3856 # This code is free software; you can redistribute it and/or modify it
3857 # under the terms of the GNU General Public License version 2 only, as
3858 # published by the Free Software Foundation.  Oracle designates this
3859 # particular file as subject to the "Classpath" exception as provided
3860 # by Oracle in the LICENSE file that accompanied this code.
3861 #
3862 # This code is distributed in the hope that it will be useful, but WITHOUT
3863 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3864 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3865 # version 2 for more details (a copy is included in the LICENSE file that
3866 # accompanied this code).
3867 #
3868 # You should have received a copy of the GNU General Public License version
3869 # 2 along with this work; if not, write to the Free Software Foundation,
3870 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3871 #
3872 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3873 # or visit www.oracle.com if you need additional information or have any
3874 # questions.
3875 #
3876 
3877 
3878 
3879 
3880 
3881 cygwin_help() {
3882   case $1 in
3883     unzip)
3884       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3885       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3886       ;;
3887     zip)
3888       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3889       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3890       ;;
3891     make)
3892       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3893       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3894       ;;
3895     freetype)
3896       HELP_MSG="
3897 The freetype library can now be build during the configure process.
3898 Download the freetype sources and unpack them into an arbitrary directory:
3899 
3900 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3901 tar -xzf freetype-2.5.3.tar.gz
3902 
3903 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3904 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3905 builds or into '<freetype_src>/lib32' for 32-bit builds.
3906 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3907 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3908       ;;
3909   esac
3910 }
3911 
3912 msys_help() {
3913   PKGHANDLER_COMMAND=""
3914 }
3915 
3916 apt_help() {
3917   case $1 in
3918     reduced)
3919       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3920     devkit)
3921       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3922     openjdk)
3923       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3924     alsa)
3925       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3926     cups)
3927       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3928     freetype)
3929       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3930     ffi)
3931       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3932     x11)
3933       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3934     ccache)
3935       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3936   esac
3937 }
3938 
3939 yum_help() {
3940   case $1 in
3941     devkit)
3942       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3943     openjdk)
3944       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3945     alsa)
3946       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3947     cups)
3948       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3949     freetype)
3950       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3951     x11)
3952       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3953     ccache)
3954       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3955   esac
3956 }
3957 
3958 port_help() {
3959   PKGHANDLER_COMMAND=""
3960 }
3961 
3962 pkgutil_help() {
3963   PKGHANDLER_COMMAND=""
3964 }
3965 
3966 pkgadd_help() {
3967   PKGHANDLER_COMMAND=""
3968 }
3969 
3970 # This function will check if we're called from the "configure" wrapper while
3971 # printing --help. If so, we will print out additional information that can
3972 # only be extracted within the autoconf script, and then exit. This must be
3973 # called at the very beginning in configure.ac.
3974 
3975 
3976 
3977 
3978 
3979 
3980 #
3981 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3982 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983 #
3984 # This code is free software; you can redistribute it and/or modify it
3985 # under the terms of the GNU General Public License version 2 only, as
3986 # published by the Free Software Foundation.  Oracle designates this
3987 # particular file as subject to the "Classpath" exception as provided
3988 # by Oracle in the LICENSE file that accompanied this code.
3989 #
3990 # This code is distributed in the hope that it will be useful, but WITHOUT
3991 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993 # version 2 for more details (a copy is included in the LICENSE file that
3994 # accompanied this code).
3995 #
3996 # You should have received a copy of the GNU General Public License version
3997 # 2 along with this work; if not, write to the Free Software Foundation,
3998 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999 #
4000 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001 # or visit www.oracle.com if you need additional information or have any
4002 # questions.
4003 #
4004 
4005 
4006 
4007 
4008 
4009 
4010 
4011 
4012 
4013 
4014 ###############################################################################
4015 #
4016 # Should we build only OpenJDK even if closed sources are present?
4017 #
4018 
4019 
4020 
4021 
4022 ###############################################################################
4023 #
4024 # Setup version numbers
4025 #
4026 
4027 
4028 
4029 
4030 
4031 
4032 ################################################################################
4033 #
4034 # Gcov coverage data for hotspot
4035 #
4036 
4037 
4038 ################################################################################
4039 #
4040 # Static build support.  When enabled will generate static
4041 # libraries instead of shared libraries for all JDK libs.
4042 #
4043 
4044 
4045 
4046 
4047 #
4048 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4049 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4050 #
4051 # This code is free software; you can redistribute it and/or modify it
4052 # under the terms of the GNU General Public License version 2 only, as
4053 # published by the Free Software Foundation.  Oracle designates this
4054 # particular file as subject to the "Classpath" exception as provided
4055 # by Oracle in the LICENSE file that accompanied this code.
4056 #
4057 # This code is distributed in the hope that it will be useful, but WITHOUT
4058 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4059 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4060 # version 2 for more details (a copy is included in the LICENSE file that
4061 # accompanied this code).
4062 #
4063 # You should have received a copy of the GNU General Public License version
4064 # 2 along with this work; if not, write to the Free Software Foundation,
4065 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4066 #
4067 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4068 # or visit www.oracle.com if you need additional information or have any
4069 # questions.
4070 #
4071 
4072 # Major library component reside in separate files.
4073 #
4074 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4075 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4076 #
4077 # This code is free software; you can redistribute it and/or modify it
4078 # under the terms of the GNU General Public License version 2 only, as
4079 # published by the Free Software Foundation.  Oracle designates this
4080 # particular file as subject to the "Classpath" exception as provided
4081 # by Oracle in the LICENSE file that accompanied this code.
4082 #
4083 # This code is distributed in the hope that it will be useful, but WITHOUT
4084 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4085 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4086 # version 2 for more details (a copy is included in the LICENSE file that
4087 # accompanied this code).
4088 #
4089 # You should have received a copy of the GNU General Public License version
4090 # 2 along with this work; if not, write to the Free Software Foundation,
4091 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4092 #
4093 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4094 # or visit www.oracle.com if you need additional information or have any
4095 # questions.
4096 #
4097 
4098 ################################################################################
4099 # Setup alsa (Advanced Linux Sound Architecture)
4100 ################################################################################
4101 
4102 
4103 #
4104 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4105 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4106 #
4107 # This code is free software; you can redistribute it and/or modify it
4108 # under the terms of the GNU General Public License version 2 only, as
4109 # published by the Free Software Foundation.  Oracle designates this
4110 # particular file as subject to the "Classpath" exception as provided
4111 # by Oracle in the LICENSE file that accompanied this code.
4112 #
4113 # This code is distributed in the hope that it will be useful, but WITHOUT
4114 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4115 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4116 # version 2 for more details (a copy is included in the LICENSE file that
4117 # accompanied this code).
4118 #
4119 # You should have received a copy of the GNU General Public License version
4120 # 2 along with this work; if not, write to the Free Software Foundation,
4121 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4122 #
4123 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4124 # or visit www.oracle.com if you need additional information or have any
4125 # questions.
4126 #
4127 
4128 ################################################################################
4129 # Setup bundled libraries.
4130 #
4131 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4132 # OpenJDK repository. Default is to use these libraries as bundled, but they
4133 # might be replaced by en external version by the user.
4134 ################################################################################
4135 
4136 
4137 ################################################################################
4138 # Setup libjpeg
4139 ################################################################################
4140 
4141 
4142 ################################################################################
4143 # Setup giflib
4144 ################################################################################
4145 
4146 
4147 ################################################################################
4148 # Setup libpng
4149 ################################################################################
4150 
4151 
4152 ################################################################################
4153 # Setup zlib
4154 ################################################################################
4155 
4156 
4157 ################################################################################
4158 # Setup lcms (Little CMS)
4159 ################################################################################
4160 
4161 
4162 #
4163 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4164 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4165 #
4166 # This code is free software; you can redistribute it and/or modify it
4167 # under the terms of the GNU General Public License version 2 only, as
4168 # published by the Free Software Foundation.  Oracle designates this
4169 # particular file as subject to the "Classpath" exception as provided
4170 # by Oracle in the LICENSE file that accompanied this code.
4171 #
4172 # This code is distributed in the hope that it will be useful, but WITHOUT
4173 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4174 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4175 # version 2 for more details (a copy is included in the LICENSE file that
4176 # accompanied this code).
4177 #
4178 # You should have received a copy of the GNU General Public License version
4179 # 2 along with this work; if not, write to the Free Software Foundation,
4180 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4181 #
4182 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4183 # or visit www.oracle.com if you need additional information or have any
4184 # questions.
4185 #
4186 
4187 ################################################################################
4188 # Setup cups (Common Unix Printing System)
4189 ################################################################################
4190 
4191 
4192 #
4193 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4194 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4195 #
4196 # This code is free software; you can redistribute it and/or modify it
4197 # under the terms of the GNU General Public License version 2 only, as
4198 # published by the Free Software Foundation.  Oracle designates this
4199 # particular file as subject to the "Classpath" exception as provided
4200 # by Oracle in the LICENSE file that accompanied this code.
4201 #
4202 # This code is distributed in the hope that it will be useful, but WITHOUT
4203 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4204 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4205 # version 2 for more details (a copy is included in the LICENSE file that
4206 # accompanied this code).
4207 #
4208 # You should have received a copy of the GNU General Public License version
4209 # 2 along with this work; if not, write to the Free Software Foundation,
4210 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4211 #
4212 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4213 # or visit www.oracle.com if you need additional information or have any
4214 # questions.
4215 #
4216 
4217 ################################################################################
4218 # Setup libffi (Foreign Function Interface)
4219 ################################################################################
4220 
4221 
4222 #
4223 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4224 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4225 #
4226 # This code is free software; you can redistribute it and/or modify it
4227 # under the terms of the GNU General Public License version 2 only, as
4228 # published by the Free Software Foundation.  Oracle designates this
4229 # particular file as subject to the "Classpath" exception as provided
4230 # by Oracle in the LICENSE file that accompanied this code.
4231 #
4232 # This code is distributed in the hope that it will be useful, but WITHOUT
4233 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4234 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4235 # version 2 for more details (a copy is included in the LICENSE file that
4236 # accompanied this code).
4237 #
4238 # You should have received a copy of the GNU General Public License version
4239 # 2 along with this work; if not, write to the Free Software Foundation,
4240 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4241 #
4242 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4243 # or visit www.oracle.com if you need additional information or have any
4244 # questions.
4245 #
4246 
4247 ################################################################################
4248 # Build the freetype lib from source
4249 ################################################################################
4250 
4251 
4252 ################################################################################
4253 # Check if a potential freeype library match is correct and usable
4254 ################################################################################
4255 
4256 
4257 ################################################################################
4258 # Setup freetype (The FreeType2 font rendering library)
4259 ################################################################################
4260 
4261 
4262 #
4263 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4264 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4265 #
4266 # This code is free software; you can redistribute it and/or modify it
4267 # under the terms of the GNU General Public License version 2 only, as
4268 # published by the Free Software Foundation.  Oracle designates this
4269 # particular file as subject to the "Classpath" exception as provided
4270 # by Oracle in the LICENSE file that accompanied this code.
4271 #
4272 # This code is distributed in the hope that it will be useful, but WITHOUT
4273 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4274 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4275 # version 2 for more details (a copy is included in the LICENSE file that
4276 # accompanied this code).
4277 #
4278 # You should have received a copy of the GNU General Public License version
4279 # 2 along with this work; if not, write to the Free Software Foundation,
4280 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4281 #
4282 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4283 # or visit www.oracle.com if you need additional information or have any
4284 # questions.
4285 #
4286 
4287 ################################################################################
4288 # Setup the standard C/C++ runtime libraries.
4289 #
4290 # Most importantly, determine if stdc++ should be linked statically or
4291 # dynamically.
4292 ################################################################################
4293 
4294 
4295 #
4296 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4297 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4298 #
4299 # This code is free software; you can redistribute it and/or modify it
4300 # under the terms of the GNU General Public License version 2 only, as
4301 # published by the Free Software Foundation.  Oracle designates this
4302 # particular file as subject to the "Classpath" exception as provided
4303 # by Oracle in the LICENSE file that accompanied this code.
4304 #
4305 # This code is distributed in the hope that it will be useful, but WITHOUT
4306 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4307 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4308 # version 2 for more details (a copy is included in the LICENSE file that
4309 # accompanied this code).
4310 #
4311 # You should have received a copy of the GNU General Public License version
4312 # 2 along with this work; if not, write to the Free Software Foundation,
4313 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4314 #
4315 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4316 # or visit www.oracle.com if you need additional information or have any
4317 # questions.
4318 #
4319 
4320 ################################################################################
4321 # Setup X11 Windows system
4322 ################################################################################
4323 
4324 
4325 
4326 ################################################################################
4327 # Determine which libraries are needed for this configuration
4328 ################################################################################
4329 
4330 
4331 ################################################################################
4332 # Parse library options, and setup needed libraries
4333 ################################################################################
4334 
4335 
4336 ################################################################################
4337 # Setup llvm (Low-Level VM)
4338 ################################################################################
4339 
4340 
4341 ################################################################################
4342 # Setup various libraries, typically small system libraries
4343 ################################################################################
4344 
4345 
4346 #
4347 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4348 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4349 #
4350 # This code is free software; you can redistribute it and/or modify it
4351 # under the terms of the GNU General Public License version 2 only, as
4352 # published by the Free Software Foundation.  Oracle designates this
4353 # particular file as subject to the "Classpath" exception as provided
4354 # by Oracle in the LICENSE file that accompanied this code.
4355 #
4356 # This code is distributed in the hope that it will be useful, but WITHOUT
4357 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4358 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4359 # version 2 for more details (a copy is included in the LICENSE file that
4360 # accompanied this code).
4361 #
4362 # You should have received a copy of the GNU General Public License version
4363 # 2 along with this work; if not, write to the Free Software Foundation,
4364 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4365 #
4366 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4367 # or visit www.oracle.com if you need additional information or have any
4368 # questions.
4369 #
4370 
4371 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4372 # Converts autoconf style CPU name to OpenJDK style, into
4373 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4374 
4375 
4376 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4377 # Converts autoconf style OS name to OpenJDK style, into
4378 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4379 
4380 
4381 # Expects $host_os $host_cpu $build_os and $build_cpu
4382 # and $with_target_bits to have been setup!
4383 #
4384 # Translate the standard triplet(quadruplet) definition
4385 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4386 # OPENJDK_BUILD_OS, etc.
4387 
4388 
4389 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4390 # accordingly. Must be done after setting up build and target system, but before
4391 # doing anything else with these values.
4392 
4393 
4394 # Setup the legacy variables, for controlling the old makefiles.
4395 #
4396 
4397 
4398 
4399 
4400 #%%% Build and target systems %%%
4401 
4402 
4403 
4404 
4405 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4406 # Add -mX to various FLAGS variables.
4407 
4408 
4409 
4410 
4411 
4412 
4413 #
4414 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4415 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4416 #
4417 # This code is free software; you can redistribute it and/or modify it
4418 # under the terms of the GNU General Public License version 2 only, as
4419 # published by the Free Software Foundation.  Oracle designates this
4420 # particular file as subject to the "Classpath" exception as provided
4421 # by Oracle in the LICENSE file that accompanied this code.
4422 #
4423 # This code is distributed in the hope that it will be useful, but WITHOUT
4424 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4425 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4426 # version 2 for more details (a copy is included in the LICENSE file that
4427 # accompanied this code).
4428 #
4429 # You should have received a copy of the GNU General Public License version
4430 # 2 along with this work; if not, write to the Free Software Foundation,
4431 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4432 #
4433 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4434 # or visit www.oracle.com if you need additional information or have any
4435 # questions.
4436 #
4437 
4438 
4439 
4440 
4441 
4442 
4443 
4444 #
4445 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4446 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4447 #
4448 # This code is free software; you can redistribute it and/or modify it
4449 # under the terms of the GNU General Public License version 2 only, as
4450 # published by the Free Software Foundation.  Oracle designates this
4451 # particular file as subject to the "Classpath" exception as provided
4452 # by Oracle in the LICENSE file that accompanied this code.
4453 #
4454 # This code is distributed in the hope that it will be useful, but WITHOUT
4455 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4456 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4457 # version 2 for more details (a copy is included in the LICENSE file that
4458 # accompanied this code).
4459 #
4460 # You should have received a copy of the GNU General Public License version
4461 # 2 along with this work; if not, write to the Free Software Foundation,
4462 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4463 #
4464 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4465 # or visit www.oracle.com if you need additional information or have any
4466 # questions.
4467 #
4468 
4469 ########################################################################
4470 # This file is responsible for detecting, verifying and setting up the
4471 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4472 # proper paths to the binaries, but it will not setup any flags.
4473 #
4474 # The binaries used is determined by the toolchain type, which is the family of
4475 # compilers and related tools that are used.
4476 ########################################################################
4477 
4478 
4479 # All valid toolchains, regardless of platform (used by help.m4)
4480 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4481 
4482 # These toolchains are valid on different platforms
4483 VALID_TOOLCHAINS_linux="gcc clang"
4484 VALID_TOOLCHAINS_solaris="solstudio"
4485 VALID_TOOLCHAINS_macosx="gcc clang"
4486 VALID_TOOLCHAINS_aix="xlc"
4487 VALID_TOOLCHAINS_windows="microsoft"
4488 
4489 # Toolchain descriptions
4490 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4491 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4492 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4493 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4494 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4495 
4496 # Setup a number of variables describing how native output files are
4497 # named on this platform/toolchain.
4498 
4499 
4500 # Determine which toolchain type to use, and make sure it is valid for this
4501 # platform. Setup various information about the selected toolchain.
4502 
4503 
4504 # Before we start detecting the toolchain executables, we might need some
4505 # special setup, e.g. additional paths etc.
4506 
4507 
4508 # Restore path, etc
4509 
4510 
4511 # Check if a compiler is of the toolchain type we expect, and save the version
4512 # information from it. If the compiler does not match the expected type,
4513 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4514 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4515 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4516 #
4517 # $1 = compiler to test (CC or CXX)
4518 # $2 = human readable name of compiler (C or C++)
4519 
4520 
4521 # Try to locate the given C or C++ compiler in the path, or otherwise.
4522 #
4523 # $1 = compiler to test (CC or CXX)
4524 # $2 = human readable name of compiler (C or C++)
4525 # $3 = list of compiler names to search for
4526 
4527 
4528 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4529 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4530 # archiver (AR). Verify that the compilers are correct according to the
4531 # toolchain type.
4532 
4533 
4534 # Setup additional tools that is considered a part of the toolchain, but not the
4535 # core part. Many of these are highly platform-specific and do not exist,
4536 # and/or are not needed on all platforms.
4537 
4538 
4539 # Setup the build tools (i.e, the compiler and linker used to build programs
4540 # that should be run on the build platform, not the target platform, as a build
4541 # helper). Since the non-cross-compile case uses the normal, target compilers
4542 # for this, we can only do this after these have been setup.
4543 
4544 
4545 # Setup legacy variables that are still needed as alternative ways to refer to
4546 # parts of the toolchain.
4547 
4548 
4549 # Do some additional checks on the detected tools.
4550 
4551 
4552 # Setup the JTReg Regression Test Harness.
4553 
4554 
4555 #
4556 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4557 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4558 #
4559 # This code is free software; you can redistribute it and/or modify it
4560 # under the terms of the GNU General Public License version 2 only, as
4561 # published by the Free Software Foundation.  Oracle designates this
4562 # particular file as subject to the "Classpath" exception as provided
4563 # by Oracle in the LICENSE file that accompanied this code.
4564 #
4565 # This code is distributed in the hope that it will be useful, but WITHOUT
4566 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4567 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4568 # version 2 for more details (a copy is included in the LICENSE file that
4569 # accompanied this code).
4570 #
4571 # You should have received a copy of the GNU General Public License version
4572 # 2 along with this work; if not, write to the Free Software Foundation,
4573 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4574 #
4575 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4576 # or visit www.oracle.com if you need additional information or have any
4577 # questions.
4578 #
4579 
4580 ################################################################################
4581 # The order of these defines the priority by which we try to find them.
4582 VALID_VS_VERSIONS="2013 2012 2010"
4583 
4584 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4585 VS_VERSION_INTERNAL_2010=100
4586 VS_MSVCR_2010=msvcr100.dll
4587 # We don't use msvcp on Visual Studio 2010
4588 #VS_MSVCP_2010=msvcp100.dll
4589 VS_ENVVAR_2010="VS100COMNTOOLS"
4590 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4591 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4592 VS_VS_PLATFORM_NAME_2010="v100"
4593 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4594 
4595 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4596 VS_VERSION_INTERNAL_2012=110
4597 VS_MSVCR_2012=msvcr110.dll
4598 VS_MSVCP_2012=msvcp110.dll
4599 VS_ENVVAR_2012="VS110COMNTOOLS"
4600 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4601 VS_SDK_INSTALLDIR_2012=
4602 VS_VS_PLATFORM_NAME_2012="v110"
4603 VS_SDK_PLATFORM_NAME_2012=
4604 
4605 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4606 VS_VERSION_INTERNAL_2013=120
4607 VS_MSVCR_2013=msvcr120.dll
4608 VS_MSVCP_2013=msvcp120.dll
4609 VS_ENVVAR_2013="VS120COMNTOOLS"
4610 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4611 VS_SDK_INSTALLDIR_2013=
4612 VS_VS_PLATFORM_NAME_2013="v120"
4613 VS_SDK_PLATFORM_NAME_2013=
4614 
4615 ################################################################################
4616 
4617 
4618 
4619 ################################################################################
4620 
4621 
4622 
4623 ################################################################################
4624 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4625 # build environment and assigns it to VS_ENV_CMD
4626 
4627 
4628 ################################################################################
4629 
4630 
4631 
4632 ################################################################################
4633 # Check if the VS env variables were setup prior to running configure.
4634 # If not, then find vcvarsall.bat and run it automatically, and integrate
4635 # the set env variables into the spec file.
4636 
4637 
4638 
4639 
4640 
4641 
4642 
4643 
4644 
4645 
4646 
4647 
4648 
4649 
4650 # This line needs to be here, verbatim, after all includes and the dummy hook
4651 # definitions. It is replaced with custom functionality when building
4652 # custom sources.
4653 #CUSTOM_AUTOCONF_INCLUDE
4654 
4655 # Do not change or remove the following line, it is needed for consistency checks:
4656 DATE_WHEN_GENERATED=1448546432
4657 
4658 ###############################################################################
4659 #
4660 # Initialization / Boot-strapping
4661 #
4662 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4663 # thus it jumps back and forth, each time gaining something needed later on.
4664 #
4665 ###############################################################################
4666 
4667 # If we are requested to print additional help, do that and then exit.
4668 # This must be the very first call.
4669 
4670   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4671     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4672     $PRINTF "Which are valid to use depends on the build platform.\n"
4673     for toolchain in $VALID_TOOLCHAINS_all; do
4674       # Use indirect variable referencing
4675       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4676       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4677       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4678     done
4679 
4680     # And now exit directly
4681     exit 0
4682   fi
4683 
4684 
4685 # Basic initialization that must happen first of all in the normal process.
4686 
4687   # Save the original command line. This is passed to us by the wrapper configure script.
4688 
4689   # Save the path variable before it gets changed
4690   ORIGINAL_PATH="$PATH"
4691 
4692   DATE_WHEN_CONFIGURED=`LANG=C date`
4693 
4694   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4695 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4696   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4697 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4698 
4699 
4700   # Start with tools that do not need have cross compilation support
4701   # and can be expected to be found in the default PATH. These tools are
4702   # used by configure.
4703 
4704   # First are all the simple required tools.
4705 
4706 
4707 
4708   # Publish this variable in the help.
4709 
4710 
4711   if [ -z "${BASENAME+x}" ]; then
4712     # The variable is not set by user, try to locate tool using the code snippet
4713     for ac_prog in basename
4714 do
4715   # Extract the first word of "$ac_prog", so it can be a program name with args.
4716 set dummy $ac_prog; ac_word=$2
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718 $as_echo_n "checking for $ac_word... " >&6; }
4719 if ${ac_cv_path_BASENAME+:} false; then :
4720   $as_echo_n "(cached) " >&6
4721 else
4722   case $BASENAME in
4723   [\\/]* | ?:[\\/]*)
4724   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4725   ;;
4726   *)
4727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728 for as_dir in $PATH
4729 do
4730   IFS=$as_save_IFS
4731   test -z "$as_dir" && as_dir=.
4732     for ac_exec_ext in '' $ac_executable_extensions; do
4733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4734     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4736     break 2
4737   fi
4738 done
4739   done
4740 IFS=$as_save_IFS
4741 
4742   ;;
4743 esac
4744 fi
4745 BASENAME=$ac_cv_path_BASENAME
4746 if test -n "$BASENAME"; then
4747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4748 $as_echo "$BASENAME" >&6; }
4749 else
4750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751 $as_echo "no" >&6; }
4752 fi
4753 
4754 
4755   test -n "$BASENAME" && break
4756 done
4757 
4758   else
4759     # The variable is set, but is it from the command line or the environment?
4760 
4761     # Try to remove the string !BASENAME! from our list.
4762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4764       # If it failed, the variable was not from the command line. Ignore it,
4765       # but warn the user (except for BASH, which is always set by the calling BASH).
4766       if test "xBASENAME" != xBASH; then
4767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4768 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4769       fi
4770       # Try to locate tool using the code snippet
4771       for ac_prog in basename
4772 do
4773   # Extract the first word of "$ac_prog", so it can be a program name with args.
4774 set dummy $ac_prog; ac_word=$2
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776 $as_echo_n "checking for $ac_word... " >&6; }
4777 if ${ac_cv_path_BASENAME+:} false; then :
4778   $as_echo_n "(cached) " >&6
4779 else
4780   case $BASENAME in
4781   [\\/]* | ?:[\\/]*)
4782   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4783   ;;
4784   *)
4785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786 for as_dir in $PATH
4787 do
4788   IFS=$as_save_IFS
4789   test -z "$as_dir" && as_dir=.
4790     for ac_exec_ext in '' $ac_executable_extensions; do
4791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4792     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794     break 2
4795   fi
4796 done
4797   done
4798 IFS=$as_save_IFS
4799 
4800   ;;
4801 esac
4802 fi
4803 BASENAME=$ac_cv_path_BASENAME
4804 if test -n "$BASENAME"; then
4805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4806 $as_echo "$BASENAME" >&6; }
4807 else
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809 $as_echo "no" >&6; }
4810 fi
4811 
4812 
4813   test -n "$BASENAME" && break
4814 done
4815 
4816     else
4817       # If it succeeded, then it was overridden by the user. We will use it
4818       # for the tool.
4819 
4820       # First remove it from the list of overridden variables, so we can test
4821       # for unknown variables in the end.
4822       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4823 
4824       # Check if we try to supply an empty value
4825       if test "x$BASENAME" = x; then
4826         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4827 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4829 $as_echo_n "checking for BASENAME... " >&6; }
4830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4831 $as_echo "disabled" >&6; }
4832       else
4833         # Check if the provided tool contains a complete path.
4834         tool_specified="$BASENAME"
4835         tool_basename="${tool_specified##*/}"
4836         if test "x$tool_basename" = "x$tool_specified"; then
4837           # A command without a complete path is provided, search $PATH.
4838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4839 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4840           # Extract the first word of "$tool_basename", so it can be a program name with args.
4841 set dummy $tool_basename; ac_word=$2
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4843 $as_echo_n "checking for $ac_word... " >&6; }
4844 if ${ac_cv_path_BASENAME+:} false; then :
4845   $as_echo_n "(cached) " >&6
4846 else
4847   case $BASENAME in
4848   [\\/]* | ?:[\\/]*)
4849   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4850   ;;
4851   *)
4852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853 for as_dir in $PATH
4854 do
4855   IFS=$as_save_IFS
4856   test -z "$as_dir" && as_dir=.
4857     for ac_exec_ext in '' $ac_executable_extensions; do
4858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4859     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4861     break 2
4862   fi
4863 done
4864   done
4865 IFS=$as_save_IFS
4866 
4867   ;;
4868 esac
4869 fi
4870 BASENAME=$ac_cv_path_BASENAME
4871 if test -n "$BASENAME"; then
4872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4873 $as_echo "$BASENAME" >&6; }
4874 else
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876 $as_echo "no" >&6; }
4877 fi
4878 
4879 
4880           if test "x$BASENAME" = x; then
4881             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4882           fi
4883         else
4884           # Otherwise we believe it is a complete path. Use it as it is.
4885           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4886 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4888 $as_echo_n "checking for BASENAME... " >&6; }
4889           if test ! -x "$tool_specified"; then
4890             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4891 $as_echo "not found" >&6; }
4892             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4893           fi
4894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4895 $as_echo "$tool_specified" >&6; }
4896         fi
4897       fi
4898     fi
4899 
4900   fi
4901 
4902 
4903 
4904   if test "x$BASENAME" = x; then
4905     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4906   fi
4907 
4908 
4909 
4910 
4911 
4912   # Publish this variable in the help.
4913 
4914 
4915   if [ -z "${BASH+x}" ]; then
4916     # The variable is not set by user, try to locate tool using the code snippet
4917     for ac_prog in bash
4918 do
4919   # Extract the first word of "$ac_prog", so it can be a program name with args.
4920 set dummy $ac_prog; ac_word=$2
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922 $as_echo_n "checking for $ac_word... " >&6; }
4923 if ${ac_cv_path_BASH+:} false; then :
4924   $as_echo_n "(cached) " >&6
4925 else
4926   case $BASH in
4927   [\\/]* | ?:[\\/]*)
4928   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4929   ;;
4930   *)
4931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932 for as_dir in $PATH
4933 do
4934   IFS=$as_save_IFS
4935   test -z "$as_dir" && as_dir=.
4936     for ac_exec_ext in '' $ac_executable_extensions; do
4937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4938     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940     break 2
4941   fi
4942 done
4943   done
4944 IFS=$as_save_IFS
4945 
4946   ;;
4947 esac
4948 fi
4949 BASH=$ac_cv_path_BASH
4950 if test -n "$BASH"; then
4951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4952 $as_echo "$BASH" >&6; }
4953 else
4954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955 $as_echo "no" >&6; }
4956 fi
4957 
4958 
4959   test -n "$BASH" && break
4960 done
4961 
4962   else
4963     # The variable is set, but is it from the command line or the environment?
4964 
4965     # Try to remove the string !BASH! from our list.
4966     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4967     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4968       # If it failed, the variable was not from the command line. Ignore it,
4969       # but warn the user (except for BASH, which is always set by the calling BASH).
4970       if test "xBASH" != xBASH; then
4971         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4972 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4973       fi
4974       # Try to locate tool using the code snippet
4975       for ac_prog in bash
4976 do
4977   # Extract the first word of "$ac_prog", so it can be a program name with args.
4978 set dummy $ac_prog; ac_word=$2
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980 $as_echo_n "checking for $ac_word... " >&6; }
4981 if ${ac_cv_path_BASH+:} false; then :
4982   $as_echo_n "(cached) " >&6
4983 else
4984   case $BASH in
4985   [\\/]* | ?:[\\/]*)
4986   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4987   ;;
4988   *)
4989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4990 for as_dir in $PATH
4991 do
4992   IFS=$as_save_IFS
4993   test -z "$as_dir" && as_dir=.
4994     for ac_exec_ext in '' $ac_executable_extensions; do
4995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4996     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4998     break 2
4999   fi
5000 done
5001   done
5002 IFS=$as_save_IFS
5003 
5004   ;;
5005 esac
5006 fi
5007 BASH=$ac_cv_path_BASH
5008 if test -n "$BASH"; then
5009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5010 $as_echo "$BASH" >&6; }
5011 else
5012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013 $as_echo "no" >&6; }
5014 fi
5015 
5016 
5017   test -n "$BASH" && break
5018 done
5019 
5020     else
5021       # If it succeeded, then it was overridden by the user. We will use it
5022       # for the tool.
5023 
5024       # First remove it from the list of overridden variables, so we can test
5025       # for unknown variables in the end.
5026       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5027 
5028       # Check if we try to supply an empty value
5029       if test "x$BASH" = x; then
5030         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5031 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5032         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5033 $as_echo_n "checking for BASH... " >&6; }
5034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5035 $as_echo "disabled" >&6; }
5036       else
5037         # Check if the provided tool contains a complete path.
5038         tool_specified="$BASH"
5039         tool_basename="${tool_specified##*/}"
5040         if test "x$tool_basename" = "x$tool_specified"; then
5041           # A command without a complete path is provided, search $PATH.
5042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5043 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5044           # Extract the first word of "$tool_basename", so it can be a program name with args.
5045 set dummy $tool_basename; ac_word=$2
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047 $as_echo_n "checking for $ac_word... " >&6; }
5048 if ${ac_cv_path_BASH+:} false; then :
5049   $as_echo_n "(cached) " >&6
5050 else
5051   case $BASH in
5052   [\\/]* | ?:[\\/]*)
5053   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5054   ;;
5055   *)
5056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057 for as_dir in $PATH
5058 do
5059   IFS=$as_save_IFS
5060   test -z "$as_dir" && as_dir=.
5061     for ac_exec_ext in '' $ac_executable_extensions; do
5062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5063     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065     break 2
5066   fi
5067 done
5068   done
5069 IFS=$as_save_IFS
5070 
5071   ;;
5072 esac
5073 fi
5074 BASH=$ac_cv_path_BASH
5075 if test -n "$BASH"; then
5076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5077 $as_echo "$BASH" >&6; }
5078 else
5079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080 $as_echo "no" >&6; }
5081 fi
5082 
5083 
5084           if test "x$BASH" = x; then
5085             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5086           fi
5087         else
5088           # Otherwise we believe it is a complete path. Use it as it is.
5089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5090 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5091           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5092 $as_echo_n "checking for BASH... " >&6; }
5093           if test ! -x "$tool_specified"; then
5094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5095 $as_echo "not found" >&6; }
5096             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5097           fi
5098           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5099 $as_echo "$tool_specified" >&6; }
5100         fi
5101       fi
5102     fi
5103 
5104   fi
5105 
5106 
5107 
5108   if test "x$BASH" = x; then
5109     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5110   fi
5111 
5112 
5113 
5114 
5115 
5116   # Publish this variable in the help.
5117 
5118 
5119   if [ -z "${CAT+x}" ]; then
5120     # The variable is not set by user, try to locate tool using the code snippet
5121     for ac_prog in cat
5122 do
5123   # Extract the first word of "$ac_prog", so it can be a program name with args.
5124 set dummy $ac_prog; ac_word=$2
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126 $as_echo_n "checking for $ac_word... " >&6; }
5127 if ${ac_cv_path_CAT+:} false; then :
5128   $as_echo_n "(cached) " >&6
5129 else
5130   case $CAT in
5131   [\\/]* | ?:[\\/]*)
5132   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5133   ;;
5134   *)
5135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136 for as_dir in $PATH
5137 do
5138   IFS=$as_save_IFS
5139   test -z "$as_dir" && as_dir=.
5140     for ac_exec_ext in '' $ac_executable_extensions; do
5141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144     break 2
5145   fi
5146 done
5147   done
5148 IFS=$as_save_IFS
5149 
5150   ;;
5151 esac
5152 fi
5153 CAT=$ac_cv_path_CAT
5154 if test -n "$CAT"; then
5155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5156 $as_echo "$CAT" >&6; }
5157 else
5158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159 $as_echo "no" >&6; }
5160 fi
5161 
5162 
5163   test -n "$CAT" && break
5164 done
5165 
5166   else
5167     # The variable is set, but is it from the command line or the environment?
5168 
5169     # Try to remove the string !CAT! from our list.
5170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5172       # If it failed, the variable was not from the command line. Ignore it,
5173       # but warn the user (except for BASH, which is always set by the calling BASH).
5174       if test "xCAT" != xBASH; then
5175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5176 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5177       fi
5178       # Try to locate tool using the code snippet
5179       for ac_prog in cat
5180 do
5181   # Extract the first word of "$ac_prog", so it can be a program name with args.
5182 set dummy $ac_prog; ac_word=$2
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184 $as_echo_n "checking for $ac_word... " >&6; }
5185 if ${ac_cv_path_CAT+:} false; then :
5186   $as_echo_n "(cached) " >&6
5187 else
5188   case $CAT in
5189   [\\/]* | ?:[\\/]*)
5190   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5191   ;;
5192   *)
5193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5194 for as_dir in $PATH
5195 do
5196   IFS=$as_save_IFS
5197   test -z "$as_dir" && as_dir=.
5198     for ac_exec_ext in '' $ac_executable_extensions; do
5199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5200     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5202     break 2
5203   fi
5204 done
5205   done
5206 IFS=$as_save_IFS
5207 
5208   ;;
5209 esac
5210 fi
5211 CAT=$ac_cv_path_CAT
5212 if test -n "$CAT"; then
5213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5214 $as_echo "$CAT" >&6; }
5215 else
5216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217 $as_echo "no" >&6; }
5218 fi
5219 
5220 
5221   test -n "$CAT" && break
5222 done
5223 
5224     else
5225       # If it succeeded, then it was overridden by the user. We will use it
5226       # for the tool.
5227 
5228       # First remove it from the list of overridden variables, so we can test
5229       # for unknown variables in the end.
5230       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5231 
5232       # Check if we try to supply an empty value
5233       if test "x$CAT" = x; then
5234         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5235 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5237 $as_echo_n "checking for CAT... " >&6; }
5238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5239 $as_echo "disabled" >&6; }
5240       else
5241         # Check if the provided tool contains a complete path.
5242         tool_specified="$CAT"
5243         tool_basename="${tool_specified##*/}"
5244         if test "x$tool_basename" = "x$tool_specified"; then
5245           # A command without a complete path is provided, search $PATH.
5246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5247 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5248           # Extract the first word of "$tool_basename", so it can be a program name with args.
5249 set dummy $tool_basename; ac_word=$2
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5251 $as_echo_n "checking for $ac_word... " >&6; }
5252 if ${ac_cv_path_CAT+:} false; then :
5253   $as_echo_n "(cached) " >&6
5254 else
5255   case $CAT in
5256   [\\/]* | ?:[\\/]*)
5257   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5258   ;;
5259   *)
5260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5261 for as_dir in $PATH
5262 do
5263   IFS=$as_save_IFS
5264   test -z "$as_dir" && as_dir=.
5265     for ac_exec_ext in '' $ac_executable_extensions; do
5266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5267     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5269     break 2
5270   fi
5271 done
5272   done
5273 IFS=$as_save_IFS
5274 
5275   ;;
5276 esac
5277 fi
5278 CAT=$ac_cv_path_CAT
5279 if test -n "$CAT"; then
5280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5281 $as_echo "$CAT" >&6; }
5282 else
5283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5284 $as_echo "no" >&6; }
5285 fi
5286 
5287 
5288           if test "x$CAT" = x; then
5289             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5290           fi
5291         else
5292           # Otherwise we believe it is a complete path. Use it as it is.
5293           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5294 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5295           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5296 $as_echo_n "checking for CAT... " >&6; }
5297           if test ! -x "$tool_specified"; then
5298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5299 $as_echo "not found" >&6; }
5300             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5301           fi
5302           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5303 $as_echo "$tool_specified" >&6; }
5304         fi
5305       fi
5306     fi
5307 
5308   fi
5309 
5310 
5311 
5312   if test "x$CAT" = x; then
5313     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5314   fi
5315 
5316 
5317 
5318 
5319 
5320   # Publish this variable in the help.
5321 
5322 
5323   if [ -z "${CHMOD+x}" ]; then
5324     # The variable is not set by user, try to locate tool using the code snippet
5325     for ac_prog in chmod
5326 do
5327   # Extract the first word of "$ac_prog", so it can be a program name with args.
5328 set dummy $ac_prog; ac_word=$2
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330 $as_echo_n "checking for $ac_word... " >&6; }
5331 if ${ac_cv_path_CHMOD+:} false; then :
5332   $as_echo_n "(cached) " >&6
5333 else
5334   case $CHMOD in
5335   [\\/]* | ?:[\\/]*)
5336   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5337   ;;
5338   *)
5339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340 for as_dir in $PATH
5341 do
5342   IFS=$as_save_IFS
5343   test -z "$as_dir" && as_dir=.
5344     for ac_exec_ext in '' $ac_executable_extensions; do
5345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348     break 2
5349   fi
5350 done
5351   done
5352 IFS=$as_save_IFS
5353 
5354   ;;
5355 esac
5356 fi
5357 CHMOD=$ac_cv_path_CHMOD
5358 if test -n "$CHMOD"; then
5359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5360 $as_echo "$CHMOD" >&6; }
5361 else
5362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363 $as_echo "no" >&6; }
5364 fi
5365 
5366 
5367   test -n "$CHMOD" && break
5368 done
5369 
5370   else
5371     # The variable is set, but is it from the command line or the environment?
5372 
5373     # Try to remove the string !CHMOD! from our list.
5374     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5375     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5376       # If it failed, the variable was not from the command line. Ignore it,
5377       # but warn the user (except for BASH, which is always set by the calling BASH).
5378       if test "xCHMOD" != xBASH; then
5379         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5380 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5381       fi
5382       # Try to locate tool using the code snippet
5383       for ac_prog in chmod
5384 do
5385   # Extract the first word of "$ac_prog", so it can be a program name with args.
5386 set dummy $ac_prog; ac_word=$2
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388 $as_echo_n "checking for $ac_word... " >&6; }
5389 if ${ac_cv_path_CHMOD+:} false; then :
5390   $as_echo_n "(cached) " >&6
5391 else
5392   case $CHMOD in
5393   [\\/]* | ?:[\\/]*)
5394   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5395   ;;
5396   *)
5397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398 for as_dir in $PATH
5399 do
5400   IFS=$as_save_IFS
5401   test -z "$as_dir" && as_dir=.
5402     for ac_exec_ext in '' $ac_executable_extensions; do
5403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406     break 2
5407   fi
5408 done
5409   done
5410 IFS=$as_save_IFS
5411 
5412   ;;
5413 esac
5414 fi
5415 CHMOD=$ac_cv_path_CHMOD
5416 if test -n "$CHMOD"; then
5417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5418 $as_echo "$CHMOD" >&6; }
5419 else
5420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421 $as_echo "no" >&6; }
5422 fi
5423 
5424 
5425   test -n "$CHMOD" && break
5426 done
5427 
5428     else
5429       # If it succeeded, then it was overridden by the user. We will use it
5430       # for the tool.
5431 
5432       # First remove it from the list of overridden variables, so we can test
5433       # for unknown variables in the end.
5434       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5435 
5436       # Check if we try to supply an empty value
5437       if test "x$CHMOD" = x; then
5438         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5439 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5440         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5441 $as_echo_n "checking for CHMOD... " >&6; }
5442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5443 $as_echo "disabled" >&6; }
5444       else
5445         # Check if the provided tool contains a complete path.
5446         tool_specified="$CHMOD"
5447         tool_basename="${tool_specified##*/}"
5448         if test "x$tool_basename" = "x$tool_specified"; then
5449           # A command without a complete path is provided, search $PATH.
5450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5451 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5452           # Extract the first word of "$tool_basename", so it can be a program name with args.
5453 set dummy $tool_basename; ac_word=$2
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455 $as_echo_n "checking for $ac_word... " >&6; }
5456 if ${ac_cv_path_CHMOD+:} false; then :
5457   $as_echo_n "(cached) " >&6
5458 else
5459   case $CHMOD in
5460   [\\/]* | ?:[\\/]*)
5461   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5462   ;;
5463   *)
5464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465 for as_dir in $PATH
5466 do
5467   IFS=$as_save_IFS
5468   test -z "$as_dir" && as_dir=.
5469     for ac_exec_ext in '' $ac_executable_extensions; do
5470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473     break 2
5474   fi
5475 done
5476   done
5477 IFS=$as_save_IFS
5478 
5479   ;;
5480 esac
5481 fi
5482 CHMOD=$ac_cv_path_CHMOD
5483 if test -n "$CHMOD"; then
5484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5485 $as_echo "$CHMOD" >&6; }
5486 else
5487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488 $as_echo "no" >&6; }
5489 fi
5490 
5491 
5492           if test "x$CHMOD" = x; then
5493             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5494           fi
5495         else
5496           # Otherwise we believe it is a complete path. Use it as it is.
5497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5498 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5499           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5500 $as_echo_n "checking for CHMOD... " >&6; }
5501           if test ! -x "$tool_specified"; then
5502             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5503 $as_echo "not found" >&6; }
5504             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5505           fi
5506           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5507 $as_echo "$tool_specified" >&6; }
5508         fi
5509       fi
5510     fi
5511 
5512   fi
5513 
5514 
5515 
5516   if test "x$CHMOD" = x; then
5517     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5518   fi
5519 
5520 
5521 
5522 
5523 
5524   # Publish this variable in the help.
5525 
5526 
5527   if [ -z "${CMP+x}" ]; then
5528     # The variable is not set by user, try to locate tool using the code snippet
5529     for ac_prog in cmp
5530 do
5531   # Extract the first word of "$ac_prog", so it can be a program name with args.
5532 set dummy $ac_prog; ac_word=$2
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534 $as_echo_n "checking for $ac_word... " >&6; }
5535 if ${ac_cv_path_CMP+:} false; then :
5536   $as_echo_n "(cached) " >&6
5537 else
5538   case $CMP in
5539   [\\/]* | ?:[\\/]*)
5540   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5541   ;;
5542   *)
5543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544 for as_dir in $PATH
5545 do
5546   IFS=$as_save_IFS
5547   test -z "$as_dir" && as_dir=.
5548     for ac_exec_ext in '' $ac_executable_extensions; do
5549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5550     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552     break 2
5553   fi
5554 done
5555   done
5556 IFS=$as_save_IFS
5557 
5558   ;;
5559 esac
5560 fi
5561 CMP=$ac_cv_path_CMP
5562 if test -n "$CMP"; then
5563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5564 $as_echo "$CMP" >&6; }
5565 else
5566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567 $as_echo "no" >&6; }
5568 fi
5569 
5570 
5571   test -n "$CMP" && break
5572 done
5573 
5574   else
5575     # The variable is set, but is it from the command line or the environment?
5576 
5577     # Try to remove the string !CMP! from our list.
5578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5580       # If it failed, the variable was not from the command line. Ignore it,
5581       # but warn the user (except for BASH, which is always set by the calling BASH).
5582       if test "xCMP" != xBASH; then
5583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5584 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5585       fi
5586       # Try to locate tool using the code snippet
5587       for ac_prog in cmp
5588 do
5589   # Extract the first word of "$ac_prog", so it can be a program name with args.
5590 set dummy $ac_prog; ac_word=$2
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592 $as_echo_n "checking for $ac_word... " >&6; }
5593 if ${ac_cv_path_CMP+:} false; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   case $CMP in
5597   [\\/]* | ?:[\\/]*)
5598   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5599   ;;
5600   *)
5601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5608     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615 
5616   ;;
5617 esac
5618 fi
5619 CMP=$ac_cv_path_CMP
5620 if test -n "$CMP"; then
5621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5622 $as_echo "$CMP" >&6; }
5623 else
5624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625 $as_echo "no" >&6; }
5626 fi
5627 
5628 
5629   test -n "$CMP" && break
5630 done
5631 
5632     else
5633       # If it succeeded, then it was overridden by the user. We will use it
5634       # for the tool.
5635 
5636       # First remove it from the list of overridden variables, so we can test
5637       # for unknown variables in the end.
5638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5639 
5640       # Check if we try to supply an empty value
5641       if test "x$CMP" = x; then
5642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5643 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5645 $as_echo_n "checking for CMP... " >&6; }
5646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5647 $as_echo "disabled" >&6; }
5648       else
5649         # Check if the provided tool contains a complete path.
5650         tool_specified="$CMP"
5651         tool_basename="${tool_specified##*/}"
5652         if test "x$tool_basename" = "x$tool_specified"; then
5653           # A command without a complete path is provided, search $PATH.
5654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5655 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5656           # Extract the first word of "$tool_basename", so it can be a program name with args.
5657 set dummy $tool_basename; ac_word=$2
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659 $as_echo_n "checking for $ac_word... " >&6; }
5660 if ${ac_cv_path_CMP+:} false; then :
5661   $as_echo_n "(cached) " >&6
5662 else
5663   case $CMP in
5664   [\\/]* | ?:[\\/]*)
5665   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5666   ;;
5667   *)
5668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669 for as_dir in $PATH
5670 do
5671   IFS=$as_save_IFS
5672   test -z "$as_dir" && as_dir=.
5673     for ac_exec_ext in '' $ac_executable_extensions; do
5674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5675     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677     break 2
5678   fi
5679 done
5680   done
5681 IFS=$as_save_IFS
5682 
5683   ;;
5684 esac
5685 fi
5686 CMP=$ac_cv_path_CMP
5687 if test -n "$CMP"; then
5688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5689 $as_echo "$CMP" >&6; }
5690 else
5691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692 $as_echo "no" >&6; }
5693 fi
5694 
5695 
5696           if test "x$CMP" = x; then
5697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5698           fi
5699         else
5700           # Otherwise we believe it is a complete path. Use it as it is.
5701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5702 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5704 $as_echo_n "checking for CMP... " >&6; }
5705           if test ! -x "$tool_specified"; then
5706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5707 $as_echo "not found" >&6; }
5708             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5709           fi
5710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5711 $as_echo "$tool_specified" >&6; }
5712         fi
5713       fi
5714     fi
5715 
5716   fi
5717 
5718 
5719 
5720   if test "x$CMP" = x; then
5721     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5722   fi
5723 
5724 
5725 
5726 
5727 
5728   # Publish this variable in the help.
5729 
5730 
5731   if [ -z "${COMM+x}" ]; then
5732     # The variable is not set by user, try to locate tool using the code snippet
5733     for ac_prog in comm
5734 do
5735   # Extract the first word of "$ac_prog", so it can be a program name with args.
5736 set dummy $ac_prog; ac_word=$2
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738 $as_echo_n "checking for $ac_word... " >&6; }
5739 if ${ac_cv_path_COMM+:} false; then :
5740   $as_echo_n "(cached) " >&6
5741 else
5742   case $COMM in
5743   [\\/]* | ?:[\\/]*)
5744   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5745   ;;
5746   *)
5747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748 for as_dir in $PATH
5749 do
5750   IFS=$as_save_IFS
5751   test -z "$as_dir" && as_dir=.
5752     for ac_exec_ext in '' $ac_executable_extensions; do
5753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5754     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5756     break 2
5757   fi
5758 done
5759   done
5760 IFS=$as_save_IFS
5761 
5762   ;;
5763 esac
5764 fi
5765 COMM=$ac_cv_path_COMM
5766 if test -n "$COMM"; then
5767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5768 $as_echo "$COMM" >&6; }
5769 else
5770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771 $as_echo "no" >&6; }
5772 fi
5773 
5774 
5775   test -n "$COMM" && break
5776 done
5777 
5778   else
5779     # The variable is set, but is it from the command line or the environment?
5780 
5781     # Try to remove the string !COMM! from our list.
5782     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5783     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5784       # If it failed, the variable was not from the command line. Ignore it,
5785       # but warn the user (except for BASH, which is always set by the calling BASH).
5786       if test "xCOMM" != xBASH; then
5787         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5788 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5789       fi
5790       # Try to locate tool using the code snippet
5791       for ac_prog in comm
5792 do
5793   # Extract the first word of "$ac_prog", so it can be a program name with args.
5794 set dummy $ac_prog; ac_word=$2
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796 $as_echo_n "checking for $ac_word... " >&6; }
5797 if ${ac_cv_path_COMM+:} false; then :
5798   $as_echo_n "(cached) " >&6
5799 else
5800   case $COMM in
5801   [\\/]* | ?:[\\/]*)
5802   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5803   ;;
5804   *)
5805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806 for as_dir in $PATH
5807 do
5808   IFS=$as_save_IFS
5809   test -z "$as_dir" && as_dir=.
5810     for ac_exec_ext in '' $ac_executable_extensions; do
5811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5812     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814     break 2
5815   fi
5816 done
5817   done
5818 IFS=$as_save_IFS
5819 
5820   ;;
5821 esac
5822 fi
5823 COMM=$ac_cv_path_COMM
5824 if test -n "$COMM"; then
5825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5826 $as_echo "$COMM" >&6; }
5827 else
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829 $as_echo "no" >&6; }
5830 fi
5831 
5832 
5833   test -n "$COMM" && break
5834 done
5835 
5836     else
5837       # If it succeeded, then it was overridden by the user. We will use it
5838       # for the tool.
5839 
5840       # First remove it from the list of overridden variables, so we can test
5841       # for unknown variables in the end.
5842       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5843 
5844       # Check if we try to supply an empty value
5845       if test "x$COMM" = x; then
5846         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5847 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5849 $as_echo_n "checking for COMM... " >&6; }
5850         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5851 $as_echo "disabled" >&6; }
5852       else
5853         # Check if the provided tool contains a complete path.
5854         tool_specified="$COMM"
5855         tool_basename="${tool_specified##*/}"
5856         if test "x$tool_basename" = "x$tool_specified"; then
5857           # A command without a complete path is provided, search $PATH.
5858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5859 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5860           # Extract the first word of "$tool_basename", so it can be a program name with args.
5861 set dummy $tool_basename; ac_word=$2
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5863 $as_echo_n "checking for $ac_word... " >&6; }
5864 if ${ac_cv_path_COMM+:} false; then :
5865   $as_echo_n "(cached) " >&6
5866 else
5867   case $COMM in
5868   [\\/]* | ?:[\\/]*)
5869   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5870   ;;
5871   *)
5872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5873 for as_dir in $PATH
5874 do
5875   IFS=$as_save_IFS
5876   test -z "$as_dir" && as_dir=.
5877     for ac_exec_ext in '' $ac_executable_extensions; do
5878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5879     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5881     break 2
5882   fi
5883 done
5884   done
5885 IFS=$as_save_IFS
5886 
5887   ;;
5888 esac
5889 fi
5890 COMM=$ac_cv_path_COMM
5891 if test -n "$COMM"; then
5892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5893 $as_echo "$COMM" >&6; }
5894 else
5895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896 $as_echo "no" >&6; }
5897 fi
5898 
5899 
5900           if test "x$COMM" = x; then
5901             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5902           fi
5903         else
5904           # Otherwise we believe it is a complete path. Use it as it is.
5905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5906 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5907           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5908 $as_echo_n "checking for COMM... " >&6; }
5909           if test ! -x "$tool_specified"; then
5910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5911 $as_echo "not found" >&6; }
5912             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5913           fi
5914           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5915 $as_echo "$tool_specified" >&6; }
5916         fi
5917       fi
5918     fi
5919 
5920   fi
5921 
5922 
5923 
5924   if test "x$COMM" = x; then
5925     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5926   fi
5927 
5928 
5929 
5930 
5931 
5932   # Publish this variable in the help.
5933 
5934 
5935   if [ -z "${CP+x}" ]; then
5936     # The variable is not set by user, try to locate tool using the code snippet
5937     for ac_prog in cp
5938 do
5939   # Extract the first word of "$ac_prog", so it can be a program name with args.
5940 set dummy $ac_prog; ac_word=$2
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942 $as_echo_n "checking for $ac_word... " >&6; }
5943 if ${ac_cv_path_CP+:} false; then :
5944   $as_echo_n "(cached) " >&6
5945 else
5946   case $CP in
5947   [\\/]* | ?:[\\/]*)
5948   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5949   ;;
5950   *)
5951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952 for as_dir in $PATH
5953 do
5954   IFS=$as_save_IFS
5955   test -z "$as_dir" && as_dir=.
5956     for ac_exec_ext in '' $ac_executable_extensions; do
5957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5958     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5960     break 2
5961   fi
5962 done
5963   done
5964 IFS=$as_save_IFS
5965 
5966   ;;
5967 esac
5968 fi
5969 CP=$ac_cv_path_CP
5970 if test -n "$CP"; then
5971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5972 $as_echo "$CP" >&6; }
5973 else
5974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975 $as_echo "no" >&6; }
5976 fi
5977 
5978 
5979   test -n "$CP" && break
5980 done
5981 
5982   else
5983     # The variable is set, but is it from the command line or the environment?
5984 
5985     # Try to remove the string !CP! from our list.
5986     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5987     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5988       # If it failed, the variable was not from the command line. Ignore it,
5989       # but warn the user (except for BASH, which is always set by the calling BASH).
5990       if test "xCP" != xBASH; then
5991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5992 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5993       fi
5994       # Try to locate tool using the code snippet
5995       for ac_prog in cp
5996 do
5997   # Extract the first word of "$ac_prog", so it can be a program name with args.
5998 set dummy $ac_prog; ac_word=$2
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000 $as_echo_n "checking for $ac_word... " >&6; }
6001 if ${ac_cv_path_CP+:} false; then :
6002   $as_echo_n "(cached) " >&6
6003 else
6004   case $CP in
6005   [\\/]* | ?:[\\/]*)
6006   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6007   ;;
6008   *)
6009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010 for as_dir in $PATH
6011 do
6012   IFS=$as_save_IFS
6013   test -z "$as_dir" && as_dir=.
6014     for ac_exec_ext in '' $ac_executable_extensions; do
6015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6016     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6018     break 2
6019   fi
6020 done
6021   done
6022 IFS=$as_save_IFS
6023 
6024   ;;
6025 esac
6026 fi
6027 CP=$ac_cv_path_CP
6028 if test -n "$CP"; then
6029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6030 $as_echo "$CP" >&6; }
6031 else
6032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033 $as_echo "no" >&6; }
6034 fi
6035 
6036 
6037   test -n "$CP" && break
6038 done
6039 
6040     else
6041       # If it succeeded, then it was overridden by the user. We will use it
6042       # for the tool.
6043 
6044       # First remove it from the list of overridden variables, so we can test
6045       # for unknown variables in the end.
6046       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6047 
6048       # Check if we try to supply an empty value
6049       if test "x$CP" = x; then
6050         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6051 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6053 $as_echo_n "checking for CP... " >&6; }
6054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6055 $as_echo "disabled" >&6; }
6056       else
6057         # Check if the provided tool contains a complete path.
6058         tool_specified="$CP"
6059         tool_basename="${tool_specified##*/}"
6060         if test "x$tool_basename" = "x$tool_specified"; then
6061           # A command without a complete path is provided, search $PATH.
6062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6063 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6064           # Extract the first word of "$tool_basename", so it can be a program name with args.
6065 set dummy $tool_basename; ac_word=$2
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067 $as_echo_n "checking for $ac_word... " >&6; }
6068 if ${ac_cv_path_CP+:} false; then :
6069   $as_echo_n "(cached) " >&6
6070 else
6071   case $CP in
6072   [\\/]* | ?:[\\/]*)
6073   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6074   ;;
6075   *)
6076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077 for as_dir in $PATH
6078 do
6079   IFS=$as_save_IFS
6080   test -z "$as_dir" && as_dir=.
6081     for ac_exec_ext in '' $ac_executable_extensions; do
6082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6083     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6085     break 2
6086   fi
6087 done
6088   done
6089 IFS=$as_save_IFS
6090 
6091   ;;
6092 esac
6093 fi
6094 CP=$ac_cv_path_CP
6095 if test -n "$CP"; then
6096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6097 $as_echo "$CP" >&6; }
6098 else
6099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6100 $as_echo "no" >&6; }
6101 fi
6102 
6103 
6104           if test "x$CP" = x; then
6105             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6106           fi
6107         else
6108           # Otherwise we believe it is a complete path. Use it as it is.
6109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6110 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6111           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6112 $as_echo_n "checking for CP... " >&6; }
6113           if test ! -x "$tool_specified"; then
6114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6115 $as_echo "not found" >&6; }
6116             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6117           fi
6118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6119 $as_echo "$tool_specified" >&6; }
6120         fi
6121       fi
6122     fi
6123 
6124   fi
6125 
6126 
6127 
6128   if test "x$CP" = x; then
6129     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6130   fi
6131 
6132 
6133 
6134 
6135 
6136   # Publish this variable in the help.
6137 
6138 
6139   if [ -z "${CUT+x}" ]; then
6140     # The variable is not set by user, try to locate tool using the code snippet
6141     for ac_prog in cut
6142 do
6143   # Extract the first word of "$ac_prog", so it can be a program name with args.
6144 set dummy $ac_prog; ac_word=$2
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6146 $as_echo_n "checking for $ac_word... " >&6; }
6147 if ${ac_cv_path_CUT+:} false; then :
6148   $as_echo_n "(cached) " >&6
6149 else
6150   case $CUT in
6151   [\\/]* | ?:[\\/]*)
6152   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6153   ;;
6154   *)
6155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156 for as_dir in $PATH
6157 do
6158   IFS=$as_save_IFS
6159   test -z "$as_dir" && as_dir=.
6160     for ac_exec_ext in '' $ac_executable_extensions; do
6161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6162     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6164     break 2
6165   fi
6166 done
6167   done
6168 IFS=$as_save_IFS
6169 
6170   ;;
6171 esac
6172 fi
6173 CUT=$ac_cv_path_CUT
6174 if test -n "$CUT"; then
6175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6176 $as_echo "$CUT" >&6; }
6177 else
6178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6179 $as_echo "no" >&6; }
6180 fi
6181 
6182 
6183   test -n "$CUT" && break
6184 done
6185 
6186   else
6187     # The variable is set, but is it from the command line or the environment?
6188 
6189     # Try to remove the string !CUT! from our list.
6190     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6191     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6192       # If it failed, the variable was not from the command line. Ignore it,
6193       # but warn the user (except for BASH, which is always set by the calling BASH).
6194       if test "xCUT" != xBASH; then
6195         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6196 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6197       fi
6198       # Try to locate tool using the code snippet
6199       for ac_prog in cut
6200 do
6201   # Extract the first word of "$ac_prog", so it can be a program name with args.
6202 set dummy $ac_prog; ac_word=$2
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204 $as_echo_n "checking for $ac_word... " >&6; }
6205 if ${ac_cv_path_CUT+:} false; then :
6206   $as_echo_n "(cached) " >&6
6207 else
6208   case $CUT in
6209   [\\/]* | ?:[\\/]*)
6210   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6211   ;;
6212   *)
6213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214 for as_dir in $PATH
6215 do
6216   IFS=$as_save_IFS
6217   test -z "$as_dir" && as_dir=.
6218     for ac_exec_ext in '' $ac_executable_extensions; do
6219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222     break 2
6223   fi
6224 done
6225   done
6226 IFS=$as_save_IFS
6227 
6228   ;;
6229 esac
6230 fi
6231 CUT=$ac_cv_path_CUT
6232 if test -n "$CUT"; then
6233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6234 $as_echo "$CUT" >&6; }
6235 else
6236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237 $as_echo "no" >&6; }
6238 fi
6239 
6240 
6241   test -n "$CUT" && break
6242 done
6243 
6244     else
6245       # If it succeeded, then it was overridden by the user. We will use it
6246       # for the tool.
6247 
6248       # First remove it from the list of overridden variables, so we can test
6249       # for unknown variables in the end.
6250       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6251 
6252       # Check if we try to supply an empty value
6253       if test "x$CUT" = x; then
6254         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6255 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6257 $as_echo_n "checking for CUT... " >&6; }
6258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6259 $as_echo "disabled" >&6; }
6260       else
6261         # Check if the provided tool contains a complete path.
6262         tool_specified="$CUT"
6263         tool_basename="${tool_specified##*/}"
6264         if test "x$tool_basename" = "x$tool_specified"; then
6265           # A command without a complete path is provided, search $PATH.
6266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6267 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6268           # Extract the first word of "$tool_basename", so it can be a program name with args.
6269 set dummy $tool_basename; ac_word=$2
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6271 $as_echo_n "checking for $ac_word... " >&6; }
6272 if ${ac_cv_path_CUT+:} false; then :
6273   $as_echo_n "(cached) " >&6
6274 else
6275   case $CUT in
6276   [\\/]* | ?:[\\/]*)
6277   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6278   ;;
6279   *)
6280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281 for as_dir in $PATH
6282 do
6283   IFS=$as_save_IFS
6284   test -z "$as_dir" && as_dir=.
6285     for ac_exec_ext in '' $ac_executable_extensions; do
6286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6287     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6289     break 2
6290   fi
6291 done
6292   done
6293 IFS=$as_save_IFS
6294 
6295   ;;
6296 esac
6297 fi
6298 CUT=$ac_cv_path_CUT
6299 if test -n "$CUT"; then
6300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6301 $as_echo "$CUT" >&6; }
6302 else
6303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304 $as_echo "no" >&6; }
6305 fi
6306 
6307 
6308           if test "x$CUT" = x; then
6309             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6310           fi
6311         else
6312           # Otherwise we believe it is a complete path. Use it as it is.
6313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6314 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6316 $as_echo_n "checking for CUT... " >&6; }
6317           if test ! -x "$tool_specified"; then
6318             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6319 $as_echo "not found" >&6; }
6320             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6321           fi
6322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6323 $as_echo "$tool_specified" >&6; }
6324         fi
6325       fi
6326     fi
6327 
6328   fi
6329 
6330 
6331 
6332   if test "x$CUT" = x; then
6333     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6334   fi
6335 
6336 
6337 
6338 
6339 
6340   # Publish this variable in the help.
6341 
6342 
6343   if [ -z "${DATE+x}" ]; then
6344     # The variable is not set by user, try to locate tool using the code snippet
6345     for ac_prog in date
6346 do
6347   # Extract the first word of "$ac_prog", so it can be a program name with args.
6348 set dummy $ac_prog; ac_word=$2
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6350 $as_echo_n "checking for $ac_word... " >&6; }
6351 if ${ac_cv_path_DATE+:} false; then :
6352   $as_echo_n "(cached) " >&6
6353 else
6354   case $DATE in
6355   [\\/]* | ?:[\\/]*)
6356   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6357   ;;
6358   *)
6359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6360 for as_dir in $PATH
6361 do
6362   IFS=$as_save_IFS
6363   test -z "$as_dir" && as_dir=.
6364     for ac_exec_ext in '' $ac_executable_extensions; do
6365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6366     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6368     break 2
6369   fi
6370 done
6371   done
6372 IFS=$as_save_IFS
6373 
6374   ;;
6375 esac
6376 fi
6377 DATE=$ac_cv_path_DATE
6378 if test -n "$DATE"; then
6379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6380 $as_echo "$DATE" >&6; }
6381 else
6382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383 $as_echo "no" >&6; }
6384 fi
6385 
6386 
6387   test -n "$DATE" && break
6388 done
6389 
6390   else
6391     # The variable is set, but is it from the command line or the environment?
6392 
6393     # Try to remove the string !DATE! from our list.
6394     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6395     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6396       # If it failed, the variable was not from the command line. Ignore it,
6397       # but warn the user (except for BASH, which is always set by the calling BASH).
6398       if test "xDATE" != xBASH; then
6399         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6400 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6401       fi
6402       # Try to locate tool using the code snippet
6403       for ac_prog in date
6404 do
6405   # Extract the first word of "$ac_prog", so it can be a program name with args.
6406 set dummy $ac_prog; ac_word=$2
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408 $as_echo_n "checking for $ac_word... " >&6; }
6409 if ${ac_cv_path_DATE+:} false; then :
6410   $as_echo_n "(cached) " >&6
6411 else
6412   case $DATE in
6413   [\\/]* | ?:[\\/]*)
6414   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6415   ;;
6416   *)
6417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418 for as_dir in $PATH
6419 do
6420   IFS=$as_save_IFS
6421   test -z "$as_dir" && as_dir=.
6422     for ac_exec_ext in '' $ac_executable_extensions; do
6423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426     break 2
6427   fi
6428 done
6429   done
6430 IFS=$as_save_IFS
6431 
6432   ;;
6433 esac
6434 fi
6435 DATE=$ac_cv_path_DATE
6436 if test -n "$DATE"; then
6437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6438 $as_echo "$DATE" >&6; }
6439 else
6440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441 $as_echo "no" >&6; }
6442 fi
6443 
6444 
6445   test -n "$DATE" && break
6446 done
6447 
6448     else
6449       # If it succeeded, then it was overridden by the user. We will use it
6450       # for the tool.
6451 
6452       # First remove it from the list of overridden variables, so we can test
6453       # for unknown variables in the end.
6454       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6455 
6456       # Check if we try to supply an empty value
6457       if test "x$DATE" = x; then
6458         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6459 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6461 $as_echo_n "checking for DATE... " >&6; }
6462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6463 $as_echo "disabled" >&6; }
6464       else
6465         # Check if the provided tool contains a complete path.
6466         tool_specified="$DATE"
6467         tool_basename="${tool_specified##*/}"
6468         if test "x$tool_basename" = "x$tool_specified"; then
6469           # A command without a complete path is provided, search $PATH.
6470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6471 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6472           # Extract the first word of "$tool_basename", so it can be a program name with args.
6473 set dummy $tool_basename; ac_word=$2
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475 $as_echo_n "checking for $ac_word... " >&6; }
6476 if ${ac_cv_path_DATE+:} false; then :
6477   $as_echo_n "(cached) " >&6
6478 else
6479   case $DATE in
6480   [\\/]* | ?:[\\/]*)
6481   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6482   ;;
6483   *)
6484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485 for as_dir in $PATH
6486 do
6487   IFS=$as_save_IFS
6488   test -z "$as_dir" && as_dir=.
6489     for ac_exec_ext in '' $ac_executable_extensions; do
6490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493     break 2
6494   fi
6495 done
6496   done
6497 IFS=$as_save_IFS
6498 
6499   ;;
6500 esac
6501 fi
6502 DATE=$ac_cv_path_DATE
6503 if test -n "$DATE"; then
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6505 $as_echo "$DATE" >&6; }
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6509 fi
6510 
6511 
6512           if test "x$DATE" = x; then
6513             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6514           fi
6515         else
6516           # Otherwise we believe it is a complete path. Use it as it is.
6517           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6518 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6519           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6520 $as_echo_n "checking for DATE... " >&6; }
6521           if test ! -x "$tool_specified"; then
6522             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6523 $as_echo "not found" >&6; }
6524             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6525           fi
6526           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6527 $as_echo "$tool_specified" >&6; }
6528         fi
6529       fi
6530     fi
6531 
6532   fi
6533 
6534 
6535 
6536   if test "x$DATE" = x; then
6537     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6538   fi
6539 
6540 
6541 
6542 
6543 
6544   # Publish this variable in the help.
6545 
6546 
6547   if [ -z "${DIFF+x}" ]; then
6548     # The variable is not set by user, try to locate tool using the code snippet
6549     for ac_prog in gdiff diff
6550 do
6551   # Extract the first word of "$ac_prog", so it can be a program name with args.
6552 set dummy $ac_prog; ac_word=$2
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554 $as_echo_n "checking for $ac_word... " >&6; }
6555 if ${ac_cv_path_DIFF+:} false; then :
6556   $as_echo_n "(cached) " >&6
6557 else
6558   case $DIFF in
6559   [\\/]* | ?:[\\/]*)
6560   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6561   ;;
6562   *)
6563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564 for as_dir in $PATH
6565 do
6566   IFS=$as_save_IFS
6567   test -z "$as_dir" && as_dir=.
6568     for ac_exec_ext in '' $ac_executable_extensions; do
6569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6570     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572     break 2
6573   fi
6574 done
6575   done
6576 IFS=$as_save_IFS
6577 
6578   ;;
6579 esac
6580 fi
6581 DIFF=$ac_cv_path_DIFF
6582 if test -n "$DIFF"; then
6583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6584 $as_echo "$DIFF" >&6; }
6585 else
6586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587 $as_echo "no" >&6; }
6588 fi
6589 
6590 
6591   test -n "$DIFF" && break
6592 done
6593 
6594   else
6595     # The variable is set, but is it from the command line or the environment?
6596 
6597     # Try to remove the string !DIFF! from our list.
6598     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6599     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6600       # If it failed, the variable was not from the command line. Ignore it,
6601       # but warn the user (except for BASH, which is always set by the calling BASH).
6602       if test "xDIFF" != xBASH; then
6603         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6604 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6605       fi
6606       # Try to locate tool using the code snippet
6607       for ac_prog in gdiff diff
6608 do
6609   # Extract the first word of "$ac_prog", so it can be a program name with args.
6610 set dummy $ac_prog; ac_word=$2
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612 $as_echo_n "checking for $ac_word... " >&6; }
6613 if ${ac_cv_path_DIFF+:} false; then :
6614   $as_echo_n "(cached) " >&6
6615 else
6616   case $DIFF in
6617   [\\/]* | ?:[\\/]*)
6618   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6619   ;;
6620   *)
6621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622 for as_dir in $PATH
6623 do
6624   IFS=$as_save_IFS
6625   test -z "$as_dir" && as_dir=.
6626     for ac_exec_ext in '' $ac_executable_extensions; do
6627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630     break 2
6631   fi
6632 done
6633   done
6634 IFS=$as_save_IFS
6635 
6636   ;;
6637 esac
6638 fi
6639 DIFF=$ac_cv_path_DIFF
6640 if test -n "$DIFF"; then
6641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6642 $as_echo "$DIFF" >&6; }
6643 else
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645 $as_echo "no" >&6; }
6646 fi
6647 
6648 
6649   test -n "$DIFF" && break
6650 done
6651 
6652     else
6653       # If it succeeded, then it was overridden by the user. We will use it
6654       # for the tool.
6655 
6656       # First remove it from the list of overridden variables, so we can test
6657       # for unknown variables in the end.
6658       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6659 
6660       # Check if we try to supply an empty value
6661       if test "x$DIFF" = x; then
6662         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6663 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6665 $as_echo_n "checking for DIFF... " >&6; }
6666         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6667 $as_echo "disabled" >&6; }
6668       else
6669         # Check if the provided tool contains a complete path.
6670         tool_specified="$DIFF"
6671         tool_basename="${tool_specified##*/}"
6672         if test "x$tool_basename" = "x$tool_specified"; then
6673           # A command without a complete path is provided, search $PATH.
6674           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6675 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6676           # Extract the first word of "$tool_basename", so it can be a program name with args.
6677 set dummy $tool_basename; ac_word=$2
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679 $as_echo_n "checking for $ac_word... " >&6; }
6680 if ${ac_cv_path_DIFF+:} false; then :
6681   $as_echo_n "(cached) " >&6
6682 else
6683   case $DIFF in
6684   [\\/]* | ?:[\\/]*)
6685   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6686   ;;
6687   *)
6688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6689 for as_dir in $PATH
6690 do
6691   IFS=$as_save_IFS
6692   test -z "$as_dir" && as_dir=.
6693     for ac_exec_ext in '' $ac_executable_extensions; do
6694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6695     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6697     break 2
6698   fi
6699 done
6700   done
6701 IFS=$as_save_IFS
6702 
6703   ;;
6704 esac
6705 fi
6706 DIFF=$ac_cv_path_DIFF
6707 if test -n "$DIFF"; then
6708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6709 $as_echo "$DIFF" >&6; }
6710 else
6711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6712 $as_echo "no" >&6; }
6713 fi
6714 
6715 
6716           if test "x$DIFF" = x; then
6717             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6718           fi
6719         else
6720           # Otherwise we believe it is a complete path. Use it as it is.
6721           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6722 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6723           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6724 $as_echo_n "checking for DIFF... " >&6; }
6725           if test ! -x "$tool_specified"; then
6726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6727 $as_echo "not found" >&6; }
6728             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6729           fi
6730           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6731 $as_echo "$tool_specified" >&6; }
6732         fi
6733       fi
6734     fi
6735 
6736   fi
6737 
6738 
6739 
6740   if test "x$DIFF" = x; then
6741     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6742   fi
6743 
6744 
6745 
6746 
6747 
6748   # Publish this variable in the help.
6749 
6750 
6751   if [ -z "${DIRNAME+x}" ]; then
6752     # The variable is not set by user, try to locate tool using the code snippet
6753     for ac_prog in dirname
6754 do
6755   # Extract the first word of "$ac_prog", so it can be a program name with args.
6756 set dummy $ac_prog; ac_word=$2
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6758 $as_echo_n "checking for $ac_word... " >&6; }
6759 if ${ac_cv_path_DIRNAME+:} false; then :
6760   $as_echo_n "(cached) " >&6
6761 else
6762   case $DIRNAME in
6763   [\\/]* | ?:[\\/]*)
6764   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6765   ;;
6766   *)
6767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6768 for as_dir in $PATH
6769 do
6770   IFS=$as_save_IFS
6771   test -z "$as_dir" && as_dir=.
6772     for ac_exec_ext in '' $ac_executable_extensions; do
6773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6774     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6776     break 2
6777   fi
6778 done
6779   done
6780 IFS=$as_save_IFS
6781 
6782   ;;
6783 esac
6784 fi
6785 DIRNAME=$ac_cv_path_DIRNAME
6786 if test -n "$DIRNAME"; then
6787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6788 $as_echo "$DIRNAME" >&6; }
6789 else
6790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6791 $as_echo "no" >&6; }
6792 fi
6793 
6794 
6795   test -n "$DIRNAME" && break
6796 done
6797 
6798   else
6799     # The variable is set, but is it from the command line or the environment?
6800 
6801     # Try to remove the string !DIRNAME! from our list.
6802     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6803     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6804       # If it failed, the variable was not from the command line. Ignore it,
6805       # but warn the user (except for BASH, which is always set by the calling BASH).
6806       if test "xDIRNAME" != xBASH; then
6807         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6808 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6809       fi
6810       # Try to locate tool using the code snippet
6811       for ac_prog in dirname
6812 do
6813   # Extract the first word of "$ac_prog", so it can be a program name with args.
6814 set dummy $ac_prog; ac_word=$2
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816 $as_echo_n "checking for $ac_word... " >&6; }
6817 if ${ac_cv_path_DIRNAME+:} false; then :
6818   $as_echo_n "(cached) " >&6
6819 else
6820   case $DIRNAME in
6821   [\\/]* | ?:[\\/]*)
6822   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6823   ;;
6824   *)
6825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826 for as_dir in $PATH
6827 do
6828   IFS=$as_save_IFS
6829   test -z "$as_dir" && as_dir=.
6830     for ac_exec_ext in '' $ac_executable_extensions; do
6831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834     break 2
6835   fi
6836 done
6837   done
6838 IFS=$as_save_IFS
6839 
6840   ;;
6841 esac
6842 fi
6843 DIRNAME=$ac_cv_path_DIRNAME
6844 if test -n "$DIRNAME"; then
6845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6846 $as_echo "$DIRNAME" >&6; }
6847 else
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6850 fi
6851 
6852 
6853   test -n "$DIRNAME" && break
6854 done
6855 
6856     else
6857       # If it succeeded, then it was overridden by the user. We will use it
6858       # for the tool.
6859 
6860       # First remove it from the list of overridden variables, so we can test
6861       # for unknown variables in the end.
6862       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6863 
6864       # Check if we try to supply an empty value
6865       if test "x$DIRNAME" = x; then
6866         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6867 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6868         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6869 $as_echo_n "checking for DIRNAME... " >&6; }
6870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6871 $as_echo "disabled" >&6; }
6872       else
6873         # Check if the provided tool contains a complete path.
6874         tool_specified="$DIRNAME"
6875         tool_basename="${tool_specified##*/}"
6876         if test "x$tool_basename" = "x$tool_specified"; then
6877           # A command without a complete path is provided, search $PATH.
6878           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6879 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6880           # Extract the first word of "$tool_basename", so it can be a program name with args.
6881 set dummy $tool_basename; ac_word=$2
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6883 $as_echo_n "checking for $ac_word... " >&6; }
6884 if ${ac_cv_path_DIRNAME+:} false; then :
6885   $as_echo_n "(cached) " >&6
6886 else
6887   case $DIRNAME in
6888   [\\/]* | ?:[\\/]*)
6889   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6890   ;;
6891   *)
6892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893 for as_dir in $PATH
6894 do
6895   IFS=$as_save_IFS
6896   test -z "$as_dir" && as_dir=.
6897     for ac_exec_ext in '' $ac_executable_extensions; do
6898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6899     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6901     break 2
6902   fi
6903 done
6904   done
6905 IFS=$as_save_IFS
6906 
6907   ;;
6908 esac
6909 fi
6910 DIRNAME=$ac_cv_path_DIRNAME
6911 if test -n "$DIRNAME"; then
6912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6913 $as_echo "$DIRNAME" >&6; }
6914 else
6915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6916 $as_echo "no" >&6; }
6917 fi
6918 
6919 
6920           if test "x$DIRNAME" = x; then
6921             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6922           fi
6923         else
6924           # Otherwise we believe it is a complete path. Use it as it is.
6925           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6926 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6927           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6928 $as_echo_n "checking for DIRNAME... " >&6; }
6929           if test ! -x "$tool_specified"; then
6930             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6931 $as_echo "not found" >&6; }
6932             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6933           fi
6934           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6935 $as_echo "$tool_specified" >&6; }
6936         fi
6937       fi
6938     fi
6939 
6940   fi
6941 
6942 
6943 
6944   if test "x$DIRNAME" = x; then
6945     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6946   fi
6947 
6948 
6949 
6950 
6951 
6952   # Publish this variable in the help.
6953 
6954 
6955   if [ -z "${ECHO+x}" ]; then
6956     # The variable is not set by user, try to locate tool using the code snippet
6957     for ac_prog in echo
6958 do
6959   # Extract the first word of "$ac_prog", so it can be a program name with args.
6960 set dummy $ac_prog; ac_word=$2
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6962 $as_echo_n "checking for $ac_word... " >&6; }
6963 if ${ac_cv_path_ECHO+:} false; then :
6964   $as_echo_n "(cached) " >&6
6965 else
6966   case $ECHO in
6967   [\\/]* | ?:[\\/]*)
6968   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6969   ;;
6970   *)
6971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6972 for as_dir in $PATH
6973 do
6974   IFS=$as_save_IFS
6975   test -z "$as_dir" && as_dir=.
6976     for ac_exec_ext in '' $ac_executable_extensions; do
6977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6978     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6980     break 2
6981   fi
6982 done
6983   done
6984 IFS=$as_save_IFS
6985 
6986   ;;
6987 esac
6988 fi
6989 ECHO=$ac_cv_path_ECHO
6990 if test -n "$ECHO"; then
6991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6992 $as_echo "$ECHO" >&6; }
6993 else
6994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6995 $as_echo "no" >&6; }
6996 fi
6997 
6998 
6999   test -n "$ECHO" && break
7000 done
7001 
7002   else
7003     # The variable is set, but is it from the command line or the environment?
7004 
7005     # Try to remove the string !ECHO! from our list.
7006     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7007     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7008       # If it failed, the variable was not from the command line. Ignore it,
7009       # but warn the user (except for BASH, which is always set by the calling BASH).
7010       if test "xECHO" != xBASH; then
7011         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7012 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7013       fi
7014       # Try to locate tool using the code snippet
7015       for ac_prog in echo
7016 do
7017   # Extract the first word of "$ac_prog", so it can be a program name with args.
7018 set dummy $ac_prog; ac_word=$2
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7020 $as_echo_n "checking for $ac_word... " >&6; }
7021 if ${ac_cv_path_ECHO+:} false; then :
7022   $as_echo_n "(cached) " >&6
7023 else
7024   case $ECHO in
7025   [\\/]* | ?:[\\/]*)
7026   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7027   ;;
7028   *)
7029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7030 for as_dir in $PATH
7031 do
7032   IFS=$as_save_IFS
7033   test -z "$as_dir" && as_dir=.
7034     for ac_exec_ext in '' $ac_executable_extensions; do
7035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038     break 2
7039   fi
7040 done
7041   done
7042 IFS=$as_save_IFS
7043 
7044   ;;
7045 esac
7046 fi
7047 ECHO=$ac_cv_path_ECHO
7048 if test -n "$ECHO"; then
7049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7050 $as_echo "$ECHO" >&6; }
7051 else
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053 $as_echo "no" >&6; }
7054 fi
7055 
7056 
7057   test -n "$ECHO" && break
7058 done
7059 
7060     else
7061       # If it succeeded, then it was overridden by the user. We will use it
7062       # for the tool.
7063 
7064       # First remove it from the list of overridden variables, so we can test
7065       # for unknown variables in the end.
7066       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7067 
7068       # Check if we try to supply an empty value
7069       if test "x$ECHO" = x; then
7070         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7071 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7073 $as_echo_n "checking for ECHO... " >&6; }
7074         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7075 $as_echo "disabled" >&6; }
7076       else
7077         # Check if the provided tool contains a complete path.
7078         tool_specified="$ECHO"
7079         tool_basename="${tool_specified##*/}"
7080         if test "x$tool_basename" = "x$tool_specified"; then
7081           # A command without a complete path is provided, search $PATH.
7082           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7083 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7084           # Extract the first word of "$tool_basename", so it can be a program name with args.
7085 set dummy $tool_basename; ac_word=$2
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7087 $as_echo_n "checking for $ac_word... " >&6; }
7088 if ${ac_cv_path_ECHO+:} false; then :
7089   $as_echo_n "(cached) " >&6
7090 else
7091   case $ECHO in
7092   [\\/]* | ?:[\\/]*)
7093   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7094   ;;
7095   *)
7096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7097 for as_dir in $PATH
7098 do
7099   IFS=$as_save_IFS
7100   test -z "$as_dir" && as_dir=.
7101     for ac_exec_ext in '' $ac_executable_extensions; do
7102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7103     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7105     break 2
7106   fi
7107 done
7108   done
7109 IFS=$as_save_IFS
7110 
7111   ;;
7112 esac
7113 fi
7114 ECHO=$ac_cv_path_ECHO
7115 if test -n "$ECHO"; then
7116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7117 $as_echo "$ECHO" >&6; }
7118 else
7119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7120 $as_echo "no" >&6; }
7121 fi
7122 
7123 
7124           if test "x$ECHO" = x; then
7125             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7126           fi
7127         else
7128           # Otherwise we believe it is a complete path. Use it as it is.
7129           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7130 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7131           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7132 $as_echo_n "checking for ECHO... " >&6; }
7133           if test ! -x "$tool_specified"; then
7134             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7135 $as_echo "not found" >&6; }
7136             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7137           fi
7138           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7139 $as_echo "$tool_specified" >&6; }
7140         fi
7141       fi
7142     fi
7143 
7144   fi
7145 
7146 
7147 
7148   if test "x$ECHO" = x; then
7149     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7150   fi
7151 
7152 
7153 
7154 
7155 
7156   # Publish this variable in the help.
7157 
7158 
7159   if [ -z "${EXPR+x}" ]; then
7160     # The variable is not set by user, try to locate tool using the code snippet
7161     for ac_prog in expr
7162 do
7163   # Extract the first word of "$ac_prog", so it can be a program name with args.
7164 set dummy $ac_prog; ac_word=$2
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7166 $as_echo_n "checking for $ac_word... " >&6; }
7167 if ${ac_cv_path_EXPR+:} false; then :
7168   $as_echo_n "(cached) " >&6
7169 else
7170   case $EXPR in
7171   [\\/]* | ?:[\\/]*)
7172   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7173   ;;
7174   *)
7175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7176 for as_dir in $PATH
7177 do
7178   IFS=$as_save_IFS
7179   test -z "$as_dir" && as_dir=.
7180     for ac_exec_ext in '' $ac_executable_extensions; do
7181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7182     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7184     break 2
7185   fi
7186 done
7187   done
7188 IFS=$as_save_IFS
7189 
7190   ;;
7191 esac
7192 fi
7193 EXPR=$ac_cv_path_EXPR
7194 if test -n "$EXPR"; then
7195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7196 $as_echo "$EXPR" >&6; }
7197 else
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7199 $as_echo "no" >&6; }
7200 fi
7201 
7202 
7203   test -n "$EXPR" && break
7204 done
7205 
7206   else
7207     # The variable is set, but is it from the command line or the environment?
7208 
7209     # Try to remove the string !EXPR! from our list.
7210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7212       # If it failed, the variable was not from the command line. Ignore it,
7213       # but warn the user (except for BASH, which is always set by the calling BASH).
7214       if test "xEXPR" != xBASH; then
7215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7216 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7217       fi
7218       # Try to locate tool using the code snippet
7219       for ac_prog in expr
7220 do
7221   # Extract the first word of "$ac_prog", so it can be a program name with args.
7222 set dummy $ac_prog; ac_word=$2
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7224 $as_echo_n "checking for $ac_word... " >&6; }
7225 if ${ac_cv_path_EXPR+:} false; then :
7226   $as_echo_n "(cached) " >&6
7227 else
7228   case $EXPR in
7229   [\\/]* | ?:[\\/]*)
7230   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7231   ;;
7232   *)
7233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7234 for as_dir in $PATH
7235 do
7236   IFS=$as_save_IFS
7237   test -z "$as_dir" && as_dir=.
7238     for ac_exec_ext in '' $ac_executable_extensions; do
7239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7240     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7242     break 2
7243   fi
7244 done
7245   done
7246 IFS=$as_save_IFS
7247 
7248   ;;
7249 esac
7250 fi
7251 EXPR=$ac_cv_path_EXPR
7252 if test -n "$EXPR"; then
7253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7254 $as_echo "$EXPR" >&6; }
7255 else
7256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257 $as_echo "no" >&6; }
7258 fi
7259 
7260 
7261   test -n "$EXPR" && break
7262 done
7263 
7264     else
7265       # If it succeeded, then it was overridden by the user. We will use it
7266       # for the tool.
7267 
7268       # First remove it from the list of overridden variables, so we can test
7269       # for unknown variables in the end.
7270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7271 
7272       # Check if we try to supply an empty value
7273       if test "x$EXPR" = x; then
7274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7275 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7277 $as_echo_n "checking for EXPR... " >&6; }
7278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7279 $as_echo "disabled" >&6; }
7280       else
7281         # Check if the provided tool contains a complete path.
7282         tool_specified="$EXPR"
7283         tool_basename="${tool_specified##*/}"
7284         if test "x$tool_basename" = "x$tool_specified"; then
7285           # A command without a complete path is provided, search $PATH.
7286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7287 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7288           # Extract the first word of "$tool_basename", so it can be a program name with args.
7289 set dummy $tool_basename; ac_word=$2
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291 $as_echo_n "checking for $ac_word... " >&6; }
7292 if ${ac_cv_path_EXPR+:} false; then :
7293   $as_echo_n "(cached) " >&6
7294 else
7295   case $EXPR in
7296   [\\/]* | ?:[\\/]*)
7297   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7298   ;;
7299   *)
7300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7301 for as_dir in $PATH
7302 do
7303   IFS=$as_save_IFS
7304   test -z "$as_dir" && as_dir=.
7305     for ac_exec_ext in '' $ac_executable_extensions; do
7306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7307     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7309     break 2
7310   fi
7311 done
7312   done
7313 IFS=$as_save_IFS
7314 
7315   ;;
7316 esac
7317 fi
7318 EXPR=$ac_cv_path_EXPR
7319 if test -n "$EXPR"; then
7320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7321 $as_echo "$EXPR" >&6; }
7322 else
7323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7324 $as_echo "no" >&6; }
7325 fi
7326 
7327 
7328           if test "x$EXPR" = x; then
7329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7330           fi
7331         else
7332           # Otherwise we believe it is a complete path. Use it as it is.
7333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7334 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7336 $as_echo_n "checking for EXPR... " >&6; }
7337           if test ! -x "$tool_specified"; then
7338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7339 $as_echo "not found" >&6; }
7340             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7341           fi
7342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7343 $as_echo "$tool_specified" >&6; }
7344         fi
7345       fi
7346     fi
7347 
7348   fi
7349 
7350 
7351 
7352   if test "x$EXPR" = x; then
7353     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7354   fi
7355 
7356 
7357 
7358 
7359 
7360   # Publish this variable in the help.
7361 
7362 
7363   if [ -z "${FILE+x}" ]; then
7364     # The variable is not set by user, try to locate tool using the code snippet
7365     for ac_prog in file
7366 do
7367   # Extract the first word of "$ac_prog", so it can be a program name with args.
7368 set dummy $ac_prog; ac_word=$2
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7370 $as_echo_n "checking for $ac_word... " >&6; }
7371 if ${ac_cv_path_FILE+:} false; then :
7372   $as_echo_n "(cached) " >&6
7373 else
7374   case $FILE in
7375   [\\/]* | ?:[\\/]*)
7376   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7377   ;;
7378   *)
7379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380 for as_dir in $PATH
7381 do
7382   IFS=$as_save_IFS
7383   test -z "$as_dir" && as_dir=.
7384     for ac_exec_ext in '' $ac_executable_extensions; do
7385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7386     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7388     break 2
7389   fi
7390 done
7391   done
7392 IFS=$as_save_IFS
7393 
7394   ;;
7395 esac
7396 fi
7397 FILE=$ac_cv_path_FILE
7398 if test -n "$FILE"; then
7399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7400 $as_echo "$FILE" >&6; }
7401 else
7402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403 $as_echo "no" >&6; }
7404 fi
7405 
7406 
7407   test -n "$FILE" && break
7408 done
7409 
7410   else
7411     # The variable is set, but is it from the command line or the environment?
7412 
7413     # Try to remove the string !FILE! from our list.
7414     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7415     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7416       # If it failed, the variable was not from the command line. Ignore it,
7417       # but warn the user (except for BASH, which is always set by the calling BASH).
7418       if test "xFILE" != xBASH; then
7419         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7420 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7421       fi
7422       # Try to locate tool using the code snippet
7423       for ac_prog in file
7424 do
7425   # Extract the first word of "$ac_prog", so it can be a program name with args.
7426 set dummy $ac_prog; ac_word=$2
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428 $as_echo_n "checking for $ac_word... " >&6; }
7429 if ${ac_cv_path_FILE+:} false; then :
7430   $as_echo_n "(cached) " >&6
7431 else
7432   case $FILE in
7433   [\\/]* | ?:[\\/]*)
7434   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7435   ;;
7436   *)
7437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438 for as_dir in $PATH
7439 do
7440   IFS=$as_save_IFS
7441   test -z "$as_dir" && as_dir=.
7442     for ac_exec_ext in '' $ac_executable_extensions; do
7443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7444     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7446     break 2
7447   fi
7448 done
7449   done
7450 IFS=$as_save_IFS
7451 
7452   ;;
7453 esac
7454 fi
7455 FILE=$ac_cv_path_FILE
7456 if test -n "$FILE"; then
7457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7458 $as_echo "$FILE" >&6; }
7459 else
7460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7461 $as_echo "no" >&6; }
7462 fi
7463 
7464 
7465   test -n "$FILE" && break
7466 done
7467 
7468     else
7469       # If it succeeded, then it was overridden by the user. We will use it
7470       # for the tool.
7471 
7472       # First remove it from the list of overridden variables, so we can test
7473       # for unknown variables in the end.
7474       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7475 
7476       # Check if we try to supply an empty value
7477       if test "x$FILE" = x; then
7478         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7479 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7481 $as_echo_n "checking for FILE... " >&6; }
7482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7483 $as_echo "disabled" >&6; }
7484       else
7485         # Check if the provided tool contains a complete path.
7486         tool_specified="$FILE"
7487         tool_basename="${tool_specified##*/}"
7488         if test "x$tool_basename" = "x$tool_specified"; then
7489           # A command without a complete path is provided, search $PATH.
7490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7491 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7492           # Extract the first word of "$tool_basename", so it can be a program name with args.
7493 set dummy $tool_basename; ac_word=$2
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7495 $as_echo_n "checking for $ac_word... " >&6; }
7496 if ${ac_cv_path_FILE+:} false; then :
7497   $as_echo_n "(cached) " >&6
7498 else
7499   case $FILE in
7500   [\\/]* | ?:[\\/]*)
7501   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7502   ;;
7503   *)
7504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7505 for as_dir in $PATH
7506 do
7507   IFS=$as_save_IFS
7508   test -z "$as_dir" && as_dir=.
7509     for ac_exec_ext in '' $ac_executable_extensions; do
7510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7511     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7513     break 2
7514   fi
7515 done
7516   done
7517 IFS=$as_save_IFS
7518 
7519   ;;
7520 esac
7521 fi
7522 FILE=$ac_cv_path_FILE
7523 if test -n "$FILE"; then
7524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7525 $as_echo "$FILE" >&6; }
7526 else
7527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7528 $as_echo "no" >&6; }
7529 fi
7530 
7531 
7532           if test "x$FILE" = x; then
7533             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7534           fi
7535         else
7536           # Otherwise we believe it is a complete path. Use it as it is.
7537           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7538 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7539           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7540 $as_echo_n "checking for FILE... " >&6; }
7541           if test ! -x "$tool_specified"; then
7542             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7543 $as_echo "not found" >&6; }
7544             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7545           fi
7546           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7547 $as_echo "$tool_specified" >&6; }
7548         fi
7549       fi
7550     fi
7551 
7552   fi
7553 
7554 
7555 
7556   if test "x$FILE" = x; then
7557     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7558   fi
7559 
7560 
7561 
7562 
7563 
7564   # Publish this variable in the help.
7565 
7566 
7567   if [ -z "${FIND+x}" ]; then
7568     # The variable is not set by user, try to locate tool using the code snippet
7569     for ac_prog in find
7570 do
7571   # Extract the first word of "$ac_prog", so it can be a program name with args.
7572 set dummy $ac_prog; ac_word=$2
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7574 $as_echo_n "checking for $ac_word... " >&6; }
7575 if ${ac_cv_path_FIND+:} false; then :
7576   $as_echo_n "(cached) " >&6
7577 else
7578   case $FIND in
7579   [\\/]* | ?:[\\/]*)
7580   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7581   ;;
7582   *)
7583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7584 for as_dir in $PATH
7585 do
7586   IFS=$as_save_IFS
7587   test -z "$as_dir" && as_dir=.
7588     for ac_exec_ext in '' $ac_executable_extensions; do
7589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7590     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7592     break 2
7593   fi
7594 done
7595   done
7596 IFS=$as_save_IFS
7597 
7598   ;;
7599 esac
7600 fi
7601 FIND=$ac_cv_path_FIND
7602 if test -n "$FIND"; then
7603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7604 $as_echo "$FIND" >&6; }
7605 else
7606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7607 $as_echo "no" >&6; }
7608 fi
7609 
7610 
7611   test -n "$FIND" && break
7612 done
7613 
7614   else
7615     # The variable is set, but is it from the command line or the environment?
7616 
7617     # Try to remove the string !FIND! from our list.
7618     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7619     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7620       # If it failed, the variable was not from the command line. Ignore it,
7621       # but warn the user (except for BASH, which is always set by the calling BASH).
7622       if test "xFIND" != xBASH; then
7623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7624 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7625       fi
7626       # Try to locate tool using the code snippet
7627       for ac_prog in find
7628 do
7629   # Extract the first word of "$ac_prog", so it can be a program name with args.
7630 set dummy $ac_prog; ac_word=$2
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632 $as_echo_n "checking for $ac_word... " >&6; }
7633 if ${ac_cv_path_FIND+:} false; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636   case $FIND in
7637   [\\/]* | ?:[\\/]*)
7638   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7639   ;;
7640   *)
7641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644   IFS=$as_save_IFS
7645   test -z "$as_dir" && as_dir=.
7646     for ac_exec_ext in '' $ac_executable_extensions; do
7647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650     break 2
7651   fi
7652 done
7653   done
7654 IFS=$as_save_IFS
7655 
7656   ;;
7657 esac
7658 fi
7659 FIND=$ac_cv_path_FIND
7660 if test -n "$FIND"; then
7661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7662 $as_echo "$FIND" >&6; }
7663 else
7664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666 fi
7667 
7668 
7669   test -n "$FIND" && break
7670 done
7671 
7672     else
7673       # If it succeeded, then it was overridden by the user. We will use it
7674       # for the tool.
7675 
7676       # First remove it from the list of overridden variables, so we can test
7677       # for unknown variables in the end.
7678       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7679 
7680       # Check if we try to supply an empty value
7681       if test "x$FIND" = x; then
7682         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7683 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7685 $as_echo_n "checking for FIND... " >&6; }
7686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7687 $as_echo "disabled" >&6; }
7688       else
7689         # Check if the provided tool contains a complete path.
7690         tool_specified="$FIND"
7691         tool_basename="${tool_specified##*/}"
7692         if test "x$tool_basename" = "x$tool_specified"; then
7693           # A command without a complete path is provided, search $PATH.
7694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7695 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7696           # Extract the first word of "$tool_basename", so it can be a program name with args.
7697 set dummy $tool_basename; ac_word=$2
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7699 $as_echo_n "checking for $ac_word... " >&6; }
7700 if ${ac_cv_path_FIND+:} false; then :
7701   $as_echo_n "(cached) " >&6
7702 else
7703   case $FIND in
7704   [\\/]* | ?:[\\/]*)
7705   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7706   ;;
7707   *)
7708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7709 for as_dir in $PATH
7710 do
7711   IFS=$as_save_IFS
7712   test -z "$as_dir" && as_dir=.
7713     for ac_exec_ext in '' $ac_executable_extensions; do
7714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7715     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7717     break 2
7718   fi
7719 done
7720   done
7721 IFS=$as_save_IFS
7722 
7723   ;;
7724 esac
7725 fi
7726 FIND=$ac_cv_path_FIND
7727 if test -n "$FIND"; then
7728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7729 $as_echo "$FIND" >&6; }
7730 else
7731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7732 $as_echo "no" >&6; }
7733 fi
7734 
7735 
7736           if test "x$FIND" = x; then
7737             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7738           fi
7739         else
7740           # Otherwise we believe it is a complete path. Use it as it is.
7741           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7742 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7743           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7744 $as_echo_n "checking for FIND... " >&6; }
7745           if test ! -x "$tool_specified"; then
7746             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7747 $as_echo "not found" >&6; }
7748             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7749           fi
7750           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7751 $as_echo "$tool_specified" >&6; }
7752         fi
7753       fi
7754     fi
7755 
7756   fi
7757 
7758 
7759 
7760   if test "x$FIND" = x; then
7761     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7762   fi
7763 
7764 
7765 
7766 
7767 
7768   # Publish this variable in the help.
7769 
7770 
7771   if [ -z "${HEAD+x}" ]; then
7772     # The variable is not set by user, try to locate tool using the code snippet
7773     for ac_prog in head
7774 do
7775   # Extract the first word of "$ac_prog", so it can be a program name with args.
7776 set dummy $ac_prog; ac_word=$2
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7778 $as_echo_n "checking for $ac_word... " >&6; }
7779 if ${ac_cv_path_HEAD+:} false; then :
7780   $as_echo_n "(cached) " >&6
7781 else
7782   case $HEAD in
7783   [\\/]* | ?:[\\/]*)
7784   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7785   ;;
7786   *)
7787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7788 for as_dir in $PATH
7789 do
7790   IFS=$as_save_IFS
7791   test -z "$as_dir" && as_dir=.
7792     for ac_exec_ext in '' $ac_executable_extensions; do
7793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7794     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7796     break 2
7797   fi
7798 done
7799   done
7800 IFS=$as_save_IFS
7801 
7802   ;;
7803 esac
7804 fi
7805 HEAD=$ac_cv_path_HEAD
7806 if test -n "$HEAD"; then
7807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7808 $as_echo "$HEAD" >&6; }
7809 else
7810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7811 $as_echo "no" >&6; }
7812 fi
7813 
7814 
7815   test -n "$HEAD" && break
7816 done
7817 
7818   else
7819     # The variable is set, but is it from the command line or the environment?
7820 
7821     # Try to remove the string !HEAD! from our list.
7822     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7823     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7824       # If it failed, the variable was not from the command line. Ignore it,
7825       # but warn the user (except for BASH, which is always set by the calling BASH).
7826       if test "xHEAD" != xBASH; then
7827         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7828 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7829       fi
7830       # Try to locate tool using the code snippet
7831       for ac_prog in head
7832 do
7833   # Extract the first word of "$ac_prog", so it can be a program name with args.
7834 set dummy $ac_prog; ac_word=$2
7835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7836 $as_echo_n "checking for $ac_word... " >&6; }
7837 if ${ac_cv_path_HEAD+:} false; then :
7838   $as_echo_n "(cached) " >&6
7839 else
7840   case $HEAD in
7841   [\\/]* | ?:[\\/]*)
7842   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7843   ;;
7844   *)
7845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7846 for as_dir in $PATH
7847 do
7848   IFS=$as_save_IFS
7849   test -z "$as_dir" && as_dir=.
7850     for ac_exec_ext in '' $ac_executable_extensions; do
7851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7852     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7854     break 2
7855   fi
7856 done
7857   done
7858 IFS=$as_save_IFS
7859 
7860   ;;
7861 esac
7862 fi
7863 HEAD=$ac_cv_path_HEAD
7864 if test -n "$HEAD"; then
7865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7866 $as_echo "$HEAD" >&6; }
7867 else
7868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869 $as_echo "no" >&6; }
7870 fi
7871 
7872 
7873   test -n "$HEAD" && break
7874 done
7875 
7876     else
7877       # If it succeeded, then it was overridden by the user. We will use it
7878       # for the tool.
7879 
7880       # First remove it from the list of overridden variables, so we can test
7881       # for unknown variables in the end.
7882       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7883 
7884       # Check if we try to supply an empty value
7885       if test "x$HEAD" = x; then
7886         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7887 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7889 $as_echo_n "checking for HEAD... " >&6; }
7890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7891 $as_echo "disabled" >&6; }
7892       else
7893         # Check if the provided tool contains a complete path.
7894         tool_specified="$HEAD"
7895         tool_basename="${tool_specified##*/}"
7896         if test "x$tool_basename" = "x$tool_specified"; then
7897           # A command without a complete path is provided, search $PATH.
7898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7899 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7900           # Extract the first word of "$tool_basename", so it can be a program name with args.
7901 set dummy $tool_basename; ac_word=$2
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903 $as_echo_n "checking for $ac_word... " >&6; }
7904 if ${ac_cv_path_HEAD+:} false; then :
7905   $as_echo_n "(cached) " >&6
7906 else
7907   case $HEAD in
7908   [\\/]* | ?:[\\/]*)
7909   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7910   ;;
7911   *)
7912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913 for as_dir in $PATH
7914 do
7915   IFS=$as_save_IFS
7916   test -z "$as_dir" && as_dir=.
7917     for ac_exec_ext in '' $ac_executable_extensions; do
7918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7919     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7921     break 2
7922   fi
7923 done
7924   done
7925 IFS=$as_save_IFS
7926 
7927   ;;
7928 esac
7929 fi
7930 HEAD=$ac_cv_path_HEAD
7931 if test -n "$HEAD"; then
7932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7933 $as_echo "$HEAD" >&6; }
7934 else
7935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936 $as_echo "no" >&6; }
7937 fi
7938 
7939 
7940           if test "x$HEAD" = x; then
7941             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7942           fi
7943         else
7944           # Otherwise we believe it is a complete path. Use it as it is.
7945           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7946 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7947           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7948 $as_echo_n "checking for HEAD... " >&6; }
7949           if test ! -x "$tool_specified"; then
7950             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7951 $as_echo "not found" >&6; }
7952             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7953           fi
7954           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7955 $as_echo "$tool_specified" >&6; }
7956         fi
7957       fi
7958     fi
7959 
7960   fi
7961 
7962 
7963 
7964   if test "x$HEAD" = x; then
7965     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7966   fi
7967 
7968 
7969 
7970 
7971 
7972   # Publish this variable in the help.
7973 
7974 
7975   if [ -z "${LN+x}" ]; then
7976     # The variable is not set by user, try to locate tool using the code snippet
7977     for ac_prog in ln
7978 do
7979   # Extract the first word of "$ac_prog", so it can be a program name with args.
7980 set dummy $ac_prog; ac_word=$2
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7982 $as_echo_n "checking for $ac_word... " >&6; }
7983 if ${ac_cv_path_LN+:} false; then :
7984   $as_echo_n "(cached) " >&6
7985 else
7986   case $LN in
7987   [\\/]* | ?:[\\/]*)
7988   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7989   ;;
7990   *)
7991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7992 for as_dir in $PATH
7993 do
7994   IFS=$as_save_IFS
7995   test -z "$as_dir" && as_dir=.
7996     for ac_exec_ext in '' $ac_executable_extensions; do
7997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7998     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8000     break 2
8001   fi
8002 done
8003   done
8004 IFS=$as_save_IFS
8005 
8006   ;;
8007 esac
8008 fi
8009 LN=$ac_cv_path_LN
8010 if test -n "$LN"; then
8011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8012 $as_echo "$LN" >&6; }
8013 else
8014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8015 $as_echo "no" >&6; }
8016 fi
8017 
8018 
8019   test -n "$LN" && break
8020 done
8021 
8022   else
8023     # The variable is set, but is it from the command line or the environment?
8024 
8025     # Try to remove the string !LN! from our list.
8026     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8027     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8028       # If it failed, the variable was not from the command line. Ignore it,
8029       # but warn the user (except for BASH, which is always set by the calling BASH).
8030       if test "xLN" != xBASH; then
8031         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8032 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8033       fi
8034       # Try to locate tool using the code snippet
8035       for ac_prog in ln
8036 do
8037   # Extract the first word of "$ac_prog", so it can be a program name with args.
8038 set dummy $ac_prog; ac_word=$2
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8040 $as_echo_n "checking for $ac_word... " >&6; }
8041 if ${ac_cv_path_LN+:} false; then :
8042   $as_echo_n "(cached) " >&6
8043 else
8044   case $LN in
8045   [\\/]* | ?:[\\/]*)
8046   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8047   ;;
8048   *)
8049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8050 for as_dir in $PATH
8051 do
8052   IFS=$as_save_IFS
8053   test -z "$as_dir" && as_dir=.
8054     for ac_exec_ext in '' $ac_executable_extensions; do
8055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8056     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8058     break 2
8059   fi
8060 done
8061   done
8062 IFS=$as_save_IFS
8063 
8064   ;;
8065 esac
8066 fi
8067 LN=$ac_cv_path_LN
8068 if test -n "$LN"; then
8069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8070 $as_echo "$LN" >&6; }
8071 else
8072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8073 $as_echo "no" >&6; }
8074 fi
8075 
8076 
8077   test -n "$LN" && break
8078 done
8079 
8080     else
8081       # If it succeeded, then it was overridden by the user. We will use it
8082       # for the tool.
8083 
8084       # First remove it from the list of overridden variables, so we can test
8085       # for unknown variables in the end.
8086       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8087 
8088       # Check if we try to supply an empty value
8089       if test "x$LN" = x; then
8090         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8091 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8092         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8093 $as_echo_n "checking for LN... " >&6; }
8094         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8095 $as_echo "disabled" >&6; }
8096       else
8097         # Check if the provided tool contains a complete path.
8098         tool_specified="$LN"
8099         tool_basename="${tool_specified##*/}"
8100         if test "x$tool_basename" = "x$tool_specified"; then
8101           # A command without a complete path is provided, search $PATH.
8102           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8103 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8104           # Extract the first word of "$tool_basename", so it can be a program name with args.
8105 set dummy $tool_basename; ac_word=$2
8106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8107 $as_echo_n "checking for $ac_word... " >&6; }
8108 if ${ac_cv_path_LN+:} false; then :
8109   $as_echo_n "(cached) " >&6
8110 else
8111   case $LN in
8112   [\\/]* | ?:[\\/]*)
8113   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8114   ;;
8115   *)
8116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8117 for as_dir in $PATH
8118 do
8119   IFS=$as_save_IFS
8120   test -z "$as_dir" && as_dir=.
8121     for ac_exec_ext in '' $ac_executable_extensions; do
8122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8123     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8125     break 2
8126   fi
8127 done
8128   done
8129 IFS=$as_save_IFS
8130 
8131   ;;
8132 esac
8133 fi
8134 LN=$ac_cv_path_LN
8135 if test -n "$LN"; then
8136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8137 $as_echo "$LN" >&6; }
8138 else
8139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140 $as_echo "no" >&6; }
8141 fi
8142 
8143 
8144           if test "x$LN" = x; then
8145             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8146           fi
8147         else
8148           # Otherwise we believe it is a complete path. Use it as it is.
8149           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8150 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8151           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8152 $as_echo_n "checking for LN... " >&6; }
8153           if test ! -x "$tool_specified"; then
8154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8155 $as_echo "not found" >&6; }
8156             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8157           fi
8158           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8159 $as_echo "$tool_specified" >&6; }
8160         fi
8161       fi
8162     fi
8163 
8164   fi
8165 
8166 
8167 
8168   if test "x$LN" = x; then
8169     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8170   fi
8171 
8172 
8173 
8174 
8175 
8176   # Publish this variable in the help.
8177 
8178 
8179   if [ -z "${LS+x}" ]; then
8180     # The variable is not set by user, try to locate tool using the code snippet
8181     for ac_prog in ls
8182 do
8183   # Extract the first word of "$ac_prog", so it can be a program name with args.
8184 set dummy $ac_prog; ac_word=$2
8185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8186 $as_echo_n "checking for $ac_word... " >&6; }
8187 if ${ac_cv_path_LS+:} false; then :
8188   $as_echo_n "(cached) " >&6
8189 else
8190   case $LS in
8191   [\\/]* | ?:[\\/]*)
8192   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8193   ;;
8194   *)
8195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8196 for as_dir in $PATH
8197 do
8198   IFS=$as_save_IFS
8199   test -z "$as_dir" && as_dir=.
8200     for ac_exec_ext in '' $ac_executable_extensions; do
8201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8202     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8204     break 2
8205   fi
8206 done
8207   done
8208 IFS=$as_save_IFS
8209 
8210   ;;
8211 esac
8212 fi
8213 LS=$ac_cv_path_LS
8214 if test -n "$LS"; then
8215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8216 $as_echo "$LS" >&6; }
8217 else
8218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219 $as_echo "no" >&6; }
8220 fi
8221 
8222 
8223   test -n "$LS" && break
8224 done
8225 
8226   else
8227     # The variable is set, but is it from the command line or the environment?
8228 
8229     # Try to remove the string !LS! from our list.
8230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8232       # If it failed, the variable was not from the command line. Ignore it,
8233       # but warn the user (except for BASH, which is always set by the calling BASH).
8234       if test "xLS" != xBASH; then
8235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8236 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8237       fi
8238       # Try to locate tool using the code snippet
8239       for ac_prog in ls
8240 do
8241   # Extract the first word of "$ac_prog", so it can be a program name with args.
8242 set dummy $ac_prog; ac_word=$2
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8244 $as_echo_n "checking for $ac_word... " >&6; }
8245 if ${ac_cv_path_LS+:} false; then :
8246   $as_echo_n "(cached) " >&6
8247 else
8248   case $LS in
8249   [\\/]* | ?:[\\/]*)
8250   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8251   ;;
8252   *)
8253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8254 for as_dir in $PATH
8255 do
8256   IFS=$as_save_IFS
8257   test -z "$as_dir" && as_dir=.
8258     for ac_exec_ext in '' $ac_executable_extensions; do
8259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8260     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8262     break 2
8263   fi
8264 done
8265   done
8266 IFS=$as_save_IFS
8267 
8268   ;;
8269 esac
8270 fi
8271 LS=$ac_cv_path_LS
8272 if test -n "$LS"; then
8273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8274 $as_echo "$LS" >&6; }
8275 else
8276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277 $as_echo "no" >&6; }
8278 fi
8279 
8280 
8281   test -n "$LS" && break
8282 done
8283 
8284     else
8285       # If it succeeded, then it was overridden by the user. We will use it
8286       # for the tool.
8287 
8288       # First remove it from the list of overridden variables, so we can test
8289       # for unknown variables in the end.
8290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8291 
8292       # Check if we try to supply an empty value
8293       if test "x$LS" = x; then
8294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8295 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8297 $as_echo_n "checking for LS... " >&6; }
8298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8299 $as_echo "disabled" >&6; }
8300       else
8301         # Check if the provided tool contains a complete path.
8302         tool_specified="$LS"
8303         tool_basename="${tool_specified##*/}"
8304         if test "x$tool_basename" = "x$tool_specified"; then
8305           # A command without a complete path is provided, search $PATH.
8306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8307 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8308           # Extract the first word of "$tool_basename", so it can be a program name with args.
8309 set dummy $tool_basename; ac_word=$2
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311 $as_echo_n "checking for $ac_word... " >&6; }
8312 if ${ac_cv_path_LS+:} false; then :
8313   $as_echo_n "(cached) " >&6
8314 else
8315   case $LS in
8316   [\\/]* | ?:[\\/]*)
8317   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8318   ;;
8319   *)
8320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321 for as_dir in $PATH
8322 do
8323   IFS=$as_save_IFS
8324   test -z "$as_dir" && as_dir=.
8325     for ac_exec_ext in '' $ac_executable_extensions; do
8326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329     break 2
8330   fi
8331 done
8332   done
8333 IFS=$as_save_IFS
8334 
8335   ;;
8336 esac
8337 fi
8338 LS=$ac_cv_path_LS
8339 if test -n "$LS"; then
8340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8341 $as_echo "$LS" >&6; }
8342 else
8343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344 $as_echo "no" >&6; }
8345 fi
8346 
8347 
8348           if test "x$LS" = x; then
8349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8350           fi
8351         else
8352           # Otherwise we believe it is a complete path. Use it as it is.
8353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8354 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8356 $as_echo_n "checking for LS... " >&6; }
8357           if test ! -x "$tool_specified"; then
8358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8359 $as_echo "not found" >&6; }
8360             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8361           fi
8362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8363 $as_echo "$tool_specified" >&6; }
8364         fi
8365       fi
8366     fi
8367 
8368   fi
8369 
8370 
8371 
8372   if test "x$LS" = x; then
8373     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8374   fi
8375 
8376 
8377 
8378 
8379 
8380   # Publish this variable in the help.
8381 
8382 
8383   if [ -z "${MKDIR+x}" ]; then
8384     # The variable is not set by user, try to locate tool using the code snippet
8385     for ac_prog in mkdir
8386 do
8387   # Extract the first word of "$ac_prog", so it can be a program name with args.
8388 set dummy $ac_prog; ac_word=$2
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390 $as_echo_n "checking for $ac_word... " >&6; }
8391 if ${ac_cv_path_MKDIR+:} false; then :
8392   $as_echo_n "(cached) " >&6
8393 else
8394   case $MKDIR in
8395   [\\/]* | ?:[\\/]*)
8396   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8397   ;;
8398   *)
8399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400 for as_dir in $PATH
8401 do
8402   IFS=$as_save_IFS
8403   test -z "$as_dir" && as_dir=.
8404     for ac_exec_ext in '' $ac_executable_extensions; do
8405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8406     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8408     break 2
8409   fi
8410 done
8411   done
8412 IFS=$as_save_IFS
8413 
8414   ;;
8415 esac
8416 fi
8417 MKDIR=$ac_cv_path_MKDIR
8418 if test -n "$MKDIR"; then
8419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8420 $as_echo "$MKDIR" >&6; }
8421 else
8422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8423 $as_echo "no" >&6; }
8424 fi
8425 
8426 
8427   test -n "$MKDIR" && break
8428 done
8429 
8430   else
8431     # The variable is set, but is it from the command line or the environment?
8432 
8433     # Try to remove the string !MKDIR! from our list.
8434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8436       # If it failed, the variable was not from the command line. Ignore it,
8437       # but warn the user (except for BASH, which is always set by the calling BASH).
8438       if test "xMKDIR" != xBASH; then
8439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8440 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8441       fi
8442       # Try to locate tool using the code snippet
8443       for ac_prog in mkdir
8444 do
8445   # Extract the first word of "$ac_prog", so it can be a program name with args.
8446 set dummy $ac_prog; ac_word=$2
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8448 $as_echo_n "checking for $ac_word... " >&6; }
8449 if ${ac_cv_path_MKDIR+:} false; then :
8450   $as_echo_n "(cached) " >&6
8451 else
8452   case $MKDIR in
8453   [\\/]* | ?:[\\/]*)
8454   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8455   ;;
8456   *)
8457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8458 for as_dir in $PATH
8459 do
8460   IFS=$as_save_IFS
8461   test -z "$as_dir" && as_dir=.
8462     for ac_exec_ext in '' $ac_executable_extensions; do
8463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8464     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8466     break 2
8467   fi
8468 done
8469   done
8470 IFS=$as_save_IFS
8471 
8472   ;;
8473 esac
8474 fi
8475 MKDIR=$ac_cv_path_MKDIR
8476 if test -n "$MKDIR"; then
8477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8478 $as_echo "$MKDIR" >&6; }
8479 else
8480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8481 $as_echo "no" >&6; }
8482 fi
8483 
8484 
8485   test -n "$MKDIR" && break
8486 done
8487 
8488     else
8489       # If it succeeded, then it was overridden by the user. We will use it
8490       # for the tool.
8491 
8492       # First remove it from the list of overridden variables, so we can test
8493       # for unknown variables in the end.
8494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8495 
8496       # Check if we try to supply an empty value
8497       if test "x$MKDIR" = x; then
8498         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8499 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8501 $as_echo_n "checking for MKDIR... " >&6; }
8502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8503 $as_echo "disabled" >&6; }
8504       else
8505         # Check if the provided tool contains a complete path.
8506         tool_specified="$MKDIR"
8507         tool_basename="${tool_specified##*/}"
8508         if test "x$tool_basename" = "x$tool_specified"; then
8509           # A command without a complete path is provided, search $PATH.
8510           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8511 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8512           # Extract the first word of "$tool_basename", so it can be a program name with args.
8513 set dummy $tool_basename; ac_word=$2
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8515 $as_echo_n "checking for $ac_word... " >&6; }
8516 if ${ac_cv_path_MKDIR+:} false; then :
8517   $as_echo_n "(cached) " >&6
8518 else
8519   case $MKDIR in
8520   [\\/]* | ?:[\\/]*)
8521   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8522   ;;
8523   *)
8524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8525 for as_dir in $PATH
8526 do
8527   IFS=$as_save_IFS
8528   test -z "$as_dir" && as_dir=.
8529     for ac_exec_ext in '' $ac_executable_extensions; do
8530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8531     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8533     break 2
8534   fi
8535 done
8536   done
8537 IFS=$as_save_IFS
8538 
8539   ;;
8540 esac
8541 fi
8542 MKDIR=$ac_cv_path_MKDIR
8543 if test -n "$MKDIR"; then
8544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8545 $as_echo "$MKDIR" >&6; }
8546 else
8547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548 $as_echo "no" >&6; }
8549 fi
8550 
8551 
8552           if test "x$MKDIR" = x; then
8553             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8554           fi
8555         else
8556           # Otherwise we believe it is a complete path. Use it as it is.
8557           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8558 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8559           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8560 $as_echo_n "checking for MKDIR... " >&6; }
8561           if test ! -x "$tool_specified"; then
8562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8563 $as_echo "not found" >&6; }
8564             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8565           fi
8566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8567 $as_echo "$tool_specified" >&6; }
8568         fi
8569       fi
8570     fi
8571 
8572   fi
8573 
8574 
8575 
8576   if test "x$MKDIR" = x; then
8577     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8578   fi
8579 
8580 
8581 
8582 
8583 
8584   # Publish this variable in the help.
8585 
8586 
8587   if [ -z "${MKTEMP+x}" ]; then
8588     # The variable is not set by user, try to locate tool using the code snippet
8589     for ac_prog in mktemp
8590 do
8591   # Extract the first word of "$ac_prog", so it can be a program name with args.
8592 set dummy $ac_prog; ac_word=$2
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8594 $as_echo_n "checking for $ac_word... " >&6; }
8595 if ${ac_cv_path_MKTEMP+:} false; then :
8596   $as_echo_n "(cached) " >&6
8597 else
8598   case $MKTEMP in
8599   [\\/]* | ?:[\\/]*)
8600   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8601   ;;
8602   *)
8603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8604 for as_dir in $PATH
8605 do
8606   IFS=$as_save_IFS
8607   test -z "$as_dir" && as_dir=.
8608     for ac_exec_ext in '' $ac_executable_extensions; do
8609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8610     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8612     break 2
8613   fi
8614 done
8615   done
8616 IFS=$as_save_IFS
8617 
8618   ;;
8619 esac
8620 fi
8621 MKTEMP=$ac_cv_path_MKTEMP
8622 if test -n "$MKTEMP"; then
8623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8624 $as_echo "$MKTEMP" >&6; }
8625 else
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8627 $as_echo "no" >&6; }
8628 fi
8629 
8630 
8631   test -n "$MKTEMP" && break
8632 done
8633 
8634   else
8635     # The variable is set, but is it from the command line or the environment?
8636 
8637     # Try to remove the string !MKTEMP! from our list.
8638     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8639     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8640       # If it failed, the variable was not from the command line. Ignore it,
8641       # but warn the user (except for BASH, which is always set by the calling BASH).
8642       if test "xMKTEMP" != xBASH; then
8643         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8644 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8645       fi
8646       # Try to locate tool using the code snippet
8647       for ac_prog in mktemp
8648 do
8649   # Extract the first word of "$ac_prog", so it can be a program name with args.
8650 set dummy $ac_prog; ac_word=$2
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8652 $as_echo_n "checking for $ac_word... " >&6; }
8653 if ${ac_cv_path_MKTEMP+:} false; then :
8654   $as_echo_n "(cached) " >&6
8655 else
8656   case $MKTEMP in
8657   [\\/]* | ?:[\\/]*)
8658   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8659   ;;
8660   *)
8661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8662 for as_dir in $PATH
8663 do
8664   IFS=$as_save_IFS
8665   test -z "$as_dir" && as_dir=.
8666     for ac_exec_ext in '' $ac_executable_extensions; do
8667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8668     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8670     break 2
8671   fi
8672 done
8673   done
8674 IFS=$as_save_IFS
8675 
8676   ;;
8677 esac
8678 fi
8679 MKTEMP=$ac_cv_path_MKTEMP
8680 if test -n "$MKTEMP"; then
8681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8682 $as_echo "$MKTEMP" >&6; }
8683 else
8684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685 $as_echo "no" >&6; }
8686 fi
8687 
8688 
8689   test -n "$MKTEMP" && break
8690 done
8691 
8692     else
8693       # If it succeeded, then it was overridden by the user. We will use it
8694       # for the tool.
8695 
8696       # First remove it from the list of overridden variables, so we can test
8697       # for unknown variables in the end.
8698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8699 
8700       # Check if we try to supply an empty value
8701       if test "x$MKTEMP" = x; then
8702         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8703 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8705 $as_echo_n "checking for MKTEMP... " >&6; }
8706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8707 $as_echo "disabled" >&6; }
8708       else
8709         # Check if the provided tool contains a complete path.
8710         tool_specified="$MKTEMP"
8711         tool_basename="${tool_specified##*/}"
8712         if test "x$tool_basename" = "x$tool_specified"; then
8713           # A command without a complete path is provided, search $PATH.
8714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8715 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8716           # Extract the first word of "$tool_basename", so it can be a program name with args.
8717 set dummy $tool_basename; ac_word=$2
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719 $as_echo_n "checking for $ac_word... " >&6; }
8720 if ${ac_cv_path_MKTEMP+:} false; then :
8721   $as_echo_n "(cached) " >&6
8722 else
8723   case $MKTEMP in
8724   [\\/]* | ?:[\\/]*)
8725   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8726   ;;
8727   *)
8728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8729 for as_dir in $PATH
8730 do
8731   IFS=$as_save_IFS
8732   test -z "$as_dir" && as_dir=.
8733     for ac_exec_ext in '' $ac_executable_extensions; do
8734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8735     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8737     break 2
8738   fi
8739 done
8740   done
8741 IFS=$as_save_IFS
8742 
8743   ;;
8744 esac
8745 fi
8746 MKTEMP=$ac_cv_path_MKTEMP
8747 if test -n "$MKTEMP"; then
8748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8749 $as_echo "$MKTEMP" >&6; }
8750 else
8751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8752 $as_echo "no" >&6; }
8753 fi
8754 
8755 
8756           if test "x$MKTEMP" = x; then
8757             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8758           fi
8759         else
8760           # Otherwise we believe it is a complete path. Use it as it is.
8761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8762 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8763           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8764 $as_echo_n "checking for MKTEMP... " >&6; }
8765           if test ! -x "$tool_specified"; then
8766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8767 $as_echo "not found" >&6; }
8768             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8769           fi
8770           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8771 $as_echo "$tool_specified" >&6; }
8772         fi
8773       fi
8774     fi
8775 
8776   fi
8777 
8778 
8779 
8780   if test "x$MKTEMP" = x; then
8781     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8782   fi
8783 
8784 
8785 
8786 
8787 
8788   # Publish this variable in the help.
8789 
8790 
8791   if [ -z "${MV+x}" ]; then
8792     # The variable is not set by user, try to locate tool using the code snippet
8793     for ac_prog in mv
8794 do
8795   # Extract the first word of "$ac_prog", so it can be a program name with args.
8796 set dummy $ac_prog; ac_word=$2
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8798 $as_echo_n "checking for $ac_word... " >&6; }
8799 if ${ac_cv_path_MV+:} false; then :
8800   $as_echo_n "(cached) " >&6
8801 else
8802   case $MV in
8803   [\\/]* | ?:[\\/]*)
8804   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8805   ;;
8806   *)
8807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8808 for as_dir in $PATH
8809 do
8810   IFS=$as_save_IFS
8811   test -z "$as_dir" && as_dir=.
8812     for ac_exec_ext in '' $ac_executable_extensions; do
8813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8814     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8816     break 2
8817   fi
8818 done
8819   done
8820 IFS=$as_save_IFS
8821 
8822   ;;
8823 esac
8824 fi
8825 MV=$ac_cv_path_MV
8826 if test -n "$MV"; then
8827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8828 $as_echo "$MV" >&6; }
8829 else
8830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8831 $as_echo "no" >&6; }
8832 fi
8833 
8834 
8835   test -n "$MV" && break
8836 done
8837 
8838   else
8839     # The variable is set, but is it from the command line or the environment?
8840 
8841     # Try to remove the string !MV! from our list.
8842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8844       # If it failed, the variable was not from the command line. Ignore it,
8845       # but warn the user (except for BASH, which is always set by the calling BASH).
8846       if test "xMV" != xBASH; then
8847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8848 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8849       fi
8850       # Try to locate tool using the code snippet
8851       for ac_prog in mv
8852 do
8853   # Extract the first word of "$ac_prog", so it can be a program name with args.
8854 set dummy $ac_prog; ac_word=$2
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8856 $as_echo_n "checking for $ac_word... " >&6; }
8857 if ${ac_cv_path_MV+:} false; then :
8858   $as_echo_n "(cached) " >&6
8859 else
8860   case $MV in
8861   [\\/]* | ?:[\\/]*)
8862   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8863   ;;
8864   *)
8865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8866 for as_dir in $PATH
8867 do
8868   IFS=$as_save_IFS
8869   test -z "$as_dir" && as_dir=.
8870     for ac_exec_ext in '' $ac_executable_extensions; do
8871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8872     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8874     break 2
8875   fi
8876 done
8877   done
8878 IFS=$as_save_IFS
8879 
8880   ;;
8881 esac
8882 fi
8883 MV=$ac_cv_path_MV
8884 if test -n "$MV"; then
8885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8886 $as_echo "$MV" >&6; }
8887 else
8888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8889 $as_echo "no" >&6; }
8890 fi
8891 
8892 
8893   test -n "$MV" && break
8894 done
8895 
8896     else
8897       # If it succeeded, then it was overridden by the user. We will use it
8898       # for the tool.
8899 
8900       # First remove it from the list of overridden variables, so we can test
8901       # for unknown variables in the end.
8902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8903 
8904       # Check if we try to supply an empty value
8905       if test "x$MV" = x; then
8906         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8907 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8909 $as_echo_n "checking for MV... " >&6; }
8910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8911 $as_echo "disabled" >&6; }
8912       else
8913         # Check if the provided tool contains a complete path.
8914         tool_specified="$MV"
8915         tool_basename="${tool_specified##*/}"
8916         if test "x$tool_basename" = "x$tool_specified"; then
8917           # A command without a complete path is provided, search $PATH.
8918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8919 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8920           # Extract the first word of "$tool_basename", so it can be a program name with args.
8921 set dummy $tool_basename; ac_word=$2
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8923 $as_echo_n "checking for $ac_word... " >&6; }
8924 if ${ac_cv_path_MV+:} false; then :
8925   $as_echo_n "(cached) " >&6
8926 else
8927   case $MV in
8928   [\\/]* | ?:[\\/]*)
8929   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8930   ;;
8931   *)
8932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8933 for as_dir in $PATH
8934 do
8935   IFS=$as_save_IFS
8936   test -z "$as_dir" && as_dir=.
8937     for ac_exec_ext in '' $ac_executable_extensions; do
8938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8941     break 2
8942   fi
8943 done
8944   done
8945 IFS=$as_save_IFS
8946 
8947   ;;
8948 esac
8949 fi
8950 MV=$ac_cv_path_MV
8951 if test -n "$MV"; then
8952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8953 $as_echo "$MV" >&6; }
8954 else
8955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956 $as_echo "no" >&6; }
8957 fi
8958 
8959 
8960           if test "x$MV" = x; then
8961             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8962           fi
8963         else
8964           # Otherwise we believe it is a complete path. Use it as it is.
8965           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8966 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8967           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8968 $as_echo_n "checking for MV... " >&6; }
8969           if test ! -x "$tool_specified"; then
8970             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8971 $as_echo "not found" >&6; }
8972             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8973           fi
8974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8975 $as_echo "$tool_specified" >&6; }
8976         fi
8977       fi
8978     fi
8979 
8980   fi
8981 
8982 
8983 
8984   if test "x$MV" = x; then
8985     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8986   fi
8987 
8988 
8989 
8990 
8991 
8992   # Publish this variable in the help.
8993 
8994 
8995   if [ -z "${NAWK+x}" ]; then
8996     # The variable is not set by user, try to locate tool using the code snippet
8997     for ac_prog in nawk gawk awk
8998 do
8999   # Extract the first word of "$ac_prog", so it can be a program name with args.
9000 set dummy $ac_prog; ac_word=$2
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002 $as_echo_n "checking for $ac_word... " >&6; }
9003 if ${ac_cv_path_NAWK+:} false; then :
9004   $as_echo_n "(cached) " >&6
9005 else
9006   case $NAWK in
9007   [\\/]* | ?:[\\/]*)
9008   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9009   ;;
9010   *)
9011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012 for as_dir in $PATH
9013 do
9014   IFS=$as_save_IFS
9015   test -z "$as_dir" && as_dir=.
9016     for ac_exec_ext in '' $ac_executable_extensions; do
9017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9020     break 2
9021   fi
9022 done
9023   done
9024 IFS=$as_save_IFS
9025 
9026   ;;
9027 esac
9028 fi
9029 NAWK=$ac_cv_path_NAWK
9030 if test -n "$NAWK"; then
9031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9032 $as_echo "$NAWK" >&6; }
9033 else
9034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035 $as_echo "no" >&6; }
9036 fi
9037 
9038 
9039   test -n "$NAWK" && break
9040 done
9041 
9042   else
9043     # The variable is set, but is it from the command line or the environment?
9044 
9045     # Try to remove the string !NAWK! from our list.
9046     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9047     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9048       # If it failed, the variable was not from the command line. Ignore it,
9049       # but warn the user (except for BASH, which is always set by the calling BASH).
9050       if test "xNAWK" != xBASH; then
9051         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9052 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9053       fi
9054       # Try to locate tool using the code snippet
9055       for ac_prog in nawk gawk awk
9056 do
9057   # Extract the first word of "$ac_prog", so it can be a program name with args.
9058 set dummy $ac_prog; ac_word=$2
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060 $as_echo_n "checking for $ac_word... " >&6; }
9061 if ${ac_cv_path_NAWK+:} false; then :
9062   $as_echo_n "(cached) " >&6
9063 else
9064   case $NAWK in
9065   [\\/]* | ?:[\\/]*)
9066   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9067   ;;
9068   *)
9069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070 for as_dir in $PATH
9071 do
9072   IFS=$as_save_IFS
9073   test -z "$as_dir" && as_dir=.
9074     for ac_exec_ext in '' $ac_executable_extensions; do
9075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078     break 2
9079   fi
9080 done
9081   done
9082 IFS=$as_save_IFS
9083 
9084   ;;
9085 esac
9086 fi
9087 NAWK=$ac_cv_path_NAWK
9088 if test -n "$NAWK"; then
9089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9090 $as_echo "$NAWK" >&6; }
9091 else
9092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093 $as_echo "no" >&6; }
9094 fi
9095 
9096 
9097   test -n "$NAWK" && break
9098 done
9099 
9100     else
9101       # If it succeeded, then it was overridden by the user. We will use it
9102       # for the tool.
9103 
9104       # First remove it from the list of overridden variables, so we can test
9105       # for unknown variables in the end.
9106       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9107 
9108       # Check if we try to supply an empty value
9109       if test "x$NAWK" = x; then
9110         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9111 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9113 $as_echo_n "checking for NAWK... " >&6; }
9114         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9115 $as_echo "disabled" >&6; }
9116       else
9117         # Check if the provided tool contains a complete path.
9118         tool_specified="$NAWK"
9119         tool_basename="${tool_specified##*/}"
9120         if test "x$tool_basename" = "x$tool_specified"; then
9121           # A command without a complete path is provided, search $PATH.
9122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9123 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9124           # Extract the first word of "$tool_basename", so it can be a program name with args.
9125 set dummy $tool_basename; ac_word=$2
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9127 $as_echo_n "checking for $ac_word... " >&6; }
9128 if ${ac_cv_path_NAWK+:} false; then :
9129   $as_echo_n "(cached) " >&6
9130 else
9131   case $NAWK in
9132   [\\/]* | ?:[\\/]*)
9133   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9134   ;;
9135   *)
9136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9137 for as_dir in $PATH
9138 do
9139   IFS=$as_save_IFS
9140   test -z "$as_dir" && as_dir=.
9141     for ac_exec_ext in '' $ac_executable_extensions; do
9142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9143     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9145     break 2
9146   fi
9147 done
9148   done
9149 IFS=$as_save_IFS
9150 
9151   ;;
9152 esac
9153 fi
9154 NAWK=$ac_cv_path_NAWK
9155 if test -n "$NAWK"; then
9156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9157 $as_echo "$NAWK" >&6; }
9158 else
9159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160 $as_echo "no" >&6; }
9161 fi
9162 
9163 
9164           if test "x$NAWK" = x; then
9165             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9166           fi
9167         else
9168           # Otherwise we believe it is a complete path. Use it as it is.
9169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9170 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9171           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9172 $as_echo_n "checking for NAWK... " >&6; }
9173           if test ! -x "$tool_specified"; then
9174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9175 $as_echo "not found" >&6; }
9176             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9177           fi
9178           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9179 $as_echo "$tool_specified" >&6; }
9180         fi
9181       fi
9182     fi
9183 
9184   fi
9185 
9186 
9187 
9188   if test "x$NAWK" = x; then
9189     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9190   fi
9191 
9192 
9193 
9194 
9195 
9196   # Publish this variable in the help.
9197 
9198 
9199   if [ -z "${PRINTF+x}" ]; then
9200     # The variable is not set by user, try to locate tool using the code snippet
9201     for ac_prog in printf
9202 do
9203   # Extract the first word of "$ac_prog", so it can be a program name with args.
9204 set dummy $ac_prog; ac_word=$2
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9206 $as_echo_n "checking for $ac_word... " >&6; }
9207 if ${ac_cv_path_PRINTF+:} false; then :
9208   $as_echo_n "(cached) " >&6
9209 else
9210   case $PRINTF in
9211   [\\/]* | ?:[\\/]*)
9212   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9213   ;;
9214   *)
9215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9216 for as_dir in $PATH
9217 do
9218   IFS=$as_save_IFS
9219   test -z "$as_dir" && as_dir=.
9220     for ac_exec_ext in '' $ac_executable_extensions; do
9221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9222     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9224     break 2
9225   fi
9226 done
9227   done
9228 IFS=$as_save_IFS
9229 
9230   ;;
9231 esac
9232 fi
9233 PRINTF=$ac_cv_path_PRINTF
9234 if test -n "$PRINTF"; then
9235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9236 $as_echo "$PRINTF" >&6; }
9237 else
9238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9239 $as_echo "no" >&6; }
9240 fi
9241 
9242 
9243   test -n "$PRINTF" && break
9244 done
9245 
9246   else
9247     # The variable is set, but is it from the command line or the environment?
9248 
9249     # Try to remove the string !PRINTF! from our list.
9250     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9251     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9252       # If it failed, the variable was not from the command line. Ignore it,
9253       # but warn the user (except for BASH, which is always set by the calling BASH).
9254       if test "xPRINTF" != xBASH; then
9255         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9256 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9257       fi
9258       # Try to locate tool using the code snippet
9259       for ac_prog in printf
9260 do
9261   # Extract the first word of "$ac_prog", so it can be a program name with args.
9262 set dummy $ac_prog; ac_word=$2
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9264 $as_echo_n "checking for $ac_word... " >&6; }
9265 if ${ac_cv_path_PRINTF+:} false; then :
9266   $as_echo_n "(cached) " >&6
9267 else
9268   case $PRINTF in
9269   [\\/]* | ?:[\\/]*)
9270   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9271   ;;
9272   *)
9273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9274 for as_dir in $PATH
9275 do
9276   IFS=$as_save_IFS
9277   test -z "$as_dir" && as_dir=.
9278     for ac_exec_ext in '' $ac_executable_extensions; do
9279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9280     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9282     break 2
9283   fi
9284 done
9285   done
9286 IFS=$as_save_IFS
9287 
9288   ;;
9289 esac
9290 fi
9291 PRINTF=$ac_cv_path_PRINTF
9292 if test -n "$PRINTF"; then
9293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9294 $as_echo "$PRINTF" >&6; }
9295 else
9296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297 $as_echo "no" >&6; }
9298 fi
9299 
9300 
9301   test -n "$PRINTF" && break
9302 done
9303 
9304     else
9305       # If it succeeded, then it was overridden by the user. We will use it
9306       # for the tool.
9307 
9308       # First remove it from the list of overridden variables, so we can test
9309       # for unknown variables in the end.
9310       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9311 
9312       # Check if we try to supply an empty value
9313       if test "x$PRINTF" = x; then
9314         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9315 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9316         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9317 $as_echo_n "checking for PRINTF... " >&6; }
9318         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9319 $as_echo "disabled" >&6; }
9320       else
9321         # Check if the provided tool contains a complete path.
9322         tool_specified="$PRINTF"
9323         tool_basename="${tool_specified##*/}"
9324         if test "x$tool_basename" = "x$tool_specified"; then
9325           # A command without a complete path is provided, search $PATH.
9326           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9327 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9328           # Extract the first word of "$tool_basename", so it can be a program name with args.
9329 set dummy $tool_basename; ac_word=$2
9330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9331 $as_echo_n "checking for $ac_word... " >&6; }
9332 if ${ac_cv_path_PRINTF+:} false; then :
9333   $as_echo_n "(cached) " >&6
9334 else
9335   case $PRINTF in
9336   [\\/]* | ?:[\\/]*)
9337   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9338   ;;
9339   *)
9340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341 for as_dir in $PATH
9342 do
9343   IFS=$as_save_IFS
9344   test -z "$as_dir" && as_dir=.
9345     for ac_exec_ext in '' $ac_executable_extensions; do
9346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349     break 2
9350   fi
9351 done
9352   done
9353 IFS=$as_save_IFS
9354 
9355   ;;
9356 esac
9357 fi
9358 PRINTF=$ac_cv_path_PRINTF
9359 if test -n "$PRINTF"; then
9360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9361 $as_echo "$PRINTF" >&6; }
9362 else
9363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364 $as_echo "no" >&6; }
9365 fi
9366 
9367 
9368           if test "x$PRINTF" = x; then
9369             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9370           fi
9371         else
9372           # Otherwise we believe it is a complete path. Use it as it is.
9373           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9374 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9375           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9376 $as_echo_n "checking for PRINTF... " >&6; }
9377           if test ! -x "$tool_specified"; then
9378             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9379 $as_echo "not found" >&6; }
9380             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9381           fi
9382           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9383 $as_echo "$tool_specified" >&6; }
9384         fi
9385       fi
9386     fi
9387 
9388   fi
9389 
9390 
9391 
9392   if test "x$PRINTF" = x; then
9393     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9394   fi
9395 
9396 
9397 
9398 
9399 
9400   # Publish this variable in the help.
9401 
9402 
9403   if [ -z "${RM+x}" ]; then
9404     # The variable is not set by user, try to locate tool using the code snippet
9405     for ac_prog in rm
9406 do
9407   # Extract the first word of "$ac_prog", so it can be a program name with args.
9408 set dummy $ac_prog; ac_word=$2
9409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9410 $as_echo_n "checking for $ac_word... " >&6; }
9411 if ${ac_cv_path_RM+:} false; then :
9412   $as_echo_n "(cached) " >&6
9413 else
9414   case $RM in
9415   [\\/]* | ?:[\\/]*)
9416   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9417   ;;
9418   *)
9419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9420 for as_dir in $PATH
9421 do
9422   IFS=$as_save_IFS
9423   test -z "$as_dir" && as_dir=.
9424     for ac_exec_ext in '' $ac_executable_extensions; do
9425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9426     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9428     break 2
9429   fi
9430 done
9431   done
9432 IFS=$as_save_IFS
9433 
9434   ;;
9435 esac
9436 fi
9437 RM=$ac_cv_path_RM
9438 if test -n "$RM"; then
9439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9440 $as_echo "$RM" >&6; }
9441 else
9442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9443 $as_echo "no" >&6; }
9444 fi
9445 
9446 
9447   test -n "$RM" && break
9448 done
9449 
9450   else
9451     # The variable is set, but is it from the command line or the environment?
9452 
9453     # Try to remove the string !RM! from our list.
9454     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9455     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9456       # If it failed, the variable was not from the command line. Ignore it,
9457       # but warn the user (except for BASH, which is always set by the calling BASH).
9458       if test "xRM" != xBASH; then
9459         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9460 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9461       fi
9462       # Try to locate tool using the code snippet
9463       for ac_prog in rm
9464 do
9465   # Extract the first word of "$ac_prog", so it can be a program name with args.
9466 set dummy $ac_prog; ac_word=$2
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9468 $as_echo_n "checking for $ac_word... " >&6; }
9469 if ${ac_cv_path_RM+:} false; then :
9470   $as_echo_n "(cached) " >&6
9471 else
9472   case $RM in
9473   [\\/]* | ?:[\\/]*)
9474   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9475   ;;
9476   *)
9477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478 for as_dir in $PATH
9479 do
9480   IFS=$as_save_IFS
9481   test -z "$as_dir" && as_dir=.
9482     for ac_exec_ext in '' $ac_executable_extensions; do
9483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9484     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9486     break 2
9487   fi
9488 done
9489   done
9490 IFS=$as_save_IFS
9491 
9492   ;;
9493 esac
9494 fi
9495 RM=$ac_cv_path_RM
9496 if test -n "$RM"; then
9497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9498 $as_echo "$RM" >&6; }
9499 else
9500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501 $as_echo "no" >&6; }
9502 fi
9503 
9504 
9505   test -n "$RM" && break
9506 done
9507 
9508     else
9509       # If it succeeded, then it was overridden by the user. We will use it
9510       # for the tool.
9511 
9512       # First remove it from the list of overridden variables, so we can test
9513       # for unknown variables in the end.
9514       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9515 
9516       # Check if we try to supply an empty value
9517       if test "x$RM" = x; then
9518         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9519 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9520         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9521 $as_echo_n "checking for RM... " >&6; }
9522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9523 $as_echo "disabled" >&6; }
9524       else
9525         # Check if the provided tool contains a complete path.
9526         tool_specified="$RM"
9527         tool_basename="${tool_specified##*/}"
9528         if test "x$tool_basename" = "x$tool_specified"; then
9529           # A command without a complete path is provided, search $PATH.
9530           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9531 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9532           # Extract the first word of "$tool_basename", so it can be a program name with args.
9533 set dummy $tool_basename; ac_word=$2
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9535 $as_echo_n "checking for $ac_word... " >&6; }
9536 if ${ac_cv_path_RM+:} false; then :
9537   $as_echo_n "(cached) " >&6
9538 else
9539   case $RM in
9540   [\\/]* | ?:[\\/]*)
9541   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9542   ;;
9543   *)
9544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9545 for as_dir in $PATH
9546 do
9547   IFS=$as_save_IFS
9548   test -z "$as_dir" && as_dir=.
9549     for ac_exec_ext in '' $ac_executable_extensions; do
9550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9551     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9553     break 2
9554   fi
9555 done
9556   done
9557 IFS=$as_save_IFS
9558 
9559   ;;
9560 esac
9561 fi
9562 RM=$ac_cv_path_RM
9563 if test -n "$RM"; then
9564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9565 $as_echo "$RM" >&6; }
9566 else
9567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568 $as_echo "no" >&6; }
9569 fi
9570 
9571 
9572           if test "x$RM" = x; then
9573             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9574           fi
9575         else
9576           # Otherwise we believe it is a complete path. Use it as it is.
9577           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9578 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9579           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9580 $as_echo_n "checking for RM... " >&6; }
9581           if test ! -x "$tool_specified"; then
9582             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9583 $as_echo "not found" >&6; }
9584             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9585           fi
9586           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9587 $as_echo "$tool_specified" >&6; }
9588         fi
9589       fi
9590     fi
9591 
9592   fi
9593 
9594 
9595 
9596   if test "x$RM" = x; then
9597     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9598   fi
9599 
9600 
9601 
9602 
9603 
9604   # Publish this variable in the help.
9605 
9606 
9607   if [ -z "${RMDIR+x}" ]; then
9608     # The variable is not set by user, try to locate tool using the code snippet
9609     for ac_prog in rmdir
9610 do
9611   # Extract the first word of "$ac_prog", so it can be a program name with args.
9612 set dummy $ac_prog; ac_word=$2
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9614 $as_echo_n "checking for $ac_word... " >&6; }
9615 if ${ac_cv_path_RMDIR+:} false; then :
9616   $as_echo_n "(cached) " >&6
9617 else
9618   case $RMDIR in
9619   [\\/]* | ?:[\\/]*)
9620   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9621   ;;
9622   *)
9623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9624 for as_dir in $PATH
9625 do
9626   IFS=$as_save_IFS
9627   test -z "$as_dir" && as_dir=.
9628     for ac_exec_ext in '' $ac_executable_extensions; do
9629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9630     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9632     break 2
9633   fi
9634 done
9635   done
9636 IFS=$as_save_IFS
9637 
9638   ;;
9639 esac
9640 fi
9641 RMDIR=$ac_cv_path_RMDIR
9642 if test -n "$RMDIR"; then
9643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9644 $as_echo "$RMDIR" >&6; }
9645 else
9646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647 $as_echo "no" >&6; }
9648 fi
9649 
9650 
9651   test -n "$RMDIR" && break
9652 done
9653 
9654   else
9655     # The variable is set, but is it from the command line or the environment?
9656 
9657     # Try to remove the string !RMDIR! from our list.
9658     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9659     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9660       # If it failed, the variable was not from the command line. Ignore it,
9661       # but warn the user (except for BASH, which is always set by the calling BASH).
9662       if test "xRMDIR" != xBASH; then
9663         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9664 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9665       fi
9666       # Try to locate tool using the code snippet
9667       for ac_prog in rmdir
9668 do
9669   # Extract the first word of "$ac_prog", so it can be a program name with args.
9670 set dummy $ac_prog; ac_word=$2
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9672 $as_echo_n "checking for $ac_word... " >&6; }
9673 if ${ac_cv_path_RMDIR+:} false; then :
9674   $as_echo_n "(cached) " >&6
9675 else
9676   case $RMDIR in
9677   [\\/]* | ?:[\\/]*)
9678   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9679   ;;
9680   *)
9681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682 for as_dir in $PATH
9683 do
9684   IFS=$as_save_IFS
9685   test -z "$as_dir" && as_dir=.
9686     for ac_exec_ext in '' $ac_executable_extensions; do
9687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9688     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9690     break 2
9691   fi
9692 done
9693   done
9694 IFS=$as_save_IFS
9695 
9696   ;;
9697 esac
9698 fi
9699 RMDIR=$ac_cv_path_RMDIR
9700 if test -n "$RMDIR"; then
9701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9702 $as_echo "$RMDIR" >&6; }
9703 else
9704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706 fi
9707 
9708 
9709   test -n "$RMDIR" && break
9710 done
9711 
9712     else
9713       # If it succeeded, then it was overridden by the user. We will use it
9714       # for the tool.
9715 
9716       # First remove it from the list of overridden variables, so we can test
9717       # for unknown variables in the end.
9718       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9719 
9720       # Check if we try to supply an empty value
9721       if test "x$RMDIR" = x; then
9722         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9723 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9724         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9725 $as_echo_n "checking for RMDIR... " >&6; }
9726         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9727 $as_echo "disabled" >&6; }
9728       else
9729         # Check if the provided tool contains a complete path.
9730         tool_specified="$RMDIR"
9731         tool_basename="${tool_specified##*/}"
9732         if test "x$tool_basename" = "x$tool_specified"; then
9733           # A command without a complete path is provided, search $PATH.
9734           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9735 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9736           # Extract the first word of "$tool_basename", so it can be a program name with args.
9737 set dummy $tool_basename; ac_word=$2
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9739 $as_echo_n "checking for $ac_word... " >&6; }
9740 if ${ac_cv_path_RMDIR+:} false; then :
9741   $as_echo_n "(cached) " >&6
9742 else
9743   case $RMDIR in
9744   [\\/]* | ?:[\\/]*)
9745   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9746   ;;
9747   *)
9748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9749 for as_dir in $PATH
9750 do
9751   IFS=$as_save_IFS
9752   test -z "$as_dir" && as_dir=.
9753     for ac_exec_ext in '' $ac_executable_extensions; do
9754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9755     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9757     break 2
9758   fi
9759 done
9760   done
9761 IFS=$as_save_IFS
9762 
9763   ;;
9764 esac
9765 fi
9766 RMDIR=$ac_cv_path_RMDIR
9767 if test -n "$RMDIR"; then
9768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9769 $as_echo "$RMDIR" >&6; }
9770 else
9771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772 $as_echo "no" >&6; }
9773 fi
9774 
9775 
9776           if test "x$RMDIR" = x; then
9777             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9778           fi
9779         else
9780           # Otherwise we believe it is a complete path. Use it as it is.
9781           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9782 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9783           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9784 $as_echo_n "checking for RMDIR... " >&6; }
9785           if test ! -x "$tool_specified"; then
9786             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9787 $as_echo "not found" >&6; }
9788             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9789           fi
9790           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9791 $as_echo "$tool_specified" >&6; }
9792         fi
9793       fi
9794     fi
9795 
9796   fi
9797 
9798 
9799 
9800   if test "x$RMDIR" = x; then
9801     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9802   fi
9803 
9804 
9805 
9806 
9807 
9808   # Publish this variable in the help.
9809 
9810 
9811   if [ -z "${SH+x}" ]; then
9812     # The variable is not set by user, try to locate tool using the code snippet
9813     for ac_prog in sh
9814 do
9815   # Extract the first word of "$ac_prog", so it can be a program name with args.
9816 set dummy $ac_prog; ac_word=$2
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9818 $as_echo_n "checking for $ac_word... " >&6; }
9819 if ${ac_cv_path_SH+:} false; then :
9820   $as_echo_n "(cached) " >&6
9821 else
9822   case $SH in
9823   [\\/]* | ?:[\\/]*)
9824   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9825   ;;
9826   *)
9827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9828 for as_dir in $PATH
9829 do
9830   IFS=$as_save_IFS
9831   test -z "$as_dir" && as_dir=.
9832     for ac_exec_ext in '' $ac_executable_extensions; do
9833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9834     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9836     break 2
9837   fi
9838 done
9839   done
9840 IFS=$as_save_IFS
9841 
9842   ;;
9843 esac
9844 fi
9845 SH=$ac_cv_path_SH
9846 if test -n "$SH"; then
9847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9848 $as_echo "$SH" >&6; }
9849 else
9850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9851 $as_echo "no" >&6; }
9852 fi
9853 
9854 
9855   test -n "$SH" && break
9856 done
9857 
9858   else
9859     # The variable is set, but is it from the command line or the environment?
9860 
9861     # Try to remove the string !SH! from our list.
9862     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9863     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9864       # If it failed, the variable was not from the command line. Ignore it,
9865       # but warn the user (except for BASH, which is always set by the calling BASH).
9866       if test "xSH" != xBASH; then
9867         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9868 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9869       fi
9870       # Try to locate tool using the code snippet
9871       for ac_prog in sh
9872 do
9873   # Extract the first word of "$ac_prog", so it can be a program name with args.
9874 set dummy $ac_prog; ac_word=$2
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876 $as_echo_n "checking for $ac_word... " >&6; }
9877 if ${ac_cv_path_SH+:} false; then :
9878   $as_echo_n "(cached) " >&6
9879 else
9880   case $SH in
9881   [\\/]* | ?:[\\/]*)
9882   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9883   ;;
9884   *)
9885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886 for as_dir in $PATH
9887 do
9888   IFS=$as_save_IFS
9889   test -z "$as_dir" && as_dir=.
9890     for ac_exec_ext in '' $ac_executable_extensions; do
9891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9892     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894     break 2
9895   fi
9896 done
9897   done
9898 IFS=$as_save_IFS
9899 
9900   ;;
9901 esac
9902 fi
9903 SH=$ac_cv_path_SH
9904 if test -n "$SH"; then
9905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9906 $as_echo "$SH" >&6; }
9907 else
9908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909 $as_echo "no" >&6; }
9910 fi
9911 
9912 
9913   test -n "$SH" && break
9914 done
9915 
9916     else
9917       # If it succeeded, then it was overridden by the user. We will use it
9918       # for the tool.
9919 
9920       # First remove it from the list of overridden variables, so we can test
9921       # for unknown variables in the end.
9922       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9923 
9924       # Check if we try to supply an empty value
9925       if test "x$SH" = x; then
9926         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9927 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9929 $as_echo_n "checking for SH... " >&6; }
9930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9931 $as_echo "disabled" >&6; }
9932       else
9933         # Check if the provided tool contains a complete path.
9934         tool_specified="$SH"
9935         tool_basename="${tool_specified##*/}"
9936         if test "x$tool_basename" = "x$tool_specified"; then
9937           # A command without a complete path is provided, search $PATH.
9938           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9939 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9940           # Extract the first word of "$tool_basename", so it can be a program name with args.
9941 set dummy $tool_basename; ac_word=$2
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9943 $as_echo_n "checking for $ac_word... " >&6; }
9944 if ${ac_cv_path_SH+:} false; then :
9945   $as_echo_n "(cached) " >&6
9946 else
9947   case $SH in
9948   [\\/]* | ?:[\\/]*)
9949   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9950   ;;
9951   *)
9952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9953 for as_dir in $PATH
9954 do
9955   IFS=$as_save_IFS
9956   test -z "$as_dir" && as_dir=.
9957     for ac_exec_ext in '' $ac_executable_extensions; do
9958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9959     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9961     break 2
9962   fi
9963 done
9964   done
9965 IFS=$as_save_IFS
9966 
9967   ;;
9968 esac
9969 fi
9970 SH=$ac_cv_path_SH
9971 if test -n "$SH"; then
9972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9973 $as_echo "$SH" >&6; }
9974 else
9975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9976 $as_echo "no" >&6; }
9977 fi
9978 
9979 
9980           if test "x$SH" = x; then
9981             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9982           fi
9983         else
9984           # Otherwise we believe it is a complete path. Use it as it is.
9985           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9986 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9987           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9988 $as_echo_n "checking for SH... " >&6; }
9989           if test ! -x "$tool_specified"; then
9990             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9991 $as_echo "not found" >&6; }
9992             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9993           fi
9994           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9995 $as_echo "$tool_specified" >&6; }
9996         fi
9997       fi
9998     fi
9999 
10000   fi
10001 
10002 
10003 
10004   if test "x$SH" = x; then
10005     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10006   fi
10007 
10008 
10009 
10010 
10011 
10012   # Publish this variable in the help.
10013 
10014 
10015   if [ -z "${SORT+x}" ]; then
10016     # The variable is not set by user, try to locate tool using the code snippet
10017     for ac_prog in sort
10018 do
10019   # Extract the first word of "$ac_prog", so it can be a program name with args.
10020 set dummy $ac_prog; ac_word=$2
10021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10022 $as_echo_n "checking for $ac_word... " >&6; }
10023 if ${ac_cv_path_SORT+:} false; then :
10024   $as_echo_n "(cached) " >&6
10025 else
10026   case $SORT in
10027   [\\/]* | ?:[\\/]*)
10028   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10029   ;;
10030   *)
10031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10032 for as_dir in $PATH
10033 do
10034   IFS=$as_save_IFS
10035   test -z "$as_dir" && as_dir=.
10036     for ac_exec_ext in '' $ac_executable_extensions; do
10037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10038     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10040     break 2
10041   fi
10042 done
10043   done
10044 IFS=$as_save_IFS
10045 
10046   ;;
10047 esac
10048 fi
10049 SORT=$ac_cv_path_SORT
10050 if test -n "$SORT"; then
10051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10052 $as_echo "$SORT" >&6; }
10053 else
10054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055 $as_echo "no" >&6; }
10056 fi
10057 
10058 
10059   test -n "$SORT" && break
10060 done
10061 
10062   else
10063     # The variable is set, but is it from the command line or the environment?
10064 
10065     # Try to remove the string !SORT! from our list.
10066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10068       # If it failed, the variable was not from the command line. Ignore it,
10069       # but warn the user (except for BASH, which is always set by the calling BASH).
10070       if test "xSORT" != xBASH; then
10071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10072 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10073       fi
10074       # Try to locate tool using the code snippet
10075       for ac_prog in sort
10076 do
10077   # Extract the first word of "$ac_prog", so it can be a program name with args.
10078 set dummy $ac_prog; ac_word=$2
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10080 $as_echo_n "checking for $ac_word... " >&6; }
10081 if ${ac_cv_path_SORT+:} false; then :
10082   $as_echo_n "(cached) " >&6
10083 else
10084   case $SORT in
10085   [\\/]* | ?:[\\/]*)
10086   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10087   ;;
10088   *)
10089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10090 for as_dir in $PATH
10091 do
10092   IFS=$as_save_IFS
10093   test -z "$as_dir" && as_dir=.
10094     for ac_exec_ext in '' $ac_executable_extensions; do
10095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10096     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10098     break 2
10099   fi
10100 done
10101   done
10102 IFS=$as_save_IFS
10103 
10104   ;;
10105 esac
10106 fi
10107 SORT=$ac_cv_path_SORT
10108 if test -n "$SORT"; then
10109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10110 $as_echo "$SORT" >&6; }
10111 else
10112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113 $as_echo "no" >&6; }
10114 fi
10115 
10116 
10117   test -n "$SORT" && break
10118 done
10119 
10120     else
10121       # If it succeeded, then it was overridden by the user. We will use it
10122       # for the tool.
10123 
10124       # First remove it from the list of overridden variables, so we can test
10125       # for unknown variables in the end.
10126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10127 
10128       # Check if we try to supply an empty value
10129       if test "x$SORT" = x; then
10130         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10131 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10133 $as_echo_n "checking for SORT... " >&6; }
10134         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10135 $as_echo "disabled" >&6; }
10136       else
10137         # Check if the provided tool contains a complete path.
10138         tool_specified="$SORT"
10139         tool_basename="${tool_specified##*/}"
10140         if test "x$tool_basename" = "x$tool_specified"; then
10141           # A command without a complete path is provided, search $PATH.
10142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10143 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10144           # Extract the first word of "$tool_basename", so it can be a program name with args.
10145 set dummy $tool_basename; ac_word=$2
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147 $as_echo_n "checking for $ac_word... " >&6; }
10148 if ${ac_cv_path_SORT+:} false; then :
10149   $as_echo_n "(cached) " >&6
10150 else
10151   case $SORT in
10152   [\\/]* | ?:[\\/]*)
10153   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10154   ;;
10155   *)
10156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157 for as_dir in $PATH
10158 do
10159   IFS=$as_save_IFS
10160   test -z "$as_dir" && as_dir=.
10161     for ac_exec_ext in '' $ac_executable_extensions; do
10162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165     break 2
10166   fi
10167 done
10168   done
10169 IFS=$as_save_IFS
10170 
10171   ;;
10172 esac
10173 fi
10174 SORT=$ac_cv_path_SORT
10175 if test -n "$SORT"; then
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10177 $as_echo "$SORT" >&6; }
10178 else
10179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180 $as_echo "no" >&6; }
10181 fi
10182 
10183 
10184           if test "x$SORT" = x; then
10185             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10186           fi
10187         else
10188           # Otherwise we believe it is a complete path. Use it as it is.
10189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10190 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10191           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10192 $as_echo_n "checking for SORT... " >&6; }
10193           if test ! -x "$tool_specified"; then
10194             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10195 $as_echo "not found" >&6; }
10196             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10197           fi
10198           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10199 $as_echo "$tool_specified" >&6; }
10200         fi
10201       fi
10202     fi
10203 
10204   fi
10205 
10206 
10207 
10208   if test "x$SORT" = x; then
10209     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10210   fi
10211 
10212 
10213 
10214 
10215 
10216   # Publish this variable in the help.
10217 
10218 
10219   if [ -z "${TAIL+x}" ]; then
10220     # The variable is not set by user, try to locate tool using the code snippet
10221     for ac_prog in tail
10222 do
10223   # Extract the first word of "$ac_prog", so it can be a program name with args.
10224 set dummy $ac_prog; ac_word=$2
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10226 $as_echo_n "checking for $ac_word... " >&6; }
10227 if ${ac_cv_path_TAIL+:} false; then :
10228   $as_echo_n "(cached) " >&6
10229 else
10230   case $TAIL in
10231   [\\/]* | ?:[\\/]*)
10232   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10233   ;;
10234   *)
10235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10236 for as_dir in $PATH
10237 do
10238   IFS=$as_save_IFS
10239   test -z "$as_dir" && as_dir=.
10240     for ac_exec_ext in '' $ac_executable_extensions; do
10241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10242     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10244     break 2
10245   fi
10246 done
10247   done
10248 IFS=$as_save_IFS
10249 
10250   ;;
10251 esac
10252 fi
10253 TAIL=$ac_cv_path_TAIL
10254 if test -n "$TAIL"; then
10255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10256 $as_echo "$TAIL" >&6; }
10257 else
10258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10259 $as_echo "no" >&6; }
10260 fi
10261 
10262 
10263   test -n "$TAIL" && break
10264 done
10265 
10266   else
10267     # The variable is set, but is it from the command line or the environment?
10268 
10269     # Try to remove the string !TAIL! from our list.
10270     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10271     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10272       # If it failed, the variable was not from the command line. Ignore it,
10273       # but warn the user (except for BASH, which is always set by the calling BASH).
10274       if test "xTAIL" != xBASH; then
10275         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10276 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10277       fi
10278       # Try to locate tool using the code snippet
10279       for ac_prog in tail
10280 do
10281   # Extract the first word of "$ac_prog", so it can be a program name with args.
10282 set dummy $ac_prog; ac_word=$2
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10284 $as_echo_n "checking for $ac_word... " >&6; }
10285 if ${ac_cv_path_TAIL+:} false; then :
10286   $as_echo_n "(cached) " >&6
10287 else
10288   case $TAIL in
10289   [\\/]* | ?:[\\/]*)
10290   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10291   ;;
10292   *)
10293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10294 for as_dir in $PATH
10295 do
10296   IFS=$as_save_IFS
10297   test -z "$as_dir" && as_dir=.
10298     for ac_exec_ext in '' $ac_executable_extensions; do
10299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10300     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10302     break 2
10303   fi
10304 done
10305   done
10306 IFS=$as_save_IFS
10307 
10308   ;;
10309 esac
10310 fi
10311 TAIL=$ac_cv_path_TAIL
10312 if test -n "$TAIL"; then
10313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10314 $as_echo "$TAIL" >&6; }
10315 else
10316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317 $as_echo "no" >&6; }
10318 fi
10319 
10320 
10321   test -n "$TAIL" && break
10322 done
10323 
10324     else
10325       # If it succeeded, then it was overridden by the user. We will use it
10326       # for the tool.
10327 
10328       # First remove it from the list of overridden variables, so we can test
10329       # for unknown variables in the end.
10330       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10331 
10332       # Check if we try to supply an empty value
10333       if test "x$TAIL" = x; then
10334         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10335 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10336         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10337 $as_echo_n "checking for TAIL... " >&6; }
10338         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10339 $as_echo "disabled" >&6; }
10340       else
10341         # Check if the provided tool contains a complete path.
10342         tool_specified="$TAIL"
10343         tool_basename="${tool_specified##*/}"
10344         if test "x$tool_basename" = "x$tool_specified"; then
10345           # A command without a complete path is provided, search $PATH.
10346           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10347 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10348           # Extract the first word of "$tool_basename", so it can be a program name with args.
10349 set dummy $tool_basename; ac_word=$2
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10351 $as_echo_n "checking for $ac_word... " >&6; }
10352 if ${ac_cv_path_TAIL+:} false; then :
10353   $as_echo_n "(cached) " >&6
10354 else
10355   case $TAIL in
10356   [\\/]* | ?:[\\/]*)
10357   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10358   ;;
10359   *)
10360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10361 for as_dir in $PATH
10362 do
10363   IFS=$as_save_IFS
10364   test -z "$as_dir" && as_dir=.
10365     for ac_exec_ext in '' $ac_executable_extensions; do
10366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10367     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10369     break 2
10370   fi
10371 done
10372   done
10373 IFS=$as_save_IFS
10374 
10375   ;;
10376 esac
10377 fi
10378 TAIL=$ac_cv_path_TAIL
10379 if test -n "$TAIL"; then
10380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10381 $as_echo "$TAIL" >&6; }
10382 else
10383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384 $as_echo "no" >&6; }
10385 fi
10386 
10387 
10388           if test "x$TAIL" = x; then
10389             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10390           fi
10391         else
10392           # Otherwise we believe it is a complete path. Use it as it is.
10393           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10394 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10395           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10396 $as_echo_n "checking for TAIL... " >&6; }
10397           if test ! -x "$tool_specified"; then
10398             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10399 $as_echo "not found" >&6; }
10400             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10401           fi
10402           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10403 $as_echo "$tool_specified" >&6; }
10404         fi
10405       fi
10406     fi
10407 
10408   fi
10409 
10410 
10411 
10412   if test "x$TAIL" = x; then
10413     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10414   fi
10415 
10416 
10417 
10418 
10419 
10420   # Publish this variable in the help.
10421 
10422 
10423   if [ -z "${TAR+x}" ]; then
10424     # The variable is not set by user, try to locate tool using the code snippet
10425     for ac_prog in tar
10426 do
10427   # Extract the first word of "$ac_prog", so it can be a program name with args.
10428 set dummy $ac_prog; ac_word=$2
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10430 $as_echo_n "checking for $ac_word... " >&6; }
10431 if ${ac_cv_path_TAR+:} false; then :
10432   $as_echo_n "(cached) " >&6
10433 else
10434   case $TAR in
10435   [\\/]* | ?:[\\/]*)
10436   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10437   ;;
10438   *)
10439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10440 for as_dir in $PATH
10441 do
10442   IFS=$as_save_IFS
10443   test -z "$as_dir" && as_dir=.
10444     for ac_exec_ext in '' $ac_executable_extensions; do
10445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10446     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10448     break 2
10449   fi
10450 done
10451   done
10452 IFS=$as_save_IFS
10453 
10454   ;;
10455 esac
10456 fi
10457 TAR=$ac_cv_path_TAR
10458 if test -n "$TAR"; then
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10460 $as_echo "$TAR" >&6; }
10461 else
10462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10463 $as_echo "no" >&6; }
10464 fi
10465 
10466 
10467   test -n "$TAR" && break
10468 done
10469 
10470   else
10471     # The variable is set, but is it from the command line or the environment?
10472 
10473     # Try to remove the string !TAR! from our list.
10474     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10475     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10476       # If it failed, the variable was not from the command line. Ignore it,
10477       # but warn the user (except for BASH, which is always set by the calling BASH).
10478       if test "xTAR" != xBASH; then
10479         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10480 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10481       fi
10482       # Try to locate tool using the code snippet
10483       for ac_prog in tar
10484 do
10485   # Extract the first word of "$ac_prog", so it can be a program name with args.
10486 set dummy $ac_prog; ac_word=$2
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488 $as_echo_n "checking for $ac_word... " >&6; }
10489 if ${ac_cv_path_TAR+:} false; then :
10490   $as_echo_n "(cached) " >&6
10491 else
10492   case $TAR in
10493   [\\/]* | ?:[\\/]*)
10494   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10495   ;;
10496   *)
10497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498 for as_dir in $PATH
10499 do
10500   IFS=$as_save_IFS
10501   test -z "$as_dir" && as_dir=.
10502     for ac_exec_ext in '' $ac_executable_extensions; do
10503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506     break 2
10507   fi
10508 done
10509   done
10510 IFS=$as_save_IFS
10511 
10512   ;;
10513 esac
10514 fi
10515 TAR=$ac_cv_path_TAR
10516 if test -n "$TAR"; then
10517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10518 $as_echo "$TAR" >&6; }
10519 else
10520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521 $as_echo "no" >&6; }
10522 fi
10523 
10524 
10525   test -n "$TAR" && break
10526 done
10527 
10528     else
10529       # If it succeeded, then it was overridden by the user. We will use it
10530       # for the tool.
10531 
10532       # First remove it from the list of overridden variables, so we can test
10533       # for unknown variables in the end.
10534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10535 
10536       # Check if we try to supply an empty value
10537       if test "x$TAR" = x; then
10538         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10539 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10540         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10541 $as_echo_n "checking for TAR... " >&6; }
10542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10543 $as_echo "disabled" >&6; }
10544       else
10545         # Check if the provided tool contains a complete path.
10546         tool_specified="$TAR"
10547         tool_basename="${tool_specified##*/}"
10548         if test "x$tool_basename" = "x$tool_specified"; then
10549           # A command without a complete path is provided, search $PATH.
10550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10551 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10552           # Extract the first word of "$tool_basename", so it can be a program name with args.
10553 set dummy $tool_basename; ac_word=$2
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10555 $as_echo_n "checking for $ac_word... " >&6; }
10556 if ${ac_cv_path_TAR+:} false; then :
10557   $as_echo_n "(cached) " >&6
10558 else
10559   case $TAR in
10560   [\\/]* | ?:[\\/]*)
10561   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10562   ;;
10563   *)
10564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10565 for as_dir in $PATH
10566 do
10567   IFS=$as_save_IFS
10568   test -z "$as_dir" && as_dir=.
10569     for ac_exec_ext in '' $ac_executable_extensions; do
10570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10571     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10573     break 2
10574   fi
10575 done
10576   done
10577 IFS=$as_save_IFS
10578 
10579   ;;
10580 esac
10581 fi
10582 TAR=$ac_cv_path_TAR
10583 if test -n "$TAR"; then
10584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10585 $as_echo "$TAR" >&6; }
10586 else
10587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10588 $as_echo "no" >&6; }
10589 fi
10590 
10591 
10592           if test "x$TAR" = x; then
10593             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10594           fi
10595         else
10596           # Otherwise we believe it is a complete path. Use it as it is.
10597           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10598 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10599           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10600 $as_echo_n "checking for TAR... " >&6; }
10601           if test ! -x "$tool_specified"; then
10602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10603 $as_echo "not found" >&6; }
10604             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10605           fi
10606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10607 $as_echo "$tool_specified" >&6; }
10608         fi
10609       fi
10610     fi
10611 
10612   fi
10613 
10614 
10615 
10616   if test "x$TAR" = x; then
10617     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10618   fi
10619 
10620 
10621 
10622 
10623 
10624   # Publish this variable in the help.
10625 
10626 
10627   if [ -z "${TEE+x}" ]; then
10628     # The variable is not set by user, try to locate tool using the code snippet
10629     for ac_prog in tee
10630 do
10631   # Extract the first word of "$ac_prog", so it can be a program name with args.
10632 set dummy $ac_prog; ac_word=$2
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10634 $as_echo_n "checking for $ac_word... " >&6; }
10635 if ${ac_cv_path_TEE+:} false; then :
10636   $as_echo_n "(cached) " >&6
10637 else
10638   case $TEE in
10639   [\\/]* | ?:[\\/]*)
10640   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10641   ;;
10642   *)
10643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10644 for as_dir in $PATH
10645 do
10646   IFS=$as_save_IFS
10647   test -z "$as_dir" && as_dir=.
10648     for ac_exec_ext in '' $ac_executable_extensions; do
10649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10650     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10652     break 2
10653   fi
10654 done
10655   done
10656 IFS=$as_save_IFS
10657 
10658   ;;
10659 esac
10660 fi
10661 TEE=$ac_cv_path_TEE
10662 if test -n "$TEE"; then
10663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10664 $as_echo "$TEE" >&6; }
10665 else
10666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10667 $as_echo "no" >&6; }
10668 fi
10669 
10670 
10671   test -n "$TEE" && break
10672 done
10673 
10674   else
10675     # The variable is set, but is it from the command line or the environment?
10676 
10677     # Try to remove the string !TEE! from our list.
10678     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10679     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10680       # If it failed, the variable was not from the command line. Ignore it,
10681       # but warn the user (except for BASH, which is always set by the calling BASH).
10682       if test "xTEE" != xBASH; then
10683         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10684 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10685       fi
10686       # Try to locate tool using the code snippet
10687       for ac_prog in tee
10688 do
10689   # Extract the first word of "$ac_prog", so it can be a program name with args.
10690 set dummy $ac_prog; ac_word=$2
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10692 $as_echo_n "checking for $ac_word... " >&6; }
10693 if ${ac_cv_path_TEE+:} false; then :
10694   $as_echo_n "(cached) " >&6
10695 else
10696   case $TEE in
10697   [\\/]* | ?:[\\/]*)
10698   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10699   ;;
10700   *)
10701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10702 for as_dir in $PATH
10703 do
10704   IFS=$as_save_IFS
10705   test -z "$as_dir" && as_dir=.
10706     for ac_exec_ext in '' $ac_executable_extensions; do
10707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10708     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10710     break 2
10711   fi
10712 done
10713   done
10714 IFS=$as_save_IFS
10715 
10716   ;;
10717 esac
10718 fi
10719 TEE=$ac_cv_path_TEE
10720 if test -n "$TEE"; then
10721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10722 $as_echo "$TEE" >&6; }
10723 else
10724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10725 $as_echo "no" >&6; }
10726 fi
10727 
10728 
10729   test -n "$TEE" && break
10730 done
10731 
10732     else
10733       # If it succeeded, then it was overridden by the user. We will use it
10734       # for the tool.
10735 
10736       # First remove it from the list of overridden variables, so we can test
10737       # for unknown variables in the end.
10738       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10739 
10740       # Check if we try to supply an empty value
10741       if test "x$TEE" = x; then
10742         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10743 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10744         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10745 $as_echo_n "checking for TEE... " >&6; }
10746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10747 $as_echo "disabled" >&6; }
10748       else
10749         # Check if the provided tool contains a complete path.
10750         tool_specified="$TEE"
10751         tool_basename="${tool_specified##*/}"
10752         if test "x$tool_basename" = "x$tool_specified"; then
10753           # A command without a complete path is provided, search $PATH.
10754           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10755 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10756           # Extract the first word of "$tool_basename", so it can be a program name with args.
10757 set dummy $tool_basename; ac_word=$2
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10759 $as_echo_n "checking for $ac_word... " >&6; }
10760 if ${ac_cv_path_TEE+:} false; then :
10761   $as_echo_n "(cached) " >&6
10762 else
10763   case $TEE in
10764   [\\/]* | ?:[\\/]*)
10765   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10766   ;;
10767   *)
10768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10769 for as_dir in $PATH
10770 do
10771   IFS=$as_save_IFS
10772   test -z "$as_dir" && as_dir=.
10773     for ac_exec_ext in '' $ac_executable_extensions; do
10774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10775     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10777     break 2
10778   fi
10779 done
10780   done
10781 IFS=$as_save_IFS
10782 
10783   ;;
10784 esac
10785 fi
10786 TEE=$ac_cv_path_TEE
10787 if test -n "$TEE"; then
10788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10789 $as_echo "$TEE" >&6; }
10790 else
10791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792 $as_echo "no" >&6; }
10793 fi
10794 
10795 
10796           if test "x$TEE" = x; then
10797             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10798           fi
10799         else
10800           # Otherwise we believe it is a complete path. Use it as it is.
10801           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10802 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10803           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10804 $as_echo_n "checking for TEE... " >&6; }
10805           if test ! -x "$tool_specified"; then
10806             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10807 $as_echo "not found" >&6; }
10808             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10809           fi
10810           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10811 $as_echo "$tool_specified" >&6; }
10812         fi
10813       fi
10814     fi
10815 
10816   fi
10817 
10818 
10819 
10820   if test "x$TEE" = x; then
10821     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10822   fi
10823 
10824 
10825 
10826 
10827 
10828   # Publish this variable in the help.
10829 
10830 
10831   if [ -z "${TOUCH+x}" ]; then
10832     # The variable is not set by user, try to locate tool using the code snippet
10833     for ac_prog in touch
10834 do
10835   # Extract the first word of "$ac_prog", so it can be a program name with args.
10836 set dummy $ac_prog; ac_word=$2
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10838 $as_echo_n "checking for $ac_word... " >&6; }
10839 if ${ac_cv_path_TOUCH+:} false; then :
10840   $as_echo_n "(cached) " >&6
10841 else
10842   case $TOUCH in
10843   [\\/]* | ?:[\\/]*)
10844   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10845   ;;
10846   *)
10847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10848 for as_dir in $PATH
10849 do
10850   IFS=$as_save_IFS
10851   test -z "$as_dir" && as_dir=.
10852     for ac_exec_ext in '' $ac_executable_extensions; do
10853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10854     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10856     break 2
10857   fi
10858 done
10859   done
10860 IFS=$as_save_IFS
10861 
10862   ;;
10863 esac
10864 fi
10865 TOUCH=$ac_cv_path_TOUCH
10866 if test -n "$TOUCH"; then
10867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10868 $as_echo "$TOUCH" >&6; }
10869 else
10870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10871 $as_echo "no" >&6; }
10872 fi
10873 
10874 
10875   test -n "$TOUCH" && break
10876 done
10877 
10878   else
10879     # The variable is set, but is it from the command line or the environment?
10880 
10881     # Try to remove the string !TOUCH! from our list.
10882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10883     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10884       # If it failed, the variable was not from the command line. Ignore it,
10885       # but warn the user (except for BASH, which is always set by the calling BASH).
10886       if test "xTOUCH" != xBASH; then
10887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10888 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10889       fi
10890       # Try to locate tool using the code snippet
10891       for ac_prog in touch
10892 do
10893   # Extract the first word of "$ac_prog", so it can be a program name with args.
10894 set dummy $ac_prog; ac_word=$2
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10896 $as_echo_n "checking for $ac_word... " >&6; }
10897 if ${ac_cv_path_TOUCH+:} false; then :
10898   $as_echo_n "(cached) " >&6
10899 else
10900   case $TOUCH in
10901   [\\/]* | ?:[\\/]*)
10902   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10903   ;;
10904   *)
10905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10906 for as_dir in $PATH
10907 do
10908   IFS=$as_save_IFS
10909   test -z "$as_dir" && as_dir=.
10910     for ac_exec_ext in '' $ac_executable_extensions; do
10911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10912     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10914     break 2
10915   fi
10916 done
10917   done
10918 IFS=$as_save_IFS
10919 
10920   ;;
10921 esac
10922 fi
10923 TOUCH=$ac_cv_path_TOUCH
10924 if test -n "$TOUCH"; then
10925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10926 $as_echo "$TOUCH" >&6; }
10927 else
10928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929 $as_echo "no" >&6; }
10930 fi
10931 
10932 
10933   test -n "$TOUCH" && break
10934 done
10935 
10936     else
10937       # If it succeeded, then it was overridden by the user. We will use it
10938       # for the tool.
10939 
10940       # First remove it from the list of overridden variables, so we can test
10941       # for unknown variables in the end.
10942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10943 
10944       # Check if we try to supply an empty value
10945       if test "x$TOUCH" = x; then
10946         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10947 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10949 $as_echo_n "checking for TOUCH... " >&6; }
10950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10951 $as_echo "disabled" >&6; }
10952       else
10953         # Check if the provided tool contains a complete path.
10954         tool_specified="$TOUCH"
10955         tool_basename="${tool_specified##*/}"
10956         if test "x$tool_basename" = "x$tool_specified"; then
10957           # A command without a complete path is provided, search $PATH.
10958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10959 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10960           # Extract the first word of "$tool_basename", so it can be a program name with args.
10961 set dummy $tool_basename; ac_word=$2
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10963 $as_echo_n "checking for $ac_word... " >&6; }
10964 if ${ac_cv_path_TOUCH+:} false; then :
10965   $as_echo_n "(cached) " >&6
10966 else
10967   case $TOUCH in
10968   [\\/]* | ?:[\\/]*)
10969   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10970   ;;
10971   *)
10972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10973 for as_dir in $PATH
10974 do
10975   IFS=$as_save_IFS
10976   test -z "$as_dir" && as_dir=.
10977     for ac_exec_ext in '' $ac_executable_extensions; do
10978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10979     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10981     break 2
10982   fi
10983 done
10984   done
10985 IFS=$as_save_IFS
10986 
10987   ;;
10988 esac
10989 fi
10990 TOUCH=$ac_cv_path_TOUCH
10991 if test -n "$TOUCH"; then
10992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10993 $as_echo "$TOUCH" >&6; }
10994 else
10995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996 $as_echo "no" >&6; }
10997 fi
10998 
10999 
11000           if test "x$TOUCH" = x; then
11001             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11002           fi
11003         else
11004           # Otherwise we believe it is a complete path. Use it as it is.
11005           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11006 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11007           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11008 $as_echo_n "checking for TOUCH... " >&6; }
11009           if test ! -x "$tool_specified"; then
11010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11011 $as_echo "not found" >&6; }
11012             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11013           fi
11014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11015 $as_echo "$tool_specified" >&6; }
11016         fi
11017       fi
11018     fi
11019 
11020   fi
11021 
11022 
11023 
11024   if test "x$TOUCH" = x; then
11025     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11026   fi
11027 
11028 
11029 
11030 
11031 
11032   # Publish this variable in the help.
11033 
11034 
11035   if [ -z "${TR+x}" ]; then
11036     # The variable is not set by user, try to locate tool using the code snippet
11037     for ac_prog in tr
11038 do
11039   # Extract the first word of "$ac_prog", so it can be a program name with args.
11040 set dummy $ac_prog; ac_word=$2
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11042 $as_echo_n "checking for $ac_word... " >&6; }
11043 if ${ac_cv_path_TR+:} false; then :
11044   $as_echo_n "(cached) " >&6
11045 else
11046   case $TR in
11047   [\\/]* | ?:[\\/]*)
11048   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11049   ;;
11050   *)
11051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11052 for as_dir in $PATH
11053 do
11054   IFS=$as_save_IFS
11055   test -z "$as_dir" && as_dir=.
11056     for ac_exec_ext in '' $ac_executable_extensions; do
11057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11058     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11060     break 2
11061   fi
11062 done
11063   done
11064 IFS=$as_save_IFS
11065 
11066   ;;
11067 esac
11068 fi
11069 TR=$ac_cv_path_TR
11070 if test -n "$TR"; then
11071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11072 $as_echo "$TR" >&6; }
11073 else
11074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11075 $as_echo "no" >&6; }
11076 fi
11077 
11078 
11079   test -n "$TR" && break
11080 done
11081 
11082   else
11083     # The variable is set, but is it from the command line or the environment?
11084 
11085     # Try to remove the string !TR! from our list.
11086     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11087     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11088       # If it failed, the variable was not from the command line. Ignore it,
11089       # but warn the user (except for BASH, which is always set by the calling BASH).
11090       if test "xTR" != xBASH; then
11091         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11092 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11093       fi
11094       # Try to locate tool using the code snippet
11095       for ac_prog in tr
11096 do
11097   # Extract the first word of "$ac_prog", so it can be a program name with args.
11098 set dummy $ac_prog; ac_word=$2
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11100 $as_echo_n "checking for $ac_word... " >&6; }
11101 if ${ac_cv_path_TR+:} false; then :
11102   $as_echo_n "(cached) " >&6
11103 else
11104   case $TR in
11105   [\\/]* | ?:[\\/]*)
11106   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11107   ;;
11108   *)
11109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11110 for as_dir in $PATH
11111 do
11112   IFS=$as_save_IFS
11113   test -z "$as_dir" && as_dir=.
11114     for ac_exec_ext in '' $ac_executable_extensions; do
11115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11116     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11118     break 2
11119   fi
11120 done
11121   done
11122 IFS=$as_save_IFS
11123 
11124   ;;
11125 esac
11126 fi
11127 TR=$ac_cv_path_TR
11128 if test -n "$TR"; then
11129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11130 $as_echo "$TR" >&6; }
11131 else
11132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133 $as_echo "no" >&6; }
11134 fi
11135 
11136 
11137   test -n "$TR" && break
11138 done
11139 
11140     else
11141       # If it succeeded, then it was overridden by the user. We will use it
11142       # for the tool.
11143 
11144       # First remove it from the list of overridden variables, so we can test
11145       # for unknown variables in the end.
11146       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11147 
11148       # Check if we try to supply an empty value
11149       if test "x$TR" = x; then
11150         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11151 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11152         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11153 $as_echo_n "checking for TR... " >&6; }
11154         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11155 $as_echo "disabled" >&6; }
11156       else
11157         # Check if the provided tool contains a complete path.
11158         tool_specified="$TR"
11159         tool_basename="${tool_specified##*/}"
11160         if test "x$tool_basename" = "x$tool_specified"; then
11161           # A command without a complete path is provided, search $PATH.
11162           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11163 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11164           # Extract the first word of "$tool_basename", so it can be a program name with args.
11165 set dummy $tool_basename; ac_word=$2
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11167 $as_echo_n "checking for $ac_word... " >&6; }
11168 if ${ac_cv_path_TR+:} false; then :
11169   $as_echo_n "(cached) " >&6
11170 else
11171   case $TR in
11172   [\\/]* | ?:[\\/]*)
11173   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11174   ;;
11175   *)
11176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11177 for as_dir in $PATH
11178 do
11179   IFS=$as_save_IFS
11180   test -z "$as_dir" && as_dir=.
11181     for ac_exec_ext in '' $ac_executable_extensions; do
11182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11183     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11185     break 2
11186   fi
11187 done
11188   done
11189 IFS=$as_save_IFS
11190 
11191   ;;
11192 esac
11193 fi
11194 TR=$ac_cv_path_TR
11195 if test -n "$TR"; then
11196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11197 $as_echo "$TR" >&6; }
11198 else
11199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11200 $as_echo "no" >&6; }
11201 fi
11202 
11203 
11204           if test "x$TR" = x; then
11205             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11206           fi
11207         else
11208           # Otherwise we believe it is a complete path. Use it as it is.
11209           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11210 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11211           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11212 $as_echo_n "checking for TR... " >&6; }
11213           if test ! -x "$tool_specified"; then
11214             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11215 $as_echo "not found" >&6; }
11216             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11217           fi
11218           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11219 $as_echo "$tool_specified" >&6; }
11220         fi
11221       fi
11222     fi
11223 
11224   fi
11225 
11226 
11227 
11228   if test "x$TR" = x; then
11229     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11230   fi
11231 
11232 
11233 
11234 
11235 
11236   # Publish this variable in the help.
11237 
11238 
11239   if [ -z "${UNAME+x}" ]; then
11240     # The variable is not set by user, try to locate tool using the code snippet
11241     for ac_prog in uname
11242 do
11243   # Extract the first word of "$ac_prog", so it can be a program name with args.
11244 set dummy $ac_prog; ac_word=$2
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11246 $as_echo_n "checking for $ac_word... " >&6; }
11247 if ${ac_cv_path_UNAME+:} false; then :
11248   $as_echo_n "(cached) " >&6
11249 else
11250   case $UNAME in
11251   [\\/]* | ?:[\\/]*)
11252   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11253   ;;
11254   *)
11255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11256 for as_dir in $PATH
11257 do
11258   IFS=$as_save_IFS
11259   test -z "$as_dir" && as_dir=.
11260     for ac_exec_ext in '' $ac_executable_extensions; do
11261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11262     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11264     break 2
11265   fi
11266 done
11267   done
11268 IFS=$as_save_IFS
11269 
11270   ;;
11271 esac
11272 fi
11273 UNAME=$ac_cv_path_UNAME
11274 if test -n "$UNAME"; then
11275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11276 $as_echo "$UNAME" >&6; }
11277 else
11278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11279 $as_echo "no" >&6; }
11280 fi
11281 
11282 
11283   test -n "$UNAME" && break
11284 done
11285 
11286   else
11287     # The variable is set, but is it from the command line or the environment?
11288 
11289     # Try to remove the string !UNAME! from our list.
11290     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11291     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11292       # If it failed, the variable was not from the command line. Ignore it,
11293       # but warn the user (except for BASH, which is always set by the calling BASH).
11294       if test "xUNAME" != xBASH; then
11295         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11296 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11297       fi
11298       # Try to locate tool using the code snippet
11299       for ac_prog in uname
11300 do
11301   # Extract the first word of "$ac_prog", so it can be a program name with args.
11302 set dummy $ac_prog; ac_word=$2
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11304 $as_echo_n "checking for $ac_word... " >&6; }
11305 if ${ac_cv_path_UNAME+:} false; then :
11306   $as_echo_n "(cached) " >&6
11307 else
11308   case $UNAME in
11309   [\\/]* | ?:[\\/]*)
11310   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11311   ;;
11312   *)
11313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11314 for as_dir in $PATH
11315 do
11316   IFS=$as_save_IFS
11317   test -z "$as_dir" && as_dir=.
11318     for ac_exec_ext in '' $ac_executable_extensions; do
11319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11320     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11322     break 2
11323   fi
11324 done
11325   done
11326 IFS=$as_save_IFS
11327 
11328   ;;
11329 esac
11330 fi
11331 UNAME=$ac_cv_path_UNAME
11332 if test -n "$UNAME"; then
11333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11334 $as_echo "$UNAME" >&6; }
11335 else
11336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337 $as_echo "no" >&6; }
11338 fi
11339 
11340 
11341   test -n "$UNAME" && break
11342 done
11343 
11344     else
11345       # If it succeeded, then it was overridden by the user. We will use it
11346       # for the tool.
11347 
11348       # First remove it from the list of overridden variables, so we can test
11349       # for unknown variables in the end.
11350       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11351 
11352       # Check if we try to supply an empty value
11353       if test "x$UNAME" = x; then
11354         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11355 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11357 $as_echo_n "checking for UNAME... " >&6; }
11358         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11359 $as_echo "disabled" >&6; }
11360       else
11361         # Check if the provided tool contains a complete path.
11362         tool_specified="$UNAME"
11363         tool_basename="${tool_specified##*/}"
11364         if test "x$tool_basename" = "x$tool_specified"; then
11365           # A command without a complete path is provided, search $PATH.
11366           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11367 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11368           # Extract the first word of "$tool_basename", so it can be a program name with args.
11369 set dummy $tool_basename; ac_word=$2
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371 $as_echo_n "checking for $ac_word... " >&6; }
11372 if ${ac_cv_path_UNAME+:} false; then :
11373   $as_echo_n "(cached) " >&6
11374 else
11375   case $UNAME in
11376   [\\/]* | ?:[\\/]*)
11377   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11378   ;;
11379   *)
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_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
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   ;;
11396 esac
11397 fi
11398 UNAME=$ac_cv_path_UNAME
11399 if test -n "$UNAME"; then
11400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11401 $as_echo "$UNAME" >&6; }
11402 else
11403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404 $as_echo "no" >&6; }
11405 fi
11406 
11407 
11408           if test "x$UNAME" = x; then
11409             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11410           fi
11411         else
11412           # Otherwise we believe it is a complete path. Use it as it is.
11413           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11414 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11415           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11416 $as_echo_n "checking for UNAME... " >&6; }
11417           if test ! -x "$tool_specified"; then
11418             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11419 $as_echo "not found" >&6; }
11420             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11421           fi
11422           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11423 $as_echo "$tool_specified" >&6; }
11424         fi
11425       fi
11426     fi
11427 
11428   fi
11429 
11430 
11431 
11432   if test "x$UNAME" = x; then
11433     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11434   fi
11435 
11436 
11437 
11438 
11439 
11440   # Publish this variable in the help.
11441 
11442 
11443   if [ -z "${UNIQ+x}" ]; then
11444     # The variable is not set by user, try to locate tool using the code snippet
11445     for ac_prog in uniq
11446 do
11447   # Extract the first word of "$ac_prog", so it can be a program name with args.
11448 set dummy $ac_prog; ac_word=$2
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11450 $as_echo_n "checking for $ac_word... " >&6; }
11451 if ${ac_cv_path_UNIQ+:} false; then :
11452   $as_echo_n "(cached) " >&6
11453 else
11454   case $UNIQ in
11455   [\\/]* | ?:[\\/]*)
11456   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11457   ;;
11458   *)
11459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11460 for as_dir in $PATH
11461 do
11462   IFS=$as_save_IFS
11463   test -z "$as_dir" && as_dir=.
11464     for ac_exec_ext in '' $ac_executable_extensions; do
11465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11466     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11468     break 2
11469   fi
11470 done
11471   done
11472 IFS=$as_save_IFS
11473 
11474   ;;
11475 esac
11476 fi
11477 UNIQ=$ac_cv_path_UNIQ
11478 if test -n "$UNIQ"; then
11479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11480 $as_echo "$UNIQ" >&6; }
11481 else
11482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483 $as_echo "no" >&6; }
11484 fi
11485 
11486 
11487   test -n "$UNIQ" && break
11488 done
11489 
11490   else
11491     # The variable is set, but is it from the command line or the environment?
11492 
11493     # Try to remove the string !UNIQ! from our list.
11494     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11495     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11496       # If it failed, the variable was not from the command line. Ignore it,
11497       # but warn the user (except for BASH, which is always set by the calling BASH).
11498       if test "xUNIQ" != xBASH; then
11499         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11500 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11501       fi
11502       # Try to locate tool using the code snippet
11503       for ac_prog in uniq
11504 do
11505   # Extract the first word of "$ac_prog", so it can be a program name with args.
11506 set dummy $ac_prog; ac_word=$2
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11508 $as_echo_n "checking for $ac_word... " >&6; }
11509 if ${ac_cv_path_UNIQ+:} false; then :
11510   $as_echo_n "(cached) " >&6
11511 else
11512   case $UNIQ in
11513   [\\/]* | ?:[\\/]*)
11514   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11515   ;;
11516   *)
11517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11518 for as_dir in $PATH
11519 do
11520   IFS=$as_save_IFS
11521   test -z "$as_dir" && as_dir=.
11522     for ac_exec_ext in '' $ac_executable_extensions; do
11523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11524     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11526     break 2
11527   fi
11528 done
11529   done
11530 IFS=$as_save_IFS
11531 
11532   ;;
11533 esac
11534 fi
11535 UNIQ=$ac_cv_path_UNIQ
11536 if test -n "$UNIQ"; then
11537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11538 $as_echo "$UNIQ" >&6; }
11539 else
11540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541 $as_echo "no" >&6; }
11542 fi
11543 
11544 
11545   test -n "$UNIQ" && break
11546 done
11547 
11548     else
11549       # If it succeeded, then it was overridden by the user. We will use it
11550       # for the tool.
11551 
11552       # First remove it from the list of overridden variables, so we can test
11553       # for unknown variables in the end.
11554       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11555 
11556       # Check if we try to supply an empty value
11557       if test "x$UNIQ" = x; then
11558         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11559 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11560         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11561 $as_echo_n "checking for UNIQ... " >&6; }
11562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11563 $as_echo "disabled" >&6; }
11564       else
11565         # Check if the provided tool contains a complete path.
11566         tool_specified="$UNIQ"
11567         tool_basename="${tool_specified##*/}"
11568         if test "x$tool_basename" = "x$tool_specified"; then
11569           # A command without a complete path is provided, search $PATH.
11570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11571 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11572           # Extract the first word of "$tool_basename", so it can be a program name with args.
11573 set dummy $tool_basename; ac_word=$2
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11575 $as_echo_n "checking for $ac_word... " >&6; }
11576 if ${ac_cv_path_UNIQ+:} false; then :
11577   $as_echo_n "(cached) " >&6
11578 else
11579   case $UNIQ in
11580   [\\/]* | ?:[\\/]*)
11581   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11582   ;;
11583   *)
11584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11585 for as_dir in $PATH
11586 do
11587   IFS=$as_save_IFS
11588   test -z "$as_dir" && as_dir=.
11589     for ac_exec_ext in '' $ac_executable_extensions; do
11590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11591     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11593     break 2
11594   fi
11595 done
11596   done
11597 IFS=$as_save_IFS
11598 
11599   ;;
11600 esac
11601 fi
11602 UNIQ=$ac_cv_path_UNIQ
11603 if test -n "$UNIQ"; then
11604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11605 $as_echo "$UNIQ" >&6; }
11606 else
11607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608 $as_echo "no" >&6; }
11609 fi
11610 
11611 
11612           if test "x$UNIQ" = x; then
11613             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11614           fi
11615         else
11616           # Otherwise we believe it is a complete path. Use it as it is.
11617           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11618 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11619           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11620 $as_echo_n "checking for UNIQ... " >&6; }
11621           if test ! -x "$tool_specified"; then
11622             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11623 $as_echo "not found" >&6; }
11624             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11625           fi
11626           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11627 $as_echo "$tool_specified" >&6; }
11628         fi
11629       fi
11630     fi
11631 
11632   fi
11633 
11634 
11635 
11636   if test "x$UNIQ" = x; then
11637     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11638   fi
11639 
11640 
11641 
11642 
11643 
11644   # Publish this variable in the help.
11645 
11646 
11647   if [ -z "${WC+x}" ]; then
11648     # The variable is not set by user, try to locate tool using the code snippet
11649     for ac_prog in wc
11650 do
11651   # Extract the first word of "$ac_prog", so it can be a program name with args.
11652 set dummy $ac_prog; ac_word=$2
11653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11654 $as_echo_n "checking for $ac_word... " >&6; }
11655 if ${ac_cv_path_WC+:} false; then :
11656   $as_echo_n "(cached) " >&6
11657 else
11658   case $WC in
11659   [\\/]* | ?:[\\/]*)
11660   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11661   ;;
11662   *)
11663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11664 for as_dir in $PATH
11665 do
11666   IFS=$as_save_IFS
11667   test -z "$as_dir" && as_dir=.
11668     for ac_exec_ext in '' $ac_executable_extensions; do
11669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11670     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11672     break 2
11673   fi
11674 done
11675   done
11676 IFS=$as_save_IFS
11677 
11678   ;;
11679 esac
11680 fi
11681 WC=$ac_cv_path_WC
11682 if test -n "$WC"; then
11683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11684 $as_echo "$WC" >&6; }
11685 else
11686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687 $as_echo "no" >&6; }
11688 fi
11689 
11690 
11691   test -n "$WC" && break
11692 done
11693 
11694   else
11695     # The variable is set, but is it from the command line or the environment?
11696 
11697     # Try to remove the string !WC! from our list.
11698     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11699     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11700       # If it failed, the variable was not from the command line. Ignore it,
11701       # but warn the user (except for BASH, which is always set by the calling BASH).
11702       if test "xWC" != xBASH; then
11703         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11704 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11705       fi
11706       # Try to locate tool using the code snippet
11707       for ac_prog in wc
11708 do
11709   # Extract the first word of "$ac_prog", so it can be a program name with args.
11710 set dummy $ac_prog; ac_word=$2
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11712 $as_echo_n "checking for $ac_word... " >&6; }
11713 if ${ac_cv_path_WC+:} false; then :
11714   $as_echo_n "(cached) " >&6
11715 else
11716   case $WC in
11717   [\\/]* | ?:[\\/]*)
11718   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11719   ;;
11720   *)
11721   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11722 for as_dir in $PATH
11723 do
11724   IFS=$as_save_IFS
11725   test -z "$as_dir" && as_dir=.
11726     for ac_exec_ext in '' $ac_executable_extensions; do
11727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11728     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11730     break 2
11731   fi
11732 done
11733   done
11734 IFS=$as_save_IFS
11735 
11736   ;;
11737 esac
11738 fi
11739 WC=$ac_cv_path_WC
11740 if test -n "$WC"; then
11741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11742 $as_echo "$WC" >&6; }
11743 else
11744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745 $as_echo "no" >&6; }
11746 fi
11747 
11748 
11749   test -n "$WC" && break
11750 done
11751 
11752     else
11753       # If it succeeded, then it was overridden by the user. We will use it
11754       # for the tool.
11755 
11756       # First remove it from the list of overridden variables, so we can test
11757       # for unknown variables in the end.
11758       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11759 
11760       # Check if we try to supply an empty value
11761       if test "x$WC" = x; then
11762         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11763 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11764         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11765 $as_echo_n "checking for WC... " >&6; }
11766         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11767 $as_echo "disabled" >&6; }
11768       else
11769         # Check if the provided tool contains a complete path.
11770         tool_specified="$WC"
11771         tool_basename="${tool_specified##*/}"
11772         if test "x$tool_basename" = "x$tool_specified"; then
11773           # A command without a complete path is provided, search $PATH.
11774           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11775 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11776           # Extract the first word of "$tool_basename", so it can be a program name with args.
11777 set dummy $tool_basename; ac_word=$2
11778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11779 $as_echo_n "checking for $ac_word... " >&6; }
11780 if ${ac_cv_path_WC+:} false; then :
11781   $as_echo_n "(cached) " >&6
11782 else
11783   case $WC in
11784   [\\/]* | ?:[\\/]*)
11785   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11786   ;;
11787   *)
11788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11789 for as_dir in $PATH
11790 do
11791   IFS=$as_save_IFS
11792   test -z "$as_dir" && as_dir=.
11793     for ac_exec_ext in '' $ac_executable_extensions; do
11794   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11795     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11797     break 2
11798   fi
11799 done
11800   done
11801 IFS=$as_save_IFS
11802 
11803   ;;
11804 esac
11805 fi
11806 WC=$ac_cv_path_WC
11807 if test -n "$WC"; then
11808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11809 $as_echo "$WC" >&6; }
11810 else
11811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11812 $as_echo "no" >&6; }
11813 fi
11814 
11815 
11816           if test "x$WC" = x; then
11817             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11818           fi
11819         else
11820           # Otherwise we believe it is a complete path. Use it as it is.
11821           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11822 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11823           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11824 $as_echo_n "checking for WC... " >&6; }
11825           if test ! -x "$tool_specified"; then
11826             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11827 $as_echo "not found" >&6; }
11828             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11829           fi
11830           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11831 $as_echo "$tool_specified" >&6; }
11832         fi
11833       fi
11834     fi
11835 
11836   fi
11837 
11838 
11839 
11840   if test "x$WC" = x; then
11841     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11842   fi
11843 
11844 
11845 
11846 
11847 
11848   # Publish this variable in the help.
11849 
11850 
11851   if [ -z "${WHICH+x}" ]; then
11852     # The variable is not set by user, try to locate tool using the code snippet
11853     for ac_prog in which
11854 do
11855   # Extract the first word of "$ac_prog", so it can be a program name with args.
11856 set dummy $ac_prog; ac_word=$2
11857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11858 $as_echo_n "checking for $ac_word... " >&6; }
11859 if ${ac_cv_path_WHICH+:} false; then :
11860   $as_echo_n "(cached) " >&6
11861 else
11862   case $WHICH in
11863   [\\/]* | ?:[\\/]*)
11864   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11865   ;;
11866   *)
11867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868 for as_dir in $PATH
11869 do
11870   IFS=$as_save_IFS
11871   test -z "$as_dir" && as_dir=.
11872     for ac_exec_ext in '' $ac_executable_extensions; do
11873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11874     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11876     break 2
11877   fi
11878 done
11879   done
11880 IFS=$as_save_IFS
11881 
11882   ;;
11883 esac
11884 fi
11885 WHICH=$ac_cv_path_WHICH
11886 if test -n "$WHICH"; then
11887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11888 $as_echo "$WHICH" >&6; }
11889 else
11890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11891 $as_echo "no" >&6; }
11892 fi
11893 
11894 
11895   test -n "$WHICH" && break
11896 done
11897 
11898   else
11899     # The variable is set, but is it from the command line or the environment?
11900 
11901     # Try to remove the string !WHICH! from our list.
11902     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11903     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11904       # If it failed, the variable was not from the command line. Ignore it,
11905       # but warn the user (except for BASH, which is always set by the calling BASH).
11906       if test "xWHICH" != xBASH; then
11907         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11908 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11909       fi
11910       # Try to locate tool using the code snippet
11911       for ac_prog in which
11912 do
11913   # Extract the first word of "$ac_prog", so it can be a program name with args.
11914 set dummy $ac_prog; ac_word=$2
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11916 $as_echo_n "checking for $ac_word... " >&6; }
11917 if ${ac_cv_path_WHICH+:} false; then :
11918   $as_echo_n "(cached) " >&6
11919 else
11920   case $WHICH in
11921   [\\/]* | ?:[\\/]*)
11922   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11923   ;;
11924   *)
11925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926 for as_dir in $PATH
11927 do
11928   IFS=$as_save_IFS
11929   test -z "$as_dir" && as_dir=.
11930     for ac_exec_ext in '' $ac_executable_extensions; do
11931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11932     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11934     break 2
11935   fi
11936 done
11937   done
11938 IFS=$as_save_IFS
11939 
11940   ;;
11941 esac
11942 fi
11943 WHICH=$ac_cv_path_WHICH
11944 if test -n "$WHICH"; then
11945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11946 $as_echo "$WHICH" >&6; }
11947 else
11948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949 $as_echo "no" >&6; }
11950 fi
11951 
11952 
11953   test -n "$WHICH" && break
11954 done
11955 
11956     else
11957       # If it succeeded, then it was overridden by the user. We will use it
11958       # for the tool.
11959 
11960       # First remove it from the list of overridden variables, so we can test
11961       # for unknown variables in the end.
11962       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11963 
11964       # Check if we try to supply an empty value
11965       if test "x$WHICH" = x; then
11966         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11967 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11969 $as_echo_n "checking for WHICH... " >&6; }
11970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11971 $as_echo "disabled" >&6; }
11972       else
11973         # Check if the provided tool contains a complete path.
11974         tool_specified="$WHICH"
11975         tool_basename="${tool_specified##*/}"
11976         if test "x$tool_basename" = "x$tool_specified"; then
11977           # A command without a complete path is provided, search $PATH.
11978           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11979 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11980           # Extract the first word of "$tool_basename", so it can be a program name with args.
11981 set dummy $tool_basename; ac_word=$2
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11983 $as_echo_n "checking for $ac_word... " >&6; }
11984 if ${ac_cv_path_WHICH+:} false; then :
11985   $as_echo_n "(cached) " >&6
11986 else
11987   case $WHICH in
11988   [\\/]* | ?:[\\/]*)
11989   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11990   ;;
11991   *)
11992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11993 for as_dir in $PATH
11994 do
11995   IFS=$as_save_IFS
11996   test -z "$as_dir" && as_dir=.
11997     for ac_exec_ext in '' $ac_executable_extensions; do
11998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11999     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12001     break 2
12002   fi
12003 done
12004   done
12005 IFS=$as_save_IFS
12006 
12007   ;;
12008 esac
12009 fi
12010 WHICH=$ac_cv_path_WHICH
12011 if test -n "$WHICH"; then
12012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12013 $as_echo "$WHICH" >&6; }
12014 else
12015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12016 $as_echo "no" >&6; }
12017 fi
12018 
12019 
12020           if test "x$WHICH" = x; then
12021             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12022           fi
12023         else
12024           # Otherwise we believe it is a complete path. Use it as it is.
12025           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12026 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12027           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12028 $as_echo_n "checking for WHICH... " >&6; }
12029           if test ! -x "$tool_specified"; then
12030             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12031 $as_echo "not found" >&6; }
12032             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12033           fi
12034           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12035 $as_echo "$tool_specified" >&6; }
12036         fi
12037       fi
12038     fi
12039 
12040   fi
12041 
12042 
12043 
12044   if test "x$WHICH" = x; then
12045     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12046   fi
12047 
12048 
12049 
12050 
12051 
12052   # Publish this variable in the help.
12053 
12054 
12055   if [ -z "${XARGS+x}" ]; then
12056     # The variable is not set by user, try to locate tool using the code snippet
12057     for ac_prog in xargs
12058 do
12059   # Extract the first word of "$ac_prog", so it can be a program name with args.
12060 set dummy $ac_prog; ac_word=$2
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12062 $as_echo_n "checking for $ac_word... " >&6; }
12063 if ${ac_cv_path_XARGS+:} false; then :
12064   $as_echo_n "(cached) " >&6
12065 else
12066   case $XARGS in
12067   [\\/]* | ?:[\\/]*)
12068   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12069   ;;
12070   *)
12071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12072 for as_dir in $PATH
12073 do
12074   IFS=$as_save_IFS
12075   test -z "$as_dir" && as_dir=.
12076     for ac_exec_ext in '' $ac_executable_extensions; do
12077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12078     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12080     break 2
12081   fi
12082 done
12083   done
12084 IFS=$as_save_IFS
12085 
12086   ;;
12087 esac
12088 fi
12089 XARGS=$ac_cv_path_XARGS
12090 if test -n "$XARGS"; then
12091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12092 $as_echo "$XARGS" >&6; }
12093 else
12094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12095 $as_echo "no" >&6; }
12096 fi
12097 
12098 
12099   test -n "$XARGS" && break
12100 done
12101 
12102   else
12103     # The variable is set, but is it from the command line or the environment?
12104 
12105     # Try to remove the string !XARGS! from our list.
12106     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12107     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12108       # If it failed, the variable was not from the command line. Ignore it,
12109       # but warn the user (except for BASH, which is always set by the calling BASH).
12110       if test "xXARGS" != xBASH; then
12111         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12112 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12113       fi
12114       # Try to locate tool using the code snippet
12115       for ac_prog in xargs
12116 do
12117   # Extract the first word of "$ac_prog", so it can be a program name with args.
12118 set dummy $ac_prog; ac_word=$2
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12120 $as_echo_n "checking for $ac_word... " >&6; }
12121 if ${ac_cv_path_XARGS+:} false; then :
12122   $as_echo_n "(cached) " >&6
12123 else
12124   case $XARGS in
12125   [\\/]* | ?:[\\/]*)
12126   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12127   ;;
12128   *)
12129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12130 for as_dir in $PATH
12131 do
12132   IFS=$as_save_IFS
12133   test -z "$as_dir" && as_dir=.
12134     for ac_exec_ext in '' $ac_executable_extensions; do
12135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12136     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12138     break 2
12139   fi
12140 done
12141   done
12142 IFS=$as_save_IFS
12143 
12144   ;;
12145 esac
12146 fi
12147 XARGS=$ac_cv_path_XARGS
12148 if test -n "$XARGS"; then
12149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12150 $as_echo "$XARGS" >&6; }
12151 else
12152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12153 $as_echo "no" >&6; }
12154 fi
12155 
12156 
12157   test -n "$XARGS" && break
12158 done
12159 
12160     else
12161       # If it succeeded, then it was overridden by the user. We will use it
12162       # for the tool.
12163 
12164       # First remove it from the list of overridden variables, so we can test
12165       # for unknown variables in the end.
12166       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12167 
12168       # Check if we try to supply an empty value
12169       if test "x$XARGS" = x; then
12170         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12171 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12172         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12173 $as_echo_n "checking for XARGS... " >&6; }
12174         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12175 $as_echo "disabled" >&6; }
12176       else
12177         # Check if the provided tool contains a complete path.
12178         tool_specified="$XARGS"
12179         tool_basename="${tool_specified##*/}"
12180         if test "x$tool_basename" = "x$tool_specified"; then
12181           # A command without a complete path is provided, search $PATH.
12182           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12183 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12184           # Extract the first word of "$tool_basename", so it can be a program name with args.
12185 set dummy $tool_basename; ac_word=$2
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187 $as_echo_n "checking for $ac_word... " >&6; }
12188 if ${ac_cv_path_XARGS+:} false; then :
12189   $as_echo_n "(cached) " >&6
12190 else
12191   case $XARGS in
12192   [\\/]* | ?:[\\/]*)
12193   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12194   ;;
12195   *)
12196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12197 for as_dir in $PATH
12198 do
12199   IFS=$as_save_IFS
12200   test -z "$as_dir" && as_dir=.
12201     for ac_exec_ext in '' $ac_executable_extensions; do
12202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12203     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12205     break 2
12206   fi
12207 done
12208   done
12209 IFS=$as_save_IFS
12210 
12211   ;;
12212 esac
12213 fi
12214 XARGS=$ac_cv_path_XARGS
12215 if test -n "$XARGS"; then
12216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12217 $as_echo "$XARGS" >&6; }
12218 else
12219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12220 $as_echo "no" >&6; }
12221 fi
12222 
12223 
12224           if test "x$XARGS" = x; then
12225             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12226           fi
12227         else
12228           # Otherwise we believe it is a complete path. Use it as it is.
12229           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12230 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12231           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12232 $as_echo_n "checking for XARGS... " >&6; }
12233           if test ! -x "$tool_specified"; then
12234             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12235 $as_echo "not found" >&6; }
12236             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12237           fi
12238           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12239 $as_echo "$tool_specified" >&6; }
12240         fi
12241       fi
12242     fi
12243 
12244   fi
12245 
12246 
12247 
12248   if test "x$XARGS" = x; then
12249     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12250   fi
12251 
12252 
12253 
12254   # Then required tools that require some special treatment.
12255 
12256 
12257   # Publish this variable in the help.
12258 
12259 
12260   if [ -z "${AWK+x}" ]; then
12261     # The variable is not set by user, try to locate tool using the code snippet
12262     for ac_prog in gawk mawk nawk awk
12263 do
12264   # Extract the first word of "$ac_prog", so it can be a program name with args.
12265 set dummy $ac_prog; ac_word=$2
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12267 $as_echo_n "checking for $ac_word... " >&6; }
12268 if ${ac_cv_prog_AWK+:} false; then :
12269   $as_echo_n "(cached) " >&6
12270 else
12271   if test -n "$AWK"; then
12272   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12273 else
12274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12275 for as_dir in $PATH
12276 do
12277   IFS=$as_save_IFS
12278   test -z "$as_dir" && as_dir=.
12279     for ac_exec_ext in '' $ac_executable_extensions; do
12280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12281     ac_cv_prog_AWK="$ac_prog"
12282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12283     break 2
12284   fi
12285 done
12286   done
12287 IFS=$as_save_IFS
12288 
12289 fi
12290 fi
12291 AWK=$ac_cv_prog_AWK
12292 if test -n "$AWK"; then
12293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12294 $as_echo "$AWK" >&6; }
12295 else
12296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12297 $as_echo "no" >&6; }
12298 fi
12299 
12300 
12301   test -n "$AWK" && break
12302 done
12303 
12304   else
12305     # The variable is set, but is it from the command line or the environment?
12306 
12307     # Try to remove the string !AWK! from our list.
12308     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12309     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12310       # If it failed, the variable was not from the command line. Ignore it,
12311       # but warn the user (except for BASH, which is always set by the calling BASH).
12312       if test "xAWK" != xBASH; then
12313         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12314 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12315       fi
12316       # Try to locate tool using the code snippet
12317       for ac_prog in gawk mawk nawk awk
12318 do
12319   # Extract the first word of "$ac_prog", so it can be a program name with args.
12320 set dummy $ac_prog; ac_word=$2
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12322 $as_echo_n "checking for $ac_word... " >&6; }
12323 if ${ac_cv_prog_AWK+:} false; then :
12324   $as_echo_n "(cached) " >&6
12325 else
12326   if test -n "$AWK"; then
12327   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12328 else
12329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12330 for as_dir in $PATH
12331 do
12332   IFS=$as_save_IFS
12333   test -z "$as_dir" && as_dir=.
12334     for ac_exec_ext in '' $ac_executable_extensions; do
12335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12336     ac_cv_prog_AWK="$ac_prog"
12337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12338     break 2
12339   fi
12340 done
12341   done
12342 IFS=$as_save_IFS
12343 
12344 fi
12345 fi
12346 AWK=$ac_cv_prog_AWK
12347 if test -n "$AWK"; then
12348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12349 $as_echo "$AWK" >&6; }
12350 else
12351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12352 $as_echo "no" >&6; }
12353 fi
12354 
12355 
12356   test -n "$AWK" && break
12357 done
12358 
12359     else
12360       # If it succeeded, then it was overridden by the user. We will use it
12361       # for the tool.
12362 
12363       # First remove it from the list of overridden variables, so we can test
12364       # for unknown variables in the end.
12365       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12366 
12367       # Check if we try to supply an empty value
12368       if test "x$AWK" = x; then
12369         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12370 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12372 $as_echo_n "checking for AWK... " >&6; }
12373         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12374 $as_echo "disabled" >&6; }
12375       else
12376         # Check if the provided tool contains a complete path.
12377         tool_specified="$AWK"
12378         tool_basename="${tool_specified##*/}"
12379         if test "x$tool_basename" = "x$tool_specified"; then
12380           # A command without a complete path is provided, search $PATH.
12381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12382 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12383           # Extract the first word of "$tool_basename", so it can be a program name with args.
12384 set dummy $tool_basename; ac_word=$2
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12386 $as_echo_n "checking for $ac_word... " >&6; }
12387 if ${ac_cv_path_AWK+:} false; then :
12388   $as_echo_n "(cached) " >&6
12389 else
12390   case $AWK in
12391   [\\/]* | ?:[\\/]*)
12392   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12393   ;;
12394   *)
12395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12396 for as_dir in $PATH
12397 do
12398   IFS=$as_save_IFS
12399   test -z "$as_dir" && as_dir=.
12400     for ac_exec_ext in '' $ac_executable_extensions; do
12401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12402     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12404     break 2
12405   fi
12406 done
12407   done
12408 IFS=$as_save_IFS
12409 
12410   ;;
12411 esac
12412 fi
12413 AWK=$ac_cv_path_AWK
12414 if test -n "$AWK"; then
12415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12416 $as_echo "$AWK" >&6; }
12417 else
12418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419 $as_echo "no" >&6; }
12420 fi
12421 
12422 
12423           if test "x$AWK" = x; then
12424             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12425           fi
12426         else
12427           # Otherwise we believe it is a complete path. Use it as it is.
12428           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12429 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12430           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12431 $as_echo_n "checking for AWK... " >&6; }
12432           if test ! -x "$tool_specified"; then
12433             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12434 $as_echo "not found" >&6; }
12435             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12436           fi
12437           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12438 $as_echo "$tool_specified" >&6; }
12439         fi
12440       fi
12441     fi
12442 
12443   fi
12444 
12445 
12446   if test "x$AWK" = x; then
12447     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12448   fi
12449 
12450 
12451 
12452 
12453   # Publish this variable in the help.
12454 
12455 
12456   if [ -z "${GREP+x}" ]; then
12457     # The variable is not set by user, try to locate tool using the code snippet
12458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12459 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12460 if ${ac_cv_path_GREP+:} false; then :
12461   $as_echo_n "(cached) " >&6
12462 else
12463   if test -z "$GREP"; then
12464   ac_path_GREP_found=false
12465   # Loop through the user's path and test for each of PROGNAME-LIST
12466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12467 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12468 do
12469   IFS=$as_save_IFS
12470   test -z "$as_dir" && as_dir=.
12471     for ac_prog in grep ggrep; do
12472     for ac_exec_ext in '' $ac_executable_extensions; do
12473       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12474       as_fn_executable_p "$ac_path_GREP" || continue
12475 # Check for GNU ac_path_GREP and select it if it is found.
12476   # Check for GNU $ac_path_GREP
12477 case `"$ac_path_GREP" --version 2>&1` in
12478 *GNU*)
12479   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12480 *)
12481   ac_count=0
12482   $as_echo_n 0123456789 >"conftest.in"
12483   while :
12484   do
12485     cat "conftest.in" "conftest.in" >"conftest.tmp"
12486     mv "conftest.tmp" "conftest.in"
12487     cp "conftest.in" "conftest.nl"
12488     $as_echo 'GREP' >> "conftest.nl"
12489     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12490     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12491     as_fn_arith $ac_count + 1 && ac_count=$as_val
12492     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12493       # Best one so far, save it but keep looking for a better one
12494       ac_cv_path_GREP="$ac_path_GREP"
12495       ac_path_GREP_max=$ac_count
12496     fi
12497     # 10*(2^10) chars as input seems more than enough
12498     test $ac_count -gt 10 && break
12499   done
12500   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12501 esac
12502 
12503       $ac_path_GREP_found && break 3
12504     done
12505   done
12506   done
12507 IFS=$as_save_IFS
12508   if test -z "$ac_cv_path_GREP"; then
12509     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12510   fi
12511 else
12512   ac_cv_path_GREP=$GREP
12513 fi
12514 
12515 fi
12516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12517 $as_echo "$ac_cv_path_GREP" >&6; }
12518  GREP="$ac_cv_path_GREP"
12519 
12520 
12521   else
12522     # The variable is set, but is it from the command line or the environment?
12523 
12524     # Try to remove the string !GREP! from our list.
12525     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12526     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12527       # If it failed, the variable was not from the command line. Ignore it,
12528       # but warn the user (except for BASH, which is always set by the calling BASH).
12529       if test "xGREP" != xBASH; then
12530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12531 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12532       fi
12533       # Try to locate tool using the code snippet
12534       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12535 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12536 if ${ac_cv_path_GREP+:} false; then :
12537   $as_echo_n "(cached) " >&6
12538 else
12539   if test -z "$GREP"; then
12540   ac_path_GREP_found=false
12541   # Loop through the user's path and test for each of PROGNAME-LIST
12542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12543 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12544 do
12545   IFS=$as_save_IFS
12546   test -z "$as_dir" && as_dir=.
12547     for ac_prog in grep ggrep; do
12548     for ac_exec_ext in '' $ac_executable_extensions; do
12549       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12550       as_fn_executable_p "$ac_path_GREP" || continue
12551 # Check for GNU ac_path_GREP and select it if it is found.
12552   # Check for GNU $ac_path_GREP
12553 case `"$ac_path_GREP" --version 2>&1` in
12554 *GNU*)
12555   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12556 *)
12557   ac_count=0
12558   $as_echo_n 0123456789 >"conftest.in"
12559   while :
12560   do
12561     cat "conftest.in" "conftest.in" >"conftest.tmp"
12562     mv "conftest.tmp" "conftest.in"
12563     cp "conftest.in" "conftest.nl"
12564     $as_echo 'GREP' >> "conftest.nl"
12565     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12566     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12567     as_fn_arith $ac_count + 1 && ac_count=$as_val
12568     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12569       # Best one so far, save it but keep looking for a better one
12570       ac_cv_path_GREP="$ac_path_GREP"
12571       ac_path_GREP_max=$ac_count
12572     fi
12573     # 10*(2^10) chars as input seems more than enough
12574     test $ac_count -gt 10 && break
12575   done
12576   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12577 esac
12578 
12579       $ac_path_GREP_found && break 3
12580     done
12581   done
12582   done
12583 IFS=$as_save_IFS
12584   if test -z "$ac_cv_path_GREP"; then
12585     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12586   fi
12587 else
12588   ac_cv_path_GREP=$GREP
12589 fi
12590 
12591 fi
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12593 $as_echo "$ac_cv_path_GREP" >&6; }
12594  GREP="$ac_cv_path_GREP"
12595 
12596 
12597     else
12598       # If it succeeded, then it was overridden by the user. We will use it
12599       # for the tool.
12600 
12601       # First remove it from the list of overridden variables, so we can test
12602       # for unknown variables in the end.
12603       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12604 
12605       # Check if we try to supply an empty value
12606       if test "x$GREP" = x; then
12607         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12608 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12609         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12610 $as_echo_n "checking for GREP... " >&6; }
12611         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12612 $as_echo "disabled" >&6; }
12613       else
12614         # Check if the provided tool contains a complete path.
12615         tool_specified="$GREP"
12616         tool_basename="${tool_specified##*/}"
12617         if test "x$tool_basename" = "x$tool_specified"; then
12618           # A command without a complete path is provided, search $PATH.
12619           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12620 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12621           # Extract the first word of "$tool_basename", so it can be a program name with args.
12622 set dummy $tool_basename; ac_word=$2
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624 $as_echo_n "checking for $ac_word... " >&6; }
12625 if ${ac_cv_path_GREP+:} false; then :
12626   $as_echo_n "(cached) " >&6
12627 else
12628   case $GREP in
12629   [\\/]* | ?:[\\/]*)
12630   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12631   ;;
12632   *)
12633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634 for as_dir in $PATH
12635 do
12636   IFS=$as_save_IFS
12637   test -z "$as_dir" && as_dir=.
12638     for ac_exec_ext in '' $ac_executable_extensions; do
12639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642     break 2
12643   fi
12644 done
12645   done
12646 IFS=$as_save_IFS
12647 
12648   ;;
12649 esac
12650 fi
12651 GREP=$ac_cv_path_GREP
12652 if test -n "$GREP"; then
12653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12654 $as_echo "$GREP" >&6; }
12655 else
12656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657 $as_echo "no" >&6; }
12658 fi
12659 
12660 
12661           if test "x$GREP" = x; then
12662             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12663           fi
12664         else
12665           # Otherwise we believe it is a complete path. Use it as it is.
12666           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12667 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12668           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12669 $as_echo_n "checking for GREP... " >&6; }
12670           if test ! -x "$tool_specified"; then
12671             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12672 $as_echo "not found" >&6; }
12673             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12674           fi
12675           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12676 $as_echo "$tool_specified" >&6; }
12677         fi
12678       fi
12679     fi
12680 
12681   fi
12682 
12683 
12684   if test "x$GREP" = x; then
12685     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12686   fi
12687 
12688 
12689 
12690 
12691   # Publish this variable in the help.
12692 
12693 
12694   if [ -z "${EGREP+x}" ]; then
12695     # The variable is not set by user, try to locate tool using the code snippet
12696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12697 $as_echo_n "checking for egrep... " >&6; }
12698 if ${ac_cv_path_EGREP+:} false; then :
12699   $as_echo_n "(cached) " >&6
12700 else
12701   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12702    then ac_cv_path_EGREP="$GREP -E"
12703    else
12704      if test -z "$EGREP"; then
12705   ac_path_EGREP_found=false
12706   # Loop through the user's path and test for each of PROGNAME-LIST
12707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12708 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12709 do
12710   IFS=$as_save_IFS
12711   test -z "$as_dir" && as_dir=.
12712     for ac_prog in egrep; do
12713     for ac_exec_ext in '' $ac_executable_extensions; do
12714       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12715       as_fn_executable_p "$ac_path_EGREP" || continue
12716 # Check for GNU ac_path_EGREP and select it if it is found.
12717   # Check for GNU $ac_path_EGREP
12718 case `"$ac_path_EGREP" --version 2>&1` in
12719 *GNU*)
12720   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12721 *)
12722   ac_count=0
12723   $as_echo_n 0123456789 >"conftest.in"
12724   while :
12725   do
12726     cat "conftest.in" "conftest.in" >"conftest.tmp"
12727     mv "conftest.tmp" "conftest.in"
12728     cp "conftest.in" "conftest.nl"
12729     $as_echo 'EGREP' >> "conftest.nl"
12730     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12731     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12732     as_fn_arith $ac_count + 1 && ac_count=$as_val
12733     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12734       # Best one so far, save it but keep looking for a better one
12735       ac_cv_path_EGREP="$ac_path_EGREP"
12736       ac_path_EGREP_max=$ac_count
12737     fi
12738     # 10*(2^10) chars as input seems more than enough
12739     test $ac_count -gt 10 && break
12740   done
12741   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12742 esac
12743 
12744       $ac_path_EGREP_found && break 3
12745     done
12746   done
12747   done
12748 IFS=$as_save_IFS
12749   if test -z "$ac_cv_path_EGREP"; then
12750     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12751   fi
12752 else
12753   ac_cv_path_EGREP=$EGREP
12754 fi
12755 
12756    fi
12757 fi
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12759 $as_echo "$ac_cv_path_EGREP" >&6; }
12760  EGREP="$ac_cv_path_EGREP"
12761 
12762 
12763   else
12764     # The variable is set, but is it from the command line or the environment?
12765 
12766     # Try to remove the string !EGREP! from our list.
12767     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12768     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12769       # If it failed, the variable was not from the command line. Ignore it,
12770       # but warn the user (except for BASH, which is always set by the calling BASH).
12771       if test "xEGREP" != xBASH; then
12772         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12773 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12774       fi
12775       # Try to locate tool using the code snippet
12776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12777 $as_echo_n "checking for egrep... " >&6; }
12778 if ${ac_cv_path_EGREP+:} false; then :
12779   $as_echo_n "(cached) " >&6
12780 else
12781   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12782    then ac_cv_path_EGREP="$GREP -E"
12783    else
12784      if test -z "$EGREP"; then
12785   ac_path_EGREP_found=false
12786   # Loop through the user's path and test for each of PROGNAME-LIST
12787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12788 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12789 do
12790   IFS=$as_save_IFS
12791   test -z "$as_dir" && as_dir=.
12792     for ac_prog in egrep; do
12793     for ac_exec_ext in '' $ac_executable_extensions; do
12794       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12795       as_fn_executable_p "$ac_path_EGREP" || continue
12796 # Check for GNU ac_path_EGREP and select it if it is found.
12797   # Check for GNU $ac_path_EGREP
12798 case `"$ac_path_EGREP" --version 2>&1` in
12799 *GNU*)
12800   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12801 *)
12802   ac_count=0
12803   $as_echo_n 0123456789 >"conftest.in"
12804   while :
12805   do
12806     cat "conftest.in" "conftest.in" >"conftest.tmp"
12807     mv "conftest.tmp" "conftest.in"
12808     cp "conftest.in" "conftest.nl"
12809     $as_echo 'EGREP' >> "conftest.nl"
12810     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12811     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12812     as_fn_arith $ac_count + 1 && ac_count=$as_val
12813     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12814       # Best one so far, save it but keep looking for a better one
12815       ac_cv_path_EGREP="$ac_path_EGREP"
12816       ac_path_EGREP_max=$ac_count
12817     fi
12818     # 10*(2^10) chars as input seems more than enough
12819     test $ac_count -gt 10 && break
12820   done
12821   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12822 esac
12823 
12824       $ac_path_EGREP_found && break 3
12825     done
12826   done
12827   done
12828 IFS=$as_save_IFS
12829   if test -z "$ac_cv_path_EGREP"; then
12830     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12831   fi
12832 else
12833   ac_cv_path_EGREP=$EGREP
12834 fi
12835 
12836    fi
12837 fi
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12839 $as_echo "$ac_cv_path_EGREP" >&6; }
12840  EGREP="$ac_cv_path_EGREP"
12841 
12842 
12843     else
12844       # If it succeeded, then it was overridden by the user. We will use it
12845       # for the tool.
12846 
12847       # First remove it from the list of overridden variables, so we can test
12848       # for unknown variables in the end.
12849       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12850 
12851       # Check if we try to supply an empty value
12852       if test "x$EGREP" = x; then
12853         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12854 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12855         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12856 $as_echo_n "checking for EGREP... " >&6; }
12857         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12858 $as_echo "disabled" >&6; }
12859       else
12860         # Check if the provided tool contains a complete path.
12861         tool_specified="$EGREP"
12862         tool_basename="${tool_specified##*/}"
12863         if test "x$tool_basename" = "x$tool_specified"; then
12864           # A command without a complete path is provided, search $PATH.
12865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12866 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12867           # Extract the first word of "$tool_basename", so it can be a program name with args.
12868 set dummy $tool_basename; ac_word=$2
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12870 $as_echo_n "checking for $ac_word... " >&6; }
12871 if ${ac_cv_path_EGREP+:} false; then :
12872   $as_echo_n "(cached) " >&6
12873 else
12874   case $EGREP in
12875   [\\/]* | ?:[\\/]*)
12876   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12877   ;;
12878   *)
12879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12880 for as_dir in $PATH
12881 do
12882   IFS=$as_save_IFS
12883   test -z "$as_dir" && as_dir=.
12884     for ac_exec_ext in '' $ac_executable_extensions; do
12885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12886     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12888     break 2
12889   fi
12890 done
12891   done
12892 IFS=$as_save_IFS
12893 
12894   ;;
12895 esac
12896 fi
12897 EGREP=$ac_cv_path_EGREP
12898 if test -n "$EGREP"; then
12899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12900 $as_echo "$EGREP" >&6; }
12901 else
12902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12903 $as_echo "no" >&6; }
12904 fi
12905 
12906 
12907           if test "x$EGREP" = x; then
12908             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12909           fi
12910         else
12911           # Otherwise we believe it is a complete path. Use it as it is.
12912           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12913 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12914           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12915 $as_echo_n "checking for EGREP... " >&6; }
12916           if test ! -x "$tool_specified"; then
12917             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12918 $as_echo "not found" >&6; }
12919             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12920           fi
12921           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12922 $as_echo "$tool_specified" >&6; }
12923         fi
12924       fi
12925     fi
12926 
12927   fi
12928 
12929 
12930   if test "x$EGREP" = x; then
12931     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12932   fi
12933 
12934 
12935 
12936 
12937   # Publish this variable in the help.
12938 
12939 
12940   if [ -z "${FGREP+x}" ]; then
12941     # The variable is not set by user, try to locate tool using the code snippet
12942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12943 $as_echo_n "checking for fgrep... " >&6; }
12944 if ${ac_cv_path_FGREP+:} false; then :
12945   $as_echo_n "(cached) " >&6
12946 else
12947   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12948    then ac_cv_path_FGREP="$GREP -F"
12949    else
12950      if test -z "$FGREP"; then
12951   ac_path_FGREP_found=false
12952   # Loop through the user's path and test for each of PROGNAME-LIST
12953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12954 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12955 do
12956   IFS=$as_save_IFS
12957   test -z "$as_dir" && as_dir=.
12958     for ac_prog in fgrep; do
12959     for ac_exec_ext in '' $ac_executable_extensions; do
12960       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12961       as_fn_executable_p "$ac_path_FGREP" || continue
12962 # Check for GNU ac_path_FGREP and select it if it is found.
12963   # Check for GNU $ac_path_FGREP
12964 case `"$ac_path_FGREP" --version 2>&1` in
12965 *GNU*)
12966   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12967 *)
12968   ac_count=0
12969   $as_echo_n 0123456789 >"conftest.in"
12970   while :
12971   do
12972     cat "conftest.in" "conftest.in" >"conftest.tmp"
12973     mv "conftest.tmp" "conftest.in"
12974     cp "conftest.in" "conftest.nl"
12975     $as_echo 'FGREP' >> "conftest.nl"
12976     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12977     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12978     as_fn_arith $ac_count + 1 && ac_count=$as_val
12979     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12980       # Best one so far, save it but keep looking for a better one
12981       ac_cv_path_FGREP="$ac_path_FGREP"
12982       ac_path_FGREP_max=$ac_count
12983     fi
12984     # 10*(2^10) chars as input seems more than enough
12985     test $ac_count -gt 10 && break
12986   done
12987   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12988 esac
12989 
12990       $ac_path_FGREP_found && break 3
12991     done
12992   done
12993   done
12994 IFS=$as_save_IFS
12995   if test -z "$ac_cv_path_FGREP"; then
12996     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12997   fi
12998 else
12999   ac_cv_path_FGREP=$FGREP
13000 fi
13001 
13002    fi
13003 fi
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13005 $as_echo "$ac_cv_path_FGREP" >&6; }
13006  FGREP="$ac_cv_path_FGREP"
13007 
13008 
13009   else
13010     # The variable is set, but is it from the command line or the environment?
13011 
13012     # Try to remove the string !FGREP! from our list.
13013     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13014     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13015       # If it failed, the variable was not from the command line. Ignore it,
13016       # but warn the user (except for BASH, which is always set by the calling BASH).
13017       if test "xFGREP" != xBASH; then
13018         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13019 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13020       fi
13021       # Try to locate tool using the code snippet
13022       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13023 $as_echo_n "checking for fgrep... " >&6; }
13024 if ${ac_cv_path_FGREP+:} false; then :
13025   $as_echo_n "(cached) " >&6
13026 else
13027   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13028    then ac_cv_path_FGREP="$GREP -F"
13029    else
13030      if test -z "$FGREP"; then
13031   ac_path_FGREP_found=false
13032   # Loop through the user's path and test for each of PROGNAME-LIST
13033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13034 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13035 do
13036   IFS=$as_save_IFS
13037   test -z "$as_dir" && as_dir=.
13038     for ac_prog in fgrep; do
13039     for ac_exec_ext in '' $ac_executable_extensions; do
13040       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13041       as_fn_executable_p "$ac_path_FGREP" || continue
13042 # Check for GNU ac_path_FGREP and select it if it is found.
13043   # Check for GNU $ac_path_FGREP
13044 case `"$ac_path_FGREP" --version 2>&1` in
13045 *GNU*)
13046   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13047 *)
13048   ac_count=0
13049   $as_echo_n 0123456789 >"conftest.in"
13050   while :
13051   do
13052     cat "conftest.in" "conftest.in" >"conftest.tmp"
13053     mv "conftest.tmp" "conftest.in"
13054     cp "conftest.in" "conftest.nl"
13055     $as_echo 'FGREP' >> "conftest.nl"
13056     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13057     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13058     as_fn_arith $ac_count + 1 && ac_count=$as_val
13059     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13060       # Best one so far, save it but keep looking for a better one
13061       ac_cv_path_FGREP="$ac_path_FGREP"
13062       ac_path_FGREP_max=$ac_count
13063     fi
13064     # 10*(2^10) chars as input seems more than enough
13065     test $ac_count -gt 10 && break
13066   done
13067   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13068 esac
13069 
13070       $ac_path_FGREP_found && break 3
13071     done
13072   done
13073   done
13074 IFS=$as_save_IFS
13075   if test -z "$ac_cv_path_FGREP"; then
13076     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13077   fi
13078 else
13079   ac_cv_path_FGREP=$FGREP
13080 fi
13081 
13082    fi
13083 fi
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13085 $as_echo "$ac_cv_path_FGREP" >&6; }
13086  FGREP="$ac_cv_path_FGREP"
13087 
13088 
13089     else
13090       # If it succeeded, then it was overridden by the user. We will use it
13091       # for the tool.
13092 
13093       # First remove it from the list of overridden variables, so we can test
13094       # for unknown variables in the end.
13095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13096 
13097       # Check if we try to supply an empty value
13098       if test "x$FGREP" = x; then
13099         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13100 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13102 $as_echo_n "checking for FGREP... " >&6; }
13103         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13104 $as_echo "disabled" >&6; }
13105       else
13106         # Check if the provided tool contains a complete path.
13107         tool_specified="$FGREP"
13108         tool_basename="${tool_specified##*/}"
13109         if test "x$tool_basename" = "x$tool_specified"; then
13110           # A command without a complete path is provided, search $PATH.
13111           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13112 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13113           # Extract the first word of "$tool_basename", so it can be a program name with args.
13114 set dummy $tool_basename; ac_word=$2
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13116 $as_echo_n "checking for $ac_word... " >&6; }
13117 if ${ac_cv_path_FGREP+:} false; then :
13118   $as_echo_n "(cached) " >&6
13119 else
13120   case $FGREP in
13121   [\\/]* | ?:[\\/]*)
13122   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13123   ;;
13124   *)
13125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13126 for as_dir in $PATH
13127 do
13128   IFS=$as_save_IFS
13129   test -z "$as_dir" && as_dir=.
13130     for ac_exec_ext in '' $ac_executable_extensions; do
13131   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13132     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13134     break 2
13135   fi
13136 done
13137   done
13138 IFS=$as_save_IFS
13139 
13140   ;;
13141 esac
13142 fi
13143 FGREP=$ac_cv_path_FGREP
13144 if test -n "$FGREP"; then
13145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13146 $as_echo "$FGREP" >&6; }
13147 else
13148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13149 $as_echo "no" >&6; }
13150 fi
13151 
13152 
13153           if test "x$FGREP" = x; then
13154             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13155           fi
13156         else
13157           # Otherwise we believe it is a complete path. Use it as it is.
13158           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13159 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13160           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13161 $as_echo_n "checking for FGREP... " >&6; }
13162           if test ! -x "$tool_specified"; then
13163             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13164 $as_echo "not found" >&6; }
13165             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13166           fi
13167           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13168 $as_echo "$tool_specified" >&6; }
13169         fi
13170       fi
13171     fi
13172 
13173   fi
13174 
13175 
13176   if test "x$FGREP" = x; then
13177     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13178   fi
13179 
13180 
13181 
13182 
13183   # Publish this variable in the help.
13184 
13185 
13186   if [ -z "${SED+x}" ]; then
13187     # The variable is not set by user, try to locate tool using the code snippet
13188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13189 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13190 if ${ac_cv_path_SED+:} false; then :
13191   $as_echo_n "(cached) " >&6
13192 else
13193             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13194      for ac_i in 1 2 3 4 5 6 7; do
13195        ac_script="$ac_script$as_nl$ac_script"
13196      done
13197      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13198      { ac_script=; unset ac_script;}
13199      if test -z "$SED"; then
13200   ac_path_SED_found=false
13201   # Loop through the user's path and test for each of PROGNAME-LIST
13202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13203 for as_dir in $PATH
13204 do
13205   IFS=$as_save_IFS
13206   test -z "$as_dir" && as_dir=.
13207     for ac_prog in sed gsed; do
13208     for ac_exec_ext in '' $ac_executable_extensions; do
13209       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13210       as_fn_executable_p "$ac_path_SED" || continue
13211 # Check for GNU ac_path_SED and select it if it is found.
13212   # Check for GNU $ac_path_SED
13213 case `"$ac_path_SED" --version 2>&1` in
13214 *GNU*)
13215   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13216 *)
13217   ac_count=0
13218   $as_echo_n 0123456789 >"conftest.in"
13219   while :
13220   do
13221     cat "conftest.in" "conftest.in" >"conftest.tmp"
13222     mv "conftest.tmp" "conftest.in"
13223     cp "conftest.in" "conftest.nl"
13224     $as_echo '' >> "conftest.nl"
13225     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13226     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13227     as_fn_arith $ac_count + 1 && ac_count=$as_val
13228     if test $ac_count -gt ${ac_path_SED_max-0}; then
13229       # Best one so far, save it but keep looking for a better one
13230       ac_cv_path_SED="$ac_path_SED"
13231       ac_path_SED_max=$ac_count
13232     fi
13233     # 10*(2^10) chars as input seems more than enough
13234     test $ac_count -gt 10 && break
13235   done
13236   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13237 esac
13238 
13239       $ac_path_SED_found && break 3
13240     done
13241   done
13242   done
13243 IFS=$as_save_IFS
13244   if test -z "$ac_cv_path_SED"; then
13245     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13246   fi
13247 else
13248   ac_cv_path_SED=$SED
13249 fi
13250 
13251 fi
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13253 $as_echo "$ac_cv_path_SED" >&6; }
13254  SED="$ac_cv_path_SED"
13255   rm -f conftest.sed
13256 
13257   else
13258     # The variable is set, but is it from the command line or the environment?
13259 
13260     # Try to remove the string !SED! from our list.
13261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13263       # If it failed, the variable was not from the command line. Ignore it,
13264       # but warn the user (except for BASH, which is always set by the calling BASH).
13265       if test "xSED" != xBASH; then
13266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13267 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13268       fi
13269       # Try to locate tool using the code snippet
13270       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13271 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13272 if ${ac_cv_path_SED+:} false; then :
13273   $as_echo_n "(cached) " >&6
13274 else
13275             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13276      for ac_i in 1 2 3 4 5 6 7; do
13277        ac_script="$ac_script$as_nl$ac_script"
13278      done
13279      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13280      { ac_script=; unset ac_script;}
13281      if test -z "$SED"; then
13282   ac_path_SED_found=false
13283   # Loop through the user's path and test for each of PROGNAME-LIST
13284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13285 for as_dir in $PATH
13286 do
13287   IFS=$as_save_IFS
13288   test -z "$as_dir" && as_dir=.
13289     for ac_prog in sed gsed; do
13290     for ac_exec_ext in '' $ac_executable_extensions; do
13291       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13292       as_fn_executable_p "$ac_path_SED" || continue
13293 # Check for GNU ac_path_SED and select it if it is found.
13294   # Check for GNU $ac_path_SED
13295 case `"$ac_path_SED" --version 2>&1` in
13296 *GNU*)
13297   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13298 *)
13299   ac_count=0
13300   $as_echo_n 0123456789 >"conftest.in"
13301   while :
13302   do
13303     cat "conftest.in" "conftest.in" >"conftest.tmp"
13304     mv "conftest.tmp" "conftest.in"
13305     cp "conftest.in" "conftest.nl"
13306     $as_echo '' >> "conftest.nl"
13307     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13308     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13309     as_fn_arith $ac_count + 1 && ac_count=$as_val
13310     if test $ac_count -gt ${ac_path_SED_max-0}; then
13311       # Best one so far, save it but keep looking for a better one
13312       ac_cv_path_SED="$ac_path_SED"
13313       ac_path_SED_max=$ac_count
13314     fi
13315     # 10*(2^10) chars as input seems more than enough
13316     test $ac_count -gt 10 && break
13317   done
13318   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13319 esac
13320 
13321       $ac_path_SED_found && break 3
13322     done
13323   done
13324   done
13325 IFS=$as_save_IFS
13326   if test -z "$ac_cv_path_SED"; then
13327     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13328   fi
13329 else
13330   ac_cv_path_SED=$SED
13331 fi
13332 
13333 fi
13334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13335 $as_echo "$ac_cv_path_SED" >&6; }
13336  SED="$ac_cv_path_SED"
13337   rm -f conftest.sed
13338 
13339     else
13340       # If it succeeded, then it was overridden by the user. We will use it
13341       # for the tool.
13342 
13343       # First remove it from the list of overridden variables, so we can test
13344       # for unknown variables in the end.
13345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13346 
13347       # Check if we try to supply an empty value
13348       if test "x$SED" = x; then
13349         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13350 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13352 $as_echo_n "checking for SED... " >&6; }
13353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13354 $as_echo "disabled" >&6; }
13355       else
13356         # Check if the provided tool contains a complete path.
13357         tool_specified="$SED"
13358         tool_basename="${tool_specified##*/}"
13359         if test "x$tool_basename" = "x$tool_specified"; then
13360           # A command without a complete path is provided, search $PATH.
13361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13362 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13363           # Extract the first word of "$tool_basename", so it can be a program name with args.
13364 set dummy $tool_basename; ac_word=$2
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13366 $as_echo_n "checking for $ac_word... " >&6; }
13367 if ${ac_cv_path_SED+:} false; then :
13368   $as_echo_n "(cached) " >&6
13369 else
13370   case $SED in
13371   [\\/]* | ?:[\\/]*)
13372   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13373   ;;
13374   *)
13375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13376 for as_dir in $PATH
13377 do
13378   IFS=$as_save_IFS
13379   test -z "$as_dir" && as_dir=.
13380     for ac_exec_ext in '' $ac_executable_extensions; do
13381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13382     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13384     break 2
13385   fi
13386 done
13387   done
13388 IFS=$as_save_IFS
13389 
13390   ;;
13391 esac
13392 fi
13393 SED=$ac_cv_path_SED
13394 if test -n "$SED"; then
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13396 $as_echo "$SED" >&6; }
13397 else
13398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399 $as_echo "no" >&6; }
13400 fi
13401 
13402 
13403           if test "x$SED" = x; then
13404             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13405           fi
13406         else
13407           # Otherwise we believe it is a complete path. Use it as it is.
13408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13409 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13410           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13411 $as_echo_n "checking for SED... " >&6; }
13412           if test ! -x "$tool_specified"; then
13413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13414 $as_echo "not found" >&6; }
13415             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13416           fi
13417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13418 $as_echo "$tool_specified" >&6; }
13419         fi
13420       fi
13421     fi
13422 
13423   fi
13424 
13425 
13426   if test "x$SED" = x; then
13427     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13428   fi
13429 
13430 
13431 
13432   # Always force rm.
13433   RM="$RM -f"
13434 
13435   # pwd behaves differently on various platforms and some don't support the -L flag.
13436   # Always use the bash builtin pwd to get uniform behavior.
13437   THEPWDCMD=pwd
13438 
13439   # These are not required on all platforms
13440 
13441 
13442   # Publish this variable in the help.
13443 
13444 
13445   if [ -z "${CYGPATH+x}" ]; then
13446     # The variable is not set by user, try to locate tool using the code snippet
13447     for ac_prog in cygpath
13448 do
13449   # Extract the first word of "$ac_prog", so it can be a program name with args.
13450 set dummy $ac_prog; ac_word=$2
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13452 $as_echo_n "checking for $ac_word... " >&6; }
13453 if ${ac_cv_path_CYGPATH+:} false; then :
13454   $as_echo_n "(cached) " >&6
13455 else
13456   case $CYGPATH in
13457   [\\/]* | ?:[\\/]*)
13458   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13459   ;;
13460   *)
13461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13462 for as_dir in $PATH
13463 do
13464   IFS=$as_save_IFS
13465   test -z "$as_dir" && as_dir=.
13466     for ac_exec_ext in '' $ac_executable_extensions; do
13467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13468     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13470     break 2
13471   fi
13472 done
13473   done
13474 IFS=$as_save_IFS
13475 
13476   ;;
13477 esac
13478 fi
13479 CYGPATH=$ac_cv_path_CYGPATH
13480 if test -n "$CYGPATH"; then
13481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13482 $as_echo "$CYGPATH" >&6; }
13483 else
13484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13485 $as_echo "no" >&6; }
13486 fi
13487 
13488 
13489   test -n "$CYGPATH" && break
13490 done
13491 
13492   else
13493     # The variable is set, but is it from the command line or the environment?
13494 
13495     # Try to remove the string !CYGPATH! from our list.
13496     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13497     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13498       # If it failed, the variable was not from the command line. Ignore it,
13499       # but warn the user (except for BASH, which is always set by the calling BASH).
13500       if test "xCYGPATH" != xBASH; then
13501         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13502 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13503       fi
13504       # Try to locate tool using the code snippet
13505       for ac_prog in cygpath
13506 do
13507   # Extract the first word of "$ac_prog", so it can be a program name with args.
13508 set dummy $ac_prog; ac_word=$2
13509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13510 $as_echo_n "checking for $ac_word... " >&6; }
13511 if ${ac_cv_path_CYGPATH+:} false; then :
13512   $as_echo_n "(cached) " >&6
13513 else
13514   case $CYGPATH in
13515   [\\/]* | ?:[\\/]*)
13516   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13517   ;;
13518   *)
13519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13520 for as_dir in $PATH
13521 do
13522   IFS=$as_save_IFS
13523   test -z "$as_dir" && as_dir=.
13524     for ac_exec_ext in '' $ac_executable_extensions; do
13525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13526     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13528     break 2
13529   fi
13530 done
13531   done
13532 IFS=$as_save_IFS
13533 
13534   ;;
13535 esac
13536 fi
13537 CYGPATH=$ac_cv_path_CYGPATH
13538 if test -n "$CYGPATH"; then
13539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13540 $as_echo "$CYGPATH" >&6; }
13541 else
13542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13543 $as_echo "no" >&6; }
13544 fi
13545 
13546 
13547   test -n "$CYGPATH" && break
13548 done
13549 
13550     else
13551       # If it succeeded, then it was overridden by the user. We will use it
13552       # for the tool.
13553 
13554       # First remove it from the list of overridden variables, so we can test
13555       # for unknown variables in the end.
13556       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13557 
13558       # Check if we try to supply an empty value
13559       if test "x$CYGPATH" = x; then
13560         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13561 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13562         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13563 $as_echo_n "checking for CYGPATH... " >&6; }
13564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13565 $as_echo "disabled" >&6; }
13566       else
13567         # Check if the provided tool contains a complete path.
13568         tool_specified="$CYGPATH"
13569         tool_basename="${tool_specified##*/}"
13570         if test "x$tool_basename" = "x$tool_specified"; then
13571           # A command without a complete path is provided, search $PATH.
13572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13573 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13574           # Extract the first word of "$tool_basename", so it can be a program name with args.
13575 set dummy $tool_basename; ac_word=$2
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13577 $as_echo_n "checking for $ac_word... " >&6; }
13578 if ${ac_cv_path_CYGPATH+:} false; then :
13579   $as_echo_n "(cached) " >&6
13580 else
13581   case $CYGPATH in
13582   [\\/]* | ?:[\\/]*)
13583   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13584   ;;
13585   *)
13586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13587 for as_dir in $PATH
13588 do
13589   IFS=$as_save_IFS
13590   test -z "$as_dir" && as_dir=.
13591     for ac_exec_ext in '' $ac_executable_extensions; do
13592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13593     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13595     break 2
13596   fi
13597 done
13598   done
13599 IFS=$as_save_IFS
13600 
13601   ;;
13602 esac
13603 fi
13604 CYGPATH=$ac_cv_path_CYGPATH
13605 if test -n "$CYGPATH"; then
13606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13607 $as_echo "$CYGPATH" >&6; }
13608 else
13609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13610 $as_echo "no" >&6; }
13611 fi
13612 
13613 
13614           if test "x$CYGPATH" = x; then
13615             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13616           fi
13617         else
13618           # Otherwise we believe it is a complete path. Use it as it is.
13619           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13620 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13621           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13622 $as_echo_n "checking for CYGPATH... " >&6; }
13623           if test ! -x "$tool_specified"; then
13624             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13625 $as_echo "not found" >&6; }
13626             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13627           fi
13628           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13629 $as_echo "$tool_specified" >&6; }
13630         fi
13631       fi
13632     fi
13633 
13634   fi
13635 
13636 
13637 
13638 
13639   # Publish this variable in the help.
13640 
13641 
13642   if [ -z "${READLINK+x}" ]; then
13643     # The variable is not set by user, try to locate tool using the code snippet
13644     for ac_prog in greadlink readlink
13645 do
13646   # Extract the first word of "$ac_prog", so it can be a program name with args.
13647 set dummy $ac_prog; ac_word=$2
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13649 $as_echo_n "checking for $ac_word... " >&6; }
13650 if ${ac_cv_path_READLINK+:} false; then :
13651   $as_echo_n "(cached) " >&6
13652 else
13653   case $READLINK in
13654   [\\/]* | ?:[\\/]*)
13655   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13656   ;;
13657   *)
13658   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13659 for as_dir in $PATH
13660 do
13661   IFS=$as_save_IFS
13662   test -z "$as_dir" && as_dir=.
13663     for ac_exec_ext in '' $ac_executable_extensions; do
13664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13665     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13666     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13667     break 2
13668   fi
13669 done
13670   done
13671 IFS=$as_save_IFS
13672 
13673   ;;
13674 esac
13675 fi
13676 READLINK=$ac_cv_path_READLINK
13677 if test -n "$READLINK"; then
13678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13679 $as_echo "$READLINK" >&6; }
13680 else
13681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13682 $as_echo "no" >&6; }
13683 fi
13684 
13685 
13686   test -n "$READLINK" && break
13687 done
13688 
13689   else
13690     # The variable is set, but is it from the command line or the environment?
13691 
13692     # Try to remove the string !READLINK! from our list.
13693     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13694     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13695       # If it failed, the variable was not from the command line. Ignore it,
13696       # but warn the user (except for BASH, which is always set by the calling BASH).
13697       if test "xREADLINK" != xBASH; then
13698         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13699 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13700       fi
13701       # Try to locate tool using the code snippet
13702       for ac_prog in greadlink readlink
13703 do
13704   # Extract the first word of "$ac_prog", so it can be a program name with args.
13705 set dummy $ac_prog; ac_word=$2
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13707 $as_echo_n "checking for $ac_word... " >&6; }
13708 if ${ac_cv_path_READLINK+:} false; then :
13709   $as_echo_n "(cached) " >&6
13710 else
13711   case $READLINK in
13712   [\\/]* | ?:[\\/]*)
13713   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13714   ;;
13715   *)
13716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13717 for as_dir in $PATH
13718 do
13719   IFS=$as_save_IFS
13720   test -z "$as_dir" && as_dir=.
13721     for ac_exec_ext in '' $ac_executable_extensions; do
13722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13723     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13725     break 2
13726   fi
13727 done
13728   done
13729 IFS=$as_save_IFS
13730 
13731   ;;
13732 esac
13733 fi
13734 READLINK=$ac_cv_path_READLINK
13735 if test -n "$READLINK"; then
13736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13737 $as_echo "$READLINK" >&6; }
13738 else
13739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13740 $as_echo "no" >&6; }
13741 fi
13742 
13743 
13744   test -n "$READLINK" && break
13745 done
13746 
13747     else
13748       # If it succeeded, then it was overridden by the user. We will use it
13749       # for the tool.
13750 
13751       # First remove it from the list of overridden variables, so we can test
13752       # for unknown variables in the end.
13753       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13754 
13755       # Check if we try to supply an empty value
13756       if test "x$READLINK" = x; then
13757         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13758 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13759         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13760 $as_echo_n "checking for READLINK... " >&6; }
13761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13762 $as_echo "disabled" >&6; }
13763       else
13764         # Check if the provided tool contains a complete path.
13765         tool_specified="$READLINK"
13766         tool_basename="${tool_specified##*/}"
13767         if test "x$tool_basename" = "x$tool_specified"; then
13768           # A command without a complete path is provided, search $PATH.
13769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13770 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13771           # Extract the first word of "$tool_basename", so it can be a program name with args.
13772 set dummy $tool_basename; ac_word=$2
13773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13774 $as_echo_n "checking for $ac_word... " >&6; }
13775 if ${ac_cv_path_READLINK+:} false; then :
13776   $as_echo_n "(cached) " >&6
13777 else
13778   case $READLINK in
13779   [\\/]* | ?:[\\/]*)
13780   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13781   ;;
13782   *)
13783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13784 for as_dir in $PATH
13785 do
13786   IFS=$as_save_IFS
13787   test -z "$as_dir" && as_dir=.
13788     for ac_exec_ext in '' $ac_executable_extensions; do
13789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13790     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13792     break 2
13793   fi
13794 done
13795   done
13796 IFS=$as_save_IFS
13797 
13798   ;;
13799 esac
13800 fi
13801 READLINK=$ac_cv_path_READLINK
13802 if test -n "$READLINK"; then
13803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13804 $as_echo "$READLINK" >&6; }
13805 else
13806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13807 $as_echo "no" >&6; }
13808 fi
13809 
13810 
13811           if test "x$READLINK" = x; then
13812             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13813           fi
13814         else
13815           # Otherwise we believe it is a complete path. Use it as it is.
13816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13817 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13818           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13819 $as_echo_n "checking for READLINK... " >&6; }
13820           if test ! -x "$tool_specified"; then
13821             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13822 $as_echo "not found" >&6; }
13823             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13824           fi
13825           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13826 $as_echo "$tool_specified" >&6; }
13827         fi
13828       fi
13829     fi
13830 
13831   fi
13832 
13833 
13834 
13835 
13836   # Publish this variable in the help.
13837 
13838 
13839   if [ -z "${DF+x}" ]; then
13840     # The variable is not set by user, try to locate tool using the code snippet
13841     for ac_prog in df
13842 do
13843   # Extract the first word of "$ac_prog", so it can be a program name with args.
13844 set dummy $ac_prog; ac_word=$2
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13846 $as_echo_n "checking for $ac_word... " >&6; }
13847 if ${ac_cv_path_DF+:} false; then :
13848   $as_echo_n "(cached) " >&6
13849 else
13850   case $DF in
13851   [\\/]* | ?:[\\/]*)
13852   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13853   ;;
13854   *)
13855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13856 for as_dir in $PATH
13857 do
13858   IFS=$as_save_IFS
13859   test -z "$as_dir" && as_dir=.
13860     for ac_exec_ext in '' $ac_executable_extensions; do
13861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13862     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13864     break 2
13865   fi
13866 done
13867   done
13868 IFS=$as_save_IFS
13869 
13870   ;;
13871 esac
13872 fi
13873 DF=$ac_cv_path_DF
13874 if test -n "$DF"; then
13875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13876 $as_echo "$DF" >&6; }
13877 else
13878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13879 $as_echo "no" >&6; }
13880 fi
13881 
13882 
13883   test -n "$DF" && break
13884 done
13885 
13886   else
13887     # The variable is set, but is it from the command line or the environment?
13888 
13889     # Try to remove the string !DF! from our list.
13890     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13891     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13892       # If it failed, the variable was not from the command line. Ignore it,
13893       # but warn the user (except for BASH, which is always set by the calling BASH).
13894       if test "xDF" != xBASH; then
13895         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13896 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13897       fi
13898       # Try to locate tool using the code snippet
13899       for ac_prog in df
13900 do
13901   # Extract the first word of "$ac_prog", so it can be a program name with args.
13902 set dummy $ac_prog; ac_word=$2
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13904 $as_echo_n "checking for $ac_word... " >&6; }
13905 if ${ac_cv_path_DF+:} false; then :
13906   $as_echo_n "(cached) " >&6
13907 else
13908   case $DF in
13909   [\\/]* | ?:[\\/]*)
13910   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13911   ;;
13912   *)
13913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13914 for as_dir in $PATH
13915 do
13916   IFS=$as_save_IFS
13917   test -z "$as_dir" && as_dir=.
13918     for ac_exec_ext in '' $ac_executable_extensions; do
13919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13920     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13922     break 2
13923   fi
13924 done
13925   done
13926 IFS=$as_save_IFS
13927 
13928   ;;
13929 esac
13930 fi
13931 DF=$ac_cv_path_DF
13932 if test -n "$DF"; then
13933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13934 $as_echo "$DF" >&6; }
13935 else
13936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13937 $as_echo "no" >&6; }
13938 fi
13939 
13940 
13941   test -n "$DF" && break
13942 done
13943 
13944     else
13945       # If it succeeded, then it was overridden by the user. We will use it
13946       # for the tool.
13947 
13948       # First remove it from the list of overridden variables, so we can test
13949       # for unknown variables in the end.
13950       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13951 
13952       # Check if we try to supply an empty value
13953       if test "x$DF" = x; then
13954         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13955 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13956         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13957 $as_echo_n "checking for DF... " >&6; }
13958         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13959 $as_echo "disabled" >&6; }
13960       else
13961         # Check if the provided tool contains a complete path.
13962         tool_specified="$DF"
13963         tool_basename="${tool_specified##*/}"
13964         if test "x$tool_basename" = "x$tool_specified"; then
13965           # A command without a complete path is provided, search $PATH.
13966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13967 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13968           # Extract the first word of "$tool_basename", so it can be a program name with args.
13969 set dummy $tool_basename; ac_word=$2
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13971 $as_echo_n "checking for $ac_word... " >&6; }
13972 if ${ac_cv_path_DF+:} false; then :
13973   $as_echo_n "(cached) " >&6
13974 else
13975   case $DF in
13976   [\\/]* | ?:[\\/]*)
13977   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13978   ;;
13979   *)
13980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981 for as_dir in $PATH
13982 do
13983   IFS=$as_save_IFS
13984   test -z "$as_dir" && as_dir=.
13985     for ac_exec_ext in '' $ac_executable_extensions; do
13986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13987     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13989     break 2
13990   fi
13991 done
13992   done
13993 IFS=$as_save_IFS
13994 
13995   ;;
13996 esac
13997 fi
13998 DF=$ac_cv_path_DF
13999 if test -n "$DF"; then
14000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14001 $as_echo "$DF" >&6; }
14002 else
14003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004 $as_echo "no" >&6; }
14005 fi
14006 
14007 
14008           if test "x$DF" = x; then
14009             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14010           fi
14011         else
14012           # Otherwise we believe it is a complete path. Use it as it is.
14013           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14014 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14015           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14016 $as_echo_n "checking for DF... " >&6; }
14017           if test ! -x "$tool_specified"; then
14018             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14019 $as_echo "not found" >&6; }
14020             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14021           fi
14022           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14023 $as_echo "$tool_specified" >&6; }
14024         fi
14025       fi
14026     fi
14027 
14028   fi
14029 
14030 
14031 
14032 
14033   # Publish this variable in the help.
14034 
14035 
14036   if [ -z "${CPIO+x}" ]; then
14037     # The variable is not set by user, try to locate tool using the code snippet
14038     for ac_prog in cpio bsdcpio
14039 do
14040   # Extract the first word of "$ac_prog", so it can be a program name with args.
14041 set dummy $ac_prog; ac_word=$2
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14043 $as_echo_n "checking for $ac_word... " >&6; }
14044 if ${ac_cv_path_CPIO+:} false; then :
14045   $as_echo_n "(cached) " >&6
14046 else
14047   case $CPIO in
14048   [\\/]* | ?:[\\/]*)
14049   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14050   ;;
14051   *)
14052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14053 for as_dir in $PATH
14054 do
14055   IFS=$as_save_IFS
14056   test -z "$as_dir" && as_dir=.
14057     for ac_exec_ext in '' $ac_executable_extensions; do
14058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14059     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14061     break 2
14062   fi
14063 done
14064   done
14065 IFS=$as_save_IFS
14066 
14067   ;;
14068 esac
14069 fi
14070 CPIO=$ac_cv_path_CPIO
14071 if test -n "$CPIO"; then
14072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14073 $as_echo "$CPIO" >&6; }
14074 else
14075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14076 $as_echo "no" >&6; }
14077 fi
14078 
14079 
14080   test -n "$CPIO" && break
14081 done
14082 
14083   else
14084     # The variable is set, but is it from the command line or the environment?
14085 
14086     # Try to remove the string !CPIO! from our list.
14087     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14088     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14089       # If it failed, the variable was not from the command line. Ignore it,
14090       # but warn the user (except for BASH, which is always set by the calling BASH).
14091       if test "xCPIO" != xBASH; then
14092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14093 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14094       fi
14095       # Try to locate tool using the code snippet
14096       for ac_prog in cpio bsdcpio
14097 do
14098   # Extract the first word of "$ac_prog", so it can be a program name with args.
14099 set dummy $ac_prog; ac_word=$2
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14101 $as_echo_n "checking for $ac_word... " >&6; }
14102 if ${ac_cv_path_CPIO+:} false; then :
14103   $as_echo_n "(cached) " >&6
14104 else
14105   case $CPIO in
14106   [\\/]* | ?:[\\/]*)
14107   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14108   ;;
14109   *)
14110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14111 for as_dir in $PATH
14112 do
14113   IFS=$as_save_IFS
14114   test -z "$as_dir" && as_dir=.
14115     for ac_exec_ext in '' $ac_executable_extensions; do
14116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14117     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14119     break 2
14120   fi
14121 done
14122   done
14123 IFS=$as_save_IFS
14124 
14125   ;;
14126 esac
14127 fi
14128 CPIO=$ac_cv_path_CPIO
14129 if test -n "$CPIO"; then
14130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14131 $as_echo "$CPIO" >&6; }
14132 else
14133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14134 $as_echo "no" >&6; }
14135 fi
14136 
14137 
14138   test -n "$CPIO" && break
14139 done
14140 
14141     else
14142       # If it succeeded, then it was overridden by the user. We will use it
14143       # for the tool.
14144 
14145       # First remove it from the list of overridden variables, so we can test
14146       # for unknown variables in the end.
14147       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14148 
14149       # Check if we try to supply an empty value
14150       if test "x$CPIO" = x; then
14151         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14152 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14153         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14154 $as_echo_n "checking for CPIO... " >&6; }
14155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14156 $as_echo "disabled" >&6; }
14157       else
14158         # Check if the provided tool contains a complete path.
14159         tool_specified="$CPIO"
14160         tool_basename="${tool_specified##*/}"
14161         if test "x$tool_basename" = "x$tool_specified"; then
14162           # A command without a complete path is provided, search $PATH.
14163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14164 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14165           # Extract the first word of "$tool_basename", so it can be a program name with args.
14166 set dummy $tool_basename; ac_word=$2
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14168 $as_echo_n "checking for $ac_word... " >&6; }
14169 if ${ac_cv_path_CPIO+:} false; then :
14170   $as_echo_n "(cached) " >&6
14171 else
14172   case $CPIO in
14173   [\\/]* | ?:[\\/]*)
14174   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14175   ;;
14176   *)
14177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14178 for as_dir in $PATH
14179 do
14180   IFS=$as_save_IFS
14181   test -z "$as_dir" && as_dir=.
14182     for ac_exec_ext in '' $ac_executable_extensions; do
14183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14184     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14186     break 2
14187   fi
14188 done
14189   done
14190 IFS=$as_save_IFS
14191 
14192   ;;
14193 esac
14194 fi
14195 CPIO=$ac_cv_path_CPIO
14196 if test -n "$CPIO"; then
14197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14198 $as_echo "$CPIO" >&6; }
14199 else
14200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14201 $as_echo "no" >&6; }
14202 fi
14203 
14204 
14205           if test "x$CPIO" = x; then
14206             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14207           fi
14208         else
14209           # Otherwise we believe it is a complete path. Use it as it is.
14210           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14211 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14212           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14213 $as_echo_n "checking for CPIO... " >&6; }
14214           if test ! -x "$tool_specified"; then
14215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14216 $as_echo "not found" >&6; }
14217             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14218           fi
14219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14220 $as_echo "$tool_specified" >&6; }
14221         fi
14222       fi
14223     fi
14224 
14225   fi
14226 
14227 
14228 
14229 
14230   # Publish this variable in the help.
14231 
14232 
14233   if [ -z "${NICE+x}" ]; then
14234     # The variable is not set by user, try to locate tool using the code snippet
14235     for ac_prog in nice
14236 do
14237   # Extract the first word of "$ac_prog", so it can be a program name with args.
14238 set dummy $ac_prog; ac_word=$2
14239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14240 $as_echo_n "checking for $ac_word... " >&6; }
14241 if ${ac_cv_path_NICE+:} false; then :
14242   $as_echo_n "(cached) " >&6
14243 else
14244   case $NICE in
14245   [\\/]* | ?:[\\/]*)
14246   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14247   ;;
14248   *)
14249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14250 for as_dir in $PATH
14251 do
14252   IFS=$as_save_IFS
14253   test -z "$as_dir" && as_dir=.
14254     for ac_exec_ext in '' $ac_executable_extensions; do
14255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14256     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14258     break 2
14259   fi
14260 done
14261   done
14262 IFS=$as_save_IFS
14263 
14264   ;;
14265 esac
14266 fi
14267 NICE=$ac_cv_path_NICE
14268 if test -n "$NICE"; then
14269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14270 $as_echo "$NICE" >&6; }
14271 else
14272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14273 $as_echo "no" >&6; }
14274 fi
14275 
14276 
14277   test -n "$NICE" && break
14278 done
14279 
14280   else
14281     # The variable is set, but is it from the command line or the environment?
14282 
14283     # Try to remove the string !NICE! from our list.
14284     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14285     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14286       # If it failed, the variable was not from the command line. Ignore it,
14287       # but warn the user (except for BASH, which is always set by the calling BASH).
14288       if test "xNICE" != xBASH; then
14289         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14290 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14291       fi
14292       # Try to locate tool using the code snippet
14293       for ac_prog in nice
14294 do
14295   # Extract the first word of "$ac_prog", so it can be a program name with args.
14296 set dummy $ac_prog; ac_word=$2
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14298 $as_echo_n "checking for $ac_word... " >&6; }
14299 if ${ac_cv_path_NICE+:} false; then :
14300   $as_echo_n "(cached) " >&6
14301 else
14302   case $NICE in
14303   [\\/]* | ?:[\\/]*)
14304   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14305   ;;
14306   *)
14307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14308 for as_dir in $PATH
14309 do
14310   IFS=$as_save_IFS
14311   test -z "$as_dir" && as_dir=.
14312     for ac_exec_ext in '' $ac_executable_extensions; do
14313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14314     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14316     break 2
14317   fi
14318 done
14319   done
14320 IFS=$as_save_IFS
14321 
14322   ;;
14323 esac
14324 fi
14325 NICE=$ac_cv_path_NICE
14326 if test -n "$NICE"; then
14327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14328 $as_echo "$NICE" >&6; }
14329 else
14330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331 $as_echo "no" >&6; }
14332 fi
14333 
14334 
14335   test -n "$NICE" && break
14336 done
14337 
14338     else
14339       # If it succeeded, then it was overridden by the user. We will use it
14340       # for the tool.
14341 
14342       # First remove it from the list of overridden variables, so we can test
14343       # for unknown variables in the end.
14344       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14345 
14346       # Check if we try to supply an empty value
14347       if test "x$NICE" = x; then
14348         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14349 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14351 $as_echo_n "checking for NICE... " >&6; }
14352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14353 $as_echo "disabled" >&6; }
14354       else
14355         # Check if the provided tool contains a complete path.
14356         tool_specified="$NICE"
14357         tool_basename="${tool_specified##*/}"
14358         if test "x$tool_basename" = "x$tool_specified"; then
14359           # A command without a complete path is provided, search $PATH.
14360           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14361 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14362           # Extract the first word of "$tool_basename", so it can be a program name with args.
14363 set dummy $tool_basename; ac_word=$2
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14365 $as_echo_n "checking for $ac_word... " >&6; }
14366 if ${ac_cv_path_NICE+:} false; then :
14367   $as_echo_n "(cached) " >&6
14368 else
14369   case $NICE in
14370   [\\/]* | ?:[\\/]*)
14371   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14372   ;;
14373   *)
14374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14375 for as_dir in $PATH
14376 do
14377   IFS=$as_save_IFS
14378   test -z "$as_dir" && as_dir=.
14379     for ac_exec_ext in '' $ac_executable_extensions; do
14380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14381     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14383     break 2
14384   fi
14385 done
14386   done
14387 IFS=$as_save_IFS
14388 
14389   ;;
14390 esac
14391 fi
14392 NICE=$ac_cv_path_NICE
14393 if test -n "$NICE"; then
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14395 $as_echo "$NICE" >&6; }
14396 else
14397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398 $as_echo "no" >&6; }
14399 fi
14400 
14401 
14402           if test "x$NICE" = x; then
14403             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14404           fi
14405         else
14406           # Otherwise we believe it is a complete path. Use it as it is.
14407           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14408 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14409           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14410 $as_echo_n "checking for NICE... " >&6; }
14411           if test ! -x "$tool_specified"; then
14412             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14413 $as_echo "not found" >&6; }
14414             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14415           fi
14416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14417 $as_echo "$tool_specified" >&6; }
14418         fi
14419       fi
14420     fi
14421 
14422   fi
14423 
14424 
14425 
14426 
14427 # Now we can determine OpenJDK build and target platforms. This is required to
14428 # have early on.
14429 # Make sure we can run config.sub.
14430 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14431   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14432 
14433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14434 $as_echo_n "checking build system type... " >&6; }
14435 if ${ac_cv_build+:} false; then :
14436   $as_echo_n "(cached) " >&6
14437 else
14438   ac_build_alias=$build_alias
14439 test "x$ac_build_alias" = x &&
14440   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14441 test "x$ac_build_alias" = x &&
14442   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14443 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14444   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14445 
14446 fi
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14448 $as_echo "$ac_cv_build" >&6; }
14449 case $ac_cv_build in
14450 *-*-*) ;;
14451 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14452 esac
14453 build=$ac_cv_build
14454 ac_save_IFS=$IFS; IFS='-'
14455 set x $ac_cv_build
14456 shift
14457 build_cpu=$1
14458 build_vendor=$2
14459 shift; shift
14460 # Remember, the first character of IFS is used to create $*,
14461 # except with old shells:
14462 build_os=$*
14463 IFS=$ac_save_IFS
14464 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14465 
14466 
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14468 $as_echo_n "checking host system type... " >&6; }
14469 if ${ac_cv_host+:} false; then :
14470   $as_echo_n "(cached) " >&6
14471 else
14472   if test "x$host_alias" = x; then
14473   ac_cv_host=$ac_cv_build
14474 else
14475   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14476     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14477 fi
14478 
14479 fi
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14481 $as_echo "$ac_cv_host" >&6; }
14482 case $ac_cv_host in
14483 *-*-*) ;;
14484 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14485 esac
14486 host=$ac_cv_host
14487 ac_save_IFS=$IFS; IFS='-'
14488 set x $ac_cv_host
14489 shift
14490 host_cpu=$1
14491 host_vendor=$2
14492 shift; shift
14493 # Remember, the first character of IFS is used to create $*,
14494 # except with old shells:
14495 host_os=$*
14496 IFS=$ac_save_IFS
14497 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14498 
14499 
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14501 $as_echo_n "checking target system type... " >&6; }
14502 if ${ac_cv_target+:} false; then :
14503   $as_echo_n "(cached) " >&6
14504 else
14505   if test "x$target_alias" = x; then
14506   ac_cv_target=$ac_cv_host
14507 else
14508   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14509     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14510 fi
14511 
14512 fi
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14514 $as_echo "$ac_cv_target" >&6; }
14515 case $ac_cv_target in
14516 *-*-*) ;;
14517 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14518 esac
14519 target=$ac_cv_target
14520 ac_save_IFS=$IFS; IFS='-'
14521 set x $ac_cv_target
14522 shift
14523 target_cpu=$1
14524 target_vendor=$2
14525 shift; shift
14526 # Remember, the first character of IFS is used to create $*,
14527 # except with old shells:
14528 target_os=$*
14529 IFS=$ac_save_IFS
14530 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14531 
14532 
14533 # The aliases save the names the user supplied, while $host etc.
14534 # will get canonicalized.
14535 test -n "$target_alias" &&
14536   test "$program_prefix$program_suffix$program_transform_name" = \
14537     NONENONEs,x,x, &&
14538   program_prefix=${target_alias}-
14539 
14540   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14541   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14542   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14543   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14544   # to use the configure naming style.
14545 
14546 
14547 
14548 
14549 
14550   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14551   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14552   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14553   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14554   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14555   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14556 
14557 
14558 
14559   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14560 
14561   case "$build_os" in
14562     *linux*)
14563       VAR_OS=linux
14564       VAR_OS_TYPE=unix
14565       ;;
14566     *solaris*)
14567       VAR_OS=solaris
14568       VAR_OS_TYPE=unix
14569       ;;
14570     *darwin*)
14571       VAR_OS=macosx
14572       VAR_OS_TYPE=unix
14573       ;;
14574     *bsd*)
14575       VAR_OS=bsd
14576       VAR_OS_TYPE=unix
14577       ;;
14578     *cygwin*)
14579       VAR_OS=windows
14580       VAR_OS_ENV=windows.cygwin
14581       ;;
14582     *mingw*)
14583       VAR_OS=windows
14584       VAR_OS_ENV=windows.msys
14585       ;;
14586     *aix*)
14587       VAR_OS=aix
14588       VAR_OS_TYPE=unix
14589       ;;
14590     *)
14591       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14592       ;;
14593   esac
14594 
14595 
14596   # First argument is the cpu name from the trip/quad
14597   case "$build_cpu" in
14598     x86_64)
14599       VAR_CPU=x86_64
14600       VAR_CPU_ARCH=x86
14601       VAR_CPU_BITS=64
14602       VAR_CPU_ENDIAN=little
14603       ;;
14604     i?86)
14605       VAR_CPU=x86
14606       VAR_CPU_ARCH=x86
14607       VAR_CPU_BITS=32
14608       VAR_CPU_ENDIAN=little
14609       ;;
14610     arm*)
14611       VAR_CPU=arm
14612       VAR_CPU_ARCH=arm
14613       VAR_CPU_BITS=32
14614       VAR_CPU_ENDIAN=little
14615       ;;
14616     aarch64)
14617       VAR_CPU=aarch64
14618       VAR_CPU_ARCH=aarch64
14619       VAR_CPU_BITS=64
14620       VAR_CPU_ENDIAN=little
14621       ;;
14622     powerpc)
14623       VAR_CPU=ppc
14624       VAR_CPU_ARCH=ppc
14625       VAR_CPU_BITS=32
14626       VAR_CPU_ENDIAN=big
14627       ;;
14628     powerpc64)
14629       VAR_CPU=ppc64
14630       VAR_CPU_ARCH=ppc
14631       VAR_CPU_BITS=64
14632       VAR_CPU_ENDIAN=big
14633       ;;
14634     powerpc64le)
14635       VAR_CPU=ppc64
14636       VAR_CPU_ARCH=ppc
14637       VAR_CPU_BITS=64
14638       VAR_CPU_ENDIAN=little
14639       ;;
14640     s390)
14641       VAR_CPU=s390
14642       VAR_CPU_ARCH=s390
14643       VAR_CPU_BITS=32
14644       VAR_CPU_ENDIAN=big
14645       ;;
14646     s390x)
14647       VAR_CPU=s390x
14648       VAR_CPU_ARCH=s390
14649       VAR_CPU_BITS=64
14650       VAR_CPU_ENDIAN=big
14651       ;;
14652     sparc)
14653       VAR_CPU=sparc
14654       VAR_CPU_ARCH=sparc
14655       VAR_CPU_BITS=32
14656       VAR_CPU_ENDIAN=big
14657       ;;
14658     sparcv9|sparc64)
14659       VAR_CPU=sparcv9
14660       VAR_CPU_ARCH=sparc
14661       VAR_CPU_BITS=64
14662       VAR_CPU_ENDIAN=big
14663       ;;
14664     *)
14665       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14666       ;;
14667   esac
14668 
14669   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14670   OPENJDK_BUILD_OS="$VAR_OS"
14671   if test "x$VAR_OS_TYPE" != x; then
14672     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14673   else
14674     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14675   fi
14676   if test "x$VAR_OS_ENV" != x; then
14677     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14678   else
14679     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14680   fi
14681   OPENJDK_BUILD_CPU="$VAR_CPU"
14682   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14683   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14684   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14685 
14686 
14687 
14688 
14689 
14690 
14691 
14692 
14693   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14694 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14696 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14697 
14698   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14699 
14700   case "$host_os" in
14701     *linux*)
14702       VAR_OS=linux
14703       VAR_OS_TYPE=unix
14704       ;;
14705     *solaris*)
14706       VAR_OS=solaris
14707       VAR_OS_TYPE=unix
14708       ;;
14709     *darwin*)
14710       VAR_OS=macosx
14711       VAR_OS_TYPE=unix
14712       ;;
14713     *bsd*)
14714       VAR_OS=bsd
14715       VAR_OS_TYPE=unix
14716       ;;
14717     *cygwin*)
14718       VAR_OS=windows
14719       VAR_OS_ENV=windows.cygwin
14720       ;;
14721     *mingw*)
14722       VAR_OS=windows
14723       VAR_OS_ENV=windows.msys
14724       ;;
14725     *aix*)
14726       VAR_OS=aix
14727       VAR_OS_TYPE=unix
14728       ;;
14729     *)
14730       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14731       ;;
14732   esac
14733 
14734 
14735   # First argument is the cpu name from the trip/quad
14736   case "$host_cpu" in
14737     x86_64)
14738       VAR_CPU=x86_64
14739       VAR_CPU_ARCH=x86
14740       VAR_CPU_BITS=64
14741       VAR_CPU_ENDIAN=little
14742       ;;
14743     i?86)
14744       VAR_CPU=x86
14745       VAR_CPU_ARCH=x86
14746       VAR_CPU_BITS=32
14747       VAR_CPU_ENDIAN=little
14748       ;;
14749     arm*)
14750       VAR_CPU=arm
14751       VAR_CPU_ARCH=arm
14752       VAR_CPU_BITS=32
14753       VAR_CPU_ENDIAN=little
14754       ;;
14755     aarch64)
14756       VAR_CPU=aarch64
14757       VAR_CPU_ARCH=aarch64
14758       VAR_CPU_BITS=64
14759       VAR_CPU_ENDIAN=little
14760       ;;
14761     powerpc)
14762       VAR_CPU=ppc
14763       VAR_CPU_ARCH=ppc
14764       VAR_CPU_BITS=32
14765       VAR_CPU_ENDIAN=big
14766       ;;
14767     powerpc64)
14768       VAR_CPU=ppc64
14769       VAR_CPU_ARCH=ppc
14770       VAR_CPU_BITS=64
14771       VAR_CPU_ENDIAN=big
14772       ;;
14773     powerpc64le)
14774       VAR_CPU=ppc64
14775       VAR_CPU_ARCH=ppc
14776       VAR_CPU_BITS=64
14777       VAR_CPU_ENDIAN=little
14778       ;;
14779     s390)
14780       VAR_CPU=s390
14781       VAR_CPU_ARCH=s390
14782       VAR_CPU_BITS=32
14783       VAR_CPU_ENDIAN=big
14784       ;;
14785     s390x)
14786       VAR_CPU=s390x
14787       VAR_CPU_ARCH=s390
14788       VAR_CPU_BITS=64
14789       VAR_CPU_ENDIAN=big
14790       ;;
14791     sparc)
14792       VAR_CPU=sparc
14793       VAR_CPU_ARCH=sparc
14794       VAR_CPU_BITS=32
14795       VAR_CPU_ENDIAN=big
14796       ;;
14797     sparcv9|sparc64)
14798       VAR_CPU=sparcv9
14799       VAR_CPU_ARCH=sparc
14800       VAR_CPU_BITS=64
14801       VAR_CPU_ENDIAN=big
14802       ;;
14803     *)
14804       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14805       ;;
14806   esac
14807 
14808   # ... and setup our own variables. (Do this explicitely to facilitate searching)
14809   OPENJDK_TARGET_OS="$VAR_OS"
14810   if test "x$VAR_OS_TYPE" != x; then
14811     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14812   else
14813     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14814   fi
14815   if test "x$VAR_OS_ENV" != x; then
14816     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14817   else
14818     OPENJDK_TARGET_OS_ENV="$VAR_OS"
14819   fi
14820   OPENJDK_TARGET_CPU="$VAR_CPU"
14821   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14822   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14823   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14824 
14825 
14826 
14827 
14828 
14829 
14830 
14831 
14832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14833 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
14834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14835 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14836 
14837 
14838 
14839 # Check whether --with-target-bits was given.
14840 if test "${with_target_bits+set}" = set; then :
14841   withval=$with_target_bits;
14842 fi
14843 
14844 
14845   # We have three types of compiles:
14846   # native  == normal compilation, target system == build system
14847   # cross   == traditional cross compilation, target system != build system; special toolchain needed
14848   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14849   #
14850   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14851     # We're doing a proper cross-compilation
14852     COMPILE_TYPE="cross"
14853   else
14854     COMPILE_TYPE="native"
14855   fi
14856 
14857   if test "x$with_target_bits" != x; then
14858     if test "x$COMPILE_TYPE" = "xcross"; then
14859       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14860     fi
14861 
14862     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14863       # A reduced build is requested
14864       COMPILE_TYPE="reduced"
14865       OPENJDK_TARGET_CPU_BITS=32
14866       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14867         OPENJDK_TARGET_CPU=x86
14868       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14869         OPENJDK_TARGET_CPU=sparc
14870       else
14871         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14872       fi
14873     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14874       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
14875     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14876       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14877 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14878     else
14879       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14880     fi
14881   fi
14882 
14883 
14884   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14885 $as_echo_n "checking compilation type... " >&6; }
14886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14887 $as_echo "$COMPILE_TYPE" >&6; }
14888 
14889 
14890   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14891     REQUIRED_OS_NAME=SunOS
14892     REQUIRED_OS_VERSION=5.10
14893   fi
14894   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14895     REQUIRED_OS_NAME=Linux
14896     REQUIRED_OS_VERSION=2.6
14897   fi
14898   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14899     REQUIRED_OS_NAME=Windows
14900     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14901       REQUIRED_OS_VERSION=5.2
14902     else
14903       REQUIRED_OS_VERSION=5.1
14904     fi
14905   fi
14906   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14907     REQUIRED_OS_NAME=Darwin
14908     REQUIRED_OS_VERSION=11.2
14909   fi
14910 
14911 
14912 
14913 
14914 
14915   # Also store the legacy naming of the cpu.
14916   # Ie i586 and amd64 instead of x86 and x86_64
14917   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14918   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14919     OPENJDK_TARGET_CPU_LEGACY="i586"
14920   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14921     # On all platforms except MacOSX replace x86_64 with amd64.
14922     OPENJDK_TARGET_CPU_LEGACY="amd64"
14923   fi
14924 
14925 
14926   # And the second legacy naming of the cpu.
14927   # Ie i386 and amd64 instead of x86 and x86_64.
14928   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14929   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14930     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14931   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14932     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14933   fi
14934 
14935 
14936   # This is the name of the cpu (but using i386 and amd64 instead of
14937   # x86 and x86_64, respectively), preceeded by a /, to be used when
14938   # locating libraries. On macosx, it's empty, though.
14939   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14940   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14941     OPENJDK_TARGET_CPU_LIBDIR=""
14942   fi
14943 
14944 
14945   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14946   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14947   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14948   OPENJDK_TARGET_CPU_ISADIR=""
14949   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14950     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14951       OPENJDK_TARGET_CPU_ISADIR="/amd64"
14952     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14953       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14954     fi
14955   fi
14956 
14957 
14958   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14959   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14960   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14961     # On linux only, we replace x86 with i386.
14962     OPENJDK_TARGET_CPU_OSARCH="i386"
14963   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14964     # On all platforms except macosx, we replace x86_64 with amd64.
14965     OPENJDK_TARGET_CPU_OSARCH="amd64"
14966   fi
14967 
14968 
14969   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14970   if test "x$OPENJDK_TARGET_CPU" = xx86; then
14971     OPENJDK_TARGET_CPU_JLI="i386"
14972   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14973     # On all platforms except macosx, we replace x86_64 with amd64.
14974     OPENJDK_TARGET_CPU_JLI="amd64"
14975   fi
14976   # Now setup the -D flags for building libjli.
14977   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14978   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14979     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14980       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14981     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14982       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14983     fi
14984   fi
14985 
14986 
14987   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14988       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14989   else
14990       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14991   fi
14992 
14993 
14994   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14995     A_LP64="LP64:="
14996     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14997     # unpack200.exe
14998     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14999       ADD_LP64="-D_LP64=1"
15000     fi
15001   fi
15002   LP64=$A_LP64
15003 
15004 
15005   if test "x$COMPILE_TYPE" = "xcross"; then
15006     # FIXME: ... or should this include reduced builds..?
15007     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15008   else
15009     DEFINE_CROSS_COMPILE_ARCH=""
15010   fi
15011 
15012 
15013   # ZERO_ARCHDEF is used to enable architecture-specific code
15014   case "${OPENJDK_TARGET_CPU}" in
15015     ppc)     ZERO_ARCHDEF=PPC32 ;;
15016     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15017     s390*)   ZERO_ARCHDEF=S390  ;;
15018     sparc*)  ZERO_ARCHDEF=SPARC ;;
15019     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15020     x86)     ZERO_ARCHDEF=IA32  ;;
15021     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15022   esac
15023 
15024 
15025 
15026 
15027 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15028 
15029   # Save the current directory this script was started from
15030   CURDIR="$PWD"
15031 
15032   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15033   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15034   # was not available at that time.
15035   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15036   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15037     ORIGINAL_PATH="$REWRITTEN_PATH"
15038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15039 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15040   fi
15041 
15042   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15043     PATH_SEP=";"
15044 
15045   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15046   if test $SRC_ROOT_LENGTH -gt 100; then
15047     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15048   fi
15049 
15050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15052 $as_echo_n "checking cygwin release... " >&6; }
15053     CYGWIN_VERSION=`$UNAME -r`
15054     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15055 $as_echo "$CYGWIN_VERSION" >&6; }
15056     WINDOWS_ENV_VENDOR='cygwin'
15057     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15058 
15059     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15060     if test "x$CYGWIN_VERSION_OLD" != x; then
15061       { $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
15062 $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;}
15063       as_fn_error $? "Cannot continue" "$LINENO" 5
15064     fi
15065     if test "x$CYGPATH" = x; then
15066       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15067     fi
15068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15069 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15070     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15071     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15072     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15073     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15075 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15076     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15077     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15078     if test "x$test_cygdrive_prefix" = x; then
15079       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15080     fi
15081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15082     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15083 $as_echo_n "checking msys release... " >&6; }
15084     MSYS_VERSION=`$UNAME -r`
15085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15086 $as_echo "$MSYS_VERSION" >&6; }
15087 
15088     WINDOWS_ENV_VENDOR='msys'
15089     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15090 
15091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15092 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15093     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15094     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15095 
15096   windows_path="$MSYS_ROOT_PATH"
15097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15098     unix_path=`$CYGPATH -u "$windows_path"`
15099     MSYS_ROOT_PATH="$unix_path"
15100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15102     MSYS_ROOT_PATH="$unix_path"
15103   fi
15104 
15105     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15106 $as_echo "$MSYS_ROOT_PATH" >&6; }
15107     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15108   else
15109     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15110   fi
15111 
15112   # Test if windows or unix (cygwin/msys) find is first in path.
15113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15114 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15115   FIND_BINARY_OUTPUT=`find --version 2>&1`
15116   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15118 $as_echo "unix style" >&6; }
15119   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15121 $as_echo "Windows" >&6; }
15122     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15123 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15124     { $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
15125 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15126     as_fn_error $? "Cannot continue" "$LINENO" 5
15127   else
15128     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15129 $as_echo "unknown" >&6; }
15130     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15131 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15132   fi
15133 
15134   else
15135     PATH_SEP=":"
15136   fi
15137 
15138 
15139   # We get the top-level directory from the supporting wrappers.
15140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15141 $as_echo_n "checking for top-level directory... " >&6; }
15142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15143 $as_echo "$TOPDIR" >&6; }
15144 
15145 
15146   # Save the original version of TOPDIR for string comparisons
15147   ORIGINAL_TOPDIR="$TOPDIR"
15148 
15149 
15150   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15151 
15152   # Only process if variable expands to non-empty
15153 
15154   if test "x$CURDIR" != x; then
15155     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15156 
15157   # Input might be given as Windows format, start by converting to
15158   # unix format.
15159   path="$CURDIR"
15160   new_path=`$CYGPATH -u "$path"`
15161 
15162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15165   # "foo.exe" is OK but "foo" is an error.
15166   #
15167   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15168   # It is also a way to make sure we got the proper file name for the real test later on.
15169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15170   if test "x$test_shortpath" = x; then
15171     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15172 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15173     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15174   fi
15175 
15176   # Call helper function which possibly converts this using DOS-style short mode.
15177   # If so, the updated path is stored in $new_path.
15178 
15179   input_path="$new_path"
15180   # Check if we need to convert this using DOS-style short mode. If the path
15181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15182   # take no chances and rewrite it.
15183   # Note: m4 eats our [], so we need to use [ and ] instead.
15184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15185   if test "x$has_forbidden_chars" != x; then
15186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15187     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15188     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15189     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15190       # Going to short mode and back again did indeed matter. Since short mode is
15191       # case insensitive, let's make it lowercase to improve readability.
15192       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15193       # Now convert it back to Unix-style (cygpath)
15194       input_path=`$CYGPATH -u "$shortmode_path"`
15195       new_path="$input_path"
15196     fi
15197   fi
15198 
15199   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15200   if test "x$test_cygdrive_prefix" = x; then
15201     # As a simple fix, exclude /usr/bin since it's not a real path.
15202     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15203       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15204       # a path prefixed by /cygdrive for fixpath to work.
15205       new_path="$CYGWIN_ROOT_PATH$input_path"
15206     fi
15207   fi
15208 
15209 
15210   if test "x$path" != "x$new_path"; then
15211     CURDIR="$new_path"
15212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15213 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15214   fi
15215 
15216     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15217 
15218   path="$CURDIR"
15219   has_colon=`$ECHO $path | $GREP ^.:`
15220   new_path="$path"
15221   if test "x$has_colon" = x; then
15222     # Not in mixed or Windows style, start by that.
15223     new_path=`cmd //c echo $path`
15224   fi
15225 
15226 
15227   input_path="$new_path"
15228   # Check if we need to convert this using DOS-style short mode. If the path
15229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15230   # take no chances and rewrite it.
15231   # Note: m4 eats our [], so we need to use [ and ] instead.
15232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15233   if test "x$has_forbidden_chars" != x; then
15234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15235     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15236   fi
15237 
15238 
15239   windows_path="$new_path"
15240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15241     unix_path=`$CYGPATH -u "$windows_path"`
15242     new_path="$unix_path"
15243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15245     new_path="$unix_path"
15246   fi
15247 
15248   if test "x$path" != "x$new_path"; then
15249     CURDIR="$new_path"
15250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15251 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15252   fi
15253 
15254   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15255   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15256 
15257     else
15258       # We're on a unix platform. Hooray! :)
15259       path="$CURDIR"
15260       has_space=`$ECHO "$path" | $GREP " "`
15261       if test "x$has_space" != x; then
15262         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15263 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15264         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15265       fi
15266 
15267       # Use eval to expand a potential ~
15268       eval path="$path"
15269       if test ! -f "$path" && test ! -d "$path"; then
15270         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15271       fi
15272 
15273       CURDIR="`cd "$path"; $THEPWDCMD -L`"
15274     fi
15275   fi
15276 
15277 
15278   # Only process if variable expands to non-empty
15279 
15280   if test "x$TOPDIR" != x; then
15281     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15282 
15283   # Input might be given as Windows format, start by converting to
15284   # unix format.
15285   path="$TOPDIR"
15286   new_path=`$CYGPATH -u "$path"`
15287 
15288   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15289   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15290   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15291   # "foo.exe" is OK but "foo" is an error.
15292   #
15293   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15294   # It is also a way to make sure we got the proper file name for the real test later on.
15295   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15296   if test "x$test_shortpath" = x; then
15297     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15298 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15299     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15300   fi
15301 
15302   # Call helper function which possibly converts this using DOS-style short mode.
15303   # If so, the updated path is stored in $new_path.
15304 
15305   input_path="$new_path"
15306   # Check if we need to convert this using DOS-style short mode. If the path
15307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15308   # take no chances and rewrite it.
15309   # Note: m4 eats our [], so we need to use [ and ] instead.
15310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15311   if test "x$has_forbidden_chars" != x; then
15312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15316       # Going to short mode and back again did indeed matter. Since short mode is
15317       # case insensitive, let's make it lowercase to improve readability.
15318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15319       # Now convert it back to Unix-style (cygpath)
15320       input_path=`$CYGPATH -u "$shortmode_path"`
15321       new_path="$input_path"
15322     fi
15323   fi
15324 
15325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15326   if test "x$test_cygdrive_prefix" = x; then
15327     # As a simple fix, exclude /usr/bin since it's not a real path.
15328     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15330       # a path prefixed by /cygdrive for fixpath to work.
15331       new_path="$CYGWIN_ROOT_PATH$input_path"
15332     fi
15333   fi
15334 
15335 
15336   if test "x$path" != "x$new_path"; then
15337     TOPDIR="$new_path"
15338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15339 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15340   fi
15341 
15342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15343 
15344   path="$TOPDIR"
15345   has_colon=`$ECHO $path | $GREP ^.:`
15346   new_path="$path"
15347   if test "x$has_colon" = x; then
15348     # Not in mixed or Windows style, start by that.
15349     new_path=`cmd //c echo $path`
15350   fi
15351 
15352 
15353   input_path="$new_path"
15354   # Check if we need to convert this using DOS-style short mode. If the path
15355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15356   # take no chances and rewrite it.
15357   # Note: m4 eats our [], so we need to use [ and ] instead.
15358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15359   if test "x$has_forbidden_chars" != x; then
15360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15362   fi
15363 
15364 
15365   windows_path="$new_path"
15366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15367     unix_path=`$CYGPATH -u "$windows_path"`
15368     new_path="$unix_path"
15369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15371     new_path="$unix_path"
15372   fi
15373 
15374   if test "x$path" != "x$new_path"; then
15375     TOPDIR="$new_path"
15376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15377 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15378   fi
15379 
15380   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15381   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15382 
15383     else
15384       # We're on a unix platform. Hooray! :)
15385       path="$TOPDIR"
15386       has_space=`$ECHO "$path" | $GREP " "`
15387       if test "x$has_space" != x; then
15388         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15389 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15390         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15391       fi
15392 
15393       # Use eval to expand a potential ~
15394       eval path="$path"
15395       if test ! -f "$path" && test ! -d "$path"; then
15396         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15397       fi
15398 
15399       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15400     fi
15401   fi
15402 
15403   # SRC_ROOT is a traditional alias for TOPDIR.
15404   SRC_ROOT=$TOPDIR
15405 
15406   # Calculate a canonical version of TOPDIR for string comparisons
15407   CANONICAL_TOPDIR=$TOPDIR
15408 
15409   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15410     # Follow a chain of symbolic links. Use readlink
15411     # where it exists, else fall back to horribly
15412     # complicated shell code.
15413     if test "x$READLINK_TESTED" != yes; then
15414       # On MacOSX there is a readlink tool with a different
15415       # purpose than the GNU readlink tool. Check the found readlink.
15416       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15417       if test "x$ISGNU" = x; then
15418         # A readlink that we do not know how to use.
15419         # Are there other non-GNU readlinks out there?
15420         READLINK_TESTED=yes
15421         READLINK=
15422       fi
15423     fi
15424 
15425     if test "x$READLINK" != x; then
15426       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15427     else
15428       # Save the current directory for restoring afterwards
15429       STARTDIR=$PWD
15430       COUNTER=0
15431       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15432       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15433       cd $sym_link_dir
15434       # Use -P flag to resolve symlinks in directories.
15435       cd `$THEPWDCMD -P`
15436       sym_link_dir=`$THEPWDCMD -P`
15437       # Resolve file symlinks
15438       while test $COUNTER -lt 20; do
15439         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15440         if test "x$ISLINK" == x; then
15441           # This is not a symbolic link! We are done!
15442           break
15443         fi
15444         # Again resolve directory symlinks since the target of the just found
15445         # link could be in a different directory
15446         cd `$DIRNAME $ISLINK`
15447         sym_link_dir=`$THEPWDCMD -P`
15448         sym_link_file=`$BASENAME $ISLINK`
15449         let COUNTER=COUNTER+1
15450       done
15451       cd $STARTDIR
15452       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15453     fi
15454   fi
15455 
15456 
15457 
15458   # Locate the directory of this script.
15459   AUTOCONF_DIR=$TOPDIR/common/autoconf
15460 
15461 
15462 # Check if it's a pure open build or if custom sources are to be used.
15463 
15464   # Check whether --enable-openjdk-only was given.
15465 if test "${enable_openjdk_only+set}" = set; then :
15466   enableval=$enable_openjdk_only;
15467 else
15468   enable_openjdk_only="no"
15469 fi
15470 
15471 
15472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15473 $as_echo_n "checking for presence of closed sources... " >&6; }
15474   if test -d "$SRC_ROOT/jdk/src/closed"; then
15475     CLOSED_SOURCE_PRESENT=yes
15476   else
15477     CLOSED_SOURCE_PRESENT=no
15478   fi
15479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15480 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15481 
15482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15483 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15484   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15486 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15487 
15488   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15489     OPENJDK=true
15490     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15491       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15492 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15493     fi
15494   else
15495     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15496       OPENJDK=true
15497     else
15498       OPENJDK=false
15499     fi
15500   fi
15501 
15502   if test "x$OPENJDK" = "xtrue"; then
15503     SET_OPENJDK="OPENJDK=true"
15504   fi
15505 
15506 
15507 
15508   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15509   # the IncludeCustomExtension macro.
15510 
15511 
15512 # Check whether --with-custom-make-dir was given.
15513 if test "${with_custom_make_dir+set}" = set; then :
15514   withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
15515 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15516 fi
15517 
15518 
15519 
15520 
15521 # These are needed to be able to create a configuration name (and thus the output directory)
15522 
15523   ###############################################################################
15524   #
15525   # Check which variant of the JDK that we want to build.
15526   # Currently we have:
15527   #    normal:   standard edition
15528   # but the custom make system may add other variants
15529   #
15530   # Effectively the JDK variant gives a name to a specific set of
15531   # modules to compile into the JDK. In the future, these modules
15532   # might even be Jigsaw modules.
15533   #
15534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15535 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15536 
15537 # Check whether --with-jdk-variant was given.
15538 if test "${with_jdk_variant+set}" = set; then :
15539   withval=$with_jdk_variant;
15540 fi
15541 
15542 
15543   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15544     JDK_VARIANT="normal"
15545   else
15546     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15547   fi
15548 
15549 
15550 
15551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15552 $as_echo "$JDK_VARIANT" >&6; }
15553 
15554 
15555 ###############################################################################
15556 #
15557 # Check which interpreter of the JVM we want to build.
15558 # Currently we have:
15559 #    template: Template interpreter (the default)
15560 #    cpp     : C++ interpreter
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15562 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15563 
15564 # Check whether --with-jvm-interpreter was given.
15565 if test "${with_jvm_interpreter+set}" = set; then :
15566   withval=$with_jvm_interpreter;
15567 fi
15568 
15569 
15570 if test "x$with_jvm_interpreter" = x; then
15571      with_jvm_interpreter="template"
15572 fi
15573 
15574 JVM_INTERPRETER="$with_jvm_interpreter"
15575 
15576 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15577    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15578 fi
15579 
15580 
15581 
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15583 $as_echo "$with_jvm_interpreter" >&6; }
15584 
15585 
15586 
15587   ###############################################################################
15588   #
15589   # Check which variants of the JVM that we want to build.
15590   # Currently we have:
15591   #    server: normal interpreter and a tiered C1/C2 compiler
15592   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15593   #    minimal1: reduced form of client with optional VM services and features stripped out
15594   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15595   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15596   #    zero: no machine code interpreter, no compiler
15597   #    zeroshark: zero interpreter and shark/llvm compiler backend
15598 #    core: interpreter only, no compiler (only works on some platforms)
15599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15600 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15601 
15602 # Check whether --with-jvm-variants was given.
15603 if test "${with_jvm_variants+set}" = set; then :
15604   withval=$with_jvm_variants;
15605 fi
15606 
15607 
15608   if test "x$with_jvm_variants" = x; then
15609     with_jvm_variants="server"
15610   fi
15611 
15612   JVM_VARIANTS=",$with_jvm_variants,"
15613   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,//'`
15614 
15615   if test "x$TEST_VARIANTS" != "x,"; then
15616      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15617   fi
15618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15619 $as_echo "$with_jvm_variants" >&6; }
15620 
15621   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15622   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15623   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15624   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15625   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15626   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15627   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15628 
15629   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15630     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15631       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15632     fi
15633   fi
15634   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15635     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15636       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15637     fi
15638   fi
15639   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15640     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15641       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15642     fi
15643   fi
15644 
15645   # Replace the commas with AND for use in the build directory name.
15646   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15647   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/'`
15648   if test "x$COUNT_VARIANTS" != "x,1"; then
15649     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15650   else
15651     BUILDING_MULTIPLE_JVM_VARIANTS=no
15652   fi
15653 
15654 
15655 
15656 
15657 
15658 
15659 
15660 
15661 
15662 
15663   INCLUDE_SA=true
15664   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15665     INCLUDE_SA=false
15666   fi
15667   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15668     INCLUDE_SA=false
15669   fi
15670   if test "x$OPENJDK_TARGET_OS" = xaix ; then
15671     INCLUDE_SA=false
15672   fi
15673   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15674     INCLUDE_SA=false
15675   fi
15676 
15677 
15678   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15679     MACOSX_UNIVERSAL="true"
15680   fi
15681 
15682 
15683 
15684 
15685   ###############################################################################
15686   #
15687   # Set the debug level
15688   #    release: no debug information, all optimizations, no asserts.
15689   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15690   #    fastdebug: debug information (-g), all optimizations, all asserts
15691   #    slowdebug: debug information (-g), no optimizations, all asserts
15692   #
15693   DEBUG_LEVEL="release"
15694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15695 $as_echo_n "checking which debug level to use... " >&6; }
15696   # Check whether --enable-debug was given.
15697 if test "${enable_debug+set}" = set; then :
15698   enableval=$enable_debug;
15699         ENABLE_DEBUG="${enableval}"
15700         DEBUG_LEVEL="fastdebug"
15701 
15702 else
15703   ENABLE_DEBUG="no"
15704 fi
15705 
15706 
15707 
15708 # Check whether --with-debug-level was given.
15709 if test "${with_debug_level+set}" = set; then :
15710   withval=$with_debug_level;
15711         DEBUG_LEVEL="${withval}"
15712         if test "x$ENABLE_DEBUG" = xyes; then
15713           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15714         fi
15715 
15716 fi
15717 
15718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15719 $as_echo "$DEBUG_LEVEL" >&6; }
15720 
15721   if test "x$DEBUG_LEVEL" != xrelease && \
15722       test "x$DEBUG_LEVEL" != xoptimized && \
15723       test "x$DEBUG_LEVEL" != xfastdebug && \
15724       test "x$DEBUG_LEVEL" != xslowdebug; then
15725     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15726   fi
15727 
15728 
15729   ###############################################################################
15730   #
15731   # Setup legacy vars/targets and new vars to deal with different debug levels.
15732   #
15733 
15734   case $DEBUG_LEVEL in
15735     release )
15736       VARIANT="OPT"
15737       FASTDEBUG="false"
15738       DEBUG_CLASSFILES="false"
15739       BUILD_VARIANT_RELEASE=""
15740       HOTSPOT_DEBUG_LEVEL="product"
15741       HOTSPOT_EXPORT="product"
15742       ;;
15743     fastdebug )
15744       VARIANT="DBG"
15745       FASTDEBUG="true"
15746       DEBUG_CLASSFILES="true"
15747       BUILD_VARIANT_RELEASE="-fastdebug"
15748       HOTSPOT_DEBUG_LEVEL="fastdebug"
15749       HOTSPOT_EXPORT="fastdebug"
15750       ;;
15751     slowdebug )
15752       VARIANT="DBG"
15753       FASTDEBUG="false"
15754       DEBUG_CLASSFILES="true"
15755       BUILD_VARIANT_RELEASE="-debug"
15756       HOTSPOT_DEBUG_LEVEL="debug"
15757       HOTSPOT_EXPORT="debug"
15758       ;;
15759     optimized )
15760       VARIANT="OPT"
15761       FASTDEBUG="false"
15762       DEBUG_CLASSFILES="false"
15763       BUILD_VARIANT_RELEASE="-optimized"
15764       HOTSPOT_DEBUG_LEVEL="optimized"
15765       HOTSPOT_EXPORT="optimized"
15766       ;;
15767   esac
15768 
15769   # The debug level 'optimized' is a little special because it is currently only
15770   # applicable to the HotSpot build where it means to build a completely
15771   # optimized version of the VM without any debugging code (like for the
15772   # 'release' debug level which is called 'product' in the HotSpot build) but
15773   # with the exception that it can contain additional code which is otherwise
15774   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15775   # test new and/or experimental features which are not intended for customer
15776   # shipment. Because these new features need to be tested and benchmarked in
15777   # real world scenarios, we want to build the containing JDK at the 'release'
15778   # debug level.
15779   if test "x$DEBUG_LEVEL" = xoptimized; then
15780     DEBUG_LEVEL="release"
15781   fi
15782 
15783   #####
15784   # Generate the legacy makefile targets for hotspot.
15785   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15786   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15787   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15788   # But until then ...
15789   HOTSPOT_TARGET=""
15790 
15791   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15792     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15793   fi
15794 
15795   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15796     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15797   fi
15798 
15799   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15800     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15801   fi
15802 
15803   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15804     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15805   fi
15806 
15807   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15808     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15809   fi
15810 
15811   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15812     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15813   fi
15814 
15815   if test "x$JVM_VARIANT_CORE" = xtrue; then
15816     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15817   fi
15818 
15819   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15820 
15821   # On Macosx universal binaries are produced, but they only contain
15822   # 64 bit intel. This invalidates control of which jvms are built
15823   # from configure, but only server is valid anyway. Fix this
15824   # when hotspot makefiles are rewritten.
15825   if test "x$MACOSX_UNIVERSAL" = xtrue; then
15826     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15827   fi
15828 
15829   #####
15830 
15831 
15832 
15833 
15834 
15835 
15836 
15837 
15838 # With basic setup done, call the custom early hook.
15839 
15840 
15841 # Check if we have devkits, extra paths or sysroot set.
15842 
15843 
15844 # Check whether --with-devkit was given.
15845 if test "${with_devkit+set}" = set; then :
15846   withval=$with_devkit;
15847 
15848   # Only process if variable expands to non-empty
15849 
15850   if test "x$with_devkit" != x; then
15851     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15852 
15853   # Input might be given as Windows format, start by converting to
15854   # unix format.
15855   path="$with_devkit"
15856   new_path=`$CYGPATH -u "$path"`
15857 
15858   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15859   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15860   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15861   # "foo.exe" is OK but "foo" is an error.
15862   #
15863   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15864   # It is also a way to make sure we got the proper file name for the real test later on.
15865   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15866   if test "x$test_shortpath" = x; then
15867     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15868 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15869     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15870   fi
15871 
15872   # Call helper function which possibly converts this using DOS-style short mode.
15873   # If so, the updated path is stored in $new_path.
15874 
15875   input_path="$new_path"
15876   # Check if we need to convert this using DOS-style short mode. If the path
15877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15878   # take no chances and rewrite it.
15879   # Note: m4 eats our [], so we need to use [ and ] instead.
15880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15881   if test "x$has_forbidden_chars" != x; then
15882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15886       # Going to short mode and back again did indeed matter. Since short mode is
15887       # case insensitive, let's make it lowercase to improve readability.
15888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15889       # Now convert it back to Unix-style (cygpath)
15890       input_path=`$CYGPATH -u "$shortmode_path"`
15891       new_path="$input_path"
15892     fi
15893   fi
15894 
15895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15896   if test "x$test_cygdrive_prefix" = x; then
15897     # As a simple fix, exclude /usr/bin since it's not a real path.
15898     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15900       # a path prefixed by /cygdrive for fixpath to work.
15901       new_path="$CYGWIN_ROOT_PATH$input_path"
15902     fi
15903   fi
15904 
15905 
15906   if test "x$path" != "x$new_path"; then
15907     with_devkit="$new_path"
15908     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15909 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15910   fi
15911 
15912     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15913 
15914   path="$with_devkit"
15915   has_colon=`$ECHO $path | $GREP ^.:`
15916   new_path="$path"
15917   if test "x$has_colon" = x; then
15918     # Not in mixed or Windows style, start by that.
15919     new_path=`cmd //c echo $path`
15920   fi
15921 
15922 
15923   input_path="$new_path"
15924   # Check if we need to convert this using DOS-style short mode. If the path
15925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15926   # take no chances and rewrite it.
15927   # Note: m4 eats our [], so we need to use [ and ] instead.
15928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15929   if test "x$has_forbidden_chars" != x; then
15930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15931     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15932   fi
15933 
15934 
15935   windows_path="$new_path"
15936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15937     unix_path=`$CYGPATH -u "$windows_path"`
15938     new_path="$unix_path"
15939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15941     new_path="$unix_path"
15942   fi
15943 
15944   if test "x$path" != "x$new_path"; then
15945     with_devkit="$new_path"
15946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15947 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15948   fi
15949 
15950   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15951   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15952 
15953     else
15954       # We're on a unix platform. Hooray! :)
15955       path="$with_devkit"
15956       has_space=`$ECHO "$path" | $GREP " "`
15957       if test "x$has_space" != x; then
15958         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15959 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15960         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15961       fi
15962 
15963       # Use eval to expand a potential ~
15964       eval path="$path"
15965       if test ! -f "$path" && test ! -d "$path"; then
15966         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15967       fi
15968 
15969       with_devkit="`cd "$path"; $THEPWDCMD -L`"
15970     fi
15971   fi
15972 
15973         DEVKIT_ROOT="$with_devkit"
15974         # Check for a meta data info file in the root of the devkit
15975         if test -f "$DEVKIT_ROOT/devkit.info"; then
15976           . $DEVKIT_ROOT/devkit.info
15977           # This potentially sets the following:
15978           # A descriptive name of the devkit
15979 
15980   if test "x$DEVKIT_NAME" = x; then
15981     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15982   fi
15983 
15984           # Corresponds to --with-extra-path
15985 
15986   if test "x$DEVKIT_EXTRA_PATH" = x; then
15987     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15988   fi
15989 
15990           # Corresponds to --with-toolchain-path
15991 
15992   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15993     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15994   fi
15995 
15996           # Corresponds to --with-sysroot
15997 
15998   if test "x$DEVKIT_SYSROOT" = x; then
15999     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16000   fi
16001 
16002 
16003           # Identifies the Visual Studio version in the devkit
16004 
16005   if test "x$DEVKIT_VS_VERSION" = x; then
16006     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16007   fi
16008 
16009           # The Visual Studio include environment variable
16010 
16011   if test "x$DEVKIT_VS_INCLUDE" = x; then
16012     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16013   fi
16014 
16015           # The Visual Studio lib environment variable
16016 
16017   if test "x$DEVKIT_VS_LIB" = x; then
16018     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16019   fi
16020 
16021           # Corresponds to --with-msvcr-dll
16022 
16023   if test "x$DEVKIT_MSVCR_DLL" = x; then
16024     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16025   fi
16026 
16027           # Corresponds to --with-msvcp-dll
16028 
16029   if test "x$DEVKIT_MSVCP_DLL" = x; then
16030     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16031   fi
16032 
16033         fi
16034 
16035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16036 $as_echo_n "checking for devkit... " >&6; }
16037         if test "x$DEVKIT_NAME" != x; then
16038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16039 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16040         else
16041           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16042 $as_echo "$DEVKIT_ROOT" >&6; }
16043         fi
16044 
16045 
16046   if test "x$DEVKIT_EXTRA_PATH" != x; then
16047     if test "x$EXTRA_PATH" = x; then
16048       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16049     else
16050       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16051     fi
16052   fi
16053 
16054 
16055         # Fallback default of just /bin if DEVKIT_PATH is not defined
16056         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16057           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16058         fi
16059 
16060   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16061     if test "x$TOOLCHAIN_PATH" = x; then
16062       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16063     else
16064       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16065     fi
16066   fi
16067 
16068 
16069         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16070         # places for backwards compatiblity.
16071         if test "x$DEVKIT_SYSROOT" != x; then
16072           SYSROOT="$DEVKIT_SYSROOT"
16073         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16074           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16075         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16076           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16077         fi
16078 
16079 
16080 fi
16081 
16082 
16083   # You can force the sysroot if the sysroot encoded into the compiler tools
16084   # is not correct.
16085 
16086 # Check whether --with-sys-root was given.
16087 if test "${with_sys_root+set}" = set; then :
16088   withval=$with_sys_root; SYSROOT=$with_sys_root
16089 
16090 fi
16091 
16092 
16093 
16094 # Check whether --with-sysroot was given.
16095 if test "${with_sysroot+set}" = set; then :
16096   withval=$with_sysroot; SYSROOT=$with_sysroot
16097 
16098 fi
16099 
16100 
16101 
16102 # Check whether --with-tools-dir was given.
16103 if test "${with_tools_dir+set}" = set; then :
16104   withval=$with_tools_dir;
16105   if test "x$with_tools_dir" != x; then
16106     if test "x$TOOLCHAIN_PATH" = x; then
16107       TOOLCHAIN_PATH="$with_tools_dir"
16108     else
16109       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16110     fi
16111   fi
16112 
16113 
16114 fi
16115 
16116 
16117 
16118 # Check whether --with-toolchain-path was given.
16119 if test "${with_toolchain_path+set}" = set; then :
16120   withval=$with_toolchain_path;
16121   if test "x$with_toolchain_path" != x; then
16122     if test "x$TOOLCHAIN_PATH" = x; then
16123       TOOLCHAIN_PATH="$with_toolchain_path"
16124     else
16125       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16126     fi
16127   fi
16128 
16129 
16130 fi
16131 
16132 
16133 
16134 # Check whether --with-extra-path was given.
16135 if test "${with_extra_path+set}" = set; then :
16136   withval=$with_extra_path;
16137   if test "x$with_extra_path" != x; then
16138     if test "x$EXTRA_PATH" = x; then
16139       EXTRA_PATH="$with_extra_path"
16140     else
16141       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16142     fi
16143   fi
16144 
16145 
16146 fi
16147 
16148 
16149   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16150     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16151     # If not, detect if Xcode is installed by running xcodebuild -version
16152     # if no Xcode installed, xcodebuild exits with 1
16153     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16154     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16155       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16156       # fall back on the stub binary in /usr/bin/xcodebuild
16157       # Extract the first word of "xcodebuild", so it can be a program name with args.
16158 set dummy xcodebuild; ac_word=$2
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16160 $as_echo_n "checking for $ac_word... " >&6; }
16161 if ${ac_cv_path_XCODEBUILD+:} false; then :
16162   $as_echo_n "(cached) " >&6
16163 else
16164   case $XCODEBUILD in
16165   [\\/]* | ?:[\\/]*)
16166   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16167   ;;
16168   *)
16169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16170 for as_dir in $TOOLCHAIN_PATH
16171 do
16172   IFS=$as_save_IFS
16173   test -z "$as_dir" && as_dir=.
16174     for ac_exec_ext in '' $ac_executable_extensions; do
16175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16176     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16178     break 2
16179   fi
16180 done
16181   done
16182 IFS=$as_save_IFS
16183 
16184   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16185   ;;
16186 esac
16187 fi
16188 XCODEBUILD=$ac_cv_path_XCODEBUILD
16189 if test -n "$XCODEBUILD"; then
16190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16191 $as_echo "$XCODEBUILD" >&6; }
16192 else
16193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16194 $as_echo "no" >&6; }
16195 fi
16196 
16197 
16198     else
16199       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16200       # when only the command line tools are installed there are no SDKs, so headers
16201       # are copied into the system frameworks
16202       XCODEBUILD=
16203 
16204     fi
16205 
16206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16207 $as_echo_n "checking for sdk name... " >&6; }
16208 
16209 # Check whether --with-sdk-name was given.
16210 if test "${with_sdk_name+set}" = set; then :
16211   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16212 
16213 fi
16214 
16215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16216 $as_echo "$SDKNAME" >&6; }
16217 
16218     # if toolchain path is specified then don't rely on system headers, they may not compile
16219     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16220     test -z "$TOOLCHAIN_PATH" && \
16221       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16222 
16223     if test -z "$SYSROOT"; then
16224       if test -n "$XCODEBUILD"; then
16225         # if we don't have system headers, use default SDK name (last resort)
16226         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16227           SDKNAME=${SDKNAME:-macosx}
16228         fi
16229 
16230         if test -n "$SDKNAME"; then
16231           # Call xcodebuild to determine SYSROOT
16232           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16233         fi
16234       else
16235         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16236           as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
16237         fi
16238       fi
16239     else
16240       # warn user if --with-sdk-name was also set
16241       if test -n "$with_sdk_name"; then
16242         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16243 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16244       fi
16245     fi
16246 
16247     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16248       # If no system framework headers, then SYSROOT must be set, or we won't build
16249       as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
16250     fi
16251 
16252     # Perform a basic sanity test
16253     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16254       if test -z "$SYSROOT"; then
16255         as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
16256       else
16257         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16258       fi
16259     fi
16260 
16261     # set SDKROOT too, Xcode tools will pick it up
16262     SDKROOT=$SYSROOT
16263 
16264   fi
16265 
16266   # Prepend the extra path to the global path
16267 
16268   if test "x$EXTRA_PATH" != x; then
16269     if test "x$PATH" = x; then
16270       PATH="$EXTRA_PATH"
16271     else
16272       PATH="$EXTRA_PATH:$PATH"
16273     fi
16274   fi
16275 
16276 
16277   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16278     # Add extra search paths on solaris for utilities like ar and as etc...
16279     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16280   fi
16281 
16282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16283 $as_echo_n "checking for sysroot... " >&6; }
16284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16285 $as_echo "$SYSROOT" >&6; }
16286   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16287 $as_echo_n "checking for toolchain path... " >&6; }
16288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16289 $as_echo "$TOOLCHAIN_PATH" >&6; }
16290   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16291 $as_echo_n "checking for extra path... " >&6; }
16292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16293 $as_echo "$EXTRA_PATH" >&6; }
16294 
16295 
16296 # To properly create a configuration name, we need to have the OpenJDK target
16297 # and options (variants and debug level) parsed.
16298 
16299 
16300 
16301 # Check whether --with-conf-name was given.
16302 if test "${with_conf_name+set}" = set; then :
16303   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16304 fi
16305 
16306 
16307   # Test from where we are running configure, in or outside of src root.
16308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16309 $as_echo_n "checking where to store configuration... " >&6; }
16310   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16311       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16312       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16313     # We are running configure from the src root.
16314     # Create a default ./build/target-variant-debuglevel output root.
16315     if test "x${CONF_NAME}" = x; then
16316       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16317 $as_echo "in default location" >&6; }
16318       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16319     else
16320       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16321 $as_echo "in build directory with custom name" >&6; }
16322     fi
16323     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16324     $MKDIR -p "$OUTPUT_ROOT"
16325     if test ! -d "$OUTPUT_ROOT"; then
16326       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16327     fi
16328   else
16329     # We are running configure from outside of the src dir.
16330     # Then use the current directory as output dir!
16331     # If configuration is situated in normal build directory, just use the build
16332     # directory name as configuration name, otherwise use the complete path.
16333     if test "x${CONF_NAME}" = x; then
16334       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16335     fi
16336     OUTPUT_ROOT="$CURDIR"
16337     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16338 $as_echo "in current directory" >&6; }
16339 
16340     # WARNING: This might be a bad thing to do. You need to be sure you want to
16341     # have a configuration in this directory. Do some sanity checks!
16342 
16343     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16344       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16345       # other files
16346       files_present=`$LS $OUTPUT_ROOT`
16347       # Configure has already touched config.log and confdefs.h in the current dir when this check
16348       # is performed.
16349       filtered_files=`$ECHO "$files_present" \
16350           | $SED -e 's/config.log//g' \
16351               -e 's/configure.log//g' \
16352               -e 's/confdefs.h//g' \
16353               -e 's/ //g' \
16354           | $TR -d '\n'`
16355       if test "x$filtered_files" != x; then
16356         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16357 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16358         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16359 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16360         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16361 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16363 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16364         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16365 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16366         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16367 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16368         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16369 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16370         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16371       fi
16372     fi
16373   fi
16374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16375 $as_echo_n "checking what configuration name to use... " >&6; }
16376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16377 $as_echo "$CONF_NAME" >&6; }
16378 
16379 
16380   # Only process if variable expands to non-empty
16381 
16382   if test "x$OUTPUT_ROOT" != x; then
16383     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16384 
16385   # Input might be given as Windows format, start by converting to
16386   # unix format.
16387   path="$OUTPUT_ROOT"
16388   new_path=`$CYGPATH -u "$path"`
16389 
16390   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16391   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16392   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16393   # "foo.exe" is OK but "foo" is an error.
16394   #
16395   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16396   # It is also a way to make sure we got the proper file name for the real test later on.
16397   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16398   if test "x$test_shortpath" = x; then
16399     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16400 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16401     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16402   fi
16403 
16404   # Call helper function which possibly converts this using DOS-style short mode.
16405   # If so, the updated path is stored in $new_path.
16406 
16407   input_path="$new_path"
16408   # Check if we need to convert this using DOS-style short mode. If the path
16409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16410   # take no chances and rewrite it.
16411   # Note: m4 eats our [], so we need to use [ and ] instead.
16412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16413   if test "x$has_forbidden_chars" != x; then
16414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16415     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16416     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16417     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16418       # Going to short mode and back again did indeed matter. Since short mode is
16419       # case insensitive, let's make it lowercase to improve readability.
16420       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16421       # Now convert it back to Unix-style (cygpath)
16422       input_path=`$CYGPATH -u "$shortmode_path"`
16423       new_path="$input_path"
16424     fi
16425   fi
16426 
16427   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16428   if test "x$test_cygdrive_prefix" = x; then
16429     # As a simple fix, exclude /usr/bin since it's not a real path.
16430     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16431       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16432       # a path prefixed by /cygdrive for fixpath to work.
16433       new_path="$CYGWIN_ROOT_PATH$input_path"
16434     fi
16435   fi
16436 
16437 
16438   if test "x$path" != "x$new_path"; then
16439     OUTPUT_ROOT="$new_path"
16440     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16441 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16442   fi
16443 
16444     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445 
16446   path="$OUTPUT_ROOT"
16447   has_colon=`$ECHO $path | $GREP ^.:`
16448   new_path="$path"
16449   if test "x$has_colon" = x; then
16450     # Not in mixed or Windows style, start by that.
16451     new_path=`cmd //c echo $path`
16452   fi
16453 
16454 
16455   input_path="$new_path"
16456   # Check if we need to convert this using DOS-style short mode. If the path
16457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16458   # take no chances and rewrite it.
16459   # Note: m4 eats our [], so we need to use [ and ] instead.
16460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16461   if test "x$has_forbidden_chars" != x; then
16462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16463     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16464   fi
16465 
16466 
16467   windows_path="$new_path"
16468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16469     unix_path=`$CYGPATH -u "$windows_path"`
16470     new_path="$unix_path"
16471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16473     new_path="$unix_path"
16474   fi
16475 
16476   if test "x$path" != "x$new_path"; then
16477     OUTPUT_ROOT="$new_path"
16478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16479 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16480   fi
16481 
16482   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16483   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16484 
16485     else
16486       # We're on a unix platform. Hooray! :)
16487       path="$OUTPUT_ROOT"
16488       has_space=`$ECHO "$path" | $GREP " "`
16489       if test "x$has_space" != x; then
16490         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16491 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16492         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16493       fi
16494 
16495       # Use eval to expand a potential ~
16496       eval path="$path"
16497       if test ! -f "$path" && test ! -d "$path"; then
16498         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16499       fi
16500 
16501       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16502     fi
16503   fi
16504 
16505 
16506   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16507   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16508 
16509   SPEC=$OUTPUT_ROOT/spec.gmk
16510 
16511   CONF_NAME=$CONF_NAME
16512 
16513   OUTPUT_ROOT=$OUTPUT_ROOT
16514 
16515 
16516 
16517   # The spec.gmk file contains all variables for the make system.
16518   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16519 
16520   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16521   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16522 
16523   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16524   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16525 
16526   # The compare.sh is used to compare the build output to other builds.
16527   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16528 
16529   # The generated Makefile knows where the spec.gmk is and where the source is.
16530   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16531   # which will look for generated configurations
16532   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16533 
16534 
16535 
16536 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16537 
16538   for ac_prog in apt-get yum port pkgutil pkgadd
16539 do
16540   # Extract the first word of "$ac_prog", so it can be a program name with args.
16541 set dummy $ac_prog; ac_word=$2
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16543 $as_echo_n "checking for $ac_word... " >&6; }
16544 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16545   $as_echo_n "(cached) " >&6
16546 else
16547   if test -n "$PKGHANDLER"; then
16548   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16549 else
16550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16551 for as_dir in $PATH
16552 do
16553   IFS=$as_save_IFS
16554   test -z "$as_dir" && as_dir=.
16555     for ac_exec_ext in '' $ac_executable_extensions; do
16556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16557     ac_cv_prog_PKGHANDLER="$ac_prog"
16558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16559     break 2
16560   fi
16561 done
16562   done
16563 IFS=$as_save_IFS
16564 
16565 fi
16566 fi
16567 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16568 if test -n "$PKGHANDLER"; then
16569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16570 $as_echo "$PKGHANDLER" >&6; }
16571 else
16572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16573 $as_echo "no" >&6; }
16574 fi
16575 
16576 
16577   test -n "$PKGHANDLER" && break
16578 done
16579 
16580 
16581 
16582 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16583 
16584 
16585 
16586   # Publish this variable in the help.
16587 
16588 
16589   if [ -z "${MAKE+x}" ]; then
16590     # The variable is not set by user, try to locate tool using the code snippet
16591 
16592     # Try our hardest to locate a correct version of GNU make
16593     for ac_prog in gmake
16594 do
16595   # Extract the first word of "$ac_prog", so it can be a program name with args.
16596 set dummy $ac_prog; ac_word=$2
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16598 $as_echo_n "checking for $ac_word... " >&6; }
16599 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16600   $as_echo_n "(cached) " >&6
16601 else
16602   case $CHECK_GMAKE in
16603   [\\/]* | ?:[\\/]*)
16604   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16605   ;;
16606   *)
16607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16608 for as_dir in $PATH
16609 do
16610   IFS=$as_save_IFS
16611   test -z "$as_dir" && as_dir=.
16612     for ac_exec_ext in '' $ac_executable_extensions; do
16613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16614     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16616     break 2
16617   fi
16618 done
16619   done
16620 IFS=$as_save_IFS
16621 
16622   ;;
16623 esac
16624 fi
16625 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16626 if test -n "$CHECK_GMAKE"; then
16627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16628 $as_echo "$CHECK_GMAKE" >&6; }
16629 else
16630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16631 $as_echo "no" >&6; }
16632 fi
16633 
16634 
16635   test -n "$CHECK_GMAKE" && break
16636 done
16637 
16638 
16639   MAKE_CANDIDATE=""$CHECK_GMAKE""
16640   DESCRIPTION="gmake in PATH"
16641 
16642   # On Cygwin, we require a newer version of make than on other platforms
16643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16644     MAKE_VERSION_EXPR="-e 4\."
16645     MAKE_REQUIRED_VERSION="4.0"
16646    else
16647     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16648     MAKE_REQUIRED_VERSION="3.81"
16649   fi
16650 
16651   if test "x$MAKE_CANDIDATE" != x; then
16652     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16653 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16654     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16655     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16656     if test "x$IS_GNU_MAKE" = x; then
16657       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16658 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16659     else
16660       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16661       if test "x$IS_MODERN_MAKE" = x; then
16662         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16663 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16664       else
16665         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16666           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16667             MAKE_EXPECTED_ENV='cygwin'
16668           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16669             MAKE_EXPECTED_ENV='msys'
16670           else
16671             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16672           fi
16673           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16674           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16675         else
16676           # Not relevant for non-Windows
16677           IS_MAKE_CORRECT_ENV=true
16678         fi
16679         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16680           { $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
16681 $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;}
16682         else
16683           FOUND_MAKE=$MAKE_CANDIDATE
16684 
16685   # Only process if variable expands to non-empty
16686 
16687   if test "x$FOUND_MAKE" != x; then
16688     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689 
16690   # First separate the path from the arguments. This will split at the first
16691   # space.
16692   complete="$FOUND_MAKE"
16693   path="${complete%% *}"
16694   tmp="$complete EOL"
16695   arguments="${tmp#* }"
16696 
16697   # Input might be given as Windows format, start by converting to
16698   # unix format.
16699   new_path=`$CYGPATH -u "$path"`
16700 
16701   # Now try to locate executable using which
16702   new_path=`$WHICH "$new_path" 2> /dev/null`
16703   # bat and cmd files are not always considered executable in cygwin causing which
16704   # to not find them
16705   if test "x$new_path" = x \
16706       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16707       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16708     new_path=`$CYGPATH -u "$path"`
16709   fi
16710   if test "x$new_path" = x; then
16711     # Oops. Which didn't find the executable.
16712     # The splitting of arguments from the executable at a space might have been incorrect,
16713     # since paths with space are more likely in Windows. Give it another try with the whole
16714     # argument.
16715     path="$complete"
16716     arguments="EOL"
16717     new_path=`$CYGPATH -u "$path"`
16718     new_path=`$WHICH "$new_path" 2> /dev/null`
16719     # bat and cmd files are not always considered executable in cygwin causing which
16720     # to not find them
16721     if test "x$new_path" = x \
16722         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16723         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16724       new_path=`$CYGPATH -u "$path"`
16725     fi
16726     if test "x$new_path" = x; then
16727       # It's still not found. Now this is an unrecoverable error.
16728       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16729 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16730       has_space=`$ECHO "$complete" | $GREP " "`
16731       if test "x$has_space" != x; then
16732         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16733 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16734       fi
16735       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16736     fi
16737   fi
16738 
16739   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16740   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16741   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16742   # "foo.exe" is OK but "foo" is an error.
16743   #
16744   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16745   # It is also a way to make sure we got the proper file name for the real test later on.
16746   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16747   if test "x$test_shortpath" = x; then
16748     # Short path failed, file does not exist as specified.
16749     # Try adding .exe or .cmd
16750     if test -f "${new_path}.exe"; then
16751       input_to_shortpath="${new_path}.exe"
16752     elif test -f "${new_path}.cmd"; then
16753       input_to_shortpath="${new_path}.cmd"
16754     else
16755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16756 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16757       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16758 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16759       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16760     fi
16761   else
16762     input_to_shortpath="$new_path"
16763   fi
16764 
16765   # Call helper function which possibly converts this using DOS-style short mode.
16766   # If so, the updated path is stored in $new_path.
16767   new_path="$input_to_shortpath"
16768 
16769   input_path="$input_to_shortpath"
16770   # Check if we need to convert this using DOS-style short mode. If the path
16771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16772   # take no chances and rewrite it.
16773   # Note: m4 eats our [], so we need to use [ and ] instead.
16774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16775   if test "x$has_forbidden_chars" != x; then
16776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16780       # Going to short mode and back again did indeed matter. Since short mode is
16781       # case insensitive, let's make it lowercase to improve readability.
16782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16783       # Now convert it back to Unix-style (cygpath)
16784       input_path=`$CYGPATH -u "$shortmode_path"`
16785       new_path="$input_path"
16786     fi
16787   fi
16788 
16789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16790   if test "x$test_cygdrive_prefix" = x; then
16791     # As a simple fix, exclude /usr/bin since it's not a real path.
16792     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16794       # a path prefixed by /cygdrive for fixpath to work.
16795       new_path="$CYGWIN_ROOT_PATH$input_path"
16796     fi
16797   fi
16798 
16799   # remove trailing .exe if any
16800   new_path="${new_path/%.exe/}"
16801 
16802     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16803 
16804   # First separate the path from the arguments. This will split at the first
16805   # space.
16806   complete="$FOUND_MAKE"
16807   path="${complete%% *}"
16808   tmp="$complete EOL"
16809   arguments="${tmp#* }"
16810 
16811   # Input might be given as Windows format, start by converting to
16812   # unix format.
16813   new_path="$path"
16814 
16815   windows_path="$new_path"
16816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16817     unix_path=`$CYGPATH -u "$windows_path"`
16818     new_path="$unix_path"
16819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16821     new_path="$unix_path"
16822   fi
16823 
16824 
16825   # Now try to locate executable using which
16826   new_path=`$WHICH "$new_path" 2> /dev/null`
16827 
16828   if test "x$new_path" = x; then
16829     # Oops. Which didn't find the executable.
16830     # The splitting of arguments from the executable at a space might have been incorrect,
16831     # since paths with space are more likely in Windows. Give it another try with the whole
16832     # argument.
16833     path="$complete"
16834     arguments="EOL"
16835     new_path="$path"
16836 
16837   windows_path="$new_path"
16838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839     unix_path=`$CYGPATH -u "$windows_path"`
16840     new_path="$unix_path"
16841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16843     new_path="$unix_path"
16844   fi
16845 
16846 
16847     new_path=`$WHICH "$new_path" 2> /dev/null`
16848     # bat and cmd files are not always considered executable in MSYS causing which
16849     # to not find them
16850     if test "x$new_path" = x \
16851         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16852         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16853       new_path="$path"
16854 
16855   windows_path="$new_path"
16856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857     unix_path=`$CYGPATH -u "$windows_path"`
16858     new_path="$unix_path"
16859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16861     new_path="$unix_path"
16862   fi
16863 
16864     fi
16865 
16866     if test "x$new_path" = x; then
16867       # It's still not found. Now this is an unrecoverable error.
16868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16869 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16870       has_space=`$ECHO "$complete" | $GREP " "`
16871       if test "x$has_space" != x; then
16872         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16874       fi
16875       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16876     fi
16877   fi
16878 
16879   # Now new_path has a complete unix path to the binary
16880   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16881     # Keep paths in /bin as-is, but remove trailing .exe if any
16882     new_path="${new_path/%.exe/}"
16883     # Do not save /bin paths to all_fixpath_prefixes!
16884   else
16885     # Not in mixed or Windows style, start by that.
16886     new_path=`cmd //c echo $new_path`
16887 
16888   input_path="$new_path"
16889   # Check if we need to convert this using DOS-style short mode. If the path
16890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16891   # take no chances and rewrite it.
16892   # Note: m4 eats our [], so we need to use [ and ] instead.
16893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16894   if test "x$has_forbidden_chars" != x; then
16895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16896     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16897   fi
16898 
16899     # Output is in $new_path
16900 
16901   windows_path="$new_path"
16902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16903     unix_path=`$CYGPATH -u "$windows_path"`
16904     new_path="$unix_path"
16905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16907     new_path="$unix_path"
16908   fi
16909 
16910     # remove trailing .exe if any
16911     new_path="${new_path/%.exe/}"
16912 
16913     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16914     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16915   fi
16916 
16917     else
16918       # We're on a unix platform. Hooray! :)
16919       # First separate the path from the arguments. This will split at the first
16920       # space.
16921       complete="$FOUND_MAKE"
16922       path="${complete%% *}"
16923       tmp="$complete EOL"
16924       arguments="${tmp#* }"
16925 
16926       # Cannot rely on the command "which" here since it doesn't always work.
16927       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16928       if test -z "$is_absolute_path"; then
16929         # Path to executable is not absolute. Find it.
16930         IFS_save="$IFS"
16931         IFS=:
16932         for p in $PATH; do
16933           if test -f "$p/$path" && test -x "$p/$path"; then
16934             new_path="$p/$path"
16935             break
16936           fi
16937         done
16938         IFS="$IFS_save"
16939       else
16940         # This is an absolute path, we can use it without further modifications.
16941         new_path="$path"
16942       fi
16943 
16944       if test "x$new_path" = x; then
16945         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16946 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16947         has_space=`$ECHO "$complete" | $GREP " "`
16948         if test "x$has_space" != x; then
16949           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16950 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16951         fi
16952         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16953       fi
16954     fi
16955 
16956     # Now join together the path and the arguments once again
16957     if test "x$arguments" != xEOL; then
16958       new_complete="$new_path ${arguments% *}"
16959     else
16960       new_complete="$new_path"
16961     fi
16962 
16963     if test "x$complete" != "x$new_complete"; then
16964       FOUND_MAKE="$new_complete"
16965       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16966 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16967     fi
16968   fi
16969 
16970         fi
16971       fi
16972     fi
16973   fi
16974 
16975 
16976     if test "x$FOUND_MAKE" = x; then
16977       for ac_prog in make
16978 do
16979   # Extract the first word of "$ac_prog", so it can be a program name with args.
16980 set dummy $ac_prog; ac_word=$2
16981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16982 $as_echo_n "checking for $ac_word... " >&6; }
16983 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16984   $as_echo_n "(cached) " >&6
16985 else
16986   case $CHECK_MAKE in
16987   [\\/]* | ?:[\\/]*)
16988   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16989   ;;
16990   *)
16991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16992 for as_dir in $PATH
16993 do
16994   IFS=$as_save_IFS
16995   test -z "$as_dir" && as_dir=.
16996     for ac_exec_ext in '' $ac_executable_extensions; do
16997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16998     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17000     break 2
17001   fi
17002 done
17003   done
17004 IFS=$as_save_IFS
17005 
17006   ;;
17007 esac
17008 fi
17009 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17010 if test -n "$CHECK_MAKE"; then
17011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17012 $as_echo "$CHECK_MAKE" >&6; }
17013 else
17014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17015 $as_echo "no" >&6; }
17016 fi
17017 
17018 
17019   test -n "$CHECK_MAKE" && break
17020 done
17021 
17022 
17023   MAKE_CANDIDATE=""$CHECK_MAKE""
17024   DESCRIPTION="make in PATH"
17025 
17026   # On Cygwin, we require a newer version of make than on other platforms
17027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17028     MAKE_VERSION_EXPR="-e 4\."
17029     MAKE_REQUIRED_VERSION="4.0"
17030    else
17031     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17032     MAKE_REQUIRED_VERSION="3.81"
17033   fi
17034 
17035   if test "x$MAKE_CANDIDATE" != x; then
17036     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17037 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17038     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17039     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17040     if test "x$IS_GNU_MAKE" = x; then
17041       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17042 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17043     else
17044       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17045       if test "x$IS_MODERN_MAKE" = x; then
17046         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17047 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17048       else
17049         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17050           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17051             MAKE_EXPECTED_ENV='cygwin'
17052           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053             MAKE_EXPECTED_ENV='msys'
17054           else
17055             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17056           fi
17057           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17058           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17059         else
17060           # Not relevant for non-Windows
17061           IS_MAKE_CORRECT_ENV=true
17062         fi
17063         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17064           { $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
17065 $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;}
17066         else
17067           FOUND_MAKE=$MAKE_CANDIDATE
17068 
17069   # Only process if variable expands to non-empty
17070 
17071   if test "x$FOUND_MAKE" != x; then
17072     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17073 
17074   # First separate the path from the arguments. This will split at the first
17075   # space.
17076   complete="$FOUND_MAKE"
17077   path="${complete%% *}"
17078   tmp="$complete EOL"
17079   arguments="${tmp#* }"
17080 
17081   # Input might be given as Windows format, start by converting to
17082   # unix format.
17083   new_path=`$CYGPATH -u "$path"`
17084 
17085   # Now try to locate executable using which
17086   new_path=`$WHICH "$new_path" 2> /dev/null`
17087   # bat and cmd files are not always considered executable in cygwin causing which
17088   # to not find them
17089   if test "x$new_path" = x \
17090       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17091       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17092     new_path=`$CYGPATH -u "$path"`
17093   fi
17094   if test "x$new_path" = x; then
17095     # Oops. Which didn't find the executable.
17096     # The splitting of arguments from the executable at a space might have been incorrect,
17097     # since paths with space are more likely in Windows. Give it another try with the whole
17098     # argument.
17099     path="$complete"
17100     arguments="EOL"
17101     new_path=`$CYGPATH -u "$path"`
17102     new_path=`$WHICH "$new_path" 2> /dev/null`
17103     # bat and cmd files are not always considered executable in cygwin causing which
17104     # to not find them
17105     if test "x$new_path" = x \
17106         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17107         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17108       new_path=`$CYGPATH -u "$path"`
17109     fi
17110     if test "x$new_path" = x; then
17111       # It's still not found. Now this is an unrecoverable error.
17112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17113 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17114       has_space=`$ECHO "$complete" | $GREP " "`
17115       if test "x$has_space" != x; then
17116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17118       fi
17119       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17120     fi
17121   fi
17122 
17123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17126   # "foo.exe" is OK but "foo" is an error.
17127   #
17128   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17129   # It is also a way to make sure we got the proper file name for the real test later on.
17130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17131   if test "x$test_shortpath" = x; then
17132     # Short path failed, file does not exist as specified.
17133     # Try adding .exe or .cmd
17134     if test -f "${new_path}.exe"; then
17135       input_to_shortpath="${new_path}.exe"
17136     elif test -f "${new_path}.cmd"; then
17137       input_to_shortpath="${new_path}.cmd"
17138     else
17139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17140 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17141       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17142 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17143       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17144     fi
17145   else
17146     input_to_shortpath="$new_path"
17147   fi
17148 
17149   # Call helper function which possibly converts this using DOS-style short mode.
17150   # If so, the updated path is stored in $new_path.
17151   new_path="$input_to_shortpath"
17152 
17153   input_path="$input_to_shortpath"
17154   # Check if we need to convert this using DOS-style short mode. If the path
17155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17156   # take no chances and rewrite it.
17157   # Note: m4 eats our [], so we need to use [ and ] instead.
17158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17159   if test "x$has_forbidden_chars" != x; then
17160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17164       # Going to short mode and back again did indeed matter. Since short mode is
17165       # case insensitive, let's make it lowercase to improve readability.
17166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17167       # Now convert it back to Unix-style (cygpath)
17168       input_path=`$CYGPATH -u "$shortmode_path"`
17169       new_path="$input_path"
17170     fi
17171   fi
17172 
17173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17174   if test "x$test_cygdrive_prefix" = x; then
17175     # As a simple fix, exclude /usr/bin since it's not a real path.
17176     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17178       # a path prefixed by /cygdrive for fixpath to work.
17179       new_path="$CYGWIN_ROOT_PATH$input_path"
17180     fi
17181   fi
17182 
17183   # remove trailing .exe if any
17184   new_path="${new_path/%.exe/}"
17185 
17186     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17187 
17188   # First separate the path from the arguments. This will split at the first
17189   # space.
17190   complete="$FOUND_MAKE"
17191   path="${complete%% *}"
17192   tmp="$complete EOL"
17193   arguments="${tmp#* }"
17194 
17195   # Input might be given as Windows format, start by converting to
17196   # unix format.
17197   new_path="$path"
17198 
17199   windows_path="$new_path"
17200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17201     unix_path=`$CYGPATH -u "$windows_path"`
17202     new_path="$unix_path"
17203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17205     new_path="$unix_path"
17206   fi
17207 
17208 
17209   # Now try to locate executable using which
17210   new_path=`$WHICH "$new_path" 2> /dev/null`
17211 
17212   if test "x$new_path" = x; then
17213     # Oops. Which didn't find the executable.
17214     # The splitting of arguments from the executable at a space might have been incorrect,
17215     # since paths with space are more likely in Windows. Give it another try with the whole
17216     # argument.
17217     path="$complete"
17218     arguments="EOL"
17219     new_path="$path"
17220 
17221   windows_path="$new_path"
17222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17223     unix_path=`$CYGPATH -u "$windows_path"`
17224     new_path="$unix_path"
17225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17227     new_path="$unix_path"
17228   fi
17229 
17230 
17231     new_path=`$WHICH "$new_path" 2> /dev/null`
17232     # bat and cmd files are not always considered executable in MSYS causing which
17233     # to not find them
17234     if test "x$new_path" = x \
17235         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17236         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17237       new_path="$path"
17238 
17239   windows_path="$new_path"
17240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17241     unix_path=`$CYGPATH -u "$windows_path"`
17242     new_path="$unix_path"
17243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17245     new_path="$unix_path"
17246   fi
17247 
17248     fi
17249 
17250     if test "x$new_path" = x; then
17251       # It's still not found. Now this is an unrecoverable error.
17252       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17253 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17254       has_space=`$ECHO "$complete" | $GREP " "`
17255       if test "x$has_space" != x; then
17256         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17257 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17258       fi
17259       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17260     fi
17261   fi
17262 
17263   # Now new_path has a complete unix path to the binary
17264   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17265     # Keep paths in /bin as-is, but remove trailing .exe if any
17266     new_path="${new_path/%.exe/}"
17267     # Do not save /bin paths to all_fixpath_prefixes!
17268   else
17269     # Not in mixed or Windows style, start by that.
17270     new_path=`cmd //c echo $new_path`
17271 
17272   input_path="$new_path"
17273   # Check if we need to convert this using DOS-style short mode. If the path
17274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17275   # take no chances and rewrite it.
17276   # Note: m4 eats our [], so we need to use [ and ] instead.
17277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17278   if test "x$has_forbidden_chars" != x; then
17279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17280     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17281   fi
17282 
17283     # Output is in $new_path
17284 
17285   windows_path="$new_path"
17286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17287     unix_path=`$CYGPATH -u "$windows_path"`
17288     new_path="$unix_path"
17289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17291     new_path="$unix_path"
17292   fi
17293 
17294     # remove trailing .exe if any
17295     new_path="${new_path/%.exe/}"
17296 
17297     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17298     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17299   fi
17300 
17301     else
17302       # We're on a unix platform. Hooray! :)
17303       # First separate the path from the arguments. This will split at the first
17304       # space.
17305       complete="$FOUND_MAKE"
17306       path="${complete%% *}"
17307       tmp="$complete EOL"
17308       arguments="${tmp#* }"
17309 
17310       # Cannot rely on the command "which" here since it doesn't always work.
17311       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17312       if test -z "$is_absolute_path"; then
17313         # Path to executable is not absolute. Find it.
17314         IFS_save="$IFS"
17315         IFS=:
17316         for p in $PATH; do
17317           if test -f "$p/$path" && test -x "$p/$path"; then
17318             new_path="$p/$path"
17319             break
17320           fi
17321         done
17322         IFS="$IFS_save"
17323       else
17324         # This is an absolute path, we can use it without further modifications.
17325         new_path="$path"
17326       fi
17327 
17328       if test "x$new_path" = x; then
17329         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17330 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17331         has_space=`$ECHO "$complete" | $GREP " "`
17332         if test "x$has_space" != x; then
17333           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17334 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17335         fi
17336         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17337       fi
17338     fi
17339 
17340     # Now join together the path and the arguments once again
17341     if test "x$arguments" != xEOL; then
17342       new_complete="$new_path ${arguments% *}"
17343     else
17344       new_complete="$new_path"
17345     fi
17346 
17347     if test "x$complete" != "x$new_complete"; then
17348       FOUND_MAKE="$new_complete"
17349       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17350 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17351     fi
17352   fi
17353 
17354         fi
17355       fi
17356     fi
17357   fi
17358 
17359     fi
17360 
17361     if test "x$FOUND_MAKE" = x; then
17362       if test "x$TOOLCHAIN_PATH" != x; then
17363         # We have a toolchain path, check that as well before giving up.
17364         OLD_PATH=$PATH
17365         PATH=$TOOLCHAIN_PATH:$PATH
17366         for ac_prog in gmake
17367 do
17368   # Extract the first word of "$ac_prog", so it can be a program name with args.
17369 set dummy $ac_prog; ac_word=$2
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17371 $as_echo_n "checking for $ac_word... " >&6; }
17372 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17373   $as_echo_n "(cached) " >&6
17374 else
17375   case $CHECK_TOOLSDIR_GMAKE in
17376   [\\/]* | ?:[\\/]*)
17377   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17378   ;;
17379   *)
17380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17381 for as_dir in $PATH
17382 do
17383   IFS=$as_save_IFS
17384   test -z "$as_dir" && as_dir=.
17385     for ac_exec_ext in '' $ac_executable_extensions; do
17386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17387     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17389     break 2
17390   fi
17391 done
17392   done
17393 IFS=$as_save_IFS
17394 
17395   ;;
17396 esac
17397 fi
17398 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17399 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17401 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17402 else
17403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17404 $as_echo "no" >&6; }
17405 fi
17406 
17407 
17408   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17409 done
17410 
17411 
17412   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17413   DESCRIPTION="gmake in tools-dir"
17414 
17415   # On Cygwin, we require a newer version of make than on other platforms
17416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17417     MAKE_VERSION_EXPR="-e 4\."
17418     MAKE_REQUIRED_VERSION="4.0"
17419    else
17420     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17421     MAKE_REQUIRED_VERSION="3.81"
17422   fi
17423 
17424   if test "x$MAKE_CANDIDATE" != x; then
17425     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17426 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17427     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17428     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17429     if test "x$IS_GNU_MAKE" = x; then
17430       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17431 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17432     else
17433       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17434       if test "x$IS_MODERN_MAKE" = x; then
17435         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17436 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17437       else
17438         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17439           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17440             MAKE_EXPECTED_ENV='cygwin'
17441           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17442             MAKE_EXPECTED_ENV='msys'
17443           else
17444             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17445           fi
17446           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17447           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17448         else
17449           # Not relevant for non-Windows
17450           IS_MAKE_CORRECT_ENV=true
17451         fi
17452         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17453           { $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
17454 $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;}
17455         else
17456           FOUND_MAKE=$MAKE_CANDIDATE
17457 
17458   # Only process if variable expands to non-empty
17459 
17460   if test "x$FOUND_MAKE" != x; then
17461     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17462 
17463   # First separate the path from the arguments. This will split at the first
17464   # space.
17465   complete="$FOUND_MAKE"
17466   path="${complete%% *}"
17467   tmp="$complete EOL"
17468   arguments="${tmp#* }"
17469 
17470   # Input might be given as Windows format, start by converting to
17471   # unix format.
17472   new_path=`$CYGPATH -u "$path"`
17473 
17474   # Now try to locate executable using which
17475   new_path=`$WHICH "$new_path" 2> /dev/null`
17476   # bat and cmd files are not always considered executable in cygwin causing which
17477   # to not find them
17478   if test "x$new_path" = x \
17479       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17480       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17481     new_path=`$CYGPATH -u "$path"`
17482   fi
17483   if test "x$new_path" = x; then
17484     # Oops. Which didn't find the executable.
17485     # The splitting of arguments from the executable at a space might have been incorrect,
17486     # since paths with space are more likely in Windows. Give it another try with the whole
17487     # argument.
17488     path="$complete"
17489     arguments="EOL"
17490     new_path=`$CYGPATH -u "$path"`
17491     new_path=`$WHICH "$new_path" 2> /dev/null`
17492     # bat and cmd files are not always considered executable in cygwin causing which
17493     # to not find them
17494     if test "x$new_path" = x \
17495         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17496         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17497       new_path=`$CYGPATH -u "$path"`
17498     fi
17499     if test "x$new_path" = x; then
17500       # It's still not found. Now this is an unrecoverable error.
17501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17502 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17503       has_space=`$ECHO "$complete" | $GREP " "`
17504       if test "x$has_space" != x; then
17505         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17506 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17507       fi
17508       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17509     fi
17510   fi
17511 
17512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17515   # "foo.exe" is OK but "foo" is an error.
17516   #
17517   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17518   # It is also a way to make sure we got the proper file name for the real test later on.
17519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17520   if test "x$test_shortpath" = x; then
17521     # Short path failed, file does not exist as specified.
17522     # Try adding .exe or .cmd
17523     if test -f "${new_path}.exe"; then
17524       input_to_shortpath="${new_path}.exe"
17525     elif test -f "${new_path}.cmd"; then
17526       input_to_shortpath="${new_path}.cmd"
17527     else
17528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17529 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17530       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17531 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17532       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17533     fi
17534   else
17535     input_to_shortpath="$new_path"
17536   fi
17537 
17538   # Call helper function which possibly converts this using DOS-style short mode.
17539   # If so, the updated path is stored in $new_path.
17540   new_path="$input_to_shortpath"
17541 
17542   input_path="$input_to_shortpath"
17543   # Check if we need to convert this using DOS-style short mode. If the path
17544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17545   # take no chances and rewrite it.
17546   # Note: m4 eats our [], so we need to use [ and ] instead.
17547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17548   if test "x$has_forbidden_chars" != x; then
17549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17550     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17551     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17552     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17553       # Going to short mode and back again did indeed matter. Since short mode is
17554       # case insensitive, let's make it lowercase to improve readability.
17555       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17556       # Now convert it back to Unix-style (cygpath)
17557       input_path=`$CYGPATH -u "$shortmode_path"`
17558       new_path="$input_path"
17559     fi
17560   fi
17561 
17562   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17563   if test "x$test_cygdrive_prefix" = x; then
17564     # As a simple fix, exclude /usr/bin since it's not a real path.
17565     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17566       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17567       # a path prefixed by /cygdrive for fixpath to work.
17568       new_path="$CYGWIN_ROOT_PATH$input_path"
17569     fi
17570   fi
17571 
17572   # remove trailing .exe if any
17573   new_path="${new_path/%.exe/}"
17574 
17575     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17576 
17577   # First separate the path from the arguments. This will split at the first
17578   # space.
17579   complete="$FOUND_MAKE"
17580   path="${complete%% *}"
17581   tmp="$complete EOL"
17582   arguments="${tmp#* }"
17583 
17584   # Input might be given as Windows format, start by converting to
17585   # unix format.
17586   new_path="$path"
17587 
17588   windows_path="$new_path"
17589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17590     unix_path=`$CYGPATH -u "$windows_path"`
17591     new_path="$unix_path"
17592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17594     new_path="$unix_path"
17595   fi
17596 
17597 
17598   # Now try to locate executable using which
17599   new_path=`$WHICH "$new_path" 2> /dev/null`
17600 
17601   if test "x$new_path" = x; then
17602     # Oops. Which didn't find the executable.
17603     # The splitting of arguments from the executable at a space might have been incorrect,
17604     # since paths with space are more likely in Windows. Give it another try with the whole
17605     # argument.
17606     path="$complete"
17607     arguments="EOL"
17608     new_path="$path"
17609 
17610   windows_path="$new_path"
17611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17612     unix_path=`$CYGPATH -u "$windows_path"`
17613     new_path="$unix_path"
17614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17616     new_path="$unix_path"
17617   fi
17618 
17619 
17620     new_path=`$WHICH "$new_path" 2> /dev/null`
17621     # bat and cmd files are not always considered executable in MSYS causing which
17622     # to not find them
17623     if test "x$new_path" = x \
17624         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17625         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17626       new_path="$path"
17627 
17628   windows_path="$new_path"
17629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17630     unix_path=`$CYGPATH -u "$windows_path"`
17631     new_path="$unix_path"
17632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17633     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17634     new_path="$unix_path"
17635   fi
17636 
17637     fi
17638 
17639     if test "x$new_path" = x; then
17640       # It's still not found. Now this is an unrecoverable error.
17641       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17642 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17643       has_space=`$ECHO "$complete" | $GREP " "`
17644       if test "x$has_space" != x; then
17645         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17646 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17647       fi
17648       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17649     fi
17650   fi
17651 
17652   # Now new_path has a complete unix path to the binary
17653   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17654     # Keep paths in /bin as-is, but remove trailing .exe if any
17655     new_path="${new_path/%.exe/}"
17656     # Do not save /bin paths to all_fixpath_prefixes!
17657   else
17658     # Not in mixed or Windows style, start by that.
17659     new_path=`cmd //c echo $new_path`
17660 
17661   input_path="$new_path"
17662   # Check if we need to convert this using DOS-style short mode. If the path
17663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17664   # take no chances and rewrite it.
17665   # Note: m4 eats our [], so we need to use [ and ] instead.
17666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17667   if test "x$has_forbidden_chars" != x; then
17668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17669     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17670   fi
17671 
17672     # Output is in $new_path
17673 
17674   windows_path="$new_path"
17675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17676     unix_path=`$CYGPATH -u "$windows_path"`
17677     new_path="$unix_path"
17678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17680     new_path="$unix_path"
17681   fi
17682 
17683     # remove trailing .exe if any
17684     new_path="${new_path/%.exe/}"
17685 
17686     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17687     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17688   fi
17689 
17690     else
17691       # We're on a unix platform. Hooray! :)
17692       # First separate the path from the arguments. This will split at the first
17693       # space.
17694       complete="$FOUND_MAKE"
17695       path="${complete%% *}"
17696       tmp="$complete EOL"
17697       arguments="${tmp#* }"
17698 
17699       # Cannot rely on the command "which" here since it doesn't always work.
17700       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17701       if test -z "$is_absolute_path"; then
17702         # Path to executable is not absolute. Find it.
17703         IFS_save="$IFS"
17704         IFS=:
17705         for p in $PATH; do
17706           if test -f "$p/$path" && test -x "$p/$path"; then
17707             new_path="$p/$path"
17708             break
17709           fi
17710         done
17711         IFS="$IFS_save"
17712       else
17713         # This is an absolute path, we can use it without further modifications.
17714         new_path="$path"
17715       fi
17716 
17717       if test "x$new_path" = x; then
17718         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17719 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17720         has_space=`$ECHO "$complete" | $GREP " "`
17721         if test "x$has_space" != x; then
17722           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17723 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17724         fi
17725         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17726       fi
17727     fi
17728 
17729     # Now join together the path and the arguments once again
17730     if test "x$arguments" != xEOL; then
17731       new_complete="$new_path ${arguments% *}"
17732     else
17733       new_complete="$new_path"
17734     fi
17735 
17736     if test "x$complete" != "x$new_complete"; then
17737       FOUND_MAKE="$new_complete"
17738       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17739 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17740     fi
17741   fi
17742 
17743         fi
17744       fi
17745     fi
17746   fi
17747 
17748         if test "x$FOUND_MAKE" = x; then
17749           for ac_prog in make
17750 do
17751   # Extract the first word of "$ac_prog", so it can be a program name with args.
17752 set dummy $ac_prog; ac_word=$2
17753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17754 $as_echo_n "checking for $ac_word... " >&6; }
17755 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17756   $as_echo_n "(cached) " >&6
17757 else
17758   case $CHECK_TOOLSDIR_MAKE in
17759   [\\/]* | ?:[\\/]*)
17760   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17761   ;;
17762   *)
17763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17764 for as_dir in $PATH
17765 do
17766   IFS=$as_save_IFS
17767   test -z "$as_dir" && as_dir=.
17768     for ac_exec_ext in '' $ac_executable_extensions; do
17769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17770     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17772     break 2
17773   fi
17774 done
17775   done
17776 IFS=$as_save_IFS
17777 
17778   ;;
17779 esac
17780 fi
17781 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17782 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17784 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17785 else
17786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17787 $as_echo "no" >&6; }
17788 fi
17789 
17790 
17791   test -n "$CHECK_TOOLSDIR_MAKE" && break
17792 done
17793 
17794 
17795   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17796   DESCRIPTION="make in tools-dir"
17797 
17798   # On Cygwin, we require a newer version of make than on other platforms
17799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17800     MAKE_VERSION_EXPR="-e 4\."
17801     MAKE_REQUIRED_VERSION="4.0"
17802    else
17803     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17804     MAKE_REQUIRED_VERSION="3.81"
17805   fi
17806 
17807   if test "x$MAKE_CANDIDATE" != x; then
17808     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17809 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17810     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17811     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17812     if test "x$IS_GNU_MAKE" = x; then
17813       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17814 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17815     else
17816       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17817       if test "x$IS_MODERN_MAKE" = x; then
17818         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17819 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17820       else
17821         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17822           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823             MAKE_EXPECTED_ENV='cygwin'
17824           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17825             MAKE_EXPECTED_ENV='msys'
17826           else
17827             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17828           fi
17829           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17830           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17831         else
17832           # Not relevant for non-Windows
17833           IS_MAKE_CORRECT_ENV=true
17834         fi
17835         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17836           { $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
17837 $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;}
17838         else
17839           FOUND_MAKE=$MAKE_CANDIDATE
17840 
17841   # Only process if variable expands to non-empty
17842 
17843   if test "x$FOUND_MAKE" != x; then
17844     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845 
17846   # First separate the path from the arguments. This will split at the first
17847   # space.
17848   complete="$FOUND_MAKE"
17849   path="${complete%% *}"
17850   tmp="$complete EOL"
17851   arguments="${tmp#* }"
17852 
17853   # Input might be given as Windows format, start by converting to
17854   # unix format.
17855   new_path=`$CYGPATH -u "$path"`
17856 
17857   # Now try to locate executable using which
17858   new_path=`$WHICH "$new_path" 2> /dev/null`
17859   # bat and cmd files are not always considered executable in cygwin causing which
17860   # to not find them
17861   if test "x$new_path" = x \
17862       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17863       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17864     new_path=`$CYGPATH -u "$path"`
17865   fi
17866   if test "x$new_path" = x; then
17867     # Oops. Which didn't find the executable.
17868     # The splitting of arguments from the executable at a space might have been incorrect,
17869     # since paths with space are more likely in Windows. Give it another try with the whole
17870     # argument.
17871     path="$complete"
17872     arguments="EOL"
17873     new_path=`$CYGPATH -u "$path"`
17874     new_path=`$WHICH "$new_path" 2> /dev/null`
17875     # bat and cmd files are not always considered executable in cygwin causing which
17876     # to not find them
17877     if test "x$new_path" = x \
17878         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17879         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17880       new_path=`$CYGPATH -u "$path"`
17881     fi
17882     if test "x$new_path" = x; then
17883       # It's still not found. Now this is an unrecoverable error.
17884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17885 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17886       has_space=`$ECHO "$complete" | $GREP " "`
17887       if test "x$has_space" != x; then
17888         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17890       fi
17891       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17892     fi
17893   fi
17894 
17895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17898   # "foo.exe" is OK but "foo" is an error.
17899   #
17900   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17901   # It is also a way to make sure we got the proper file name for the real test later on.
17902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17903   if test "x$test_shortpath" = x; then
17904     # Short path failed, file does not exist as specified.
17905     # Try adding .exe or .cmd
17906     if test -f "${new_path}.exe"; then
17907       input_to_shortpath="${new_path}.exe"
17908     elif test -f "${new_path}.cmd"; then
17909       input_to_shortpath="${new_path}.cmd"
17910     else
17911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17912 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17913       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17914 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17915       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17916     fi
17917   else
17918     input_to_shortpath="$new_path"
17919   fi
17920 
17921   # Call helper function which possibly converts this using DOS-style short mode.
17922   # If so, the updated path is stored in $new_path.
17923   new_path="$input_to_shortpath"
17924 
17925   input_path="$input_to_shortpath"
17926   # Check if we need to convert this using DOS-style short mode. If the path
17927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17928   # take no chances and rewrite it.
17929   # Note: m4 eats our [], so we need to use [ and ] instead.
17930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17931   if test "x$has_forbidden_chars" != x; then
17932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17933     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17934     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17935     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17936       # Going to short mode and back again did indeed matter. Since short mode is
17937       # case insensitive, let's make it lowercase to improve readability.
17938       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17939       # Now convert it back to Unix-style (cygpath)
17940       input_path=`$CYGPATH -u "$shortmode_path"`
17941       new_path="$input_path"
17942     fi
17943   fi
17944 
17945   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17946   if test "x$test_cygdrive_prefix" = x; then
17947     # As a simple fix, exclude /usr/bin since it's not a real path.
17948     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17949       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17950       # a path prefixed by /cygdrive for fixpath to work.
17951       new_path="$CYGWIN_ROOT_PATH$input_path"
17952     fi
17953   fi
17954 
17955   # remove trailing .exe if any
17956   new_path="${new_path/%.exe/}"
17957 
17958     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17959 
17960   # First separate the path from the arguments. This will split at the first
17961   # space.
17962   complete="$FOUND_MAKE"
17963   path="${complete%% *}"
17964   tmp="$complete EOL"
17965   arguments="${tmp#* }"
17966 
17967   # Input might be given as Windows format, start by converting to
17968   # unix format.
17969   new_path="$path"
17970 
17971   windows_path="$new_path"
17972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17973     unix_path=`$CYGPATH -u "$windows_path"`
17974     new_path="$unix_path"
17975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17977     new_path="$unix_path"
17978   fi
17979 
17980 
17981   # Now try to locate executable using which
17982   new_path=`$WHICH "$new_path" 2> /dev/null`
17983 
17984   if test "x$new_path" = x; then
17985     # Oops. Which didn't find the executable.
17986     # The splitting of arguments from the executable at a space might have been incorrect,
17987     # since paths with space are more likely in Windows. Give it another try with the whole
17988     # argument.
17989     path="$complete"
17990     arguments="EOL"
17991     new_path="$path"
17992 
17993   windows_path="$new_path"
17994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17995     unix_path=`$CYGPATH -u "$windows_path"`
17996     new_path="$unix_path"
17997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17999     new_path="$unix_path"
18000   fi
18001 
18002 
18003     new_path=`$WHICH "$new_path" 2> /dev/null`
18004     # bat and cmd files are not always considered executable in MSYS causing which
18005     # to not find them
18006     if test "x$new_path" = x \
18007         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18008         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18009       new_path="$path"
18010 
18011   windows_path="$new_path"
18012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013     unix_path=`$CYGPATH -u "$windows_path"`
18014     new_path="$unix_path"
18015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18017     new_path="$unix_path"
18018   fi
18019 
18020     fi
18021 
18022     if test "x$new_path" = x; then
18023       # It's still not found. Now this is an unrecoverable error.
18024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18025 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18026       has_space=`$ECHO "$complete" | $GREP " "`
18027       if test "x$has_space" != x; then
18028         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18029 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18030       fi
18031       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18032     fi
18033   fi
18034 
18035   # Now new_path has a complete unix path to the binary
18036   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18037     # Keep paths in /bin as-is, but remove trailing .exe if any
18038     new_path="${new_path/%.exe/}"
18039     # Do not save /bin paths to all_fixpath_prefixes!
18040   else
18041     # Not in mixed or Windows style, start by that.
18042     new_path=`cmd //c echo $new_path`
18043 
18044   input_path="$new_path"
18045   # Check if we need to convert this using DOS-style short mode. If the path
18046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18047   # take no chances and rewrite it.
18048   # Note: m4 eats our [], so we need to use [ and ] instead.
18049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18050   if test "x$has_forbidden_chars" != x; then
18051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18053   fi
18054 
18055     # Output is in $new_path
18056 
18057   windows_path="$new_path"
18058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18059     unix_path=`$CYGPATH -u "$windows_path"`
18060     new_path="$unix_path"
18061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18063     new_path="$unix_path"
18064   fi
18065 
18066     # remove trailing .exe if any
18067     new_path="${new_path/%.exe/}"
18068 
18069     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18070     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18071   fi
18072 
18073     else
18074       # We're on a unix platform. Hooray! :)
18075       # First separate the path from the arguments. This will split at the first
18076       # space.
18077       complete="$FOUND_MAKE"
18078       path="${complete%% *}"
18079       tmp="$complete EOL"
18080       arguments="${tmp#* }"
18081 
18082       # Cannot rely on the command "which" here since it doesn't always work.
18083       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18084       if test -z "$is_absolute_path"; then
18085         # Path to executable is not absolute. Find it.
18086         IFS_save="$IFS"
18087         IFS=:
18088         for p in $PATH; do
18089           if test -f "$p/$path" && test -x "$p/$path"; then
18090             new_path="$p/$path"
18091             break
18092           fi
18093         done
18094         IFS="$IFS_save"
18095       else
18096         # This is an absolute path, we can use it without further modifications.
18097         new_path="$path"
18098       fi
18099 
18100       if test "x$new_path" = x; then
18101         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18102 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18103         has_space=`$ECHO "$complete" | $GREP " "`
18104         if test "x$has_space" != x; then
18105           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18106 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18107         fi
18108         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18109       fi
18110     fi
18111 
18112     # Now join together the path and the arguments once again
18113     if test "x$arguments" != xEOL; then
18114       new_complete="$new_path ${arguments% *}"
18115     else
18116       new_complete="$new_path"
18117     fi
18118 
18119     if test "x$complete" != "x$new_complete"; then
18120       FOUND_MAKE="$new_complete"
18121       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18122 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18123     fi
18124   fi
18125 
18126         fi
18127       fi
18128     fi
18129   fi
18130 
18131         fi
18132         PATH=$OLD_PATH
18133       fi
18134     fi
18135 
18136     if test "x$FOUND_MAKE" = x; then
18137       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
18138     fi
18139 
18140   else
18141     # The variable is set, but is it from the command line or the environment?
18142 
18143     # Try to remove the string !MAKE! from our list.
18144     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18145     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18146       # If it failed, the variable was not from the command line. Ignore it,
18147       # but warn the user (except for BASH, which is always set by the calling BASH).
18148       if test "xMAKE" != xBASH; then
18149         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18150 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18151       fi
18152       # Try to locate tool using the code snippet
18153 
18154     # Try our hardest to locate a correct version of GNU make
18155     for ac_prog in gmake
18156 do
18157   # Extract the first word of "$ac_prog", so it can be a program name with args.
18158 set dummy $ac_prog; ac_word=$2
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18160 $as_echo_n "checking for $ac_word... " >&6; }
18161 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18162   $as_echo_n "(cached) " >&6
18163 else
18164   case $CHECK_GMAKE in
18165   [\\/]* | ?:[\\/]*)
18166   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18167   ;;
18168   *)
18169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18170 for as_dir in $PATH
18171 do
18172   IFS=$as_save_IFS
18173   test -z "$as_dir" && as_dir=.
18174     for ac_exec_ext in '' $ac_executable_extensions; do
18175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18176     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18178     break 2
18179   fi
18180 done
18181   done
18182 IFS=$as_save_IFS
18183 
18184   ;;
18185 esac
18186 fi
18187 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18188 if test -n "$CHECK_GMAKE"; then
18189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18190 $as_echo "$CHECK_GMAKE" >&6; }
18191 else
18192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193 $as_echo "no" >&6; }
18194 fi
18195 
18196 
18197   test -n "$CHECK_GMAKE" && break
18198 done
18199 
18200 
18201   MAKE_CANDIDATE=""$CHECK_GMAKE""
18202   DESCRIPTION="gmake in PATH"
18203 
18204   # On Cygwin, we require a newer version of make than on other platforms
18205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18206     MAKE_VERSION_EXPR="-e 4\."
18207     MAKE_REQUIRED_VERSION="4.0"
18208    else
18209     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18210     MAKE_REQUIRED_VERSION="3.81"
18211   fi
18212 
18213   if test "x$MAKE_CANDIDATE" != x; then
18214     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18215 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18216     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18217     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18218     if test "x$IS_GNU_MAKE" = x; then
18219       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18220 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18221     else
18222       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18223       if test "x$IS_MODERN_MAKE" = x; then
18224         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18225 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18226       else
18227         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18228           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18229             MAKE_EXPECTED_ENV='cygwin'
18230           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231             MAKE_EXPECTED_ENV='msys'
18232           else
18233             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18234           fi
18235           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18236           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18237         else
18238           # Not relevant for non-Windows
18239           IS_MAKE_CORRECT_ENV=true
18240         fi
18241         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18242           { $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
18243 $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;}
18244         else
18245           FOUND_MAKE=$MAKE_CANDIDATE
18246 
18247   # Only process if variable expands to non-empty
18248 
18249   if test "x$FOUND_MAKE" != x; then
18250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18251 
18252   # First separate the path from the arguments. This will split at the first
18253   # space.
18254   complete="$FOUND_MAKE"
18255   path="${complete%% *}"
18256   tmp="$complete EOL"
18257   arguments="${tmp#* }"
18258 
18259   # Input might be given as Windows format, start by converting to
18260   # unix format.
18261   new_path=`$CYGPATH -u "$path"`
18262 
18263   # Now try to locate executable using which
18264   new_path=`$WHICH "$new_path" 2> /dev/null`
18265   # bat and cmd files are not always considered executable in cygwin causing which
18266   # to not find them
18267   if test "x$new_path" = x \
18268       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18269       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18270     new_path=`$CYGPATH -u "$path"`
18271   fi
18272   if test "x$new_path" = x; then
18273     # Oops. Which didn't find the executable.
18274     # The splitting of arguments from the executable at a space might have been incorrect,
18275     # since paths with space are more likely in Windows. Give it another try with the whole
18276     # argument.
18277     path="$complete"
18278     arguments="EOL"
18279     new_path=`$CYGPATH -u "$path"`
18280     new_path=`$WHICH "$new_path" 2> /dev/null`
18281     # bat and cmd files are not always considered executable in cygwin causing which
18282     # to not find them
18283     if test "x$new_path" = x \
18284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18286       new_path=`$CYGPATH -u "$path"`
18287     fi
18288     if test "x$new_path" = x; then
18289       # It's still not found. Now this is an unrecoverable error.
18290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18291 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18292       has_space=`$ECHO "$complete" | $GREP " "`
18293       if test "x$has_space" != x; then
18294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18296       fi
18297       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18298     fi
18299   fi
18300 
18301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18304   # "foo.exe" is OK but "foo" is an error.
18305   #
18306   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18307   # It is also a way to make sure we got the proper file name for the real test later on.
18308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18309   if test "x$test_shortpath" = x; then
18310     # Short path failed, file does not exist as specified.
18311     # Try adding .exe or .cmd
18312     if test -f "${new_path}.exe"; then
18313       input_to_shortpath="${new_path}.exe"
18314     elif test -f "${new_path}.cmd"; then
18315       input_to_shortpath="${new_path}.cmd"
18316     else
18317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18318 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18319       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18321       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18322     fi
18323   else
18324     input_to_shortpath="$new_path"
18325   fi
18326 
18327   # Call helper function which possibly converts this using DOS-style short mode.
18328   # If so, the updated path is stored in $new_path.
18329   new_path="$input_to_shortpath"
18330 
18331   input_path="$input_to_shortpath"
18332   # Check if we need to convert this using DOS-style short mode. If the path
18333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18334   # take no chances and rewrite it.
18335   # Note: m4 eats our [], so we need to use [ and ] instead.
18336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18337   if test "x$has_forbidden_chars" != x; then
18338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18342       # Going to short mode and back again did indeed matter. Since short mode is
18343       # case insensitive, let's make it lowercase to improve readability.
18344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18345       # Now convert it back to Unix-style (cygpath)
18346       input_path=`$CYGPATH -u "$shortmode_path"`
18347       new_path="$input_path"
18348     fi
18349   fi
18350 
18351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18352   if test "x$test_cygdrive_prefix" = x; then
18353     # As a simple fix, exclude /usr/bin since it's not a real path.
18354     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18356       # a path prefixed by /cygdrive for fixpath to work.
18357       new_path="$CYGWIN_ROOT_PATH$input_path"
18358     fi
18359   fi
18360 
18361   # remove trailing .exe if any
18362   new_path="${new_path/%.exe/}"
18363 
18364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18365 
18366   # First separate the path from the arguments. This will split at the first
18367   # space.
18368   complete="$FOUND_MAKE"
18369   path="${complete%% *}"
18370   tmp="$complete EOL"
18371   arguments="${tmp#* }"
18372 
18373   # Input might be given as Windows format, start by converting to
18374   # unix format.
18375   new_path="$path"
18376 
18377   windows_path="$new_path"
18378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18379     unix_path=`$CYGPATH -u "$windows_path"`
18380     new_path="$unix_path"
18381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18383     new_path="$unix_path"
18384   fi
18385 
18386 
18387   # Now try to locate executable using which
18388   new_path=`$WHICH "$new_path" 2> /dev/null`
18389 
18390   if test "x$new_path" = x; then
18391     # Oops. Which didn't find the executable.
18392     # The splitting of arguments from the executable at a space might have been incorrect,
18393     # since paths with space are more likely in Windows. Give it another try with the whole
18394     # argument.
18395     path="$complete"
18396     arguments="EOL"
18397     new_path="$path"
18398 
18399   windows_path="$new_path"
18400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401     unix_path=`$CYGPATH -u "$windows_path"`
18402     new_path="$unix_path"
18403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18405     new_path="$unix_path"
18406   fi
18407 
18408 
18409     new_path=`$WHICH "$new_path" 2> /dev/null`
18410     # bat and cmd files are not always considered executable in MSYS causing which
18411     # to not find them
18412     if test "x$new_path" = x \
18413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18415       new_path="$path"
18416 
18417   windows_path="$new_path"
18418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18419     unix_path=`$CYGPATH -u "$windows_path"`
18420     new_path="$unix_path"
18421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18423     new_path="$unix_path"
18424   fi
18425 
18426     fi
18427 
18428     if test "x$new_path" = x; then
18429       # It's still not found. Now this is an unrecoverable error.
18430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18431 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18432       has_space=`$ECHO "$complete" | $GREP " "`
18433       if test "x$has_space" != x; then
18434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18436       fi
18437       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18438     fi
18439   fi
18440 
18441   # Now new_path has a complete unix path to the binary
18442   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18443     # Keep paths in /bin as-is, but remove trailing .exe if any
18444     new_path="${new_path/%.exe/}"
18445     # Do not save /bin paths to all_fixpath_prefixes!
18446   else
18447     # Not in mixed or Windows style, start by that.
18448     new_path=`cmd //c echo $new_path`
18449 
18450   input_path="$new_path"
18451   # Check if we need to convert this using DOS-style short mode. If the path
18452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18453   # take no chances and rewrite it.
18454   # Note: m4 eats our [], so we need to use [ and ] instead.
18455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18456   if test "x$has_forbidden_chars" != x; then
18457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18459   fi
18460 
18461     # Output is in $new_path
18462 
18463   windows_path="$new_path"
18464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18465     unix_path=`$CYGPATH -u "$windows_path"`
18466     new_path="$unix_path"
18467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18469     new_path="$unix_path"
18470   fi
18471 
18472     # remove trailing .exe if any
18473     new_path="${new_path/%.exe/}"
18474 
18475     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18476     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18477   fi
18478 
18479     else
18480       # We're on a unix platform. Hooray! :)
18481       # First separate the path from the arguments. This will split at the first
18482       # space.
18483       complete="$FOUND_MAKE"
18484       path="${complete%% *}"
18485       tmp="$complete EOL"
18486       arguments="${tmp#* }"
18487 
18488       # Cannot rely on the command "which" here since it doesn't always work.
18489       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18490       if test -z "$is_absolute_path"; then
18491         # Path to executable is not absolute. Find it.
18492         IFS_save="$IFS"
18493         IFS=:
18494         for p in $PATH; do
18495           if test -f "$p/$path" && test -x "$p/$path"; then
18496             new_path="$p/$path"
18497             break
18498           fi
18499         done
18500         IFS="$IFS_save"
18501       else
18502         # This is an absolute path, we can use it without further modifications.
18503         new_path="$path"
18504       fi
18505 
18506       if test "x$new_path" = x; then
18507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18508 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18509         has_space=`$ECHO "$complete" | $GREP " "`
18510         if test "x$has_space" != x; then
18511           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18513         fi
18514         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18515       fi
18516     fi
18517 
18518     # Now join together the path and the arguments once again
18519     if test "x$arguments" != xEOL; then
18520       new_complete="$new_path ${arguments% *}"
18521     else
18522       new_complete="$new_path"
18523     fi
18524 
18525     if test "x$complete" != "x$new_complete"; then
18526       FOUND_MAKE="$new_complete"
18527       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18528 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18529     fi
18530   fi
18531 
18532         fi
18533       fi
18534     fi
18535   fi
18536 
18537 
18538     if test "x$FOUND_MAKE" = x; then
18539       for ac_prog in make
18540 do
18541   # Extract the first word of "$ac_prog", so it can be a program name with args.
18542 set dummy $ac_prog; ac_word=$2
18543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18544 $as_echo_n "checking for $ac_word... " >&6; }
18545 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18546   $as_echo_n "(cached) " >&6
18547 else
18548   case $CHECK_MAKE in
18549   [\\/]* | ?:[\\/]*)
18550   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18551   ;;
18552   *)
18553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18554 for as_dir in $PATH
18555 do
18556   IFS=$as_save_IFS
18557   test -z "$as_dir" && as_dir=.
18558     for ac_exec_ext in '' $ac_executable_extensions; do
18559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18560     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18562     break 2
18563   fi
18564 done
18565   done
18566 IFS=$as_save_IFS
18567 
18568   ;;
18569 esac
18570 fi
18571 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18572 if test -n "$CHECK_MAKE"; then
18573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18574 $as_echo "$CHECK_MAKE" >&6; }
18575 else
18576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18577 $as_echo "no" >&6; }
18578 fi
18579 
18580 
18581   test -n "$CHECK_MAKE" && break
18582 done
18583 
18584 
18585   MAKE_CANDIDATE=""$CHECK_MAKE""
18586   DESCRIPTION="make in PATH"
18587 
18588   # On Cygwin, we require a newer version of make than on other platforms
18589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18590     MAKE_VERSION_EXPR="-e 4\."
18591     MAKE_REQUIRED_VERSION="4.0"
18592    else
18593     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18594     MAKE_REQUIRED_VERSION="3.81"
18595   fi
18596 
18597   if test "x$MAKE_CANDIDATE" != x; then
18598     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18599 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18600     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18601     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18602     if test "x$IS_GNU_MAKE" = x; then
18603       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18604 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18605     else
18606       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18607       if test "x$IS_MODERN_MAKE" = x; then
18608         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18609 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18610       else
18611         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18612           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613             MAKE_EXPECTED_ENV='cygwin'
18614           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615             MAKE_EXPECTED_ENV='msys'
18616           else
18617             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18618           fi
18619           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18620           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18621         else
18622           # Not relevant for non-Windows
18623           IS_MAKE_CORRECT_ENV=true
18624         fi
18625         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18626           { $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
18627 $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;}
18628         else
18629           FOUND_MAKE=$MAKE_CANDIDATE
18630 
18631   # Only process if variable expands to non-empty
18632 
18633   if test "x$FOUND_MAKE" != x; then
18634     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18635 
18636   # First separate the path from the arguments. This will split at the first
18637   # space.
18638   complete="$FOUND_MAKE"
18639   path="${complete%% *}"
18640   tmp="$complete EOL"
18641   arguments="${tmp#* }"
18642 
18643   # Input might be given as Windows format, start by converting to
18644   # unix format.
18645   new_path=`$CYGPATH -u "$path"`
18646 
18647   # Now try to locate executable using which
18648   new_path=`$WHICH "$new_path" 2> /dev/null`
18649   # bat and cmd files are not always considered executable in cygwin causing which
18650   # to not find them
18651   if test "x$new_path" = x \
18652       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18653       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18654     new_path=`$CYGPATH -u "$path"`
18655   fi
18656   if test "x$new_path" = x; then
18657     # Oops. Which didn't find the executable.
18658     # The splitting of arguments from the executable at a space might have been incorrect,
18659     # since paths with space are more likely in Windows. Give it another try with the whole
18660     # argument.
18661     path="$complete"
18662     arguments="EOL"
18663     new_path=`$CYGPATH -u "$path"`
18664     new_path=`$WHICH "$new_path" 2> /dev/null`
18665     # bat and cmd files are not always considered executable in cygwin causing which
18666     # to not find them
18667     if test "x$new_path" = x \
18668         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18669         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18670       new_path=`$CYGPATH -u "$path"`
18671     fi
18672     if test "x$new_path" = x; then
18673       # It's still not found. Now this is an unrecoverable error.
18674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18675 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18676       has_space=`$ECHO "$complete" | $GREP " "`
18677       if test "x$has_space" != x; then
18678         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18679 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18680       fi
18681       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18682     fi
18683   fi
18684 
18685   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18686   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18687   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18688   # "foo.exe" is OK but "foo" is an error.
18689   #
18690   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18691   # It is also a way to make sure we got the proper file name for the real test later on.
18692   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18693   if test "x$test_shortpath" = x; then
18694     # Short path failed, file does not exist as specified.
18695     # Try adding .exe or .cmd
18696     if test -f "${new_path}.exe"; then
18697       input_to_shortpath="${new_path}.exe"
18698     elif test -f "${new_path}.cmd"; then
18699       input_to_shortpath="${new_path}.cmd"
18700     else
18701       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18702 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18703       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18704 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18705       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18706     fi
18707   else
18708     input_to_shortpath="$new_path"
18709   fi
18710 
18711   # Call helper function which possibly converts this using DOS-style short mode.
18712   # If so, the updated path is stored in $new_path.
18713   new_path="$input_to_shortpath"
18714 
18715   input_path="$input_to_shortpath"
18716   # Check if we need to convert this using DOS-style short mode. If the path
18717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18718   # take no chances and rewrite it.
18719   # Note: m4 eats our [], so we need to use [ and ] instead.
18720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18721   if test "x$has_forbidden_chars" != x; then
18722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18726       # Going to short mode and back again did indeed matter. Since short mode is
18727       # case insensitive, let's make it lowercase to improve readability.
18728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18729       # Now convert it back to Unix-style (cygpath)
18730       input_path=`$CYGPATH -u "$shortmode_path"`
18731       new_path="$input_path"
18732     fi
18733   fi
18734 
18735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18736   if test "x$test_cygdrive_prefix" = x; then
18737     # As a simple fix, exclude /usr/bin since it's not a real path.
18738     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18740       # a path prefixed by /cygdrive for fixpath to work.
18741       new_path="$CYGWIN_ROOT_PATH$input_path"
18742     fi
18743   fi
18744 
18745   # remove trailing .exe if any
18746   new_path="${new_path/%.exe/}"
18747 
18748     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18749 
18750   # First separate the path from the arguments. This will split at the first
18751   # space.
18752   complete="$FOUND_MAKE"
18753   path="${complete%% *}"
18754   tmp="$complete EOL"
18755   arguments="${tmp#* }"
18756 
18757   # Input might be given as Windows format, start by converting to
18758   # unix format.
18759   new_path="$path"
18760 
18761   windows_path="$new_path"
18762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18763     unix_path=`$CYGPATH -u "$windows_path"`
18764     new_path="$unix_path"
18765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18767     new_path="$unix_path"
18768   fi
18769 
18770 
18771   # Now try to locate executable using which
18772   new_path=`$WHICH "$new_path" 2> /dev/null`
18773 
18774   if test "x$new_path" = x; then
18775     # Oops. Which didn't find the executable.
18776     # The splitting of arguments from the executable at a space might have been incorrect,
18777     # since paths with space are more likely in Windows. Give it another try with the whole
18778     # argument.
18779     path="$complete"
18780     arguments="EOL"
18781     new_path="$path"
18782 
18783   windows_path="$new_path"
18784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785     unix_path=`$CYGPATH -u "$windows_path"`
18786     new_path="$unix_path"
18787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18789     new_path="$unix_path"
18790   fi
18791 
18792 
18793     new_path=`$WHICH "$new_path" 2> /dev/null`
18794     # bat and cmd files are not always considered executable in MSYS causing which
18795     # to not find them
18796     if test "x$new_path" = x \
18797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18799       new_path="$path"
18800 
18801   windows_path="$new_path"
18802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18803     unix_path=`$CYGPATH -u "$windows_path"`
18804     new_path="$unix_path"
18805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18807     new_path="$unix_path"
18808   fi
18809 
18810     fi
18811 
18812     if test "x$new_path" = x; then
18813       # It's still not found. Now this is an unrecoverable error.
18814       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18815 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18816       has_space=`$ECHO "$complete" | $GREP " "`
18817       if test "x$has_space" != x; then
18818         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18819 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18820       fi
18821       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18822     fi
18823   fi
18824 
18825   # Now new_path has a complete unix path to the binary
18826   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18827     # Keep paths in /bin as-is, but remove trailing .exe if any
18828     new_path="${new_path/%.exe/}"
18829     # Do not save /bin paths to all_fixpath_prefixes!
18830   else
18831     # Not in mixed or Windows style, start by that.
18832     new_path=`cmd //c echo $new_path`
18833 
18834   input_path="$new_path"
18835   # Check if we need to convert this using DOS-style short mode. If the path
18836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18837   # take no chances and rewrite it.
18838   # Note: m4 eats our [], so we need to use [ and ] instead.
18839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18840   if test "x$has_forbidden_chars" != x; then
18841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18842     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18843   fi
18844 
18845     # Output is in $new_path
18846 
18847   windows_path="$new_path"
18848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18849     unix_path=`$CYGPATH -u "$windows_path"`
18850     new_path="$unix_path"
18851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18853     new_path="$unix_path"
18854   fi
18855 
18856     # remove trailing .exe if any
18857     new_path="${new_path/%.exe/}"
18858 
18859     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18860     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18861   fi
18862 
18863     else
18864       # We're on a unix platform. Hooray! :)
18865       # First separate the path from the arguments. This will split at the first
18866       # space.
18867       complete="$FOUND_MAKE"
18868       path="${complete%% *}"
18869       tmp="$complete EOL"
18870       arguments="${tmp#* }"
18871 
18872       # Cannot rely on the command "which" here since it doesn't always work.
18873       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18874       if test -z "$is_absolute_path"; then
18875         # Path to executable is not absolute. Find it.
18876         IFS_save="$IFS"
18877         IFS=:
18878         for p in $PATH; do
18879           if test -f "$p/$path" && test -x "$p/$path"; then
18880             new_path="$p/$path"
18881             break
18882           fi
18883         done
18884         IFS="$IFS_save"
18885       else
18886         # This is an absolute path, we can use it without further modifications.
18887         new_path="$path"
18888       fi
18889 
18890       if test "x$new_path" = x; then
18891         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18892 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18893         has_space=`$ECHO "$complete" | $GREP " "`
18894         if test "x$has_space" != x; then
18895           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18896 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18897         fi
18898         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18899       fi
18900     fi
18901 
18902     # Now join together the path and the arguments once again
18903     if test "x$arguments" != xEOL; then
18904       new_complete="$new_path ${arguments% *}"
18905     else
18906       new_complete="$new_path"
18907     fi
18908 
18909     if test "x$complete" != "x$new_complete"; then
18910       FOUND_MAKE="$new_complete"
18911       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18912 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18913     fi
18914   fi
18915 
18916         fi
18917       fi
18918     fi
18919   fi
18920 
18921     fi
18922 
18923     if test "x$FOUND_MAKE" = x; then
18924       if test "x$TOOLCHAIN_PATH" != x; then
18925         # We have a toolchain path, check that as well before giving up.
18926         OLD_PATH=$PATH
18927         PATH=$TOOLCHAIN_PATH:$PATH
18928         for ac_prog in gmake
18929 do
18930   # Extract the first word of "$ac_prog", so it can be a program name with args.
18931 set dummy $ac_prog; ac_word=$2
18932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933 $as_echo_n "checking for $ac_word... " >&6; }
18934 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18935   $as_echo_n "(cached) " >&6
18936 else
18937   case $CHECK_TOOLSDIR_GMAKE in
18938   [\\/]* | ?:[\\/]*)
18939   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18940   ;;
18941   *)
18942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943 for as_dir in $PATH
18944 do
18945   IFS=$as_save_IFS
18946   test -z "$as_dir" && as_dir=.
18947     for ac_exec_ext in '' $ac_executable_extensions; do
18948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951     break 2
18952   fi
18953 done
18954   done
18955 IFS=$as_save_IFS
18956 
18957   ;;
18958 esac
18959 fi
18960 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18961 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18963 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18964 else
18965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966 $as_echo "no" >&6; }
18967 fi
18968 
18969 
18970   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18971 done
18972 
18973 
18974   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18975   DESCRIPTION="gmake in tools-dir"
18976 
18977   # On Cygwin, we require a newer version of make than on other platforms
18978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18979     MAKE_VERSION_EXPR="-e 4\."
18980     MAKE_REQUIRED_VERSION="4.0"
18981    else
18982     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18983     MAKE_REQUIRED_VERSION="3.81"
18984   fi
18985 
18986   if test "x$MAKE_CANDIDATE" != x; then
18987     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18988 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18989     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18990     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18991     if test "x$IS_GNU_MAKE" = x; then
18992       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18993 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18994     else
18995       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18996       if test "x$IS_MODERN_MAKE" = x; then
18997         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18998 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18999       else
19000         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19001           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19002             MAKE_EXPECTED_ENV='cygwin'
19003           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19004             MAKE_EXPECTED_ENV='msys'
19005           else
19006             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19007           fi
19008           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19009           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19010         else
19011           # Not relevant for non-Windows
19012           IS_MAKE_CORRECT_ENV=true
19013         fi
19014         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19015           { $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
19016 $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;}
19017         else
19018           FOUND_MAKE=$MAKE_CANDIDATE
19019 
19020   # Only process if variable expands to non-empty
19021 
19022   if test "x$FOUND_MAKE" != x; then
19023     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19024 
19025   # First separate the path from the arguments. This will split at the first
19026   # space.
19027   complete="$FOUND_MAKE"
19028   path="${complete%% *}"
19029   tmp="$complete EOL"
19030   arguments="${tmp#* }"
19031 
19032   # Input might be given as Windows format, start by converting to
19033   # unix format.
19034   new_path=`$CYGPATH -u "$path"`
19035 
19036   # Now try to locate executable using which
19037   new_path=`$WHICH "$new_path" 2> /dev/null`
19038   # bat and cmd files are not always considered executable in cygwin causing which
19039   # to not find them
19040   if test "x$new_path" = x \
19041       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19042       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19043     new_path=`$CYGPATH -u "$path"`
19044   fi
19045   if test "x$new_path" = x; then
19046     # Oops. Which didn't find the executable.
19047     # The splitting of arguments from the executable at a space might have been incorrect,
19048     # since paths with space are more likely in Windows. Give it another try with the whole
19049     # argument.
19050     path="$complete"
19051     arguments="EOL"
19052     new_path=`$CYGPATH -u "$path"`
19053     new_path=`$WHICH "$new_path" 2> /dev/null`
19054     # bat and cmd files are not always considered executable in cygwin causing which
19055     # to not find them
19056     if test "x$new_path" = x \
19057         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19058         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19059       new_path=`$CYGPATH -u "$path"`
19060     fi
19061     if test "x$new_path" = x; then
19062       # It's still not found. Now this is an unrecoverable error.
19063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065       has_space=`$ECHO "$complete" | $GREP " "`
19066       if test "x$has_space" != x; then
19067         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19068 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19069       fi
19070       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071     fi
19072   fi
19073 
19074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19077   # "foo.exe" is OK but "foo" is an error.
19078   #
19079   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19080   # It is also a way to make sure we got the proper file name for the real test later on.
19081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19082   if test "x$test_shortpath" = x; then
19083     # Short path failed, file does not exist as specified.
19084     # Try adding .exe or .cmd
19085     if test -f "${new_path}.exe"; then
19086       input_to_shortpath="${new_path}.exe"
19087     elif test -f "${new_path}.cmd"; then
19088       input_to_shortpath="${new_path}.cmd"
19089     else
19090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19091 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19092       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19093 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19094       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19095     fi
19096   else
19097     input_to_shortpath="$new_path"
19098   fi
19099 
19100   # Call helper function which possibly converts this using DOS-style short mode.
19101   # If so, the updated path is stored in $new_path.
19102   new_path="$input_to_shortpath"
19103 
19104   input_path="$input_to_shortpath"
19105   # Check if we need to convert this using DOS-style short mode. If the path
19106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19107   # take no chances and rewrite it.
19108   # Note: m4 eats our [], so we need to use [ and ] instead.
19109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19110   if test "x$has_forbidden_chars" != x; then
19111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19115       # Going to short mode and back again did indeed matter. Since short mode is
19116       # case insensitive, let's make it lowercase to improve readability.
19117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19118       # Now convert it back to Unix-style (cygpath)
19119       input_path=`$CYGPATH -u "$shortmode_path"`
19120       new_path="$input_path"
19121     fi
19122   fi
19123 
19124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19125   if test "x$test_cygdrive_prefix" = x; then
19126     # As a simple fix, exclude /usr/bin since it's not a real path.
19127     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19129       # a path prefixed by /cygdrive for fixpath to work.
19130       new_path="$CYGWIN_ROOT_PATH$input_path"
19131     fi
19132   fi
19133 
19134   # remove trailing .exe if any
19135   new_path="${new_path/%.exe/}"
19136 
19137     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19138 
19139   # First separate the path from the arguments. This will split at the first
19140   # space.
19141   complete="$FOUND_MAKE"
19142   path="${complete%% *}"
19143   tmp="$complete EOL"
19144   arguments="${tmp#* }"
19145 
19146   # Input might be given as Windows format, start by converting to
19147   # unix format.
19148   new_path="$path"
19149 
19150   windows_path="$new_path"
19151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152     unix_path=`$CYGPATH -u "$windows_path"`
19153     new_path="$unix_path"
19154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19156     new_path="$unix_path"
19157   fi
19158 
19159 
19160   # Now try to locate executable using which
19161   new_path=`$WHICH "$new_path" 2> /dev/null`
19162 
19163   if test "x$new_path" = x; then
19164     # Oops. Which didn't find the executable.
19165     # The splitting of arguments from the executable at a space might have been incorrect,
19166     # since paths with space are more likely in Windows. Give it another try with the whole
19167     # argument.
19168     path="$complete"
19169     arguments="EOL"
19170     new_path="$path"
19171 
19172   windows_path="$new_path"
19173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174     unix_path=`$CYGPATH -u "$windows_path"`
19175     new_path="$unix_path"
19176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19178     new_path="$unix_path"
19179   fi
19180 
19181 
19182     new_path=`$WHICH "$new_path" 2> /dev/null`
19183     # bat and cmd files are not always considered executable in MSYS causing which
19184     # to not find them
19185     if test "x$new_path" = x \
19186         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19187         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19188       new_path="$path"
19189 
19190   windows_path="$new_path"
19191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192     unix_path=`$CYGPATH -u "$windows_path"`
19193     new_path="$unix_path"
19194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19196     new_path="$unix_path"
19197   fi
19198 
19199     fi
19200 
19201     if test "x$new_path" = x; then
19202       # It's still not found. Now this is an unrecoverable error.
19203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19204 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19205       has_space=`$ECHO "$complete" | $GREP " "`
19206       if test "x$has_space" != x; then
19207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19209       fi
19210       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19211     fi
19212   fi
19213 
19214   # Now new_path has a complete unix path to the binary
19215   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19216     # Keep paths in /bin as-is, but remove trailing .exe if any
19217     new_path="${new_path/%.exe/}"
19218     # Do not save /bin paths to all_fixpath_prefixes!
19219   else
19220     # Not in mixed or Windows style, start by that.
19221     new_path=`cmd //c echo $new_path`
19222 
19223   input_path="$new_path"
19224   # Check if we need to convert this using DOS-style short mode. If the path
19225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19226   # take no chances and rewrite it.
19227   # Note: m4 eats our [], so we need to use [ and ] instead.
19228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19229   if test "x$has_forbidden_chars" != x; then
19230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19232   fi
19233 
19234     # Output is in $new_path
19235 
19236   windows_path="$new_path"
19237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19238     unix_path=`$CYGPATH -u "$windows_path"`
19239     new_path="$unix_path"
19240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19242     new_path="$unix_path"
19243   fi
19244 
19245     # remove trailing .exe if any
19246     new_path="${new_path/%.exe/}"
19247 
19248     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19249     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19250   fi
19251 
19252     else
19253       # We're on a unix platform. Hooray! :)
19254       # First separate the path from the arguments. This will split at the first
19255       # space.
19256       complete="$FOUND_MAKE"
19257       path="${complete%% *}"
19258       tmp="$complete EOL"
19259       arguments="${tmp#* }"
19260 
19261       # Cannot rely on the command "which" here since it doesn't always work.
19262       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19263       if test -z "$is_absolute_path"; then
19264         # Path to executable is not absolute. Find it.
19265         IFS_save="$IFS"
19266         IFS=:
19267         for p in $PATH; do
19268           if test -f "$p/$path" && test -x "$p/$path"; then
19269             new_path="$p/$path"
19270             break
19271           fi
19272         done
19273         IFS="$IFS_save"
19274       else
19275         # This is an absolute path, we can use it without further modifications.
19276         new_path="$path"
19277       fi
19278 
19279       if test "x$new_path" = x; then
19280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19281 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19282         has_space=`$ECHO "$complete" | $GREP " "`
19283         if test "x$has_space" != x; then
19284           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19285 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19286         fi
19287         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288       fi
19289     fi
19290 
19291     # Now join together the path and the arguments once again
19292     if test "x$arguments" != xEOL; then
19293       new_complete="$new_path ${arguments% *}"
19294     else
19295       new_complete="$new_path"
19296     fi
19297 
19298     if test "x$complete" != "x$new_complete"; then
19299       FOUND_MAKE="$new_complete"
19300       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19301 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19302     fi
19303   fi
19304 
19305         fi
19306       fi
19307     fi
19308   fi
19309 
19310         if test "x$FOUND_MAKE" = x; then
19311           for ac_prog in make
19312 do
19313   # Extract the first word of "$ac_prog", so it can be a program name with args.
19314 set dummy $ac_prog; ac_word=$2
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19316 $as_echo_n "checking for $ac_word... " >&6; }
19317 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19318   $as_echo_n "(cached) " >&6
19319 else
19320   case $CHECK_TOOLSDIR_MAKE in
19321   [\\/]* | ?:[\\/]*)
19322   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19323   ;;
19324   *)
19325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19326 for as_dir in $PATH
19327 do
19328   IFS=$as_save_IFS
19329   test -z "$as_dir" && as_dir=.
19330     for ac_exec_ext in '' $ac_executable_extensions; do
19331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19332     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19334     break 2
19335   fi
19336 done
19337   done
19338 IFS=$as_save_IFS
19339 
19340   ;;
19341 esac
19342 fi
19343 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19344 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19346 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19347 else
19348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19349 $as_echo "no" >&6; }
19350 fi
19351 
19352 
19353   test -n "$CHECK_TOOLSDIR_MAKE" && break
19354 done
19355 
19356 
19357   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19358   DESCRIPTION="make in tools-dir"
19359 
19360   # On Cygwin, we require a newer version of make than on other platforms
19361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19362     MAKE_VERSION_EXPR="-e 4\."
19363     MAKE_REQUIRED_VERSION="4.0"
19364    else
19365     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19366     MAKE_REQUIRED_VERSION="3.81"
19367   fi
19368 
19369   if test "x$MAKE_CANDIDATE" != x; then
19370     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19371 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19372     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19373     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19374     if test "x$IS_GNU_MAKE" = x; then
19375       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19376 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19377     else
19378       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19379       if test "x$IS_MODERN_MAKE" = x; then
19380         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19381 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19382       else
19383         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19384           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385             MAKE_EXPECTED_ENV='cygwin'
19386           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19387             MAKE_EXPECTED_ENV='msys'
19388           else
19389             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19390           fi
19391           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19392           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19393         else
19394           # Not relevant for non-Windows
19395           IS_MAKE_CORRECT_ENV=true
19396         fi
19397         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19398           { $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
19399 $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;}
19400         else
19401           FOUND_MAKE=$MAKE_CANDIDATE
19402 
19403   # Only process if variable expands to non-empty
19404 
19405   if test "x$FOUND_MAKE" != x; then
19406     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19407 
19408   # First separate the path from the arguments. This will split at the first
19409   # space.
19410   complete="$FOUND_MAKE"
19411   path="${complete%% *}"
19412   tmp="$complete EOL"
19413   arguments="${tmp#* }"
19414 
19415   # Input might be given as Windows format, start by converting to
19416   # unix format.
19417   new_path=`$CYGPATH -u "$path"`
19418 
19419   # Now try to locate executable using which
19420   new_path=`$WHICH "$new_path" 2> /dev/null`
19421   # bat and cmd files are not always considered executable in cygwin causing which
19422   # to not find them
19423   if test "x$new_path" = x \
19424       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19425       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19426     new_path=`$CYGPATH -u "$path"`
19427   fi
19428   if test "x$new_path" = x; then
19429     # Oops. Which didn't find the executable.
19430     # The splitting of arguments from the executable at a space might have been incorrect,
19431     # since paths with space are more likely in Windows. Give it another try with the whole
19432     # argument.
19433     path="$complete"
19434     arguments="EOL"
19435     new_path=`$CYGPATH -u "$path"`
19436     new_path=`$WHICH "$new_path" 2> /dev/null`
19437     # bat and cmd files are not always considered executable in cygwin causing which
19438     # to not find them
19439     if test "x$new_path" = x \
19440         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19441         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19442       new_path=`$CYGPATH -u "$path"`
19443     fi
19444     if test "x$new_path" = x; then
19445       # It's still not found. Now this is an unrecoverable error.
19446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19447 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19448       has_space=`$ECHO "$complete" | $GREP " "`
19449       if test "x$has_space" != x; then
19450         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19451 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19452       fi
19453       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19454     fi
19455   fi
19456 
19457   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19458   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19459   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19460   # "foo.exe" is OK but "foo" is an error.
19461   #
19462   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19463   # It is also a way to make sure we got the proper file name for the real test later on.
19464   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19465   if test "x$test_shortpath" = x; then
19466     # Short path failed, file does not exist as specified.
19467     # Try adding .exe or .cmd
19468     if test -f "${new_path}.exe"; then
19469       input_to_shortpath="${new_path}.exe"
19470     elif test -f "${new_path}.cmd"; then
19471       input_to_shortpath="${new_path}.cmd"
19472     else
19473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19474 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19475       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19476 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19477       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19478     fi
19479   else
19480     input_to_shortpath="$new_path"
19481   fi
19482 
19483   # Call helper function which possibly converts this using DOS-style short mode.
19484   # If so, the updated path is stored in $new_path.
19485   new_path="$input_to_shortpath"
19486 
19487   input_path="$input_to_shortpath"
19488   # Check if we need to convert this using DOS-style short mode. If the path
19489   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19490   # take no chances and rewrite it.
19491   # Note: m4 eats our [], so we need to use [ and ] instead.
19492   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19493   if test "x$has_forbidden_chars" != x; then
19494     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19495     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19496     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19497     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19498       # Going to short mode and back again did indeed matter. Since short mode is
19499       # case insensitive, let's make it lowercase to improve readability.
19500       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19501       # Now convert it back to Unix-style (cygpath)
19502       input_path=`$CYGPATH -u "$shortmode_path"`
19503       new_path="$input_path"
19504     fi
19505   fi
19506 
19507   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19508   if test "x$test_cygdrive_prefix" = x; then
19509     # As a simple fix, exclude /usr/bin since it's not a real path.
19510     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19511       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19512       # a path prefixed by /cygdrive for fixpath to work.
19513       new_path="$CYGWIN_ROOT_PATH$input_path"
19514     fi
19515   fi
19516 
19517   # remove trailing .exe if any
19518   new_path="${new_path/%.exe/}"
19519 
19520     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19521 
19522   # First separate the path from the arguments. This will split at the first
19523   # space.
19524   complete="$FOUND_MAKE"
19525   path="${complete%% *}"
19526   tmp="$complete EOL"
19527   arguments="${tmp#* }"
19528 
19529   # Input might be given as Windows format, start by converting to
19530   # unix format.
19531   new_path="$path"
19532 
19533   windows_path="$new_path"
19534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19535     unix_path=`$CYGPATH -u "$windows_path"`
19536     new_path="$unix_path"
19537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19539     new_path="$unix_path"
19540   fi
19541 
19542 
19543   # Now try to locate executable using which
19544   new_path=`$WHICH "$new_path" 2> /dev/null`
19545 
19546   if test "x$new_path" = x; then
19547     # Oops. Which didn't find the executable.
19548     # The splitting of arguments from the executable at a space might have been incorrect,
19549     # since paths with space are more likely in Windows. Give it another try with the whole
19550     # argument.
19551     path="$complete"
19552     arguments="EOL"
19553     new_path="$path"
19554 
19555   windows_path="$new_path"
19556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19557     unix_path=`$CYGPATH -u "$windows_path"`
19558     new_path="$unix_path"
19559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19561     new_path="$unix_path"
19562   fi
19563 
19564 
19565     new_path=`$WHICH "$new_path" 2> /dev/null`
19566     # bat and cmd files are not always considered executable in MSYS causing which
19567     # to not find them
19568     if test "x$new_path" = x \
19569         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19570         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19571       new_path="$path"
19572 
19573   windows_path="$new_path"
19574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575     unix_path=`$CYGPATH -u "$windows_path"`
19576     new_path="$unix_path"
19577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19579     new_path="$unix_path"
19580   fi
19581 
19582     fi
19583 
19584     if test "x$new_path" = x; then
19585       # It's still not found. Now this is an unrecoverable error.
19586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19587 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19588       has_space=`$ECHO "$complete" | $GREP " "`
19589       if test "x$has_space" != x; then
19590         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19592       fi
19593       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19594     fi
19595   fi
19596 
19597   # Now new_path has a complete unix path to the binary
19598   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19599     # Keep paths in /bin as-is, but remove trailing .exe if any
19600     new_path="${new_path/%.exe/}"
19601     # Do not save /bin paths to all_fixpath_prefixes!
19602   else
19603     # Not in mixed or Windows style, start by that.
19604     new_path=`cmd //c echo $new_path`
19605 
19606   input_path="$new_path"
19607   # Check if we need to convert this using DOS-style short mode. If the path
19608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19609   # take no chances and rewrite it.
19610   # Note: m4 eats our [], so we need to use [ and ] instead.
19611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19612   if test "x$has_forbidden_chars" != x; then
19613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19614     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19615   fi
19616 
19617     # Output is in $new_path
19618 
19619   windows_path="$new_path"
19620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19621     unix_path=`$CYGPATH -u "$windows_path"`
19622     new_path="$unix_path"
19623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19625     new_path="$unix_path"
19626   fi
19627 
19628     # remove trailing .exe if any
19629     new_path="${new_path/%.exe/}"
19630 
19631     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19632     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19633   fi
19634 
19635     else
19636       # We're on a unix platform. Hooray! :)
19637       # First separate the path from the arguments. This will split at the first
19638       # space.
19639       complete="$FOUND_MAKE"
19640       path="${complete%% *}"
19641       tmp="$complete EOL"
19642       arguments="${tmp#* }"
19643 
19644       # Cannot rely on the command "which" here since it doesn't always work.
19645       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19646       if test -z "$is_absolute_path"; then
19647         # Path to executable is not absolute. Find it.
19648         IFS_save="$IFS"
19649         IFS=:
19650         for p in $PATH; do
19651           if test -f "$p/$path" && test -x "$p/$path"; then
19652             new_path="$p/$path"
19653             break
19654           fi
19655         done
19656         IFS="$IFS_save"
19657       else
19658         # This is an absolute path, we can use it without further modifications.
19659         new_path="$path"
19660       fi
19661 
19662       if test "x$new_path" = x; then
19663         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19664 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19665         has_space=`$ECHO "$complete" | $GREP " "`
19666         if test "x$has_space" != x; then
19667           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19668 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19669         fi
19670         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19671       fi
19672     fi
19673 
19674     # Now join together the path and the arguments once again
19675     if test "x$arguments" != xEOL; then
19676       new_complete="$new_path ${arguments% *}"
19677     else
19678       new_complete="$new_path"
19679     fi
19680 
19681     if test "x$complete" != "x$new_complete"; then
19682       FOUND_MAKE="$new_complete"
19683       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19684 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19685     fi
19686   fi
19687 
19688         fi
19689       fi
19690     fi
19691   fi
19692 
19693         fi
19694         PATH=$OLD_PATH
19695       fi
19696     fi
19697 
19698     if test "x$FOUND_MAKE" = x; then
19699       as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19700     fi
19701 
19702     else
19703       # If it succeeded, then it was overridden by the user. We will use it
19704       # for the tool.
19705 
19706       # First remove it from the list of overridden variables, so we can test
19707       # for unknown variables in the end.
19708       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19709 
19710       # Check if we try to supply an empty value
19711       if test "x$MAKE" = x; then
19712         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19713 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19714         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19715 $as_echo_n "checking for MAKE... " >&6; }
19716         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19717 $as_echo "disabled" >&6; }
19718       else
19719         # Check if the provided tool contains a complete path.
19720         tool_specified="$MAKE"
19721         tool_basename="${tool_specified##*/}"
19722         if test "x$tool_basename" = "x$tool_specified"; then
19723           # A command without a complete path is provided, search $PATH.
19724           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19725 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19726           # Extract the first word of "$tool_basename", so it can be a program name with args.
19727 set dummy $tool_basename; ac_word=$2
19728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19729 $as_echo_n "checking for $ac_word... " >&6; }
19730 if ${ac_cv_path_MAKE+:} false; then :
19731   $as_echo_n "(cached) " >&6
19732 else
19733   case $MAKE in
19734   [\\/]* | ?:[\\/]*)
19735   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19736   ;;
19737   *)
19738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19739 for as_dir in $PATH
19740 do
19741   IFS=$as_save_IFS
19742   test -z "$as_dir" && as_dir=.
19743     for ac_exec_ext in '' $ac_executable_extensions; do
19744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19745     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19747     break 2
19748   fi
19749 done
19750   done
19751 IFS=$as_save_IFS
19752 
19753   ;;
19754 esac
19755 fi
19756 MAKE=$ac_cv_path_MAKE
19757 if test -n "$MAKE"; then
19758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19759 $as_echo "$MAKE" >&6; }
19760 else
19761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19762 $as_echo "no" >&6; }
19763 fi
19764 
19765 
19766           if test "x$MAKE" = x; then
19767             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19768           fi
19769         else
19770           # Otherwise we believe it is a complete path. Use it as it is.
19771           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19772 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19773           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19774 $as_echo_n "checking for MAKE... " >&6; }
19775           if test ! -x "$tool_specified"; then
19776             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19777 $as_echo "not found" >&6; }
19778             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19779           fi
19780           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19781 $as_echo "$tool_specified" >&6; }
19782         fi
19783       fi
19784     fi
19785 
19786     # If MAKE was set by user, verify the version
19787 
19788   MAKE_CANDIDATE=""$MAKE""
19789   DESCRIPTION="user supplied MAKE=$MAKE"
19790 
19791   # On Cygwin, we require a newer version of make than on other platforms
19792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19793     MAKE_VERSION_EXPR="-e 4\."
19794     MAKE_REQUIRED_VERSION="4.0"
19795    else
19796     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19797     MAKE_REQUIRED_VERSION="3.81"
19798   fi
19799 
19800   if test "x$MAKE_CANDIDATE" != x; then
19801     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19802 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19803     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19804     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19805     if test "x$IS_GNU_MAKE" = x; then
19806       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19807 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19808     else
19809       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19810       if test "x$IS_MODERN_MAKE" = x; then
19811         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19812 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19813       else
19814         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19815           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19816             MAKE_EXPECTED_ENV='cygwin'
19817           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19818             MAKE_EXPECTED_ENV='msys'
19819           else
19820             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19821           fi
19822           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19823           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19824         else
19825           # Not relevant for non-Windows
19826           IS_MAKE_CORRECT_ENV=true
19827         fi
19828         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19829           { $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
19830 $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;}
19831         else
19832           FOUND_MAKE=$MAKE_CANDIDATE
19833 
19834   # Only process if variable expands to non-empty
19835 
19836   if test "x$FOUND_MAKE" != x; then
19837     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19838 
19839   # First separate the path from the arguments. This will split at the first
19840   # space.
19841   complete="$FOUND_MAKE"
19842   path="${complete%% *}"
19843   tmp="$complete EOL"
19844   arguments="${tmp#* }"
19845 
19846   # Input might be given as Windows format, start by converting to
19847   # unix format.
19848   new_path=`$CYGPATH -u "$path"`
19849 
19850   # Now try to locate executable using which
19851   new_path=`$WHICH "$new_path" 2> /dev/null`
19852   # bat and cmd files are not always considered executable in cygwin causing which
19853   # to not find them
19854   if test "x$new_path" = x \
19855       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19856       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19857     new_path=`$CYGPATH -u "$path"`
19858   fi
19859   if test "x$new_path" = x; then
19860     # Oops. Which didn't find the executable.
19861     # The splitting of arguments from the executable at a space might have been incorrect,
19862     # since paths with space are more likely in Windows. Give it another try with the whole
19863     # argument.
19864     path="$complete"
19865     arguments="EOL"
19866     new_path=`$CYGPATH -u "$path"`
19867     new_path=`$WHICH "$new_path" 2> /dev/null`
19868     # bat and cmd files are not always considered executable in cygwin causing which
19869     # to not find them
19870     if test "x$new_path" = x \
19871         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19872         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19873       new_path=`$CYGPATH -u "$path"`
19874     fi
19875     if test "x$new_path" = x; then
19876       # It's still not found. Now this is an unrecoverable error.
19877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19878 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19879       has_space=`$ECHO "$complete" | $GREP " "`
19880       if test "x$has_space" != x; then
19881         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19882 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19883       fi
19884       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19885     fi
19886   fi
19887 
19888   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19889   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19890   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19891   # "foo.exe" is OK but "foo" is an error.
19892   #
19893   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19894   # It is also a way to make sure we got the proper file name for the real test later on.
19895   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19896   if test "x$test_shortpath" = x; then
19897     # Short path failed, file does not exist as specified.
19898     # Try adding .exe or .cmd
19899     if test -f "${new_path}.exe"; then
19900       input_to_shortpath="${new_path}.exe"
19901     elif test -f "${new_path}.cmd"; then
19902       input_to_shortpath="${new_path}.cmd"
19903     else
19904       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19905 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19906       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19907 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19908       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19909     fi
19910   else
19911     input_to_shortpath="$new_path"
19912   fi
19913 
19914   # Call helper function which possibly converts this using DOS-style short mode.
19915   # If so, the updated path is stored in $new_path.
19916   new_path="$input_to_shortpath"
19917 
19918   input_path="$input_to_shortpath"
19919   # Check if we need to convert this using DOS-style short mode. If the path
19920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19921   # take no chances and rewrite it.
19922   # Note: m4 eats our [], so we need to use [ and ] instead.
19923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19924   if test "x$has_forbidden_chars" != x; then
19925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19926     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19927     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19928     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19929       # Going to short mode and back again did indeed matter. Since short mode is
19930       # case insensitive, let's make it lowercase to improve readability.
19931       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19932       # Now convert it back to Unix-style (cygpath)
19933       input_path=`$CYGPATH -u "$shortmode_path"`
19934       new_path="$input_path"
19935     fi
19936   fi
19937 
19938   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19939   if test "x$test_cygdrive_prefix" = x; then
19940     # As a simple fix, exclude /usr/bin since it's not a real path.
19941     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19942       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19943       # a path prefixed by /cygdrive for fixpath to work.
19944       new_path="$CYGWIN_ROOT_PATH$input_path"
19945     fi
19946   fi
19947 
19948   # remove trailing .exe if any
19949   new_path="${new_path/%.exe/}"
19950 
19951     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952 
19953   # First separate the path from the arguments. This will split at the first
19954   # space.
19955   complete="$FOUND_MAKE"
19956   path="${complete%% *}"
19957   tmp="$complete EOL"
19958   arguments="${tmp#* }"
19959 
19960   # Input might be given as Windows format, start by converting to
19961   # unix format.
19962   new_path="$path"
19963 
19964   windows_path="$new_path"
19965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966     unix_path=`$CYGPATH -u "$windows_path"`
19967     new_path="$unix_path"
19968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19970     new_path="$unix_path"
19971   fi
19972 
19973 
19974   # Now try to locate executable using which
19975   new_path=`$WHICH "$new_path" 2> /dev/null`
19976 
19977   if test "x$new_path" = x; then
19978     # Oops. Which didn't find the executable.
19979     # The splitting of arguments from the executable at a space might have been incorrect,
19980     # since paths with space are more likely in Windows. Give it another try with the whole
19981     # argument.
19982     path="$complete"
19983     arguments="EOL"
19984     new_path="$path"
19985 
19986   windows_path="$new_path"
19987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988     unix_path=`$CYGPATH -u "$windows_path"`
19989     new_path="$unix_path"
19990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19992     new_path="$unix_path"
19993   fi
19994 
19995 
19996     new_path=`$WHICH "$new_path" 2> /dev/null`
19997     # bat and cmd files are not always considered executable in MSYS causing which
19998     # to not find them
19999     if test "x$new_path" = x \
20000         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20001         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20002       new_path="$path"
20003 
20004   windows_path="$new_path"
20005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20006     unix_path=`$CYGPATH -u "$windows_path"`
20007     new_path="$unix_path"
20008   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20009     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20010     new_path="$unix_path"
20011   fi
20012 
20013     fi
20014 
20015     if test "x$new_path" = x; then
20016       # It's still not found. Now this is an unrecoverable error.
20017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20018 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20019       has_space=`$ECHO "$complete" | $GREP " "`
20020       if test "x$has_space" != x; then
20021         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20022 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20023       fi
20024       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20025     fi
20026   fi
20027 
20028   # Now new_path has a complete unix path to the binary
20029   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20030     # Keep paths in /bin as-is, but remove trailing .exe if any
20031     new_path="${new_path/%.exe/}"
20032     # Do not save /bin paths to all_fixpath_prefixes!
20033   else
20034     # Not in mixed or Windows style, start by that.
20035     new_path=`cmd //c echo $new_path`
20036 
20037   input_path="$new_path"
20038   # Check if we need to convert this using DOS-style short mode. If the path
20039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20040   # take no chances and rewrite it.
20041   # Note: m4 eats our [], so we need to use [ and ] instead.
20042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20043   if test "x$has_forbidden_chars" != x; then
20044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20045     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20046   fi
20047 
20048     # Output is in $new_path
20049 
20050   windows_path="$new_path"
20051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20052     unix_path=`$CYGPATH -u "$windows_path"`
20053     new_path="$unix_path"
20054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20056     new_path="$unix_path"
20057   fi
20058 
20059     # remove trailing .exe if any
20060     new_path="${new_path/%.exe/}"
20061 
20062     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20063     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20064   fi
20065 
20066     else
20067       # We're on a unix platform. Hooray! :)
20068       # First separate the path from the arguments. This will split at the first
20069       # space.
20070       complete="$FOUND_MAKE"
20071       path="${complete%% *}"
20072       tmp="$complete EOL"
20073       arguments="${tmp#* }"
20074 
20075       # Cannot rely on the command "which" here since it doesn't always work.
20076       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20077       if test -z "$is_absolute_path"; then
20078         # Path to executable is not absolute. Find it.
20079         IFS_save="$IFS"
20080         IFS=:
20081         for p in $PATH; do
20082           if test -f "$p/$path" && test -x "$p/$path"; then
20083             new_path="$p/$path"
20084             break
20085           fi
20086         done
20087         IFS="$IFS_save"
20088       else
20089         # This is an absolute path, we can use it without further modifications.
20090         new_path="$path"
20091       fi
20092 
20093       if test "x$new_path" = x; then
20094         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20095 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20096         has_space=`$ECHO "$complete" | $GREP " "`
20097         if test "x$has_space" != x; then
20098           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20099 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20100         fi
20101         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20102       fi
20103     fi
20104 
20105     # Now join together the path and the arguments once again
20106     if test "x$arguments" != xEOL; then
20107       new_complete="$new_path ${arguments% *}"
20108     else
20109       new_complete="$new_path"
20110     fi
20111 
20112     if test "x$complete" != "x$new_complete"; then
20113       FOUND_MAKE="$new_complete"
20114       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20115 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20116     fi
20117   fi
20118 
20119         fi
20120       fi
20121     fi
20122   fi
20123 
20124     if test "x$FOUND_MAKE" = x; then
20125       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20126     fi
20127 
20128   fi
20129 
20130 
20131   MAKE=$FOUND_MAKE
20132 
20133   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20134 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20135 
20136 
20137   # Check if make supports the output sync option and if so, setup using it.
20138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20139 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20140   if $MAKE --version -O > /dev/null 2>&1; then
20141     OUTPUT_SYNC_SUPPORTED=true
20142     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20143 $as_echo "yes" >&6; }
20144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20145 $as_echo_n "checking for output-sync value... " >&6; }
20146 
20147 # Check whether --with-output-sync was given.
20148 if test "${with_output_sync+set}" = set; then :
20149   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20150 fi
20151 
20152     if test "x$OUTPUT_SYNC" = "x"; then
20153       OUTPUT_SYNC=none
20154     fi
20155     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20156 $as_echo "$OUTPUT_SYNC" >&6; }
20157     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20158       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20159     fi
20160   else
20161     OUTPUT_SYNC_SUPPORTED=false
20162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20163 $as_echo "no" >&6; }
20164   fi
20165 
20166 
20167 
20168 
20169 
20170 
20171   # Test if find supports -delete
20172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20173 $as_echo_n "checking if find supports -delete... " >&6; }
20174   FIND_DELETE="-delete"
20175 
20176   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20177 
20178   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20179 
20180   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20181   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20182     # No, it does not.
20183     rm $DELETEDIR/TestIfFindSupportsDelete
20184     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20185       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20186       FIND_DELETE="-print | xargs rm"
20187     else
20188       FIND_DELETE="-exec rm \{\} \+"
20189     fi
20190     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20191 $as_echo "no" >&6; }
20192   else
20193     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20194 $as_echo "yes" >&6; }
20195   fi
20196   rmdir $DELETEDIR
20197 
20198 
20199 
20200   # These tools might not be installed by default,
20201   # need hint on how to install them.
20202 
20203 
20204 
20205   # Publish this variable in the help.
20206 
20207 
20208   if [ -z "${UNZIP+x}" ]; then
20209     # The variable is not set by user, try to locate tool using the code snippet
20210     for ac_prog in unzip
20211 do
20212   # Extract the first word of "$ac_prog", so it can be a program name with args.
20213 set dummy $ac_prog; ac_word=$2
20214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20215 $as_echo_n "checking for $ac_word... " >&6; }
20216 if ${ac_cv_path_UNZIP+:} false; then :
20217   $as_echo_n "(cached) " >&6
20218 else
20219   case $UNZIP in
20220   [\\/]* | ?:[\\/]*)
20221   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20222   ;;
20223   *)
20224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20225 for as_dir in $PATH
20226 do
20227   IFS=$as_save_IFS
20228   test -z "$as_dir" && as_dir=.
20229     for ac_exec_ext in '' $ac_executable_extensions; do
20230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20231     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20233     break 2
20234   fi
20235 done
20236   done
20237 IFS=$as_save_IFS
20238 
20239   ;;
20240 esac
20241 fi
20242 UNZIP=$ac_cv_path_UNZIP
20243 if test -n "$UNZIP"; then
20244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20245 $as_echo "$UNZIP" >&6; }
20246 else
20247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20248 $as_echo "no" >&6; }
20249 fi
20250 
20251 
20252   test -n "$UNZIP" && break
20253 done
20254 
20255   else
20256     # The variable is set, but is it from the command line or the environment?
20257 
20258     # Try to remove the string !UNZIP! from our list.
20259     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20260     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20261       # If it failed, the variable was not from the command line. Ignore it,
20262       # but warn the user (except for BASH, which is always set by the calling BASH).
20263       if test "xUNZIP" != xBASH; then
20264         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20265 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20266       fi
20267       # Try to locate tool using the code snippet
20268       for ac_prog in unzip
20269 do
20270   # Extract the first word of "$ac_prog", so it can be a program name with args.
20271 set dummy $ac_prog; ac_word=$2
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20273 $as_echo_n "checking for $ac_word... " >&6; }
20274 if ${ac_cv_path_UNZIP+:} false; then :
20275   $as_echo_n "(cached) " >&6
20276 else
20277   case $UNZIP in
20278   [\\/]* | ?:[\\/]*)
20279   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20280   ;;
20281   *)
20282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20283 for as_dir in $PATH
20284 do
20285   IFS=$as_save_IFS
20286   test -z "$as_dir" && as_dir=.
20287     for ac_exec_ext in '' $ac_executable_extensions; do
20288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20289     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20291     break 2
20292   fi
20293 done
20294   done
20295 IFS=$as_save_IFS
20296 
20297   ;;
20298 esac
20299 fi
20300 UNZIP=$ac_cv_path_UNZIP
20301 if test -n "$UNZIP"; then
20302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20303 $as_echo "$UNZIP" >&6; }
20304 else
20305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20306 $as_echo "no" >&6; }
20307 fi
20308 
20309 
20310   test -n "$UNZIP" && break
20311 done
20312 
20313     else
20314       # If it succeeded, then it was overridden by the user. We will use it
20315       # for the tool.
20316 
20317       # First remove it from the list of overridden variables, so we can test
20318       # for unknown variables in the end.
20319       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20320 
20321       # Check if we try to supply an empty value
20322       if test "x$UNZIP" = x; then
20323         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20324 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20325         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20326 $as_echo_n "checking for UNZIP... " >&6; }
20327         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20328 $as_echo "disabled" >&6; }
20329       else
20330         # Check if the provided tool contains a complete path.
20331         tool_specified="$UNZIP"
20332         tool_basename="${tool_specified##*/}"
20333         if test "x$tool_basename" = "x$tool_specified"; then
20334           # A command without a complete path is provided, search $PATH.
20335           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20336 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20337           # Extract the first word of "$tool_basename", so it can be a program name with args.
20338 set dummy $tool_basename; ac_word=$2
20339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20340 $as_echo_n "checking for $ac_word... " >&6; }
20341 if ${ac_cv_path_UNZIP+:} false; then :
20342   $as_echo_n "(cached) " >&6
20343 else
20344   case $UNZIP in
20345   [\\/]* | ?:[\\/]*)
20346   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20347   ;;
20348   *)
20349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20350 for as_dir in $PATH
20351 do
20352   IFS=$as_save_IFS
20353   test -z "$as_dir" && as_dir=.
20354     for ac_exec_ext in '' $ac_executable_extensions; do
20355   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20356     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20358     break 2
20359   fi
20360 done
20361   done
20362 IFS=$as_save_IFS
20363 
20364   ;;
20365 esac
20366 fi
20367 UNZIP=$ac_cv_path_UNZIP
20368 if test -n "$UNZIP"; then
20369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20370 $as_echo "$UNZIP" >&6; }
20371 else
20372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20373 $as_echo "no" >&6; }
20374 fi
20375 
20376 
20377           if test "x$UNZIP" = x; then
20378             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20379           fi
20380         else
20381           # Otherwise we believe it is a complete path. Use it as it is.
20382           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20383 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20384           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20385 $as_echo_n "checking for UNZIP... " >&6; }
20386           if test ! -x "$tool_specified"; then
20387             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20388 $as_echo "not found" >&6; }
20389             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20390           fi
20391           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20392 $as_echo "$tool_specified" >&6; }
20393         fi
20394       fi
20395     fi
20396 
20397   fi
20398 
20399 
20400 
20401   if test "x$UNZIP" = x; then
20402     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20403   fi
20404 
20405 
20406 
20407 
20408 
20409   # Publish this variable in the help.
20410 
20411 
20412   if [ -z "${ZIP+x}" ]; then
20413     # The variable is not set by user, try to locate tool using the code snippet
20414     for ac_prog in zip
20415 do
20416   # Extract the first word of "$ac_prog", so it can be a program name with args.
20417 set dummy $ac_prog; ac_word=$2
20418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20419 $as_echo_n "checking for $ac_word... " >&6; }
20420 if ${ac_cv_path_ZIP+:} false; then :
20421   $as_echo_n "(cached) " >&6
20422 else
20423   case $ZIP in
20424   [\\/]* | ?:[\\/]*)
20425   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20426   ;;
20427   *)
20428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20429 for as_dir in $PATH
20430 do
20431   IFS=$as_save_IFS
20432   test -z "$as_dir" && as_dir=.
20433     for ac_exec_ext in '' $ac_executable_extensions; do
20434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20435     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20437     break 2
20438   fi
20439 done
20440   done
20441 IFS=$as_save_IFS
20442 
20443   ;;
20444 esac
20445 fi
20446 ZIP=$ac_cv_path_ZIP
20447 if test -n "$ZIP"; then
20448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20449 $as_echo "$ZIP" >&6; }
20450 else
20451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20452 $as_echo "no" >&6; }
20453 fi
20454 
20455 
20456   test -n "$ZIP" && break
20457 done
20458 
20459   else
20460     # The variable is set, but is it from the command line or the environment?
20461 
20462     # Try to remove the string !ZIP! from our list.
20463     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20464     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20465       # If it failed, the variable was not from the command line. Ignore it,
20466       # but warn the user (except for BASH, which is always set by the calling BASH).
20467       if test "xZIP" != xBASH; then
20468         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20469 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20470       fi
20471       # Try to locate tool using the code snippet
20472       for ac_prog in zip
20473 do
20474   # Extract the first word of "$ac_prog", so it can be a program name with args.
20475 set dummy $ac_prog; ac_word=$2
20476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20477 $as_echo_n "checking for $ac_word... " >&6; }
20478 if ${ac_cv_path_ZIP+:} false; then :
20479   $as_echo_n "(cached) " >&6
20480 else
20481   case $ZIP in
20482   [\\/]* | ?:[\\/]*)
20483   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20484   ;;
20485   *)
20486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20487 for as_dir in $PATH
20488 do
20489   IFS=$as_save_IFS
20490   test -z "$as_dir" && as_dir=.
20491     for ac_exec_ext in '' $ac_executable_extensions; do
20492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20493     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20495     break 2
20496   fi
20497 done
20498   done
20499 IFS=$as_save_IFS
20500 
20501   ;;
20502 esac
20503 fi
20504 ZIP=$ac_cv_path_ZIP
20505 if test -n "$ZIP"; then
20506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20507 $as_echo "$ZIP" >&6; }
20508 else
20509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20510 $as_echo "no" >&6; }
20511 fi
20512 
20513 
20514   test -n "$ZIP" && break
20515 done
20516 
20517     else
20518       # If it succeeded, then it was overridden by the user. We will use it
20519       # for the tool.
20520 
20521       # First remove it from the list of overridden variables, so we can test
20522       # for unknown variables in the end.
20523       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20524 
20525       # Check if we try to supply an empty value
20526       if test "x$ZIP" = x; then
20527         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20528 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20529         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20530 $as_echo_n "checking for ZIP... " >&6; }
20531         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20532 $as_echo "disabled" >&6; }
20533       else
20534         # Check if the provided tool contains a complete path.
20535         tool_specified="$ZIP"
20536         tool_basename="${tool_specified##*/}"
20537         if test "x$tool_basename" = "x$tool_specified"; then
20538           # A command without a complete path is provided, search $PATH.
20539           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20540 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20541           # Extract the first word of "$tool_basename", so it can be a program name with args.
20542 set dummy $tool_basename; ac_word=$2
20543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20544 $as_echo_n "checking for $ac_word... " >&6; }
20545 if ${ac_cv_path_ZIP+:} false; then :
20546   $as_echo_n "(cached) " >&6
20547 else
20548   case $ZIP in
20549   [\\/]* | ?:[\\/]*)
20550   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20551   ;;
20552   *)
20553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20554 for as_dir in $PATH
20555 do
20556   IFS=$as_save_IFS
20557   test -z "$as_dir" && as_dir=.
20558     for ac_exec_ext in '' $ac_executable_extensions; do
20559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20560     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20562     break 2
20563   fi
20564 done
20565   done
20566 IFS=$as_save_IFS
20567 
20568   ;;
20569 esac
20570 fi
20571 ZIP=$ac_cv_path_ZIP
20572 if test -n "$ZIP"; then
20573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20574 $as_echo "$ZIP" >&6; }
20575 else
20576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20577 $as_echo "no" >&6; }
20578 fi
20579 
20580 
20581           if test "x$ZIP" = x; then
20582             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20583           fi
20584         else
20585           # Otherwise we believe it is a complete path. Use it as it is.
20586           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20587 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20588           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20589 $as_echo_n "checking for ZIP... " >&6; }
20590           if test ! -x "$tool_specified"; then
20591             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20592 $as_echo "not found" >&6; }
20593             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20594           fi
20595           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20596 $as_echo "$tool_specified" >&6; }
20597         fi
20598       fi
20599     fi
20600 
20601   fi
20602 
20603 
20604 
20605   if test "x$ZIP" = x; then
20606     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20607   fi
20608 
20609 
20610 
20611   # Non-required basic tools
20612 
20613 
20614 
20615   # Publish this variable in the help.
20616 
20617 
20618   if [ -z "${LDD+x}" ]; then
20619     # The variable is not set by user, try to locate tool using the code snippet
20620     for ac_prog in ldd
20621 do
20622   # Extract the first word of "$ac_prog", so it can be a program name with args.
20623 set dummy $ac_prog; ac_word=$2
20624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20625 $as_echo_n "checking for $ac_word... " >&6; }
20626 if ${ac_cv_path_LDD+:} false; then :
20627   $as_echo_n "(cached) " >&6
20628 else
20629   case $LDD in
20630   [\\/]* | ?:[\\/]*)
20631   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20632   ;;
20633   *)
20634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20635 for as_dir in $PATH
20636 do
20637   IFS=$as_save_IFS
20638   test -z "$as_dir" && as_dir=.
20639     for ac_exec_ext in '' $ac_executable_extensions; do
20640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20641     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20643     break 2
20644   fi
20645 done
20646   done
20647 IFS=$as_save_IFS
20648 
20649   ;;
20650 esac
20651 fi
20652 LDD=$ac_cv_path_LDD
20653 if test -n "$LDD"; then
20654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20655 $as_echo "$LDD" >&6; }
20656 else
20657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20658 $as_echo "no" >&6; }
20659 fi
20660 
20661 
20662   test -n "$LDD" && break
20663 done
20664 
20665   else
20666     # The variable is set, but is it from the command line or the environment?
20667 
20668     # Try to remove the string !LDD! from our list.
20669     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20670     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20671       # If it failed, the variable was not from the command line. Ignore it,
20672       # but warn the user (except for BASH, which is always set by the calling BASH).
20673       if test "xLDD" != xBASH; then
20674         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20675 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20676       fi
20677       # Try to locate tool using the code snippet
20678       for ac_prog in ldd
20679 do
20680   # Extract the first word of "$ac_prog", so it can be a program name with args.
20681 set dummy $ac_prog; ac_word=$2
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20683 $as_echo_n "checking for $ac_word... " >&6; }
20684 if ${ac_cv_path_LDD+:} false; then :
20685   $as_echo_n "(cached) " >&6
20686 else
20687   case $LDD in
20688   [\\/]* | ?:[\\/]*)
20689   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20690   ;;
20691   *)
20692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20693 for as_dir in $PATH
20694 do
20695   IFS=$as_save_IFS
20696   test -z "$as_dir" && as_dir=.
20697     for ac_exec_ext in '' $ac_executable_extensions; do
20698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20699     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20701     break 2
20702   fi
20703 done
20704   done
20705 IFS=$as_save_IFS
20706 
20707   ;;
20708 esac
20709 fi
20710 LDD=$ac_cv_path_LDD
20711 if test -n "$LDD"; then
20712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20713 $as_echo "$LDD" >&6; }
20714 else
20715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20716 $as_echo "no" >&6; }
20717 fi
20718 
20719 
20720   test -n "$LDD" && break
20721 done
20722 
20723     else
20724       # If it succeeded, then it was overridden by the user. We will use it
20725       # for the tool.
20726 
20727       # First remove it from the list of overridden variables, so we can test
20728       # for unknown variables in the end.
20729       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20730 
20731       # Check if we try to supply an empty value
20732       if test "x$LDD" = x; then
20733         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20734 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20736 $as_echo_n "checking for LDD... " >&6; }
20737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20738 $as_echo "disabled" >&6; }
20739       else
20740         # Check if the provided tool contains a complete path.
20741         tool_specified="$LDD"
20742         tool_basename="${tool_specified##*/}"
20743         if test "x$tool_basename" = "x$tool_specified"; then
20744           # A command without a complete path is provided, search $PATH.
20745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20746 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20747           # Extract the first word of "$tool_basename", so it can be a program name with args.
20748 set dummy $tool_basename; ac_word=$2
20749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20750 $as_echo_n "checking for $ac_word... " >&6; }
20751 if ${ac_cv_path_LDD+:} false; then :
20752   $as_echo_n "(cached) " >&6
20753 else
20754   case $LDD in
20755   [\\/]* | ?:[\\/]*)
20756   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20757   ;;
20758   *)
20759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20760 for as_dir in $PATH
20761 do
20762   IFS=$as_save_IFS
20763   test -z "$as_dir" && as_dir=.
20764     for ac_exec_ext in '' $ac_executable_extensions; do
20765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20766     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20768     break 2
20769   fi
20770 done
20771   done
20772 IFS=$as_save_IFS
20773 
20774   ;;
20775 esac
20776 fi
20777 LDD=$ac_cv_path_LDD
20778 if test -n "$LDD"; then
20779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20780 $as_echo "$LDD" >&6; }
20781 else
20782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20783 $as_echo "no" >&6; }
20784 fi
20785 
20786 
20787           if test "x$LDD" = x; then
20788             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20789           fi
20790         else
20791           # Otherwise we believe it is a complete path. Use it as it is.
20792           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20793 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20794           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20795 $as_echo_n "checking for LDD... " >&6; }
20796           if test ! -x "$tool_specified"; then
20797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20798 $as_echo "not found" >&6; }
20799             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20800           fi
20801           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20802 $as_echo "$tool_specified" >&6; }
20803         fi
20804       fi
20805     fi
20806 
20807   fi
20808 
20809 
20810   if test "x$LDD" = "x"; then
20811     # List shared lib dependencies is used for
20812     # debug output and checking for forbidden dependencies.
20813     # We can build without it.
20814     LDD="true"
20815   fi
20816 
20817 
20818   # Publish this variable in the help.
20819 
20820 
20821   if [ -z "${OTOOL+x}" ]; then
20822     # The variable is not set by user, try to locate tool using the code snippet
20823     for ac_prog in otool
20824 do
20825   # Extract the first word of "$ac_prog", so it can be a program name with args.
20826 set dummy $ac_prog; ac_word=$2
20827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20828 $as_echo_n "checking for $ac_word... " >&6; }
20829 if ${ac_cv_path_OTOOL+:} false; then :
20830   $as_echo_n "(cached) " >&6
20831 else
20832   case $OTOOL in
20833   [\\/]* | ?:[\\/]*)
20834   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20835   ;;
20836   *)
20837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20838 for as_dir in $PATH
20839 do
20840   IFS=$as_save_IFS
20841   test -z "$as_dir" && as_dir=.
20842     for ac_exec_ext in '' $ac_executable_extensions; do
20843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20844     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20846     break 2
20847   fi
20848 done
20849   done
20850 IFS=$as_save_IFS
20851 
20852   ;;
20853 esac
20854 fi
20855 OTOOL=$ac_cv_path_OTOOL
20856 if test -n "$OTOOL"; then
20857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20858 $as_echo "$OTOOL" >&6; }
20859 else
20860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20861 $as_echo "no" >&6; }
20862 fi
20863 
20864 
20865   test -n "$OTOOL" && break
20866 done
20867 
20868   else
20869     # The variable is set, but is it from the command line or the environment?
20870 
20871     # Try to remove the string !OTOOL! from our list.
20872     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20873     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20874       # If it failed, the variable was not from the command line. Ignore it,
20875       # but warn the user (except for BASH, which is always set by the calling BASH).
20876       if test "xOTOOL" != xBASH; then
20877         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20878 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20879       fi
20880       # Try to locate tool using the code snippet
20881       for ac_prog in otool
20882 do
20883   # Extract the first word of "$ac_prog", so it can be a program name with args.
20884 set dummy $ac_prog; ac_word=$2
20885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20886 $as_echo_n "checking for $ac_word... " >&6; }
20887 if ${ac_cv_path_OTOOL+:} false; then :
20888   $as_echo_n "(cached) " >&6
20889 else
20890   case $OTOOL in
20891   [\\/]* | ?:[\\/]*)
20892   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20893   ;;
20894   *)
20895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20896 for as_dir in $PATH
20897 do
20898   IFS=$as_save_IFS
20899   test -z "$as_dir" && as_dir=.
20900     for ac_exec_ext in '' $ac_executable_extensions; do
20901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20902     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20904     break 2
20905   fi
20906 done
20907   done
20908 IFS=$as_save_IFS
20909 
20910   ;;
20911 esac
20912 fi
20913 OTOOL=$ac_cv_path_OTOOL
20914 if test -n "$OTOOL"; then
20915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20916 $as_echo "$OTOOL" >&6; }
20917 else
20918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20919 $as_echo "no" >&6; }
20920 fi
20921 
20922 
20923   test -n "$OTOOL" && break
20924 done
20925 
20926     else
20927       # If it succeeded, then it was overridden by the user. We will use it
20928       # for the tool.
20929 
20930       # First remove it from the list of overridden variables, so we can test
20931       # for unknown variables in the end.
20932       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20933 
20934       # Check if we try to supply an empty value
20935       if test "x$OTOOL" = x; then
20936         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20937 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20938         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20939 $as_echo_n "checking for OTOOL... " >&6; }
20940         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20941 $as_echo "disabled" >&6; }
20942       else
20943         # Check if the provided tool contains a complete path.
20944         tool_specified="$OTOOL"
20945         tool_basename="${tool_specified##*/}"
20946         if test "x$tool_basename" = "x$tool_specified"; then
20947           # A command without a complete path is provided, search $PATH.
20948           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20949 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20950           # Extract the first word of "$tool_basename", so it can be a program name with args.
20951 set dummy $tool_basename; ac_word=$2
20952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20953 $as_echo_n "checking for $ac_word... " >&6; }
20954 if ${ac_cv_path_OTOOL+:} false; then :
20955   $as_echo_n "(cached) " >&6
20956 else
20957   case $OTOOL in
20958   [\\/]* | ?:[\\/]*)
20959   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20960   ;;
20961   *)
20962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20963 for as_dir in $PATH
20964 do
20965   IFS=$as_save_IFS
20966   test -z "$as_dir" && as_dir=.
20967     for ac_exec_ext in '' $ac_executable_extensions; do
20968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20969     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20971     break 2
20972   fi
20973 done
20974   done
20975 IFS=$as_save_IFS
20976 
20977   ;;
20978 esac
20979 fi
20980 OTOOL=$ac_cv_path_OTOOL
20981 if test -n "$OTOOL"; then
20982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20983 $as_echo "$OTOOL" >&6; }
20984 else
20985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20986 $as_echo "no" >&6; }
20987 fi
20988 
20989 
20990           if test "x$OTOOL" = x; then
20991             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20992           fi
20993         else
20994           # Otherwise we believe it is a complete path. Use it as it is.
20995           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20996 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20997           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20998 $as_echo_n "checking for OTOOL... " >&6; }
20999           if test ! -x "$tool_specified"; then
21000             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21001 $as_echo "not found" >&6; }
21002             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21003           fi
21004           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21005 $as_echo "$tool_specified" >&6; }
21006         fi
21007       fi
21008     fi
21009 
21010   fi
21011 
21012 
21013   if test "x$OTOOL" = "x"; then
21014     OTOOL="true"
21015   fi
21016 
21017 
21018   # Publish this variable in the help.
21019 
21020 
21021   if [ -z "${READELF+x}" ]; then
21022     # The variable is not set by user, try to locate tool using the code snippet
21023     for ac_prog in greadelf readelf
21024 do
21025   # Extract the first word of "$ac_prog", so it can be a program name with args.
21026 set dummy $ac_prog; ac_word=$2
21027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21028 $as_echo_n "checking for $ac_word... " >&6; }
21029 if ${ac_cv_path_READELF+:} false; then :
21030   $as_echo_n "(cached) " >&6
21031 else
21032   case $READELF in
21033   [\\/]* | ?:[\\/]*)
21034   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21035   ;;
21036   *)
21037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21038 for as_dir in $PATH
21039 do
21040   IFS=$as_save_IFS
21041   test -z "$as_dir" && as_dir=.
21042     for ac_exec_ext in '' $ac_executable_extensions; do
21043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21044     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21046     break 2
21047   fi
21048 done
21049   done
21050 IFS=$as_save_IFS
21051 
21052   ;;
21053 esac
21054 fi
21055 READELF=$ac_cv_path_READELF
21056 if test -n "$READELF"; then
21057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21058 $as_echo "$READELF" >&6; }
21059 else
21060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21061 $as_echo "no" >&6; }
21062 fi
21063 
21064 
21065   test -n "$READELF" && break
21066 done
21067 
21068   else
21069     # The variable is set, but is it from the command line or the environment?
21070 
21071     # Try to remove the string !READELF! from our list.
21072     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21073     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21074       # If it failed, the variable was not from the command line. Ignore it,
21075       # but warn the user (except for BASH, which is always set by the calling BASH).
21076       if test "xREADELF" != xBASH; then
21077         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21078 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21079       fi
21080       # Try to locate tool using the code snippet
21081       for ac_prog in greadelf readelf
21082 do
21083   # Extract the first word of "$ac_prog", so it can be a program name with args.
21084 set dummy $ac_prog; ac_word=$2
21085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21086 $as_echo_n "checking for $ac_word... " >&6; }
21087 if ${ac_cv_path_READELF+:} false; then :
21088   $as_echo_n "(cached) " >&6
21089 else
21090   case $READELF in
21091   [\\/]* | ?:[\\/]*)
21092   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21093   ;;
21094   *)
21095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21096 for as_dir in $PATH
21097 do
21098   IFS=$as_save_IFS
21099   test -z "$as_dir" && as_dir=.
21100     for ac_exec_ext in '' $ac_executable_extensions; do
21101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21102     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21104     break 2
21105   fi
21106 done
21107   done
21108 IFS=$as_save_IFS
21109 
21110   ;;
21111 esac
21112 fi
21113 READELF=$ac_cv_path_READELF
21114 if test -n "$READELF"; then
21115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21116 $as_echo "$READELF" >&6; }
21117 else
21118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21119 $as_echo "no" >&6; }
21120 fi
21121 
21122 
21123   test -n "$READELF" && break
21124 done
21125 
21126     else
21127       # If it succeeded, then it was overridden by the user. We will use it
21128       # for the tool.
21129 
21130       # First remove it from the list of overridden variables, so we can test
21131       # for unknown variables in the end.
21132       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21133 
21134       # Check if we try to supply an empty value
21135       if test "x$READELF" = x; then
21136         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21137 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21139 $as_echo_n "checking for READELF... " >&6; }
21140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21141 $as_echo "disabled" >&6; }
21142       else
21143         # Check if the provided tool contains a complete path.
21144         tool_specified="$READELF"
21145         tool_basename="${tool_specified##*/}"
21146         if test "x$tool_basename" = "x$tool_specified"; then
21147           # A command without a complete path is provided, search $PATH.
21148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21149 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21150           # Extract the first word of "$tool_basename", so it can be a program name with args.
21151 set dummy $tool_basename; ac_word=$2
21152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21153 $as_echo_n "checking for $ac_word... " >&6; }
21154 if ${ac_cv_path_READELF+:} false; then :
21155   $as_echo_n "(cached) " >&6
21156 else
21157   case $READELF in
21158   [\\/]* | ?:[\\/]*)
21159   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21160   ;;
21161   *)
21162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21163 for as_dir in $PATH
21164 do
21165   IFS=$as_save_IFS
21166   test -z "$as_dir" && as_dir=.
21167     for ac_exec_ext in '' $ac_executable_extensions; do
21168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21169     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21171     break 2
21172   fi
21173 done
21174   done
21175 IFS=$as_save_IFS
21176 
21177   ;;
21178 esac
21179 fi
21180 READELF=$ac_cv_path_READELF
21181 if test -n "$READELF"; then
21182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21183 $as_echo "$READELF" >&6; }
21184 else
21185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21186 $as_echo "no" >&6; }
21187 fi
21188 
21189 
21190           if test "x$READELF" = x; then
21191             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21192           fi
21193         else
21194           # Otherwise we believe it is a complete path. Use it as it is.
21195           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21196 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21198 $as_echo_n "checking for READELF... " >&6; }
21199           if test ! -x "$tool_specified"; then
21200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21201 $as_echo "not found" >&6; }
21202             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21203           fi
21204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21205 $as_echo "$tool_specified" >&6; }
21206         fi
21207       fi
21208     fi
21209 
21210   fi
21211 
21212 
21213 
21214 
21215   # Publish this variable in the help.
21216 
21217 
21218   if [ -z "${HG+x}" ]; then
21219     # The variable is not set by user, try to locate tool using the code snippet
21220     for ac_prog in hg
21221 do
21222   # Extract the first word of "$ac_prog", so it can be a program name with args.
21223 set dummy $ac_prog; ac_word=$2
21224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21225 $as_echo_n "checking for $ac_word... " >&6; }
21226 if ${ac_cv_path_HG+:} false; then :
21227   $as_echo_n "(cached) " >&6
21228 else
21229   case $HG in
21230   [\\/]* | ?:[\\/]*)
21231   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21232   ;;
21233   *)
21234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21235 for as_dir in $PATH
21236 do
21237   IFS=$as_save_IFS
21238   test -z "$as_dir" && as_dir=.
21239     for ac_exec_ext in '' $ac_executable_extensions; do
21240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21241     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21243     break 2
21244   fi
21245 done
21246   done
21247 IFS=$as_save_IFS
21248 
21249   ;;
21250 esac
21251 fi
21252 HG=$ac_cv_path_HG
21253 if test -n "$HG"; then
21254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21255 $as_echo "$HG" >&6; }
21256 else
21257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21258 $as_echo "no" >&6; }
21259 fi
21260 
21261 
21262   test -n "$HG" && break
21263 done
21264 
21265   else
21266     # The variable is set, but is it from the command line or the environment?
21267 
21268     # Try to remove the string !HG! from our list.
21269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21271       # If it failed, the variable was not from the command line. Ignore it,
21272       # but warn the user (except for BASH, which is always set by the calling BASH).
21273       if test "xHG" != xBASH; then
21274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21275 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21276       fi
21277       # Try to locate tool using the code snippet
21278       for ac_prog in hg
21279 do
21280   # Extract the first word of "$ac_prog", so it can be a program name with args.
21281 set dummy $ac_prog; ac_word=$2
21282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21283 $as_echo_n "checking for $ac_word... " >&6; }
21284 if ${ac_cv_path_HG+:} false; then :
21285   $as_echo_n "(cached) " >&6
21286 else
21287   case $HG in
21288   [\\/]* | ?:[\\/]*)
21289   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21290   ;;
21291   *)
21292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21293 for as_dir in $PATH
21294 do
21295   IFS=$as_save_IFS
21296   test -z "$as_dir" && as_dir=.
21297     for ac_exec_ext in '' $ac_executable_extensions; do
21298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21299     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21301     break 2
21302   fi
21303 done
21304   done
21305 IFS=$as_save_IFS
21306 
21307   ;;
21308 esac
21309 fi
21310 HG=$ac_cv_path_HG
21311 if test -n "$HG"; then
21312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21313 $as_echo "$HG" >&6; }
21314 else
21315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21316 $as_echo "no" >&6; }
21317 fi
21318 
21319 
21320   test -n "$HG" && break
21321 done
21322 
21323     else
21324       # If it succeeded, then it was overridden by the user. We will use it
21325       # for the tool.
21326 
21327       # First remove it from the list of overridden variables, so we can test
21328       # for unknown variables in the end.
21329       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21330 
21331       # Check if we try to supply an empty value
21332       if test "x$HG" = x; then
21333         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21334 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21335         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21336 $as_echo_n "checking for HG... " >&6; }
21337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21338 $as_echo "disabled" >&6; }
21339       else
21340         # Check if the provided tool contains a complete path.
21341         tool_specified="$HG"
21342         tool_basename="${tool_specified##*/}"
21343         if test "x$tool_basename" = "x$tool_specified"; then
21344           # A command without a complete path is provided, search $PATH.
21345           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21346 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21347           # Extract the first word of "$tool_basename", so it can be a program name with args.
21348 set dummy $tool_basename; ac_word=$2
21349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21350 $as_echo_n "checking for $ac_word... " >&6; }
21351 if ${ac_cv_path_HG+:} false; then :
21352   $as_echo_n "(cached) " >&6
21353 else
21354   case $HG in
21355   [\\/]* | ?:[\\/]*)
21356   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21357   ;;
21358   *)
21359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21360 for as_dir in $PATH
21361 do
21362   IFS=$as_save_IFS
21363   test -z "$as_dir" && as_dir=.
21364     for ac_exec_ext in '' $ac_executable_extensions; do
21365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21366     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21368     break 2
21369   fi
21370 done
21371   done
21372 IFS=$as_save_IFS
21373 
21374   ;;
21375 esac
21376 fi
21377 HG=$ac_cv_path_HG
21378 if test -n "$HG"; then
21379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21380 $as_echo "$HG" >&6; }
21381 else
21382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21383 $as_echo "no" >&6; }
21384 fi
21385 
21386 
21387           if test "x$HG" = x; then
21388             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21389           fi
21390         else
21391           # Otherwise we believe it is a complete path. Use it as it is.
21392           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21393 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21394           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21395 $as_echo_n "checking for HG... " >&6; }
21396           if test ! -x "$tool_specified"; then
21397             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21398 $as_echo "not found" >&6; }
21399             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21400           fi
21401           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21402 $as_echo "$tool_specified" >&6; }
21403         fi
21404       fi
21405     fi
21406 
21407   fi
21408 
21409 
21410 
21411 
21412   # Publish this variable in the help.
21413 
21414 
21415   if [ -z "${STAT+x}" ]; then
21416     # The variable is not set by user, try to locate tool using the code snippet
21417     for ac_prog in stat
21418 do
21419   # Extract the first word of "$ac_prog", so it can be a program name with args.
21420 set dummy $ac_prog; ac_word=$2
21421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21422 $as_echo_n "checking for $ac_word... " >&6; }
21423 if ${ac_cv_path_STAT+:} false; then :
21424   $as_echo_n "(cached) " >&6
21425 else
21426   case $STAT in
21427   [\\/]* | ?:[\\/]*)
21428   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21429   ;;
21430   *)
21431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21432 for as_dir in $PATH
21433 do
21434   IFS=$as_save_IFS
21435   test -z "$as_dir" && as_dir=.
21436     for ac_exec_ext in '' $ac_executable_extensions; do
21437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21438     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21440     break 2
21441   fi
21442 done
21443   done
21444 IFS=$as_save_IFS
21445 
21446   ;;
21447 esac
21448 fi
21449 STAT=$ac_cv_path_STAT
21450 if test -n "$STAT"; then
21451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21452 $as_echo "$STAT" >&6; }
21453 else
21454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21455 $as_echo "no" >&6; }
21456 fi
21457 
21458 
21459   test -n "$STAT" && break
21460 done
21461 
21462   else
21463     # The variable is set, but is it from the command line or the environment?
21464 
21465     # Try to remove the string !STAT! from our list.
21466     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21467     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21468       # If it failed, the variable was not from the command line. Ignore it,
21469       # but warn the user (except for BASH, which is always set by the calling BASH).
21470       if test "xSTAT" != xBASH; then
21471         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21472 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21473       fi
21474       # Try to locate tool using the code snippet
21475       for ac_prog in stat
21476 do
21477   # Extract the first word of "$ac_prog", so it can be a program name with args.
21478 set dummy $ac_prog; ac_word=$2
21479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21480 $as_echo_n "checking for $ac_word... " >&6; }
21481 if ${ac_cv_path_STAT+:} false; then :
21482   $as_echo_n "(cached) " >&6
21483 else
21484   case $STAT in
21485   [\\/]* | ?:[\\/]*)
21486   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21487   ;;
21488   *)
21489   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21490 for as_dir in $PATH
21491 do
21492   IFS=$as_save_IFS
21493   test -z "$as_dir" && as_dir=.
21494     for ac_exec_ext in '' $ac_executable_extensions; do
21495   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21496     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21498     break 2
21499   fi
21500 done
21501   done
21502 IFS=$as_save_IFS
21503 
21504   ;;
21505 esac
21506 fi
21507 STAT=$ac_cv_path_STAT
21508 if test -n "$STAT"; then
21509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21510 $as_echo "$STAT" >&6; }
21511 else
21512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21513 $as_echo "no" >&6; }
21514 fi
21515 
21516 
21517   test -n "$STAT" && break
21518 done
21519 
21520     else
21521       # If it succeeded, then it was overridden by the user. We will use it
21522       # for the tool.
21523 
21524       # First remove it from the list of overridden variables, so we can test
21525       # for unknown variables in the end.
21526       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21527 
21528       # Check if we try to supply an empty value
21529       if test "x$STAT" = x; then
21530         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21531 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21532         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21533 $as_echo_n "checking for STAT... " >&6; }
21534         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21535 $as_echo "disabled" >&6; }
21536       else
21537         # Check if the provided tool contains a complete path.
21538         tool_specified="$STAT"
21539         tool_basename="${tool_specified##*/}"
21540         if test "x$tool_basename" = "x$tool_specified"; then
21541           # A command without a complete path is provided, search $PATH.
21542           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21543 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21544           # Extract the first word of "$tool_basename", so it can be a program name with args.
21545 set dummy $tool_basename; ac_word=$2
21546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21547 $as_echo_n "checking for $ac_word... " >&6; }
21548 if ${ac_cv_path_STAT+:} false; then :
21549   $as_echo_n "(cached) " >&6
21550 else
21551   case $STAT in
21552   [\\/]* | ?:[\\/]*)
21553   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21554   ;;
21555   *)
21556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21557 for as_dir in $PATH
21558 do
21559   IFS=$as_save_IFS
21560   test -z "$as_dir" && as_dir=.
21561     for ac_exec_ext in '' $ac_executable_extensions; do
21562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21563     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21565     break 2
21566   fi
21567 done
21568   done
21569 IFS=$as_save_IFS
21570 
21571   ;;
21572 esac
21573 fi
21574 STAT=$ac_cv_path_STAT
21575 if test -n "$STAT"; then
21576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21577 $as_echo "$STAT" >&6; }
21578 else
21579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21580 $as_echo "no" >&6; }
21581 fi
21582 
21583 
21584           if test "x$STAT" = x; then
21585             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21586           fi
21587         else
21588           # Otherwise we believe it is a complete path. Use it as it is.
21589           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21590 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21591           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21592 $as_echo_n "checking for STAT... " >&6; }
21593           if test ! -x "$tool_specified"; then
21594             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21595 $as_echo "not found" >&6; }
21596             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21597           fi
21598           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21599 $as_echo "$tool_specified" >&6; }
21600         fi
21601       fi
21602     fi
21603 
21604   fi
21605 
21606 
21607 
21608 
21609   # Publish this variable in the help.
21610 
21611 
21612   if [ -z "${TIME+x}" ]; then
21613     # The variable is not set by user, try to locate tool using the code snippet
21614     for ac_prog in time
21615 do
21616   # Extract the first word of "$ac_prog", so it can be a program name with args.
21617 set dummy $ac_prog; ac_word=$2
21618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21619 $as_echo_n "checking for $ac_word... " >&6; }
21620 if ${ac_cv_path_TIME+:} false; then :
21621   $as_echo_n "(cached) " >&6
21622 else
21623   case $TIME in
21624   [\\/]* | ?:[\\/]*)
21625   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21626   ;;
21627   *)
21628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21629 for as_dir in $PATH
21630 do
21631   IFS=$as_save_IFS
21632   test -z "$as_dir" && as_dir=.
21633     for ac_exec_ext in '' $ac_executable_extensions; do
21634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21635     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21637     break 2
21638   fi
21639 done
21640   done
21641 IFS=$as_save_IFS
21642 
21643   ;;
21644 esac
21645 fi
21646 TIME=$ac_cv_path_TIME
21647 if test -n "$TIME"; then
21648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21649 $as_echo "$TIME" >&6; }
21650 else
21651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21652 $as_echo "no" >&6; }
21653 fi
21654 
21655 
21656   test -n "$TIME" && break
21657 done
21658 
21659   else
21660     # The variable is set, but is it from the command line or the environment?
21661 
21662     # Try to remove the string !TIME! from our list.
21663     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21664     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21665       # If it failed, the variable was not from the command line. Ignore it,
21666       # but warn the user (except for BASH, which is always set by the calling BASH).
21667       if test "xTIME" != xBASH; then
21668         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21669 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21670       fi
21671       # Try to locate tool using the code snippet
21672       for ac_prog in time
21673 do
21674   # Extract the first word of "$ac_prog", so it can be a program name with args.
21675 set dummy $ac_prog; ac_word=$2
21676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21677 $as_echo_n "checking for $ac_word... " >&6; }
21678 if ${ac_cv_path_TIME+:} false; then :
21679   $as_echo_n "(cached) " >&6
21680 else
21681   case $TIME in
21682   [\\/]* | ?:[\\/]*)
21683   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21684   ;;
21685   *)
21686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21687 for as_dir in $PATH
21688 do
21689   IFS=$as_save_IFS
21690   test -z "$as_dir" && as_dir=.
21691     for ac_exec_ext in '' $ac_executable_extensions; do
21692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21693     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21695     break 2
21696   fi
21697 done
21698   done
21699 IFS=$as_save_IFS
21700 
21701   ;;
21702 esac
21703 fi
21704 TIME=$ac_cv_path_TIME
21705 if test -n "$TIME"; then
21706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21707 $as_echo "$TIME" >&6; }
21708 else
21709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21710 $as_echo "no" >&6; }
21711 fi
21712 
21713 
21714   test -n "$TIME" && break
21715 done
21716 
21717     else
21718       # If it succeeded, then it was overridden by the user. We will use it
21719       # for the tool.
21720 
21721       # First remove it from the list of overridden variables, so we can test
21722       # for unknown variables in the end.
21723       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21724 
21725       # Check if we try to supply an empty value
21726       if test "x$TIME" = x; then
21727         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21728 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21730 $as_echo_n "checking for TIME... " >&6; }
21731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21732 $as_echo "disabled" >&6; }
21733       else
21734         # Check if the provided tool contains a complete path.
21735         tool_specified="$TIME"
21736         tool_basename="${tool_specified##*/}"
21737         if test "x$tool_basename" = "x$tool_specified"; then
21738           # A command without a complete path is provided, search $PATH.
21739           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21740 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21741           # Extract the first word of "$tool_basename", so it can be a program name with args.
21742 set dummy $tool_basename; ac_word=$2
21743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21744 $as_echo_n "checking for $ac_word... " >&6; }
21745 if ${ac_cv_path_TIME+:} false; then :
21746   $as_echo_n "(cached) " >&6
21747 else
21748   case $TIME in
21749   [\\/]* | ?:[\\/]*)
21750   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21751   ;;
21752   *)
21753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21754 for as_dir in $PATH
21755 do
21756   IFS=$as_save_IFS
21757   test -z "$as_dir" && as_dir=.
21758     for ac_exec_ext in '' $ac_executable_extensions; do
21759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21760     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21762     break 2
21763   fi
21764 done
21765   done
21766 IFS=$as_save_IFS
21767 
21768   ;;
21769 esac
21770 fi
21771 TIME=$ac_cv_path_TIME
21772 if test -n "$TIME"; then
21773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21774 $as_echo "$TIME" >&6; }
21775 else
21776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21777 $as_echo "no" >&6; }
21778 fi
21779 
21780 
21781           if test "x$TIME" = x; then
21782             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21783           fi
21784         else
21785           # Otherwise we believe it is a complete path. Use it as it is.
21786           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21787 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21788           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21789 $as_echo_n "checking for TIME... " >&6; }
21790           if test ! -x "$tool_specified"; then
21791             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21792 $as_echo "not found" >&6; }
21793             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21794           fi
21795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21796 $as_echo "$tool_specified" >&6; }
21797         fi
21798       fi
21799     fi
21800 
21801   fi
21802 
21803 
21804 
21805 
21806   # Publish this variable in the help.
21807 
21808 
21809   if [ -z "${PATCH+x}" ]; then
21810     # The variable is not set by user, try to locate tool using the code snippet
21811     for ac_prog in gpatch patch
21812 do
21813   # Extract the first word of "$ac_prog", so it can be a program name with args.
21814 set dummy $ac_prog; ac_word=$2
21815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21816 $as_echo_n "checking for $ac_word... " >&6; }
21817 if ${ac_cv_path_PATCH+:} false; then :
21818   $as_echo_n "(cached) " >&6
21819 else
21820   case $PATCH in
21821   [\\/]* | ?:[\\/]*)
21822   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21823   ;;
21824   *)
21825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21826 for as_dir in $PATH
21827 do
21828   IFS=$as_save_IFS
21829   test -z "$as_dir" && as_dir=.
21830     for ac_exec_ext in '' $ac_executable_extensions; do
21831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21832     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21834     break 2
21835   fi
21836 done
21837   done
21838 IFS=$as_save_IFS
21839 
21840   ;;
21841 esac
21842 fi
21843 PATCH=$ac_cv_path_PATCH
21844 if test -n "$PATCH"; then
21845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21846 $as_echo "$PATCH" >&6; }
21847 else
21848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21849 $as_echo "no" >&6; }
21850 fi
21851 
21852 
21853   test -n "$PATCH" && break
21854 done
21855 
21856   else
21857     # The variable is set, but is it from the command line or the environment?
21858 
21859     # Try to remove the string !PATCH! from our list.
21860     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21861     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21862       # If it failed, the variable was not from the command line. Ignore it,
21863       # but warn the user (except for BASH, which is always set by the calling BASH).
21864       if test "xPATCH" != xBASH; then
21865         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21866 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21867       fi
21868       # Try to locate tool using the code snippet
21869       for ac_prog in gpatch patch
21870 do
21871   # Extract the first word of "$ac_prog", so it can be a program name with args.
21872 set dummy $ac_prog; ac_word=$2
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21874 $as_echo_n "checking for $ac_word... " >&6; }
21875 if ${ac_cv_path_PATCH+:} false; then :
21876   $as_echo_n "(cached) " >&6
21877 else
21878   case $PATCH in
21879   [\\/]* | ?:[\\/]*)
21880   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21881   ;;
21882   *)
21883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21884 for as_dir in $PATH
21885 do
21886   IFS=$as_save_IFS
21887   test -z "$as_dir" && as_dir=.
21888     for ac_exec_ext in '' $ac_executable_extensions; do
21889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21890     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21892     break 2
21893   fi
21894 done
21895   done
21896 IFS=$as_save_IFS
21897 
21898   ;;
21899 esac
21900 fi
21901 PATCH=$ac_cv_path_PATCH
21902 if test -n "$PATCH"; then
21903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21904 $as_echo "$PATCH" >&6; }
21905 else
21906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21907 $as_echo "no" >&6; }
21908 fi
21909 
21910 
21911   test -n "$PATCH" && break
21912 done
21913 
21914     else
21915       # If it succeeded, then it was overridden by the user. We will use it
21916       # for the tool.
21917 
21918       # First remove it from the list of overridden variables, so we can test
21919       # for unknown variables in the end.
21920       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21921 
21922       # Check if we try to supply an empty value
21923       if test "x$PATCH" = x; then
21924         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21925 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21927 $as_echo_n "checking for PATCH... " >&6; }
21928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21929 $as_echo "disabled" >&6; }
21930       else
21931         # Check if the provided tool contains a complete path.
21932         tool_specified="$PATCH"
21933         tool_basename="${tool_specified##*/}"
21934         if test "x$tool_basename" = "x$tool_specified"; then
21935           # A command without a complete path is provided, search $PATH.
21936           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21937 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21938           # Extract the first word of "$tool_basename", so it can be a program name with args.
21939 set dummy $tool_basename; ac_word=$2
21940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941 $as_echo_n "checking for $ac_word... " >&6; }
21942 if ${ac_cv_path_PATCH+:} false; then :
21943   $as_echo_n "(cached) " >&6
21944 else
21945   case $PATCH in
21946   [\\/]* | ?:[\\/]*)
21947   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21948   ;;
21949   *)
21950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951 for as_dir in $PATH
21952 do
21953   IFS=$as_save_IFS
21954   test -z "$as_dir" && as_dir=.
21955     for ac_exec_ext in '' $ac_executable_extensions; do
21956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959     break 2
21960   fi
21961 done
21962   done
21963 IFS=$as_save_IFS
21964 
21965   ;;
21966 esac
21967 fi
21968 PATCH=$ac_cv_path_PATCH
21969 if test -n "$PATCH"; then
21970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21971 $as_echo "$PATCH" >&6; }
21972 else
21973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974 $as_echo "no" >&6; }
21975 fi
21976 
21977 
21978           if test "x$PATCH" = x; then
21979             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21980           fi
21981         else
21982           # Otherwise we believe it is a complete path. Use it as it is.
21983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21984 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21985           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21986 $as_echo_n "checking for PATCH... " >&6; }
21987           if test ! -x "$tool_specified"; then
21988             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21989 $as_echo "not found" >&6; }
21990             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21991           fi
21992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21993 $as_echo "$tool_specified" >&6; }
21994         fi
21995       fi
21996     fi
21997 
21998   fi
21999 
22000 
22001   # Check if it's GNU time
22002   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22003   if test "x$IS_GNU_TIME" != x; then
22004     IS_GNU_TIME=yes
22005   else
22006     IS_GNU_TIME=no
22007   fi
22008 
22009 
22010   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22011 
22012 
22013 
22014   # Publish this variable in the help.
22015 
22016 
22017   if [ -z "${DSYMUTIL+x}" ]; then
22018     # The variable is not set by user, try to locate tool using the code snippet
22019     for ac_prog in dsymutil
22020 do
22021   # Extract the first word of "$ac_prog", so it can be a program name with args.
22022 set dummy $ac_prog; ac_word=$2
22023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22024 $as_echo_n "checking for $ac_word... " >&6; }
22025 if ${ac_cv_path_DSYMUTIL+:} false; then :
22026   $as_echo_n "(cached) " >&6
22027 else
22028   case $DSYMUTIL in
22029   [\\/]* | ?:[\\/]*)
22030   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22031   ;;
22032   *)
22033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22034 for as_dir in $PATH
22035 do
22036   IFS=$as_save_IFS
22037   test -z "$as_dir" && as_dir=.
22038     for ac_exec_ext in '' $ac_executable_extensions; do
22039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22040     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22042     break 2
22043   fi
22044 done
22045   done
22046 IFS=$as_save_IFS
22047 
22048   ;;
22049 esac
22050 fi
22051 DSYMUTIL=$ac_cv_path_DSYMUTIL
22052 if test -n "$DSYMUTIL"; then
22053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22054 $as_echo "$DSYMUTIL" >&6; }
22055 else
22056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22057 $as_echo "no" >&6; }
22058 fi
22059 
22060 
22061   test -n "$DSYMUTIL" && break
22062 done
22063 
22064   else
22065     # The variable is set, but is it from the command line or the environment?
22066 
22067     # Try to remove the string !DSYMUTIL! from our list.
22068     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22069     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22070       # If it failed, the variable was not from the command line. Ignore it,
22071       # but warn the user (except for BASH, which is always set by the calling BASH).
22072       if test "xDSYMUTIL" != xBASH; then
22073         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22074 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22075       fi
22076       # Try to locate tool using the code snippet
22077       for ac_prog in dsymutil
22078 do
22079   # Extract the first word of "$ac_prog", so it can be a program name with args.
22080 set dummy $ac_prog; ac_word=$2
22081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22082 $as_echo_n "checking for $ac_word... " >&6; }
22083 if ${ac_cv_path_DSYMUTIL+:} false; then :
22084   $as_echo_n "(cached) " >&6
22085 else
22086   case $DSYMUTIL in
22087   [\\/]* | ?:[\\/]*)
22088   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22089   ;;
22090   *)
22091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22092 for as_dir in $PATH
22093 do
22094   IFS=$as_save_IFS
22095   test -z "$as_dir" && as_dir=.
22096     for ac_exec_ext in '' $ac_executable_extensions; do
22097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22098     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22100     break 2
22101   fi
22102 done
22103   done
22104 IFS=$as_save_IFS
22105 
22106   ;;
22107 esac
22108 fi
22109 DSYMUTIL=$ac_cv_path_DSYMUTIL
22110 if test -n "$DSYMUTIL"; then
22111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22112 $as_echo "$DSYMUTIL" >&6; }
22113 else
22114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22115 $as_echo "no" >&6; }
22116 fi
22117 
22118 
22119   test -n "$DSYMUTIL" && break
22120 done
22121 
22122     else
22123       # If it succeeded, then it was overridden by the user. We will use it
22124       # for the tool.
22125 
22126       # First remove it from the list of overridden variables, so we can test
22127       # for unknown variables in the end.
22128       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22129 
22130       # Check if we try to supply an empty value
22131       if test "x$DSYMUTIL" = x; then
22132         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22133 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22134         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22135 $as_echo_n "checking for DSYMUTIL... " >&6; }
22136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22137 $as_echo "disabled" >&6; }
22138       else
22139         # Check if the provided tool contains a complete path.
22140         tool_specified="$DSYMUTIL"
22141         tool_basename="${tool_specified##*/}"
22142         if test "x$tool_basename" = "x$tool_specified"; then
22143           # A command without a complete path is provided, search $PATH.
22144           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22145 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22146           # Extract the first word of "$tool_basename", so it can be a program name with args.
22147 set dummy $tool_basename; ac_word=$2
22148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22149 $as_echo_n "checking for $ac_word... " >&6; }
22150 if ${ac_cv_path_DSYMUTIL+:} false; then :
22151   $as_echo_n "(cached) " >&6
22152 else
22153   case $DSYMUTIL in
22154   [\\/]* | ?:[\\/]*)
22155   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22156   ;;
22157   *)
22158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159 for as_dir in $PATH
22160 do
22161   IFS=$as_save_IFS
22162   test -z "$as_dir" && as_dir=.
22163     for ac_exec_ext in '' $ac_executable_extensions; do
22164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22165     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22167     break 2
22168   fi
22169 done
22170   done
22171 IFS=$as_save_IFS
22172 
22173   ;;
22174 esac
22175 fi
22176 DSYMUTIL=$ac_cv_path_DSYMUTIL
22177 if test -n "$DSYMUTIL"; then
22178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22179 $as_echo "$DSYMUTIL" >&6; }
22180 else
22181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22182 $as_echo "no" >&6; }
22183 fi
22184 
22185 
22186           if test "x$DSYMUTIL" = x; then
22187             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22188           fi
22189         else
22190           # Otherwise we believe it is a complete path. Use it as it is.
22191           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22192 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22193           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22194 $as_echo_n "checking for DSYMUTIL... " >&6; }
22195           if test ! -x "$tool_specified"; then
22196             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22197 $as_echo "not found" >&6; }
22198             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22199           fi
22200           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22201 $as_echo "$tool_specified" >&6; }
22202         fi
22203       fi
22204     fi
22205 
22206   fi
22207 
22208 
22209 
22210   if test "x$DSYMUTIL" = x; then
22211     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22212   fi
22213 
22214 
22215 
22216 
22217 
22218   # Publish this variable in the help.
22219 
22220 
22221   if [ -z "${XATTR+x}" ]; then
22222     # The variable is not set by user, try to locate tool using the code snippet
22223     for ac_prog in xattr
22224 do
22225   # Extract the first word of "$ac_prog", so it can be a program name with args.
22226 set dummy $ac_prog; ac_word=$2
22227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22228 $as_echo_n "checking for $ac_word... " >&6; }
22229 if ${ac_cv_path_XATTR+:} false; then :
22230   $as_echo_n "(cached) " >&6
22231 else
22232   case $XATTR in
22233   [\\/]* | ?:[\\/]*)
22234   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22235   ;;
22236   *)
22237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22238 for as_dir in $PATH
22239 do
22240   IFS=$as_save_IFS
22241   test -z "$as_dir" && as_dir=.
22242     for ac_exec_ext in '' $ac_executable_extensions; do
22243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22244     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22246     break 2
22247   fi
22248 done
22249   done
22250 IFS=$as_save_IFS
22251 
22252   ;;
22253 esac
22254 fi
22255 XATTR=$ac_cv_path_XATTR
22256 if test -n "$XATTR"; then
22257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22258 $as_echo "$XATTR" >&6; }
22259 else
22260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22261 $as_echo "no" >&6; }
22262 fi
22263 
22264 
22265   test -n "$XATTR" && break
22266 done
22267 
22268   else
22269     # The variable is set, but is it from the command line or the environment?
22270 
22271     # Try to remove the string !XATTR! from our list.
22272     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22273     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22274       # If it failed, the variable was not from the command line. Ignore it,
22275       # but warn the user (except for BASH, which is always set by the calling BASH).
22276       if test "xXATTR" != xBASH; then
22277         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22278 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22279       fi
22280       # Try to locate tool using the code snippet
22281       for ac_prog in xattr
22282 do
22283   # Extract the first word of "$ac_prog", so it can be a program name with args.
22284 set dummy $ac_prog; ac_word=$2
22285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22286 $as_echo_n "checking for $ac_word... " >&6; }
22287 if ${ac_cv_path_XATTR+:} false; then :
22288   $as_echo_n "(cached) " >&6
22289 else
22290   case $XATTR in
22291   [\\/]* | ?:[\\/]*)
22292   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22293   ;;
22294   *)
22295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22296 for as_dir in $PATH
22297 do
22298   IFS=$as_save_IFS
22299   test -z "$as_dir" && as_dir=.
22300     for ac_exec_ext in '' $ac_executable_extensions; do
22301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22302     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22304     break 2
22305   fi
22306 done
22307   done
22308 IFS=$as_save_IFS
22309 
22310   ;;
22311 esac
22312 fi
22313 XATTR=$ac_cv_path_XATTR
22314 if test -n "$XATTR"; then
22315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22316 $as_echo "$XATTR" >&6; }
22317 else
22318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22319 $as_echo "no" >&6; }
22320 fi
22321 
22322 
22323   test -n "$XATTR" && break
22324 done
22325 
22326     else
22327       # If it succeeded, then it was overridden by the user. We will use it
22328       # for the tool.
22329 
22330       # First remove it from the list of overridden variables, so we can test
22331       # for unknown variables in the end.
22332       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22333 
22334       # Check if we try to supply an empty value
22335       if test "x$XATTR" = x; then
22336         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22337 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22338         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22339 $as_echo_n "checking for XATTR... " >&6; }
22340         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22341 $as_echo "disabled" >&6; }
22342       else
22343         # Check if the provided tool contains a complete path.
22344         tool_specified="$XATTR"
22345         tool_basename="${tool_specified##*/}"
22346         if test "x$tool_basename" = "x$tool_specified"; then
22347           # A command without a complete path is provided, search $PATH.
22348           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22349 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22350           # Extract the first word of "$tool_basename", so it can be a program name with args.
22351 set dummy $tool_basename; ac_word=$2
22352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22353 $as_echo_n "checking for $ac_word... " >&6; }
22354 if ${ac_cv_path_XATTR+:} false; then :
22355   $as_echo_n "(cached) " >&6
22356 else
22357   case $XATTR in
22358   [\\/]* | ?:[\\/]*)
22359   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22360   ;;
22361   *)
22362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22363 for as_dir in $PATH
22364 do
22365   IFS=$as_save_IFS
22366   test -z "$as_dir" && as_dir=.
22367     for ac_exec_ext in '' $ac_executable_extensions; do
22368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22369     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22371     break 2
22372   fi
22373 done
22374   done
22375 IFS=$as_save_IFS
22376 
22377   ;;
22378 esac
22379 fi
22380 XATTR=$ac_cv_path_XATTR
22381 if test -n "$XATTR"; then
22382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22383 $as_echo "$XATTR" >&6; }
22384 else
22385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22386 $as_echo "no" >&6; }
22387 fi
22388 
22389 
22390           if test "x$XATTR" = x; then
22391             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22392           fi
22393         else
22394           # Otherwise we believe it is a complete path. Use it as it is.
22395           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22396 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22397           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22398 $as_echo_n "checking for XATTR... " >&6; }
22399           if test ! -x "$tool_specified"; then
22400             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22401 $as_echo "not found" >&6; }
22402             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22403           fi
22404           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22405 $as_echo "$tool_specified" >&6; }
22406         fi
22407       fi
22408     fi
22409 
22410   fi
22411 
22412 
22413 
22414   if test "x$XATTR" = x; then
22415     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22416   fi
22417 
22418 
22419 
22420 
22421   # Publish this variable in the help.
22422 
22423 
22424   if [ -z "${CODESIGN+x}" ]; then
22425     # The variable is not set by user, try to locate tool using the code snippet
22426     for ac_prog in codesign
22427 do
22428   # Extract the first word of "$ac_prog", so it can be a program name with args.
22429 set dummy $ac_prog; ac_word=$2
22430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22431 $as_echo_n "checking for $ac_word... " >&6; }
22432 if ${ac_cv_path_CODESIGN+:} false; then :
22433   $as_echo_n "(cached) " >&6
22434 else
22435   case $CODESIGN in
22436   [\\/]* | ?:[\\/]*)
22437   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22438   ;;
22439   *)
22440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22441 for as_dir in $PATH
22442 do
22443   IFS=$as_save_IFS
22444   test -z "$as_dir" && as_dir=.
22445     for ac_exec_ext in '' $ac_executable_extensions; do
22446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22447     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22449     break 2
22450   fi
22451 done
22452   done
22453 IFS=$as_save_IFS
22454 
22455   ;;
22456 esac
22457 fi
22458 CODESIGN=$ac_cv_path_CODESIGN
22459 if test -n "$CODESIGN"; then
22460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22461 $as_echo "$CODESIGN" >&6; }
22462 else
22463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22464 $as_echo "no" >&6; }
22465 fi
22466 
22467 
22468   test -n "$CODESIGN" && break
22469 done
22470 
22471   else
22472     # The variable is set, but is it from the command line or the environment?
22473 
22474     # Try to remove the string !CODESIGN! from our list.
22475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22477       # If it failed, the variable was not from the command line. Ignore it,
22478       # but warn the user (except for BASH, which is always set by the calling BASH).
22479       if test "xCODESIGN" != xBASH; then
22480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22481 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22482       fi
22483       # Try to locate tool using the code snippet
22484       for ac_prog in codesign
22485 do
22486   # Extract the first word of "$ac_prog", so it can be a program name with args.
22487 set dummy $ac_prog; ac_word=$2
22488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22489 $as_echo_n "checking for $ac_word... " >&6; }
22490 if ${ac_cv_path_CODESIGN+:} false; then :
22491   $as_echo_n "(cached) " >&6
22492 else
22493   case $CODESIGN in
22494   [\\/]* | ?:[\\/]*)
22495   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22496   ;;
22497   *)
22498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499 for as_dir in $PATH
22500 do
22501   IFS=$as_save_IFS
22502   test -z "$as_dir" && as_dir=.
22503     for ac_exec_ext in '' $ac_executable_extensions; do
22504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22505     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507     break 2
22508   fi
22509 done
22510   done
22511 IFS=$as_save_IFS
22512 
22513   ;;
22514 esac
22515 fi
22516 CODESIGN=$ac_cv_path_CODESIGN
22517 if test -n "$CODESIGN"; then
22518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22519 $as_echo "$CODESIGN" >&6; }
22520 else
22521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22522 $as_echo "no" >&6; }
22523 fi
22524 
22525 
22526   test -n "$CODESIGN" && break
22527 done
22528 
22529     else
22530       # If it succeeded, then it was overridden by the user. We will use it
22531       # for the tool.
22532 
22533       # First remove it from the list of overridden variables, so we can test
22534       # for unknown variables in the end.
22535       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22536 
22537       # Check if we try to supply an empty value
22538       if test "x$CODESIGN" = x; then
22539         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22540 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22542 $as_echo_n "checking for CODESIGN... " >&6; }
22543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22544 $as_echo "disabled" >&6; }
22545       else
22546         # Check if the provided tool contains a complete path.
22547         tool_specified="$CODESIGN"
22548         tool_basename="${tool_specified##*/}"
22549         if test "x$tool_basename" = "x$tool_specified"; then
22550           # A command without a complete path is provided, search $PATH.
22551           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22552 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22553           # Extract the first word of "$tool_basename", so it can be a program name with args.
22554 set dummy $tool_basename; ac_word=$2
22555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22556 $as_echo_n "checking for $ac_word... " >&6; }
22557 if ${ac_cv_path_CODESIGN+:} false; then :
22558   $as_echo_n "(cached) " >&6
22559 else
22560   case $CODESIGN in
22561   [\\/]* | ?:[\\/]*)
22562   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22563   ;;
22564   *)
22565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22566 for as_dir in $PATH
22567 do
22568   IFS=$as_save_IFS
22569   test -z "$as_dir" && as_dir=.
22570     for ac_exec_ext in '' $ac_executable_extensions; do
22571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22572     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22574     break 2
22575   fi
22576 done
22577   done
22578 IFS=$as_save_IFS
22579 
22580   ;;
22581 esac
22582 fi
22583 CODESIGN=$ac_cv_path_CODESIGN
22584 if test -n "$CODESIGN"; then
22585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22586 $as_echo "$CODESIGN" >&6; }
22587 else
22588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22589 $as_echo "no" >&6; }
22590 fi
22591 
22592 
22593           if test "x$CODESIGN" = x; then
22594             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22595           fi
22596         else
22597           # Otherwise we believe it is a complete path. Use it as it is.
22598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22599 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22601 $as_echo_n "checking for CODESIGN... " >&6; }
22602           if test ! -x "$tool_specified"; then
22603             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22604 $as_echo "not found" >&6; }
22605             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22606           fi
22607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22608 $as_echo "$tool_specified" >&6; }
22609         fi
22610       fi
22611     fi
22612 
22613   fi
22614 
22615 
22616     if test "x$CODESIGN" != "x"; then
22617       # Verify that the openjdk_codesign certificate is present
22618       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22619 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22620       rm -f codesign-testfile
22621       touch codesign-testfile
22622       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22623       rm -f codesign-testfile
22624       if test "x$CODESIGN" = x; then
22625         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22626 $as_echo "no" >&6; }
22627       else
22628         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22629 $as_echo "yes" >&6; }
22630       fi
22631     fi
22632 
22633 
22634 
22635   # Publish this variable in the help.
22636 
22637 
22638   if [ -z "${SETFILE+x}" ]; then
22639     # The variable is not set by user, try to locate tool using the code snippet
22640     for ac_prog in SetFile
22641 do
22642   # Extract the first word of "$ac_prog", so it can be a program name with args.
22643 set dummy $ac_prog; ac_word=$2
22644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22645 $as_echo_n "checking for $ac_word... " >&6; }
22646 if ${ac_cv_path_SETFILE+:} false; then :
22647   $as_echo_n "(cached) " >&6
22648 else
22649   case $SETFILE in
22650   [\\/]* | ?:[\\/]*)
22651   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22652   ;;
22653   *)
22654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22655 for as_dir in $PATH
22656 do
22657   IFS=$as_save_IFS
22658   test -z "$as_dir" && as_dir=.
22659     for ac_exec_ext in '' $ac_executable_extensions; do
22660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22661     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22663     break 2
22664   fi
22665 done
22666   done
22667 IFS=$as_save_IFS
22668 
22669   ;;
22670 esac
22671 fi
22672 SETFILE=$ac_cv_path_SETFILE
22673 if test -n "$SETFILE"; then
22674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22675 $as_echo "$SETFILE" >&6; }
22676 else
22677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22678 $as_echo "no" >&6; }
22679 fi
22680 
22681 
22682   test -n "$SETFILE" && break
22683 done
22684 
22685   else
22686     # The variable is set, but is it from the command line or the environment?
22687 
22688     # Try to remove the string !SETFILE! from our list.
22689     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22690     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22691       # If it failed, the variable was not from the command line. Ignore it,
22692       # but warn the user (except for BASH, which is always set by the calling BASH).
22693       if test "xSETFILE" != xBASH; then
22694         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22695 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22696       fi
22697       # Try to locate tool using the code snippet
22698       for ac_prog in SetFile
22699 do
22700   # Extract the first word of "$ac_prog", so it can be a program name with args.
22701 set dummy $ac_prog; ac_word=$2
22702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22703 $as_echo_n "checking for $ac_word... " >&6; }
22704 if ${ac_cv_path_SETFILE+:} false; then :
22705   $as_echo_n "(cached) " >&6
22706 else
22707   case $SETFILE in
22708   [\\/]* | ?:[\\/]*)
22709   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22710   ;;
22711   *)
22712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22713 for as_dir in $PATH
22714 do
22715   IFS=$as_save_IFS
22716   test -z "$as_dir" && as_dir=.
22717     for ac_exec_ext in '' $ac_executable_extensions; do
22718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22719     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22721     break 2
22722   fi
22723 done
22724   done
22725 IFS=$as_save_IFS
22726 
22727   ;;
22728 esac
22729 fi
22730 SETFILE=$ac_cv_path_SETFILE
22731 if test -n "$SETFILE"; then
22732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22733 $as_echo "$SETFILE" >&6; }
22734 else
22735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22736 $as_echo "no" >&6; }
22737 fi
22738 
22739 
22740   test -n "$SETFILE" && break
22741 done
22742 
22743     else
22744       # If it succeeded, then it was overridden by the user. We will use it
22745       # for the tool.
22746 
22747       # First remove it from the list of overridden variables, so we can test
22748       # for unknown variables in the end.
22749       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22750 
22751       # Check if we try to supply an empty value
22752       if test "x$SETFILE" = x; then
22753         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22754 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22755         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22756 $as_echo_n "checking for SETFILE... " >&6; }
22757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22758 $as_echo "disabled" >&6; }
22759       else
22760         # Check if the provided tool contains a complete path.
22761         tool_specified="$SETFILE"
22762         tool_basename="${tool_specified##*/}"
22763         if test "x$tool_basename" = "x$tool_specified"; then
22764           # A command without a complete path is provided, search $PATH.
22765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22766 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22767           # Extract the first word of "$tool_basename", so it can be a program name with args.
22768 set dummy $tool_basename; ac_word=$2
22769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22770 $as_echo_n "checking for $ac_word... " >&6; }
22771 if ${ac_cv_path_SETFILE+:} false; then :
22772   $as_echo_n "(cached) " >&6
22773 else
22774   case $SETFILE in
22775   [\\/]* | ?:[\\/]*)
22776   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22777   ;;
22778   *)
22779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22780 for as_dir in $PATH
22781 do
22782   IFS=$as_save_IFS
22783   test -z "$as_dir" && as_dir=.
22784     for ac_exec_ext in '' $ac_executable_extensions; do
22785   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22786     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22787     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22788     break 2
22789   fi
22790 done
22791   done
22792 IFS=$as_save_IFS
22793 
22794   ;;
22795 esac
22796 fi
22797 SETFILE=$ac_cv_path_SETFILE
22798 if test -n "$SETFILE"; then
22799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22800 $as_echo "$SETFILE" >&6; }
22801 else
22802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22803 $as_echo "no" >&6; }
22804 fi
22805 
22806 
22807           if test "x$SETFILE" = x; then
22808             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22809           fi
22810         else
22811           # Otherwise we believe it is a complete path. Use it as it is.
22812           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22813 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22814           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22815 $as_echo_n "checking for SETFILE... " >&6; }
22816           if test ! -x "$tool_specified"; then
22817             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22818 $as_echo "not found" >&6; }
22819             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22820           fi
22821           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22822 $as_echo "$tool_specified" >&6; }
22823         fi
22824       fi
22825     fi
22826 
22827   fi
22828 
22829 
22830 
22831   if test "x$SETFILE" = x; then
22832     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22833   fi
22834 
22835 
22836   fi
22837 
22838 
22839   # Test if bash supports pipefail.
22840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22841 $as_echo_n "checking if bash supports pipefail... " >&6; }
22842   if ${BASH} -c 'set -o pipefail'; then
22843     BASH_ARGS="$BASH_ARGS -o pipefail"
22844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22845 $as_echo "yes" >&6; }
22846   else
22847     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22848 $as_echo "no" >&6; }
22849   fi
22850 
22851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22852 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22853   if ${BASH} -e -c 'true'; then
22854     BASH_ARGS="$BASH_ARGS -e"
22855     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22856 $as_echo "yes" >&6; }
22857   else
22858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22859 $as_echo "no" >&6; }
22860   fi
22861 
22862 
22863 
22864 
22865 # Check if pkg-config is available.
22866 
22867 
22868 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22869         if test -n "$ac_tool_prefix"; then
22870   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22871 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22873 $as_echo_n "checking for $ac_word... " >&6; }
22874 if ${ac_cv_path_PKG_CONFIG+:} false; then :
22875   $as_echo_n "(cached) " >&6
22876 else
22877   case $PKG_CONFIG in
22878   [\\/]* | ?:[\\/]*)
22879   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22880   ;;
22881   *)
22882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22883 for as_dir in $PATH
22884 do
22885   IFS=$as_save_IFS
22886   test -z "$as_dir" && as_dir=.
22887     for ac_exec_ext in '' $ac_executable_extensions; do
22888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22889     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22891     break 2
22892   fi
22893 done
22894   done
22895 IFS=$as_save_IFS
22896 
22897   ;;
22898 esac
22899 fi
22900 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22901 if test -n "$PKG_CONFIG"; then
22902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22903 $as_echo "$PKG_CONFIG" >&6; }
22904 else
22905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22906 $as_echo "no" >&6; }
22907 fi
22908 
22909 
22910 fi
22911 if test -z "$ac_cv_path_PKG_CONFIG"; then
22912   ac_pt_PKG_CONFIG=$PKG_CONFIG
22913   # Extract the first word of "pkg-config", so it can be a program name with args.
22914 set dummy pkg-config; ac_word=$2
22915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22916 $as_echo_n "checking for $ac_word... " >&6; }
22917 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22918   $as_echo_n "(cached) " >&6
22919 else
22920   case $ac_pt_PKG_CONFIG in
22921   [\\/]* | ?:[\\/]*)
22922   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22923   ;;
22924   *)
22925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22926 for as_dir in $PATH
22927 do
22928   IFS=$as_save_IFS
22929   test -z "$as_dir" && as_dir=.
22930     for ac_exec_ext in '' $ac_executable_extensions; do
22931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22932     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22934     break 2
22935   fi
22936 done
22937   done
22938 IFS=$as_save_IFS
22939 
22940   ;;
22941 esac
22942 fi
22943 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22944 if test -n "$ac_pt_PKG_CONFIG"; then
22945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22946 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
22947 else
22948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22949 $as_echo "no" >&6; }
22950 fi
22951 
22952   if test "x$ac_pt_PKG_CONFIG" = x; then
22953     PKG_CONFIG=""
22954   else
22955     case $cross_compiling:$ac_tool_warned in
22956 yes:)
22957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22958 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22959 ac_tool_warned=yes ;;
22960 esac
22961     PKG_CONFIG=$ac_pt_PKG_CONFIG
22962   fi
22963 else
22964   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22965 fi
22966 
22967 fi
22968 if test -n "$PKG_CONFIG"; then
22969         _pkg_min_version=0.9.0
22970         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22971 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22972         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22973                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22974 $as_echo "yes" >&6; }
22975         else
22976                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22977 $as_echo "no" >&6; }
22978                 PKG_CONFIG=""
22979         fi
22980 
22981 fi
22982 
22983 # After basic tools have been setup, we can check build os specific details.
22984 
22985   ###############################################################################
22986 
22987   # Note that this is the build platform OS version!
22988 
22989   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22990   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22991   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22992   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22993 
22994 
22995 
22996 
22997 
22998 ###############################################################################
22999 #
23000 # Determine OpenJDK variants, options and version numbers.
23001 #
23002 ###############################################################################
23003 
23004 # We need build & target for this.
23005 
23006 
23007   ###############################################################################
23008   #
23009   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23010   # We always build headless support.
23011   #
23012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23013 $as_echo_n "checking headful support... " >&6; }
23014   # Check whether --enable-headful was given.
23015 if test "${enable_headful+set}" = set; then :
23016   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23017 else
23018   SUPPORT_HEADFUL=yes
23019 fi
23020 
23021 
23022   SUPPORT_HEADLESS=yes
23023   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23024 
23025   if test "x$SUPPORT_HEADFUL" = xyes; then
23026     # We are building both headful and headless.
23027     headful_msg="include support for both headful and headless"
23028   fi
23029 
23030   if test "x$SUPPORT_HEADFUL" = xno; then
23031     # Thus we are building headless only.
23032     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23033     headful_msg="headless only"
23034   fi
23035 
23036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23037 $as_echo "$headful_msg" >&6; }
23038 
23039 
23040 
23041 
23042 
23043   # Control wether Hotspot runs Queens test after build.
23044   # Check whether --enable-hotspot-test-in-build was given.
23045 if test "${enable_hotspot_test_in_build+set}" = set; then :
23046   enableval=$enable_hotspot_test_in_build;
23047 else
23048   enable_hotspot_test_in_build=no
23049 fi
23050 
23051   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23052     TEST_IN_BUILD=true
23053   else
23054     TEST_IN_BUILD=false
23055   fi
23056 
23057 
23058   ###############################################################################
23059   #
23060   # Choose cacerts source file
23061   #
23062 
23063 # Check whether --with-cacerts-file was given.
23064 if test "${with_cacerts_file+set}" = set; then :
23065   withval=$with_cacerts_file;
23066 fi
23067 
23068   if test "x$with_cacerts_file" != x; then
23069     CACERTS_FILE=$with_cacerts_file
23070   fi
23071 
23072 
23073   ###############################################################################
23074   #
23075   # Enable or disable unlimited crypto
23076   #
23077   # Check whether --enable-unlimited-crypto was given.
23078 if test "${enable_unlimited_crypto+set}" = set; then :
23079   enableval=$enable_unlimited_crypto;
23080 else
23081   enable_unlimited_crypto=no
23082 fi
23083 
23084   if test "x$enable_unlimited_crypto" = "xyes"; then
23085     UNLIMITED_CRYPTO=true
23086   else
23087     UNLIMITED_CRYPTO=false
23088   fi
23089 
23090 
23091   ###############################################################################
23092   #
23093   # Enable or disable the elliptic curve crypto implementation
23094   #
23095 
23096 
23097   ###############################################################################
23098   #
23099   # Compress jars
23100   #
23101   COMPRESS_JARS=false
23102 
23103 
23104 
23105 
23106   # Source the version numbers
23107   . $AUTOCONF_DIR/version-numbers
23108 
23109   # Get the settings from parameters
23110 
23111 # Check whether --with-milestone was given.
23112 if test "${with_milestone+set}" = set; then :
23113   withval=$with_milestone;
23114 fi
23115 
23116   if test "x$with_milestone" = xyes; then
23117     as_fn_error $? "Milestone must have a value" "$LINENO" 5
23118   elif test "x$with_milestone" != x; then
23119     MILESTONE="$with_milestone"
23120   fi
23121   if test "x$MILESTONE" = x; then
23122     MILESTONE=internal
23123   fi
23124 
23125 
23126 # Check whether --with-update-version was given.
23127 if test "${with_update_version+set}" = set; then :
23128   withval=$with_update_version;
23129 fi
23130 
23131   if test "x$with_update_version" = xyes; then
23132     as_fn_error $? "Update version must have a value" "$LINENO" 5
23133   elif test "x$with_update_version" != x; then
23134     JDK_UPDATE_VERSION="$with_update_version"
23135     # On macosx 10.7, it's not possible to set --with-update-version=0X due
23136     # to a bug in expr (which reduces it to just X). To work around this, we
23137     # always add a 0 to one digit update versions.
23138     if test "${#JDK_UPDATE_VERSION}" = "1"; then
23139       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23140     fi
23141   fi
23142 
23143 
23144 # Check whether --with-user-release-suffix was given.
23145 if test "${with_user_release_suffix+set}" = set; then :
23146   withval=$with_user_release_suffix;
23147 fi
23148 
23149   if test "x$with_user_release_suffix" = xyes; then
23150     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23151   elif test "x$with_user_release_suffix" != x; then
23152     USER_RELEASE_SUFFIX="$with_user_release_suffix"
23153   fi
23154 
23155 
23156 # Check whether --with-build-number was given.
23157 if test "${with_build_number+set}" = set; then :
23158   withval=$with_build_number;
23159 fi
23160 
23161   if test "x$with_build_number" = xyes; then
23162     as_fn_error $? "Build number must have a value" "$LINENO" 5
23163   elif test "x$with_build_number" != x; then
23164     JDK_BUILD_NUMBER="$with_build_number"
23165   fi
23166   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23167   if test "x$JDK_BUILD_NUMBER" = x; then
23168     JDK_BUILD_NUMBER=b00
23169     if test "x$USER_RELEASE_SUFFIX" = x; then
23170       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23171       # Avoid [:alnum:] since it depends on the locale.
23172       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23173       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23174     fi
23175   fi
23176 
23177   # Now set the JDK version, milestone, build number etc.
23178 
23179 
23180 
23181 
23182 
23183 
23184 
23185 
23186 
23187 
23188 
23189 
23190 
23191 
23192 
23193 
23194 # Check whether --with-copyright-year was given.
23195 if test "${with_copyright_year+set}" = set; then :
23196   withval=$with_copyright_year;
23197 fi
23198 
23199   if test "x$with_copyright_year" = xyes; then
23200     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23201   elif test "x$with_copyright_year" != x; then
23202     COPYRIGHT_YEAR="$with_copyright_year"
23203   else
23204     COPYRIGHT_YEAR=`date +'%Y'`
23205   fi
23206 
23207 
23208   if test "x$JDK_UPDATE_VERSION" != x; then
23209     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23210   else
23211     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23212   fi
23213 
23214 
23215   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23216 
23217 
23218 
23219 ###############################################################################
23220 #
23221 # Setup BootJDK, used to bootstrap the build.
23222 #
23223 ###############################################################################
23224 
23225 
23226   BOOT_JDK_FOUND=no
23227 
23228 # Check whether --with-boot-jdk was given.
23229 if test "${with_boot_jdk+set}" = set; then :
23230   withval=$with_boot_jdk;
23231 fi
23232 
23233 
23234   # We look for the Boot JDK through various means, going from more certain to
23235   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23236   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23237   # must check if this is indeed valid; otherwise we'll continue looking.
23238 
23239   # Test: Is bootjdk explicitely set by command line arguments?
23240 
23241   if test "x$BOOT_JDK_FOUND" = xno; then
23242     # Now execute the test
23243 
23244   if test "x$with_boot_jdk" != x; then
23245     BOOT_JDK=$with_boot_jdk
23246     BOOT_JDK_FOUND=maybe
23247     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23248 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23249   fi
23250 
23251 
23252     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23253     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23254       # Do we have a bin/java?
23255       if test ! -x "$BOOT_JDK/bin/java"; then
23256         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23258         BOOT_JDK_FOUND=no
23259       else
23260         # Do we have a bin/javac?
23261         if test ! -x "$BOOT_JDK/bin/javac"; then
23262           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23263 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23264           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23265 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23266           BOOT_JDK_FOUND=no
23267         else
23268           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23269           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23270 
23271           # Extra M4 quote needed to protect [] in grep expression.
23272           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23273           if test "x$FOUND_CORRECT_VERSION" = x; then
23274             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23276             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23277 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23278             BOOT_JDK_FOUND=no
23279           else
23280             # We're done! :-)
23281             BOOT_JDK_FOUND=yes
23282 
23283   # Only process if variable expands to non-empty
23284 
23285   if test "x$BOOT_JDK" != x; then
23286     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23287 
23288   # Input might be given as Windows format, start by converting to
23289   # unix format.
23290   path="$BOOT_JDK"
23291   new_path=`$CYGPATH -u "$path"`
23292 
23293   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23294   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23295   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23296   # "foo.exe" is OK but "foo" is an error.
23297   #
23298   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23299   # It is also a way to make sure we got the proper file name for the real test later on.
23300   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23301   if test "x$test_shortpath" = x; then
23302     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23303 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23304     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23305   fi
23306 
23307   # Call helper function which possibly converts this using DOS-style short mode.
23308   # If so, the updated path is stored in $new_path.
23309 
23310   input_path="$new_path"
23311   # Check if we need to convert this using DOS-style short mode. If the path
23312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23313   # take no chances and rewrite it.
23314   # Note: m4 eats our [], so we need to use [ and ] instead.
23315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23316   if test "x$has_forbidden_chars" != x; then
23317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23321       # Going to short mode and back again did indeed matter. Since short mode is
23322       # case insensitive, let's make it lowercase to improve readability.
23323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23324       # Now convert it back to Unix-style (cygpath)
23325       input_path=`$CYGPATH -u "$shortmode_path"`
23326       new_path="$input_path"
23327     fi
23328   fi
23329 
23330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23331   if test "x$test_cygdrive_prefix" = x; then
23332     # As a simple fix, exclude /usr/bin since it's not a real path.
23333     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23335       # a path prefixed by /cygdrive for fixpath to work.
23336       new_path="$CYGWIN_ROOT_PATH$input_path"
23337     fi
23338   fi
23339 
23340 
23341   if test "x$path" != "x$new_path"; then
23342     BOOT_JDK="$new_path"
23343     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23344 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23345   fi
23346 
23347     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23348 
23349   path="$BOOT_JDK"
23350   has_colon=`$ECHO $path | $GREP ^.:`
23351   new_path="$path"
23352   if test "x$has_colon" = x; then
23353     # Not in mixed or Windows style, start by that.
23354     new_path=`cmd //c echo $path`
23355   fi
23356 
23357 
23358   input_path="$new_path"
23359   # Check if we need to convert this using DOS-style short mode. If the path
23360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23361   # take no chances and rewrite it.
23362   # Note: m4 eats our [], so we need to use [ and ] instead.
23363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23364   if test "x$has_forbidden_chars" != x; then
23365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23367   fi
23368 
23369 
23370   windows_path="$new_path"
23371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23372     unix_path=`$CYGPATH -u "$windows_path"`
23373     new_path="$unix_path"
23374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23376     new_path="$unix_path"
23377   fi
23378 
23379   if test "x$path" != "x$new_path"; then
23380     BOOT_JDK="$new_path"
23381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23382 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23383   fi
23384 
23385   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23386   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23387 
23388     else
23389       # We're on a unix platform. Hooray! :)
23390       path="$BOOT_JDK"
23391       has_space=`$ECHO "$path" | $GREP " "`
23392       if test "x$has_space" != x; then
23393         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23394 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23395         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23396       fi
23397 
23398       # Use eval to expand a potential ~
23399       eval path="$path"
23400       if test ! -f "$path" && test ! -d "$path"; then
23401         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23402       fi
23403 
23404       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23405     fi
23406   fi
23407 
23408             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23409 $as_echo_n "checking for Boot JDK... " >&6; }
23410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23411 $as_echo "$BOOT_JDK" >&6; }
23412             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23413 $as_echo_n "checking Boot JDK version... " >&6; }
23414             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23415             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23416 $as_echo "$BOOT_JDK_VERSION" >&6; }
23417           fi # end check jdk version
23418         fi # end check javac
23419       fi # end check java
23420     fi # end check boot jdk found
23421   fi
23422 
23423   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23424     # Having specified an argument which is incorrect will produce an instant failure;
23425     # we should not go on looking
23426     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23427   fi
23428 
23429   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23430 
23431   if test "x$BOOT_JDK_FOUND" = xno; then
23432     # Now execute the test
23433 
23434   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23435     # First check at user selected default
23436 
23437   if test "x$BOOT_JDK_FOUND" = xno; then
23438     # Now execute the test
23439 
23440   if test -x /usr/libexec/java_home; then
23441     BOOT_JDK=`/usr/libexec/java_home `
23442     BOOT_JDK_FOUND=maybe
23443     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23444 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23445   fi
23446 
23447 
23448     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23449     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23450       # Do we have a bin/java?
23451       if test ! -x "$BOOT_JDK/bin/java"; then
23452         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23453 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23454         BOOT_JDK_FOUND=no
23455       else
23456         # Do we have a bin/javac?
23457         if test ! -x "$BOOT_JDK/bin/javac"; then
23458           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23460           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23461 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23462           BOOT_JDK_FOUND=no
23463         else
23464           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23465           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23466 
23467           # Extra M4 quote needed to protect [] in grep expression.
23468           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23469           if test "x$FOUND_CORRECT_VERSION" = x; then
23470             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23472             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23473 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23474             BOOT_JDK_FOUND=no
23475           else
23476             # We're done! :-)
23477             BOOT_JDK_FOUND=yes
23478 
23479   # Only process if variable expands to non-empty
23480 
23481   if test "x$BOOT_JDK" != x; then
23482     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23483 
23484   # Input might be given as Windows format, start by converting to
23485   # unix format.
23486   path="$BOOT_JDK"
23487   new_path=`$CYGPATH -u "$path"`
23488 
23489   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23490   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23491   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23492   # "foo.exe" is OK but "foo" is an error.
23493   #
23494   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23495   # It is also a way to make sure we got the proper file name for the real test later on.
23496   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23497   if test "x$test_shortpath" = x; then
23498     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23500     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23501   fi
23502 
23503   # Call helper function which possibly converts this using DOS-style short mode.
23504   # If so, the updated path is stored in $new_path.
23505 
23506   input_path="$new_path"
23507   # Check if we need to convert this using DOS-style short mode. If the path
23508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23509   # take no chances and rewrite it.
23510   # Note: m4 eats our [], so we need to use [ and ] instead.
23511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23512   if test "x$has_forbidden_chars" != x; then
23513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23514     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23515     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23516     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23517       # Going to short mode and back again did indeed matter. Since short mode is
23518       # case insensitive, let's make it lowercase to improve readability.
23519       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23520       # Now convert it back to Unix-style (cygpath)
23521       input_path=`$CYGPATH -u "$shortmode_path"`
23522       new_path="$input_path"
23523     fi
23524   fi
23525 
23526   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23527   if test "x$test_cygdrive_prefix" = x; then
23528     # As a simple fix, exclude /usr/bin since it's not a real path.
23529     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23530       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23531       # a path prefixed by /cygdrive for fixpath to work.
23532       new_path="$CYGWIN_ROOT_PATH$input_path"
23533     fi
23534   fi
23535 
23536 
23537   if test "x$path" != "x$new_path"; then
23538     BOOT_JDK="$new_path"
23539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23541   fi
23542 
23543     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23544 
23545   path="$BOOT_JDK"
23546   has_colon=`$ECHO $path | $GREP ^.:`
23547   new_path="$path"
23548   if test "x$has_colon" = x; then
23549     # Not in mixed or Windows style, start by that.
23550     new_path=`cmd //c echo $path`
23551   fi
23552 
23553 
23554   input_path="$new_path"
23555   # Check if we need to convert this using DOS-style short mode. If the path
23556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23557   # take no chances and rewrite it.
23558   # Note: m4 eats our [], so we need to use [ and ] instead.
23559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23560   if test "x$has_forbidden_chars" != x; then
23561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23563   fi
23564 
23565 
23566   windows_path="$new_path"
23567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23568     unix_path=`$CYGPATH -u "$windows_path"`
23569     new_path="$unix_path"
23570   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23571     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23572     new_path="$unix_path"
23573   fi
23574 
23575   if test "x$path" != "x$new_path"; then
23576     BOOT_JDK="$new_path"
23577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23579   fi
23580 
23581   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23582   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23583 
23584     else
23585       # We're on a unix platform. Hooray! :)
23586       path="$BOOT_JDK"
23587       has_space=`$ECHO "$path" | $GREP " "`
23588       if test "x$has_space" != x; then
23589         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23591         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23592       fi
23593 
23594       # Use eval to expand a potential ~
23595       eval path="$path"
23596       if test ! -f "$path" && test ! -d "$path"; then
23597         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23598       fi
23599 
23600       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23601     fi
23602   fi
23603 
23604             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23605 $as_echo_n "checking for Boot JDK... " >&6; }
23606             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23607 $as_echo "$BOOT_JDK" >&6; }
23608             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23609 $as_echo_n "checking Boot JDK version... " >&6; }
23610             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23612 $as_echo "$BOOT_JDK_VERSION" >&6; }
23613           fi # end check jdk version
23614         fi # end check javac
23615       fi # end check java
23616     fi # end check boot jdk found
23617   fi
23618 
23619     # If that did not work out (e.g. too old), try explicit versions instead
23620 
23621   if test "x$BOOT_JDK_FOUND" = xno; then
23622     # Now execute the test
23623 
23624   if test -x /usr/libexec/java_home; then
23625     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23626     BOOT_JDK_FOUND=maybe
23627     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23628 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23629   fi
23630 
23631 
23632     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23633     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23634       # Do we have a bin/java?
23635       if test ! -x "$BOOT_JDK/bin/java"; then
23636         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23637 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23638         BOOT_JDK_FOUND=no
23639       else
23640         # Do we have a bin/javac?
23641         if test ! -x "$BOOT_JDK/bin/javac"; then
23642           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23643 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23644           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23645 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23646           BOOT_JDK_FOUND=no
23647         else
23648           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23649           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23650 
23651           # Extra M4 quote needed to protect [] in grep expression.
23652           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23653           if test "x$FOUND_CORRECT_VERSION" = x; then
23654             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23656             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23657 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23658             BOOT_JDK_FOUND=no
23659           else
23660             # We're done! :-)
23661             BOOT_JDK_FOUND=yes
23662 
23663   # Only process if variable expands to non-empty
23664 
23665   if test "x$BOOT_JDK" != x; then
23666     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23667 
23668   # Input might be given as Windows format, start by converting to
23669   # unix format.
23670   path="$BOOT_JDK"
23671   new_path=`$CYGPATH -u "$path"`
23672 
23673   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23674   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23675   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23676   # "foo.exe" is OK but "foo" is an error.
23677   #
23678   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23679   # It is also a way to make sure we got the proper file name for the real test later on.
23680   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23681   if test "x$test_shortpath" = x; then
23682     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23683 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23684     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23685   fi
23686 
23687   # Call helper function which possibly converts this using DOS-style short mode.
23688   # If so, the updated path is stored in $new_path.
23689 
23690   input_path="$new_path"
23691   # Check if we need to convert this using DOS-style short mode. If the path
23692   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23693   # take no chances and rewrite it.
23694   # Note: m4 eats our [], so we need to use [ and ] instead.
23695   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23696   if test "x$has_forbidden_chars" != x; then
23697     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23698     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23699     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23700     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23701       # Going to short mode and back again did indeed matter. Since short mode is
23702       # case insensitive, let's make it lowercase to improve readability.
23703       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23704       # Now convert it back to Unix-style (cygpath)
23705       input_path=`$CYGPATH -u "$shortmode_path"`
23706       new_path="$input_path"
23707     fi
23708   fi
23709 
23710   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23711   if test "x$test_cygdrive_prefix" = x; then
23712     # As a simple fix, exclude /usr/bin since it's not a real path.
23713     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23714       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23715       # a path prefixed by /cygdrive for fixpath to work.
23716       new_path="$CYGWIN_ROOT_PATH$input_path"
23717     fi
23718   fi
23719 
23720 
23721   if test "x$path" != "x$new_path"; then
23722     BOOT_JDK="$new_path"
23723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23724 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23725   fi
23726 
23727     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23728 
23729   path="$BOOT_JDK"
23730   has_colon=`$ECHO $path | $GREP ^.:`
23731   new_path="$path"
23732   if test "x$has_colon" = x; then
23733     # Not in mixed or Windows style, start by that.
23734     new_path=`cmd //c echo $path`
23735   fi
23736 
23737 
23738   input_path="$new_path"
23739   # Check if we need to convert this using DOS-style short mode. If the path
23740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23741   # take no chances and rewrite it.
23742   # Note: m4 eats our [], so we need to use [ and ] instead.
23743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23744   if test "x$has_forbidden_chars" != x; then
23745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23746     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23747   fi
23748 
23749 
23750   windows_path="$new_path"
23751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23752     unix_path=`$CYGPATH -u "$windows_path"`
23753     new_path="$unix_path"
23754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23756     new_path="$unix_path"
23757   fi
23758 
23759   if test "x$path" != "x$new_path"; then
23760     BOOT_JDK="$new_path"
23761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23762 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23763   fi
23764 
23765   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23766   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23767 
23768     else
23769       # We're on a unix platform. Hooray! :)
23770       path="$BOOT_JDK"
23771       has_space=`$ECHO "$path" | $GREP " "`
23772       if test "x$has_space" != x; then
23773         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23774 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23775         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23776       fi
23777 
23778       # Use eval to expand a potential ~
23779       eval path="$path"
23780       if test ! -f "$path" && test ! -d "$path"; then
23781         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23782       fi
23783 
23784       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23785     fi
23786   fi
23787 
23788             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23789 $as_echo_n "checking for Boot JDK... " >&6; }
23790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23791 $as_echo "$BOOT_JDK" >&6; }
23792             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23793 $as_echo_n "checking Boot JDK version... " >&6; }
23794             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23795             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23796 $as_echo "$BOOT_JDK_VERSION" >&6; }
23797           fi # end check jdk version
23798         fi # end check javac
23799       fi # end check java
23800     fi # end check boot jdk found
23801   fi
23802 
23803 
23804   if test "x$BOOT_JDK_FOUND" = xno; then
23805     # Now execute the test
23806 
23807   if test -x /usr/libexec/java_home; then
23808     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23809     BOOT_JDK_FOUND=maybe
23810     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23811 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23812   fi
23813 
23814 
23815     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23816     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23817       # Do we have a bin/java?
23818       if test ! -x "$BOOT_JDK/bin/java"; then
23819         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23821         BOOT_JDK_FOUND=no
23822       else
23823         # Do we have a bin/javac?
23824         if test ! -x "$BOOT_JDK/bin/javac"; then
23825           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23827           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23828 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23829           BOOT_JDK_FOUND=no
23830         else
23831           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23832           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23833 
23834           # Extra M4 quote needed to protect [] in grep expression.
23835           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23836           if test "x$FOUND_CORRECT_VERSION" = x; then
23837             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23838 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23839             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23840 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23841             BOOT_JDK_FOUND=no
23842           else
23843             # We're done! :-)
23844             BOOT_JDK_FOUND=yes
23845 
23846   # Only process if variable expands to non-empty
23847 
23848   if test "x$BOOT_JDK" != x; then
23849     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850 
23851   # Input might be given as Windows format, start by converting to
23852   # unix format.
23853   path="$BOOT_JDK"
23854   new_path=`$CYGPATH -u "$path"`
23855 
23856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23859   # "foo.exe" is OK but "foo" is an error.
23860   #
23861   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23862   # It is also a way to make sure we got the proper file name for the real test later on.
23863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23864   if test "x$test_shortpath" = x; then
23865     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23867     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23868   fi
23869 
23870   # Call helper function which possibly converts this using DOS-style short mode.
23871   # If so, the updated path is stored in $new_path.
23872 
23873   input_path="$new_path"
23874   # Check if we need to convert this using DOS-style short mode. If the path
23875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23876   # take no chances and rewrite it.
23877   # Note: m4 eats our [], so we need to use [ and ] instead.
23878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23879   if test "x$has_forbidden_chars" != x; then
23880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23884       # Going to short mode and back again did indeed matter. Since short mode is
23885       # case insensitive, let's make it lowercase to improve readability.
23886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23887       # Now convert it back to Unix-style (cygpath)
23888       input_path=`$CYGPATH -u "$shortmode_path"`
23889       new_path="$input_path"
23890     fi
23891   fi
23892 
23893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23894   if test "x$test_cygdrive_prefix" = x; then
23895     # As a simple fix, exclude /usr/bin since it's not a real path.
23896     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23898       # a path prefixed by /cygdrive for fixpath to work.
23899       new_path="$CYGWIN_ROOT_PATH$input_path"
23900     fi
23901   fi
23902 
23903 
23904   if test "x$path" != "x$new_path"; then
23905     BOOT_JDK="$new_path"
23906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23908   fi
23909 
23910     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23911 
23912   path="$BOOT_JDK"
23913   has_colon=`$ECHO $path | $GREP ^.:`
23914   new_path="$path"
23915   if test "x$has_colon" = x; then
23916     # Not in mixed or Windows style, start by that.
23917     new_path=`cmd //c echo $path`
23918   fi
23919 
23920 
23921   input_path="$new_path"
23922   # Check if we need to convert this using DOS-style short mode. If the path
23923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23924   # take no chances and rewrite it.
23925   # Note: m4 eats our [], so we need to use [ and ] instead.
23926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23927   if test "x$has_forbidden_chars" != x; then
23928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23929     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23930   fi
23931 
23932 
23933   windows_path="$new_path"
23934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23935     unix_path=`$CYGPATH -u "$windows_path"`
23936     new_path="$unix_path"
23937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23939     new_path="$unix_path"
23940   fi
23941 
23942   if test "x$path" != "x$new_path"; then
23943     BOOT_JDK="$new_path"
23944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23945 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23946   fi
23947 
23948   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23949   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23950 
23951     else
23952       # We're on a unix platform. Hooray! :)
23953       path="$BOOT_JDK"
23954       has_space=`$ECHO "$path" | $GREP " "`
23955       if test "x$has_space" != x; then
23956         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23957 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23958         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23959       fi
23960 
23961       # Use eval to expand a potential ~
23962       eval path="$path"
23963       if test ! -f "$path" && test ! -d "$path"; then
23964         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23965       fi
23966 
23967       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23968     fi
23969   fi
23970 
23971             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23972 $as_echo_n "checking for Boot JDK... " >&6; }
23973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23974 $as_echo "$BOOT_JDK" >&6; }
23975             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23976 $as_echo_n "checking Boot JDK version... " >&6; }
23977             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23978             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23979 $as_echo "$BOOT_JDK_VERSION" >&6; }
23980           fi # end check jdk version
23981         fi # end check javac
23982       fi # end check java
23983     fi # end check boot jdk found
23984   fi
23985 
23986 
23987   if test "x$BOOT_JDK_FOUND" = xno; then
23988     # Now execute the test
23989 
23990   if test -x /usr/libexec/java_home; then
23991     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23992     BOOT_JDK_FOUND=maybe
23993     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23994 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23995   fi
23996 
23997 
23998     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23999     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24000       # Do we have a bin/java?
24001       if test ! -x "$BOOT_JDK/bin/java"; then
24002         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24004         BOOT_JDK_FOUND=no
24005       else
24006         # Do we have a bin/javac?
24007         if test ! -x "$BOOT_JDK/bin/javac"; then
24008           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24009 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24010           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24011 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24012           BOOT_JDK_FOUND=no
24013         else
24014           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24015           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24016 
24017           # Extra M4 quote needed to protect [] in grep expression.
24018           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24019           if test "x$FOUND_CORRECT_VERSION" = x; then
24020             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24021 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24022             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24023 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24024             BOOT_JDK_FOUND=no
24025           else
24026             # We're done! :-)
24027             BOOT_JDK_FOUND=yes
24028 
24029   # Only process if variable expands to non-empty
24030 
24031   if test "x$BOOT_JDK" != x; then
24032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24033 
24034   # Input might be given as Windows format, start by converting to
24035   # unix format.
24036   path="$BOOT_JDK"
24037   new_path=`$CYGPATH -u "$path"`
24038 
24039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24042   # "foo.exe" is OK but "foo" is an error.
24043   #
24044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24045   # It is also a way to make sure we got the proper file name for the real test later on.
24046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24047   if test "x$test_shortpath" = x; then
24048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24049 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24050     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24051   fi
24052 
24053   # Call helper function which possibly converts this using DOS-style short mode.
24054   # If so, the updated path is stored in $new_path.
24055 
24056   input_path="$new_path"
24057   # Check if we need to convert this using DOS-style short mode. If the path
24058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24059   # take no chances and rewrite it.
24060   # Note: m4 eats our [], so we need to use [ and ] instead.
24061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24062   if test "x$has_forbidden_chars" != x; then
24063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24067       # Going to short mode and back again did indeed matter. Since short mode is
24068       # case insensitive, let's make it lowercase to improve readability.
24069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24070       # Now convert it back to Unix-style (cygpath)
24071       input_path=`$CYGPATH -u "$shortmode_path"`
24072       new_path="$input_path"
24073     fi
24074   fi
24075 
24076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24077   if test "x$test_cygdrive_prefix" = x; then
24078     # As a simple fix, exclude /usr/bin since it's not a real path.
24079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24081       # a path prefixed by /cygdrive for fixpath to work.
24082       new_path="$CYGWIN_ROOT_PATH$input_path"
24083     fi
24084   fi
24085 
24086 
24087   if test "x$path" != "x$new_path"; then
24088     BOOT_JDK="$new_path"
24089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24091   fi
24092 
24093     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24094 
24095   path="$BOOT_JDK"
24096   has_colon=`$ECHO $path | $GREP ^.:`
24097   new_path="$path"
24098   if test "x$has_colon" = x; then
24099     # Not in mixed or Windows style, start by that.
24100     new_path=`cmd //c echo $path`
24101   fi
24102 
24103 
24104   input_path="$new_path"
24105   # Check if we need to convert this using DOS-style short mode. If the path
24106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24107   # take no chances and rewrite it.
24108   # Note: m4 eats our [], so we need to use [ and ] instead.
24109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24110   if test "x$has_forbidden_chars" != x; then
24111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24113   fi
24114 
24115 
24116   windows_path="$new_path"
24117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24118     unix_path=`$CYGPATH -u "$windows_path"`
24119     new_path="$unix_path"
24120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24122     new_path="$unix_path"
24123   fi
24124 
24125   if test "x$path" != "x$new_path"; then
24126     BOOT_JDK="$new_path"
24127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24128 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24129   fi
24130 
24131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24133 
24134     else
24135       # We're on a unix platform. Hooray! :)
24136       path="$BOOT_JDK"
24137       has_space=`$ECHO "$path" | $GREP " "`
24138       if test "x$has_space" != x; then
24139         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24141         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24142       fi
24143 
24144       # Use eval to expand a potential ~
24145       eval path="$path"
24146       if test ! -f "$path" && test ! -d "$path"; then
24147         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24148       fi
24149 
24150       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24151     fi
24152   fi
24153 
24154             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24155 $as_echo_n "checking for Boot JDK... " >&6; }
24156             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24157 $as_echo "$BOOT_JDK" >&6; }
24158             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24159 $as_echo_n "checking Boot JDK version... " >&6; }
24160             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24161             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24162 $as_echo "$BOOT_JDK_VERSION" >&6; }
24163           fi # end check jdk version
24164         fi # end check javac
24165       fi # end check java
24166     fi # end check boot jdk found
24167   fi
24168 
24169   fi
24170 
24171 
24172     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24173     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24174       # Do we have a bin/java?
24175       if test ! -x "$BOOT_JDK/bin/java"; then
24176         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24178         BOOT_JDK_FOUND=no
24179       else
24180         # Do we have a bin/javac?
24181         if test ! -x "$BOOT_JDK/bin/javac"; then
24182           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24184           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24185 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24186           BOOT_JDK_FOUND=no
24187         else
24188           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24189           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24190 
24191           # Extra M4 quote needed to protect [] in grep expression.
24192           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24193           if test "x$FOUND_CORRECT_VERSION" = x; then
24194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24196             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24197 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24198             BOOT_JDK_FOUND=no
24199           else
24200             # We're done! :-)
24201             BOOT_JDK_FOUND=yes
24202 
24203   # Only process if variable expands to non-empty
24204 
24205   if test "x$BOOT_JDK" != x; then
24206     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24207 
24208   # Input might be given as Windows format, start by converting to
24209   # unix format.
24210   path="$BOOT_JDK"
24211   new_path=`$CYGPATH -u "$path"`
24212 
24213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24216   # "foo.exe" is OK but "foo" is an error.
24217   #
24218   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24219   # It is also a way to make sure we got the proper file name for the real test later on.
24220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24221   if test "x$test_shortpath" = x; then
24222     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24224     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24225   fi
24226 
24227   # Call helper function which possibly converts this using DOS-style short mode.
24228   # If so, the updated path is stored in $new_path.
24229 
24230   input_path="$new_path"
24231   # Check if we need to convert this using DOS-style short mode. If the path
24232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24233   # take no chances and rewrite it.
24234   # Note: m4 eats our [], so we need to use [ and ] instead.
24235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24236   if test "x$has_forbidden_chars" != x; then
24237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24238     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24239     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24240     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24241       # Going to short mode and back again did indeed matter. Since short mode is
24242       # case insensitive, let's make it lowercase to improve readability.
24243       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24244       # Now convert it back to Unix-style (cygpath)
24245       input_path=`$CYGPATH -u "$shortmode_path"`
24246       new_path="$input_path"
24247     fi
24248   fi
24249 
24250   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24251   if test "x$test_cygdrive_prefix" = x; then
24252     # As a simple fix, exclude /usr/bin since it's not a real path.
24253     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24254       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24255       # a path prefixed by /cygdrive for fixpath to work.
24256       new_path="$CYGWIN_ROOT_PATH$input_path"
24257     fi
24258   fi
24259 
24260 
24261   if test "x$path" != "x$new_path"; then
24262     BOOT_JDK="$new_path"
24263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24264 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24265   fi
24266 
24267     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24268 
24269   path="$BOOT_JDK"
24270   has_colon=`$ECHO $path | $GREP ^.:`
24271   new_path="$path"
24272   if test "x$has_colon" = x; then
24273     # Not in mixed or Windows style, start by that.
24274     new_path=`cmd //c echo $path`
24275   fi
24276 
24277 
24278   input_path="$new_path"
24279   # Check if we need to convert this using DOS-style short mode. If the path
24280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24281   # take no chances and rewrite it.
24282   # Note: m4 eats our [], so we need to use [ and ] instead.
24283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24284   if test "x$has_forbidden_chars" != x; then
24285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24286     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24287   fi
24288 
24289 
24290   windows_path="$new_path"
24291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24292     unix_path=`$CYGPATH -u "$windows_path"`
24293     new_path="$unix_path"
24294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24296     new_path="$unix_path"
24297   fi
24298 
24299   if test "x$path" != "x$new_path"; then
24300     BOOT_JDK="$new_path"
24301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24302 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24303   fi
24304 
24305   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24306   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24307 
24308     else
24309       # We're on a unix platform. Hooray! :)
24310       path="$BOOT_JDK"
24311       has_space=`$ECHO "$path" | $GREP " "`
24312       if test "x$has_space" != x; then
24313         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24314 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24315         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24316       fi
24317 
24318       # Use eval to expand a potential ~
24319       eval path="$path"
24320       if test ! -f "$path" && test ! -d "$path"; then
24321         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24322       fi
24323 
24324       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24325     fi
24326   fi
24327 
24328             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24329 $as_echo_n "checking for Boot JDK... " >&6; }
24330             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24331 $as_echo "$BOOT_JDK" >&6; }
24332             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24333 $as_echo_n "checking Boot JDK version... " >&6; }
24334             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24335             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24336 $as_echo "$BOOT_JDK_VERSION" >&6; }
24337           fi # end check jdk version
24338         fi # end check javac
24339       fi # end check java
24340     fi # end check boot jdk found
24341   fi
24342 
24343 
24344   # Test: Is $JAVA_HOME set?
24345 
24346   if test "x$BOOT_JDK_FOUND" = xno; then
24347     # Now execute the test
24348 
24349   if test "x$JAVA_HOME" != x; then
24350     JAVA_HOME_PROCESSED="$JAVA_HOME"
24351 
24352   # Only process if variable expands to non-empty
24353 
24354   if test "x$JAVA_HOME_PROCESSED" != x; then
24355     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24356 
24357   # Input might be given as Windows format, start by converting to
24358   # unix format.
24359   path="$JAVA_HOME_PROCESSED"
24360   new_path=`$CYGPATH -u "$path"`
24361 
24362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24365   # "foo.exe" is OK but "foo" is an error.
24366   #
24367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24368   # It is also a way to make sure we got the proper file name for the real test later on.
24369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24370   if test "x$test_shortpath" = x; then
24371     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24372 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24373     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24374   fi
24375 
24376   # Call helper function which possibly converts this using DOS-style short mode.
24377   # If so, the updated path is stored in $new_path.
24378 
24379   input_path="$new_path"
24380   # Check if we need to convert this using DOS-style short mode. If the path
24381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382   # take no chances and rewrite it.
24383   # Note: m4 eats our [], so we need to use [ and ] instead.
24384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24385   if test "x$has_forbidden_chars" != x; then
24386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24390       # Going to short mode and back again did indeed matter. Since short mode is
24391       # case insensitive, let's make it lowercase to improve readability.
24392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393       # Now convert it back to Unix-style (cygpath)
24394       input_path=`$CYGPATH -u "$shortmode_path"`
24395       new_path="$input_path"
24396     fi
24397   fi
24398 
24399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24400   if test "x$test_cygdrive_prefix" = x; then
24401     # As a simple fix, exclude /usr/bin since it's not a real path.
24402     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24404       # a path prefixed by /cygdrive for fixpath to work.
24405       new_path="$CYGWIN_ROOT_PATH$input_path"
24406     fi
24407   fi
24408 
24409 
24410   if test "x$path" != "x$new_path"; then
24411     JAVA_HOME_PROCESSED="$new_path"
24412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24413 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24414   fi
24415 
24416     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417 
24418   path="$JAVA_HOME_PROCESSED"
24419   has_colon=`$ECHO $path | $GREP ^.:`
24420   new_path="$path"
24421   if test "x$has_colon" = x; then
24422     # Not in mixed or Windows style, start by that.
24423     new_path=`cmd //c echo $path`
24424   fi
24425 
24426 
24427   input_path="$new_path"
24428   # Check if we need to convert this using DOS-style short mode. If the path
24429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430   # take no chances and rewrite it.
24431   # Note: m4 eats our [], so we need to use [ and ] instead.
24432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24433   if test "x$has_forbidden_chars" != x; then
24434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24436   fi
24437 
24438 
24439   windows_path="$new_path"
24440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441     unix_path=`$CYGPATH -u "$windows_path"`
24442     new_path="$unix_path"
24443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24445     new_path="$unix_path"
24446   fi
24447 
24448   if test "x$path" != "x$new_path"; then
24449     JAVA_HOME_PROCESSED="$new_path"
24450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24451 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24452   fi
24453 
24454   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24455   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24456 
24457     else
24458       # We're on a unix platform. Hooray! :)
24459       path="$JAVA_HOME_PROCESSED"
24460       has_space=`$ECHO "$path" | $GREP " "`
24461       if test "x$has_space" != x; then
24462         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24463 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24464         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24465       fi
24466 
24467       # Use eval to expand a potential ~
24468       eval path="$path"
24469       if test ! -f "$path" && test ! -d "$path"; then
24470         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24471       fi
24472 
24473       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24474     fi
24475   fi
24476 
24477     if test ! -d "$JAVA_HOME_PROCESSED"; then
24478       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24479 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24480     else
24481       # Aha, the user has set a JAVA_HOME
24482       # let us use that as the Boot JDK.
24483       BOOT_JDK="$JAVA_HOME_PROCESSED"
24484       BOOT_JDK_FOUND=maybe
24485       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24486 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24487     fi
24488   fi
24489 
24490 
24491     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24492     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24493       # Do we have a bin/java?
24494       if test ! -x "$BOOT_JDK/bin/java"; then
24495         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24496 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24497         BOOT_JDK_FOUND=no
24498       else
24499         # Do we have a bin/javac?
24500         if test ! -x "$BOOT_JDK/bin/javac"; then
24501           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24503           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24504 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24505           BOOT_JDK_FOUND=no
24506         else
24507           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24508           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24509 
24510           # Extra M4 quote needed to protect [] in grep expression.
24511           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24512           if test "x$FOUND_CORRECT_VERSION" = x; then
24513             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24514 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24515             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24516 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24517             BOOT_JDK_FOUND=no
24518           else
24519             # We're done! :-)
24520             BOOT_JDK_FOUND=yes
24521 
24522   # Only process if variable expands to non-empty
24523 
24524   if test "x$BOOT_JDK" != x; then
24525     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24526 
24527   # Input might be given as Windows format, start by converting to
24528   # unix format.
24529   path="$BOOT_JDK"
24530   new_path=`$CYGPATH -u "$path"`
24531 
24532   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24533   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24534   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24535   # "foo.exe" is OK but "foo" is an error.
24536   #
24537   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24538   # It is also a way to make sure we got the proper file name for the real test later on.
24539   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24540   if test "x$test_shortpath" = x; then
24541     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24542 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24543     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24544   fi
24545 
24546   # Call helper function which possibly converts this using DOS-style short mode.
24547   # If so, the updated path is stored in $new_path.
24548 
24549   input_path="$new_path"
24550   # Check if we need to convert this using DOS-style short mode. If the path
24551   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24552   # take no chances and rewrite it.
24553   # Note: m4 eats our [], so we need to use [ and ] instead.
24554   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24555   if test "x$has_forbidden_chars" != x; then
24556     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24557     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24558     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24559     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24560       # Going to short mode and back again did indeed matter. Since short mode is
24561       # case insensitive, let's make it lowercase to improve readability.
24562       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24563       # Now convert it back to Unix-style (cygpath)
24564       input_path=`$CYGPATH -u "$shortmode_path"`
24565       new_path="$input_path"
24566     fi
24567   fi
24568 
24569   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24570   if test "x$test_cygdrive_prefix" = x; then
24571     # As a simple fix, exclude /usr/bin since it's not a real path.
24572     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24573       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24574       # a path prefixed by /cygdrive for fixpath to work.
24575       new_path="$CYGWIN_ROOT_PATH$input_path"
24576     fi
24577   fi
24578 
24579 
24580   if test "x$path" != "x$new_path"; then
24581     BOOT_JDK="$new_path"
24582     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24583 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24584   fi
24585 
24586     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24587 
24588   path="$BOOT_JDK"
24589   has_colon=`$ECHO $path | $GREP ^.:`
24590   new_path="$path"
24591   if test "x$has_colon" = x; then
24592     # Not in mixed or Windows style, start by that.
24593     new_path=`cmd //c echo $path`
24594   fi
24595 
24596 
24597   input_path="$new_path"
24598   # Check if we need to convert this using DOS-style short mode. If the path
24599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24600   # take no chances and rewrite it.
24601   # Note: m4 eats our [], so we need to use [ and ] instead.
24602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24603   if test "x$has_forbidden_chars" != x; then
24604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24605     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24606   fi
24607 
24608 
24609   windows_path="$new_path"
24610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24611     unix_path=`$CYGPATH -u "$windows_path"`
24612     new_path="$unix_path"
24613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24615     new_path="$unix_path"
24616   fi
24617 
24618   if test "x$path" != "x$new_path"; then
24619     BOOT_JDK="$new_path"
24620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24621 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24622   fi
24623 
24624   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24625   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24626 
24627     else
24628       # We're on a unix platform. Hooray! :)
24629       path="$BOOT_JDK"
24630       has_space=`$ECHO "$path" | $GREP " "`
24631       if test "x$has_space" != x; then
24632         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24633 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24634         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24635       fi
24636 
24637       # Use eval to expand a potential ~
24638       eval path="$path"
24639       if test ! -f "$path" && test ! -d "$path"; then
24640         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24641       fi
24642 
24643       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24644     fi
24645   fi
24646 
24647             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24648 $as_echo_n "checking for Boot JDK... " >&6; }
24649             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24650 $as_echo "$BOOT_JDK" >&6; }
24651             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24652 $as_echo_n "checking Boot JDK version... " >&6; }
24653             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24654             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24655 $as_echo "$BOOT_JDK_VERSION" >&6; }
24656           fi # end check jdk version
24657         fi # end check javac
24658       fi # end check java
24659     fi # end check boot jdk found
24660   fi
24661 
24662 
24663   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24664 
24665   if test "x$BOOT_JDK_FOUND" = xno; then
24666     # Now execute the test
24667 
24668   # Extract the first word of "javac", so it can be a program name with args.
24669 set dummy javac; ac_word=$2
24670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24671 $as_echo_n "checking for $ac_word... " >&6; }
24672 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24673   $as_echo_n "(cached) " >&6
24674 else
24675   case $JAVAC_CHECK in
24676   [\\/]* | ?:[\\/]*)
24677   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24678   ;;
24679   *)
24680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24681 for as_dir in $PATH
24682 do
24683   IFS=$as_save_IFS
24684   test -z "$as_dir" && as_dir=.
24685     for ac_exec_ext in '' $ac_executable_extensions; do
24686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24687     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24689     break 2
24690   fi
24691 done
24692   done
24693 IFS=$as_save_IFS
24694 
24695   ;;
24696 esac
24697 fi
24698 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24699 if test -n "$JAVAC_CHECK"; then
24700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24701 $as_echo "$JAVAC_CHECK" >&6; }
24702 else
24703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24704 $as_echo "no" >&6; }
24705 fi
24706 
24707 
24708   # Extract the first word of "java", so it can be a program name with args.
24709 set dummy java; ac_word=$2
24710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24711 $as_echo_n "checking for $ac_word... " >&6; }
24712 if ${ac_cv_path_JAVA_CHECK+:} false; then :
24713   $as_echo_n "(cached) " >&6
24714 else
24715   case $JAVA_CHECK in
24716   [\\/]* | ?:[\\/]*)
24717   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24718   ;;
24719   *)
24720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24721 for as_dir in $PATH
24722 do
24723   IFS=$as_save_IFS
24724   test -z "$as_dir" && as_dir=.
24725     for ac_exec_ext in '' $ac_executable_extensions; do
24726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24727     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24729     break 2
24730   fi
24731 done
24732   done
24733 IFS=$as_save_IFS
24734 
24735   ;;
24736 esac
24737 fi
24738 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24739 if test -n "$JAVA_CHECK"; then
24740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24741 $as_echo "$JAVA_CHECK" >&6; }
24742 else
24743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24744 $as_echo "no" >&6; }
24745 fi
24746 
24747 
24748   BINARY="$JAVAC_CHECK"
24749   if test "x$JAVAC_CHECK" = x; then
24750     BINARY="$JAVA_CHECK"
24751   fi
24752   if test "x$BINARY" != x; then
24753     # So there is a java(c) binary, it might be part of a JDK.
24754     # Lets find the JDK/JRE directory by following symbolic links.
24755     # Linux/GNU systems often have links from /usr/bin/java to
24756     # /etc/alternatives/java to the real JDK binary.
24757 
24758   if test "x$OPENJDK_BUILD_OS" != xwindows; then
24759     # Follow a chain of symbolic links. Use readlink
24760     # where it exists, else fall back to horribly
24761     # complicated shell code.
24762     if test "x$READLINK_TESTED" != yes; then
24763       # On MacOSX there is a readlink tool with a different
24764       # purpose than the GNU readlink tool. Check the found readlink.
24765       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24766       if test "x$ISGNU" = x; then
24767         # A readlink that we do not know how to use.
24768         # Are there other non-GNU readlinks out there?
24769         READLINK_TESTED=yes
24770         READLINK=
24771       fi
24772     fi
24773 
24774     if test "x$READLINK" != x; then
24775       BINARY=`$READLINK -f $BINARY`
24776     else
24777       # Save the current directory for restoring afterwards
24778       STARTDIR=$PWD
24779       COUNTER=0
24780       sym_link_dir=`$DIRNAME $BINARY`
24781       sym_link_file=`$BASENAME $BINARY`
24782       cd $sym_link_dir
24783       # Use -P flag to resolve symlinks in directories.
24784       cd `$THEPWDCMD -P`
24785       sym_link_dir=`$THEPWDCMD -P`
24786       # Resolve file symlinks
24787       while test $COUNTER -lt 20; do
24788         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24789         if test "x$ISLINK" == x; then
24790           # This is not a symbolic link! We are done!
24791           break
24792         fi
24793         # Again resolve directory symlinks since the target of the just found
24794         # link could be in a different directory
24795         cd `$DIRNAME $ISLINK`
24796         sym_link_dir=`$THEPWDCMD -P`
24797         sym_link_file=`$BASENAME $ISLINK`
24798         let COUNTER=COUNTER+1
24799       done
24800       cd $STARTDIR
24801       BINARY=$sym_link_dir/$sym_link_file
24802     fi
24803   fi
24804 
24805     BOOT_JDK=`dirname "$BINARY"`
24806     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24807     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24808       # Looks like we found ourselves an JDK
24809       BOOT_JDK_FOUND=maybe
24810       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24811 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24812     fi
24813   fi
24814 
24815 
24816     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24817     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24818       # Do we have a bin/java?
24819       if test ! -x "$BOOT_JDK/bin/java"; then
24820         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24822         BOOT_JDK_FOUND=no
24823       else
24824         # Do we have a bin/javac?
24825         if test ! -x "$BOOT_JDK/bin/javac"; then
24826           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24828           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24829 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24830           BOOT_JDK_FOUND=no
24831         else
24832           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24833           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24834 
24835           # Extra M4 quote needed to protect [] in grep expression.
24836           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24837           if test "x$FOUND_CORRECT_VERSION" = x; then
24838             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24840             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24841 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24842             BOOT_JDK_FOUND=no
24843           else
24844             # We're done! :-)
24845             BOOT_JDK_FOUND=yes
24846 
24847   # Only process if variable expands to non-empty
24848 
24849   if test "x$BOOT_JDK" != x; then
24850     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24851 
24852   # Input might be given as Windows format, start by converting to
24853   # unix format.
24854   path="$BOOT_JDK"
24855   new_path=`$CYGPATH -u "$path"`
24856 
24857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24860   # "foo.exe" is OK but "foo" is an error.
24861   #
24862   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24863   # It is also a way to make sure we got the proper file name for the real test later on.
24864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24865   if test "x$test_shortpath" = x; then
24866     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24867 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24868     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24869   fi
24870 
24871   # Call helper function which possibly converts this using DOS-style short mode.
24872   # If so, the updated path is stored in $new_path.
24873 
24874   input_path="$new_path"
24875   # Check if we need to convert this using DOS-style short mode. If the path
24876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24877   # take no chances and rewrite it.
24878   # Note: m4 eats our [], so we need to use [ and ] instead.
24879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24880   if test "x$has_forbidden_chars" != x; then
24881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24885       # Going to short mode and back again did indeed matter. Since short mode is
24886       # case insensitive, let's make it lowercase to improve readability.
24887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24888       # Now convert it back to Unix-style (cygpath)
24889       input_path=`$CYGPATH -u "$shortmode_path"`
24890       new_path="$input_path"
24891     fi
24892   fi
24893 
24894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24895   if test "x$test_cygdrive_prefix" = x; then
24896     # As a simple fix, exclude /usr/bin since it's not a real path.
24897     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24899       # a path prefixed by /cygdrive for fixpath to work.
24900       new_path="$CYGWIN_ROOT_PATH$input_path"
24901     fi
24902   fi
24903 
24904 
24905   if test "x$path" != "x$new_path"; then
24906     BOOT_JDK="$new_path"
24907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24908 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24909   fi
24910 
24911     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912 
24913   path="$BOOT_JDK"
24914   has_colon=`$ECHO $path | $GREP ^.:`
24915   new_path="$path"
24916   if test "x$has_colon" = x; then
24917     # Not in mixed or Windows style, start by that.
24918     new_path=`cmd //c echo $path`
24919   fi
24920 
24921 
24922   input_path="$new_path"
24923   # Check if we need to convert this using DOS-style short mode. If the path
24924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24925   # take no chances and rewrite it.
24926   # Note: m4 eats our [], so we need to use [ and ] instead.
24927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24928   if test "x$has_forbidden_chars" != x; then
24929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24930     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24931   fi
24932 
24933 
24934   windows_path="$new_path"
24935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24936     unix_path=`$CYGPATH -u "$windows_path"`
24937     new_path="$unix_path"
24938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24940     new_path="$unix_path"
24941   fi
24942 
24943   if test "x$path" != "x$new_path"; then
24944     BOOT_JDK="$new_path"
24945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24946 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24947   fi
24948 
24949   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24950   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24951 
24952     else
24953       # We're on a unix platform. Hooray! :)
24954       path="$BOOT_JDK"
24955       has_space=`$ECHO "$path" | $GREP " "`
24956       if test "x$has_space" != x; then
24957         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24959         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24960       fi
24961 
24962       # Use eval to expand a potential ~
24963       eval path="$path"
24964       if test ! -f "$path" && test ! -d "$path"; then
24965         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24966       fi
24967 
24968       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24969     fi
24970   fi
24971 
24972             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24973 $as_echo_n "checking for Boot JDK... " >&6; }
24974             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24975 $as_echo "$BOOT_JDK" >&6; }
24976             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24977 $as_echo_n "checking Boot JDK version... " >&6; }
24978             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24980 $as_echo "$BOOT_JDK_VERSION" >&6; }
24981           fi # end check jdk version
24982         fi # end check javac
24983       fi # end check java
24984     fi # end check boot jdk found
24985   fi
24986 
24987 
24988   # Test: Is there a JDK installed in default, well-known locations?
24989 
24990   if test "x$BOOT_JDK_FOUND" = xno; then
24991     # Now execute the test
24992 
24993   if test "x$OPENJDK_TARGET_OS" = xwindows; then
24994 
24995   if test "x$BOOT_JDK_FOUND" = xno; then
24996     # Now execute the test
24997 
24998   if test "x$ProgramW6432" != x; then
24999     VIRTUAL_DIR="$ProgramW6432/Java"
25000 
25001   windows_path="$VIRTUAL_DIR"
25002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25003     unix_path=`$CYGPATH -u "$windows_path"`
25004     VIRTUAL_DIR="$unix_path"
25005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25007     VIRTUAL_DIR="$unix_path"
25008   fi
25009 
25010 
25011   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25012   BOOT_JDK_SUFFIX=""
25013   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25014   if test "x$ALL_JDKS_FOUND" != x; then
25015     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25016 
25017   if test "x$BOOT_JDK_FOUND" = xno; then
25018     # Now execute the test
25019 
25020         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25021         if test -d "$BOOT_JDK"; then
25022           BOOT_JDK_FOUND=maybe
25023           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25024 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25025         fi
25026 
25027 
25028     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25029     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25030       # Do we have a bin/java?
25031       if test ! -x "$BOOT_JDK/bin/java"; then
25032         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25034         BOOT_JDK_FOUND=no
25035       else
25036         # Do we have a bin/javac?
25037         if test ! -x "$BOOT_JDK/bin/javac"; then
25038           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25040           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25041 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25042           BOOT_JDK_FOUND=no
25043         else
25044           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25045           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25046 
25047           # Extra M4 quote needed to protect [] in grep expression.
25048           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25049           if test "x$FOUND_CORRECT_VERSION" = x; then
25050             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25052             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25053 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25054             BOOT_JDK_FOUND=no
25055           else
25056             # We're done! :-)
25057             BOOT_JDK_FOUND=yes
25058 
25059   # Only process if variable expands to non-empty
25060 
25061   if test "x$BOOT_JDK" != x; then
25062     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25063 
25064   # Input might be given as Windows format, start by converting to
25065   # unix format.
25066   path="$BOOT_JDK"
25067   new_path=`$CYGPATH -u "$path"`
25068 
25069   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25070   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25071   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25072   # "foo.exe" is OK but "foo" is an error.
25073   #
25074   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25075   # It is also a way to make sure we got the proper file name for the real test later on.
25076   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25077   if test "x$test_shortpath" = x; then
25078     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25079 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25080     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25081   fi
25082 
25083   # Call helper function which possibly converts this using DOS-style short mode.
25084   # If so, the updated path is stored in $new_path.
25085 
25086   input_path="$new_path"
25087   # Check if we need to convert this using DOS-style short mode. If the path
25088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25089   # take no chances and rewrite it.
25090   # Note: m4 eats our [], so we need to use [ and ] instead.
25091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25092   if test "x$has_forbidden_chars" != x; then
25093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25094     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25095     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25096     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25097       # Going to short mode and back again did indeed matter. Since short mode is
25098       # case insensitive, let's make it lowercase to improve readability.
25099       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100       # Now convert it back to Unix-style (cygpath)
25101       input_path=`$CYGPATH -u "$shortmode_path"`
25102       new_path="$input_path"
25103     fi
25104   fi
25105 
25106   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25107   if test "x$test_cygdrive_prefix" = x; then
25108     # As a simple fix, exclude /usr/bin since it's not a real path.
25109     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25110       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25111       # a path prefixed by /cygdrive for fixpath to work.
25112       new_path="$CYGWIN_ROOT_PATH$input_path"
25113     fi
25114   fi
25115 
25116 
25117   if test "x$path" != "x$new_path"; then
25118     BOOT_JDK="$new_path"
25119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25120 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25121   fi
25122 
25123     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25124 
25125   path="$BOOT_JDK"
25126   has_colon=`$ECHO $path | $GREP ^.:`
25127   new_path="$path"
25128   if test "x$has_colon" = x; then
25129     # Not in mixed or Windows style, start by that.
25130     new_path=`cmd //c echo $path`
25131   fi
25132 
25133 
25134   input_path="$new_path"
25135   # Check if we need to convert this using DOS-style short mode. If the path
25136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25137   # take no chances and rewrite it.
25138   # Note: m4 eats our [], so we need to use [ and ] instead.
25139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25140   if test "x$has_forbidden_chars" != x; then
25141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25142     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25143   fi
25144 
25145 
25146   windows_path="$new_path"
25147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25148     unix_path=`$CYGPATH -u "$windows_path"`
25149     new_path="$unix_path"
25150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25152     new_path="$unix_path"
25153   fi
25154 
25155   if test "x$path" != "x$new_path"; then
25156     BOOT_JDK="$new_path"
25157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25158 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25159   fi
25160 
25161   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25162   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25163 
25164     else
25165       # We're on a unix platform. Hooray! :)
25166       path="$BOOT_JDK"
25167       has_space=`$ECHO "$path" | $GREP " "`
25168       if test "x$has_space" != x; then
25169         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25170 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25171         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25172       fi
25173 
25174       # Use eval to expand a potential ~
25175       eval path="$path"
25176       if test ! -f "$path" && test ! -d "$path"; then
25177         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25178       fi
25179 
25180       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25181     fi
25182   fi
25183 
25184             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25185 $as_echo_n "checking for Boot JDK... " >&6; }
25186             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25187 $as_echo "$BOOT_JDK" >&6; }
25188             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25189 $as_echo_n "checking Boot JDK version... " >&6; }
25190             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25192 $as_echo "$BOOT_JDK_VERSION" >&6; }
25193           fi # end check jdk version
25194         fi # end check javac
25195       fi # end check java
25196     fi # end check boot jdk found
25197   fi
25198 
25199     done
25200   fi
25201 
25202   fi
25203 
25204 
25205     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25206     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25207       # Do we have a bin/java?
25208       if test ! -x "$BOOT_JDK/bin/java"; then
25209         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25210 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25211         BOOT_JDK_FOUND=no
25212       else
25213         # Do we have a bin/javac?
25214         if test ! -x "$BOOT_JDK/bin/javac"; then
25215           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25216 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25217           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25218 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25219           BOOT_JDK_FOUND=no
25220         else
25221           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25222           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25223 
25224           # Extra M4 quote needed to protect [] in grep expression.
25225           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25226           if test "x$FOUND_CORRECT_VERSION" = x; then
25227             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25228 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25229             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25230 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25231             BOOT_JDK_FOUND=no
25232           else
25233             # We're done! :-)
25234             BOOT_JDK_FOUND=yes
25235 
25236   # Only process if variable expands to non-empty
25237 
25238   if test "x$BOOT_JDK" != x; then
25239     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25240 
25241   # Input might be given as Windows format, start by converting to
25242   # unix format.
25243   path="$BOOT_JDK"
25244   new_path=`$CYGPATH -u "$path"`
25245 
25246   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25247   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25248   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25249   # "foo.exe" is OK but "foo" is an error.
25250   #
25251   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25252   # It is also a way to make sure we got the proper file name for the real test later on.
25253   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25254   if test "x$test_shortpath" = x; then
25255     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25256 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25257     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25258   fi
25259 
25260   # Call helper function which possibly converts this using DOS-style short mode.
25261   # If so, the updated path is stored in $new_path.
25262 
25263   input_path="$new_path"
25264   # Check if we need to convert this using DOS-style short mode. If the path
25265   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25266   # take no chances and rewrite it.
25267   # Note: m4 eats our [], so we need to use [ and ] instead.
25268   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25269   if test "x$has_forbidden_chars" != x; then
25270     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25271     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25272     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25273     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25274       # Going to short mode and back again did indeed matter. Since short mode is
25275       # case insensitive, let's make it lowercase to improve readability.
25276       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25277       # Now convert it back to Unix-style (cygpath)
25278       input_path=`$CYGPATH -u "$shortmode_path"`
25279       new_path="$input_path"
25280     fi
25281   fi
25282 
25283   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25284   if test "x$test_cygdrive_prefix" = x; then
25285     # As a simple fix, exclude /usr/bin since it's not a real path.
25286     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25287       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25288       # a path prefixed by /cygdrive for fixpath to work.
25289       new_path="$CYGWIN_ROOT_PATH$input_path"
25290     fi
25291   fi
25292 
25293 
25294   if test "x$path" != "x$new_path"; then
25295     BOOT_JDK="$new_path"
25296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25297 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25298   fi
25299 
25300     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25301 
25302   path="$BOOT_JDK"
25303   has_colon=`$ECHO $path | $GREP ^.:`
25304   new_path="$path"
25305   if test "x$has_colon" = x; then
25306     # Not in mixed or Windows style, start by that.
25307     new_path=`cmd //c echo $path`
25308   fi
25309 
25310 
25311   input_path="$new_path"
25312   # Check if we need to convert this using DOS-style short mode. If the path
25313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25314   # take no chances and rewrite it.
25315   # Note: m4 eats our [], so we need to use [ and ] instead.
25316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25317   if test "x$has_forbidden_chars" != x; then
25318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25319     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25320   fi
25321 
25322 
25323   windows_path="$new_path"
25324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25325     unix_path=`$CYGPATH -u "$windows_path"`
25326     new_path="$unix_path"
25327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25329     new_path="$unix_path"
25330   fi
25331 
25332   if test "x$path" != "x$new_path"; then
25333     BOOT_JDK="$new_path"
25334     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25335 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25336   fi
25337 
25338   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25339   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25340 
25341     else
25342       # We're on a unix platform. Hooray! :)
25343       path="$BOOT_JDK"
25344       has_space=`$ECHO "$path" | $GREP " "`
25345       if test "x$has_space" != x; then
25346         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25347 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25348         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25349       fi
25350 
25351       # Use eval to expand a potential ~
25352       eval path="$path"
25353       if test ! -f "$path" && test ! -d "$path"; then
25354         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25355       fi
25356 
25357       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25358     fi
25359   fi
25360 
25361             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25362 $as_echo_n "checking for Boot JDK... " >&6; }
25363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25364 $as_echo "$BOOT_JDK" >&6; }
25365             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25366 $as_echo_n "checking Boot JDK version... " >&6; }
25367             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25368             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25369 $as_echo "$BOOT_JDK_VERSION" >&6; }
25370           fi # end check jdk version
25371         fi # end check javac
25372       fi # end check java
25373     fi # end check boot jdk found
25374   fi
25375 
25376 
25377   if test "x$BOOT_JDK_FOUND" = xno; then
25378     # Now execute the test
25379 
25380   if test "x$PROGRAMW6432" != x; then
25381     VIRTUAL_DIR="$PROGRAMW6432/Java"
25382 
25383   windows_path="$VIRTUAL_DIR"
25384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25385     unix_path=`$CYGPATH -u "$windows_path"`
25386     VIRTUAL_DIR="$unix_path"
25387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25389     VIRTUAL_DIR="$unix_path"
25390   fi
25391 
25392 
25393   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25394   BOOT_JDK_SUFFIX=""
25395   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25396   if test "x$ALL_JDKS_FOUND" != x; then
25397     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25398 
25399   if test "x$BOOT_JDK_FOUND" = xno; then
25400     # Now execute the test
25401 
25402         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25403         if test -d "$BOOT_JDK"; then
25404           BOOT_JDK_FOUND=maybe
25405           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25406 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25407         fi
25408 
25409 
25410     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25411     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25412       # Do we have a bin/java?
25413       if test ! -x "$BOOT_JDK/bin/java"; then
25414         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25416         BOOT_JDK_FOUND=no
25417       else
25418         # Do we have a bin/javac?
25419         if test ! -x "$BOOT_JDK/bin/javac"; then
25420           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25422           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25423 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25424           BOOT_JDK_FOUND=no
25425         else
25426           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25427           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25428 
25429           # Extra M4 quote needed to protect [] in grep expression.
25430           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25431           if test "x$FOUND_CORRECT_VERSION" = x; then
25432             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25434             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25435 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25436             BOOT_JDK_FOUND=no
25437           else
25438             # We're done! :-)
25439             BOOT_JDK_FOUND=yes
25440 
25441   # Only process if variable expands to non-empty
25442 
25443   if test "x$BOOT_JDK" != x; then
25444     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25445 
25446   # Input might be given as Windows format, start by converting to
25447   # unix format.
25448   path="$BOOT_JDK"
25449   new_path=`$CYGPATH -u "$path"`
25450 
25451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25454   # "foo.exe" is OK but "foo" is an error.
25455   #
25456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25457   # It is also a way to make sure we got the proper file name for the real test later on.
25458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25459   if test "x$test_shortpath" = x; then
25460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25461 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25462     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25463   fi
25464 
25465   # Call helper function which possibly converts this using DOS-style short mode.
25466   # If so, the updated path is stored in $new_path.
25467 
25468   input_path="$new_path"
25469   # Check if we need to convert this using DOS-style short mode. If the path
25470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25471   # take no chances and rewrite it.
25472   # Note: m4 eats our [], so we need to use [ and ] instead.
25473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25474   if test "x$has_forbidden_chars" != x; then
25475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25479       # Going to short mode and back again did indeed matter. Since short mode is
25480       # case insensitive, let's make it lowercase to improve readability.
25481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482       # Now convert it back to Unix-style (cygpath)
25483       input_path=`$CYGPATH -u "$shortmode_path"`
25484       new_path="$input_path"
25485     fi
25486   fi
25487 
25488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25489   if test "x$test_cygdrive_prefix" = x; then
25490     # As a simple fix, exclude /usr/bin since it's not a real path.
25491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25493       # a path prefixed by /cygdrive for fixpath to work.
25494       new_path="$CYGWIN_ROOT_PATH$input_path"
25495     fi
25496   fi
25497 
25498 
25499   if test "x$path" != "x$new_path"; then
25500     BOOT_JDK="$new_path"
25501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25503   fi
25504 
25505     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25506 
25507   path="$BOOT_JDK"
25508   has_colon=`$ECHO $path | $GREP ^.:`
25509   new_path="$path"
25510   if test "x$has_colon" = x; then
25511     # Not in mixed or Windows style, start by that.
25512     new_path=`cmd //c echo $path`
25513   fi
25514 
25515 
25516   input_path="$new_path"
25517   # Check if we need to convert this using DOS-style short mode. If the path
25518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25519   # take no chances and rewrite it.
25520   # Note: m4 eats our [], so we need to use [ and ] instead.
25521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25522   if test "x$has_forbidden_chars" != x; then
25523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25525   fi
25526 
25527 
25528   windows_path="$new_path"
25529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25530     unix_path=`$CYGPATH -u "$windows_path"`
25531     new_path="$unix_path"
25532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25534     new_path="$unix_path"
25535   fi
25536 
25537   if test "x$path" != "x$new_path"; then
25538     BOOT_JDK="$new_path"
25539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25541   fi
25542 
25543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25545 
25546     else
25547       # We're on a unix platform. Hooray! :)
25548       path="$BOOT_JDK"
25549       has_space=`$ECHO "$path" | $GREP " "`
25550       if test "x$has_space" != x; then
25551         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25552 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25553         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25554       fi
25555 
25556       # Use eval to expand a potential ~
25557       eval path="$path"
25558       if test ! -f "$path" && test ! -d "$path"; then
25559         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25560       fi
25561 
25562       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25563     fi
25564   fi
25565 
25566             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25567 $as_echo_n "checking for Boot JDK... " >&6; }
25568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25569 $as_echo "$BOOT_JDK" >&6; }
25570             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25571 $as_echo_n "checking Boot JDK version... " >&6; }
25572             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25573             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25574 $as_echo "$BOOT_JDK_VERSION" >&6; }
25575           fi # end check jdk version
25576         fi # end check javac
25577       fi # end check java
25578     fi # end check boot jdk found
25579   fi
25580 
25581     done
25582   fi
25583 
25584   fi
25585 
25586 
25587     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25588     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25589       # Do we have a bin/java?
25590       if test ! -x "$BOOT_JDK/bin/java"; then
25591         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25592 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25593         BOOT_JDK_FOUND=no
25594       else
25595         # Do we have a bin/javac?
25596         if test ! -x "$BOOT_JDK/bin/javac"; then
25597           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25599           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25600 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25601           BOOT_JDK_FOUND=no
25602         else
25603           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25604           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25605 
25606           # Extra M4 quote needed to protect [] in grep expression.
25607           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25608           if test "x$FOUND_CORRECT_VERSION" = x; then
25609             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25610 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25611             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25612 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25613             BOOT_JDK_FOUND=no
25614           else
25615             # We're done! :-)
25616             BOOT_JDK_FOUND=yes
25617 
25618   # Only process if variable expands to non-empty
25619 
25620   if test "x$BOOT_JDK" != x; then
25621     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25622 
25623   # Input might be given as Windows format, start by converting to
25624   # unix format.
25625   path="$BOOT_JDK"
25626   new_path=`$CYGPATH -u "$path"`
25627 
25628   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25629   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25630   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25631   # "foo.exe" is OK but "foo" is an error.
25632   #
25633   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25634   # It is also a way to make sure we got the proper file name for the real test later on.
25635   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25636   if test "x$test_shortpath" = x; then
25637     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25638 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25639     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25640   fi
25641 
25642   # Call helper function which possibly converts this using DOS-style short mode.
25643   # If so, the updated path is stored in $new_path.
25644 
25645   input_path="$new_path"
25646   # Check if we need to convert this using DOS-style short mode. If the path
25647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25648   # take no chances and rewrite it.
25649   # Note: m4 eats our [], so we need to use [ and ] instead.
25650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25651   if test "x$has_forbidden_chars" != x; then
25652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25653     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25654     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25655     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25656       # Going to short mode and back again did indeed matter. Since short mode is
25657       # case insensitive, let's make it lowercase to improve readability.
25658       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25659       # Now convert it back to Unix-style (cygpath)
25660       input_path=`$CYGPATH -u "$shortmode_path"`
25661       new_path="$input_path"
25662     fi
25663   fi
25664 
25665   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25666   if test "x$test_cygdrive_prefix" = x; then
25667     # As a simple fix, exclude /usr/bin since it's not a real path.
25668     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25669       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25670       # a path prefixed by /cygdrive for fixpath to work.
25671       new_path="$CYGWIN_ROOT_PATH$input_path"
25672     fi
25673   fi
25674 
25675 
25676   if test "x$path" != "x$new_path"; then
25677     BOOT_JDK="$new_path"
25678     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25679 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25680   fi
25681 
25682     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25683 
25684   path="$BOOT_JDK"
25685   has_colon=`$ECHO $path | $GREP ^.:`
25686   new_path="$path"
25687   if test "x$has_colon" = x; then
25688     # Not in mixed or Windows style, start by that.
25689     new_path=`cmd //c echo $path`
25690   fi
25691 
25692 
25693   input_path="$new_path"
25694   # Check if we need to convert this using DOS-style short mode. If the path
25695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25696   # take no chances and rewrite it.
25697   # Note: m4 eats our [], so we need to use [ and ] instead.
25698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25699   if test "x$has_forbidden_chars" != x; then
25700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25702   fi
25703 
25704 
25705   windows_path="$new_path"
25706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25707     unix_path=`$CYGPATH -u "$windows_path"`
25708     new_path="$unix_path"
25709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25711     new_path="$unix_path"
25712   fi
25713 
25714   if test "x$path" != "x$new_path"; then
25715     BOOT_JDK="$new_path"
25716     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25717 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25718   fi
25719 
25720   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25721   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25722 
25723     else
25724       # We're on a unix platform. Hooray! :)
25725       path="$BOOT_JDK"
25726       has_space=`$ECHO "$path" | $GREP " "`
25727       if test "x$has_space" != x; then
25728         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25729 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25730         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25731       fi
25732 
25733       # Use eval to expand a potential ~
25734       eval path="$path"
25735       if test ! -f "$path" && test ! -d "$path"; then
25736         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25737       fi
25738 
25739       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25740     fi
25741   fi
25742 
25743             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25744 $as_echo_n "checking for Boot JDK... " >&6; }
25745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25746 $as_echo "$BOOT_JDK" >&6; }
25747             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25748 $as_echo_n "checking Boot JDK version... " >&6; }
25749             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25750             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25751 $as_echo "$BOOT_JDK_VERSION" >&6; }
25752           fi # end check jdk version
25753         fi # end check javac
25754       fi # end check java
25755     fi # end check boot jdk found
25756   fi
25757 
25758 
25759   if test "x$BOOT_JDK_FOUND" = xno; then
25760     # Now execute the test
25761 
25762   if test "x$PROGRAMFILES" != x; then
25763     VIRTUAL_DIR="$PROGRAMFILES/Java"
25764 
25765   windows_path="$VIRTUAL_DIR"
25766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25767     unix_path=`$CYGPATH -u "$windows_path"`
25768     VIRTUAL_DIR="$unix_path"
25769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25771     VIRTUAL_DIR="$unix_path"
25772   fi
25773 
25774 
25775   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25776   BOOT_JDK_SUFFIX=""
25777   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25778   if test "x$ALL_JDKS_FOUND" != x; then
25779     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25780 
25781   if test "x$BOOT_JDK_FOUND" = xno; then
25782     # Now execute the test
25783 
25784         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25785         if test -d "$BOOT_JDK"; then
25786           BOOT_JDK_FOUND=maybe
25787           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25788 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25789         fi
25790 
25791 
25792     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25793     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25794       # Do we have a bin/java?
25795       if test ! -x "$BOOT_JDK/bin/java"; then
25796         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25797 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25798         BOOT_JDK_FOUND=no
25799       else
25800         # Do we have a bin/javac?
25801         if test ! -x "$BOOT_JDK/bin/javac"; then
25802           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25804           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25805 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25806           BOOT_JDK_FOUND=no
25807         else
25808           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25809           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25810 
25811           # Extra M4 quote needed to protect [] in grep expression.
25812           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25813           if test "x$FOUND_CORRECT_VERSION" = x; then
25814             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25815 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25816             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25817 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25818             BOOT_JDK_FOUND=no
25819           else
25820             # We're done! :-)
25821             BOOT_JDK_FOUND=yes
25822 
25823   # Only process if variable expands to non-empty
25824 
25825   if test "x$BOOT_JDK" != x; then
25826     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25827 
25828   # Input might be given as Windows format, start by converting to
25829   # unix format.
25830   path="$BOOT_JDK"
25831   new_path=`$CYGPATH -u "$path"`
25832 
25833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25836   # "foo.exe" is OK but "foo" is an error.
25837   #
25838   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25839   # It is also a way to make sure we got the proper file name for the real test later on.
25840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25841   if test "x$test_shortpath" = x; then
25842     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25844     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25845   fi
25846 
25847   # Call helper function which possibly converts this using DOS-style short mode.
25848   # If so, the updated path is stored in $new_path.
25849 
25850   input_path="$new_path"
25851   # Check if we need to convert this using DOS-style short mode. If the path
25852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25853   # take no chances and rewrite it.
25854   # Note: m4 eats our [], so we need to use [ and ] instead.
25855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25856   if test "x$has_forbidden_chars" != x; then
25857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25858     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25859     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25860     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25861       # Going to short mode and back again did indeed matter. Since short mode is
25862       # case insensitive, let's make it lowercase to improve readability.
25863       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25864       # Now convert it back to Unix-style (cygpath)
25865       input_path=`$CYGPATH -u "$shortmode_path"`
25866       new_path="$input_path"
25867     fi
25868   fi
25869 
25870   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25871   if test "x$test_cygdrive_prefix" = x; then
25872     # As a simple fix, exclude /usr/bin since it's not a real path.
25873     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25874       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25875       # a path prefixed by /cygdrive for fixpath to work.
25876       new_path="$CYGWIN_ROOT_PATH$input_path"
25877     fi
25878   fi
25879 
25880 
25881   if test "x$path" != "x$new_path"; then
25882     BOOT_JDK="$new_path"
25883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25884 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25885   fi
25886 
25887     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25888 
25889   path="$BOOT_JDK"
25890   has_colon=`$ECHO $path | $GREP ^.:`
25891   new_path="$path"
25892   if test "x$has_colon" = x; then
25893     # Not in mixed or Windows style, start by that.
25894     new_path=`cmd //c echo $path`
25895   fi
25896 
25897 
25898   input_path="$new_path"
25899   # Check if we need to convert this using DOS-style short mode. If the path
25900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25901   # take no chances and rewrite it.
25902   # Note: m4 eats our [], so we need to use [ and ] instead.
25903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25904   if test "x$has_forbidden_chars" != x; then
25905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25906     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25907   fi
25908 
25909 
25910   windows_path="$new_path"
25911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25912     unix_path=`$CYGPATH -u "$windows_path"`
25913     new_path="$unix_path"
25914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25916     new_path="$unix_path"
25917   fi
25918 
25919   if test "x$path" != "x$new_path"; then
25920     BOOT_JDK="$new_path"
25921     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25922 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25923   fi
25924 
25925   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25926   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25927 
25928     else
25929       # We're on a unix platform. Hooray! :)
25930       path="$BOOT_JDK"
25931       has_space=`$ECHO "$path" | $GREP " "`
25932       if test "x$has_space" != x; then
25933         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25934 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25935         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25936       fi
25937 
25938       # Use eval to expand a potential ~
25939       eval path="$path"
25940       if test ! -f "$path" && test ! -d "$path"; then
25941         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25942       fi
25943 
25944       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25945     fi
25946   fi
25947 
25948             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25949 $as_echo_n "checking for Boot JDK... " >&6; }
25950             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25951 $as_echo "$BOOT_JDK" >&6; }
25952             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25953 $as_echo_n "checking Boot JDK version... " >&6; }
25954             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25955             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25956 $as_echo "$BOOT_JDK_VERSION" >&6; }
25957           fi # end check jdk version
25958         fi # end check javac
25959       fi # end check java
25960     fi # end check boot jdk found
25961   fi
25962 
25963     done
25964   fi
25965 
25966   fi
25967 
25968 
25969     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25970     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25971       # Do we have a bin/java?
25972       if test ! -x "$BOOT_JDK/bin/java"; then
25973         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25974 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25975         BOOT_JDK_FOUND=no
25976       else
25977         # Do we have a bin/javac?
25978         if test ! -x "$BOOT_JDK/bin/javac"; then
25979           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25980 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25981           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25982 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25983           BOOT_JDK_FOUND=no
25984         else
25985           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25986           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25987 
25988           # Extra M4 quote needed to protect [] in grep expression.
25989           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25990           if test "x$FOUND_CORRECT_VERSION" = x; then
25991             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25993             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25994 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25995             BOOT_JDK_FOUND=no
25996           else
25997             # We're done! :-)
25998             BOOT_JDK_FOUND=yes
25999 
26000   # Only process if variable expands to non-empty
26001 
26002   if test "x$BOOT_JDK" != x; then
26003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26004 
26005   # Input might be given as Windows format, start by converting to
26006   # unix format.
26007   path="$BOOT_JDK"
26008   new_path=`$CYGPATH -u "$path"`
26009 
26010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26013   # "foo.exe" is OK but "foo" is an error.
26014   #
26015   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26016   # It is also a way to make sure we got the proper file name for the real test later on.
26017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26018   if test "x$test_shortpath" = x; then
26019     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26020 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26021     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26022   fi
26023 
26024   # Call helper function which possibly converts this using DOS-style short mode.
26025   # If so, the updated path is stored in $new_path.
26026 
26027   input_path="$new_path"
26028   # Check if we need to convert this using DOS-style short mode. If the path
26029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26030   # take no chances and rewrite it.
26031   # Note: m4 eats our [], so we need to use [ and ] instead.
26032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26033   if test "x$has_forbidden_chars" != x; then
26034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26035     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26036     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26037     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26038       # Going to short mode and back again did indeed matter. Since short mode is
26039       # case insensitive, let's make it lowercase to improve readability.
26040       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26041       # Now convert it back to Unix-style (cygpath)
26042       input_path=`$CYGPATH -u "$shortmode_path"`
26043       new_path="$input_path"
26044     fi
26045   fi
26046 
26047   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26048   if test "x$test_cygdrive_prefix" = x; then
26049     # As a simple fix, exclude /usr/bin since it's not a real path.
26050     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26051       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26052       # a path prefixed by /cygdrive for fixpath to work.
26053       new_path="$CYGWIN_ROOT_PATH$input_path"
26054     fi
26055   fi
26056 
26057 
26058   if test "x$path" != "x$new_path"; then
26059     BOOT_JDK="$new_path"
26060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26061 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26062   fi
26063 
26064     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26065 
26066   path="$BOOT_JDK"
26067   has_colon=`$ECHO $path | $GREP ^.:`
26068   new_path="$path"
26069   if test "x$has_colon" = x; then
26070     # Not in mixed or Windows style, start by that.
26071     new_path=`cmd //c echo $path`
26072   fi
26073 
26074 
26075   input_path="$new_path"
26076   # Check if we need to convert this using DOS-style short mode. If the path
26077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26078   # take no chances and rewrite it.
26079   # Note: m4 eats our [], so we need to use [ and ] instead.
26080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26081   if test "x$has_forbidden_chars" != x; then
26082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26084   fi
26085 
26086 
26087   windows_path="$new_path"
26088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26089     unix_path=`$CYGPATH -u "$windows_path"`
26090     new_path="$unix_path"
26091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26093     new_path="$unix_path"
26094   fi
26095 
26096   if test "x$path" != "x$new_path"; then
26097     BOOT_JDK="$new_path"
26098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26099 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26100   fi
26101 
26102   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26103   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26104 
26105     else
26106       # We're on a unix platform. Hooray! :)
26107       path="$BOOT_JDK"
26108       has_space=`$ECHO "$path" | $GREP " "`
26109       if test "x$has_space" != x; then
26110         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26111 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26112         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26113       fi
26114 
26115       # Use eval to expand a potential ~
26116       eval path="$path"
26117       if test ! -f "$path" && test ! -d "$path"; then
26118         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26119       fi
26120 
26121       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26122     fi
26123   fi
26124 
26125             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26126 $as_echo_n "checking for Boot JDK... " >&6; }
26127             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26128 $as_echo "$BOOT_JDK" >&6; }
26129             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26130 $as_echo_n "checking Boot JDK version... " >&6; }
26131             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26132             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26133 $as_echo "$BOOT_JDK_VERSION" >&6; }
26134           fi # end check jdk version
26135         fi # end check javac
26136       fi # end check java
26137     fi # end check boot jdk found
26138   fi
26139 
26140 
26141   if test "x$BOOT_JDK_FOUND" = xno; then
26142     # Now execute the test
26143 
26144   if test "x$ProgramFiles" != x; then
26145     VIRTUAL_DIR="$ProgramFiles/Java"
26146 
26147   windows_path="$VIRTUAL_DIR"
26148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26149     unix_path=`$CYGPATH -u "$windows_path"`
26150     VIRTUAL_DIR="$unix_path"
26151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26153     VIRTUAL_DIR="$unix_path"
26154   fi
26155 
26156 
26157   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26158   BOOT_JDK_SUFFIX=""
26159   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26160   if test "x$ALL_JDKS_FOUND" != x; then
26161     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26162 
26163   if test "x$BOOT_JDK_FOUND" = xno; then
26164     # Now execute the test
26165 
26166         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26167         if test -d "$BOOT_JDK"; then
26168           BOOT_JDK_FOUND=maybe
26169           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26170 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26171         fi
26172 
26173 
26174     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26175     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26176       # Do we have a bin/java?
26177       if test ! -x "$BOOT_JDK/bin/java"; then
26178         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26180         BOOT_JDK_FOUND=no
26181       else
26182         # Do we have a bin/javac?
26183         if test ! -x "$BOOT_JDK/bin/javac"; then
26184           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26186           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26187 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26188           BOOT_JDK_FOUND=no
26189         else
26190           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26191           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26192 
26193           # Extra M4 quote needed to protect [] in grep expression.
26194           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26195           if test "x$FOUND_CORRECT_VERSION" = x; then
26196             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26198             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26199 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26200             BOOT_JDK_FOUND=no
26201           else
26202             # We're done! :-)
26203             BOOT_JDK_FOUND=yes
26204 
26205   # Only process if variable expands to non-empty
26206 
26207   if test "x$BOOT_JDK" != x; then
26208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209 
26210   # Input might be given as Windows format, start by converting to
26211   # unix format.
26212   path="$BOOT_JDK"
26213   new_path=`$CYGPATH -u "$path"`
26214 
26215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26218   # "foo.exe" is OK but "foo" is an error.
26219   #
26220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26221   # It is also a way to make sure we got the proper file name for the real test later on.
26222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26223   if test "x$test_shortpath" = x; then
26224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26227   fi
26228 
26229   # Call helper function which possibly converts this using DOS-style short mode.
26230   # If so, the updated path is stored in $new_path.
26231 
26232   input_path="$new_path"
26233   # Check if we need to convert this using DOS-style short mode. If the path
26234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26235   # take no chances and rewrite it.
26236   # Note: m4 eats our [], so we need to use [ and ] instead.
26237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26238   if test "x$has_forbidden_chars" != x; then
26239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26243       # Going to short mode and back again did indeed matter. Since short mode is
26244       # case insensitive, let's make it lowercase to improve readability.
26245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26246       # Now convert it back to Unix-style (cygpath)
26247       input_path=`$CYGPATH -u "$shortmode_path"`
26248       new_path="$input_path"
26249     fi
26250   fi
26251 
26252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26253   if test "x$test_cygdrive_prefix" = x; then
26254     # As a simple fix, exclude /usr/bin since it's not a real path.
26255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26257       # a path prefixed by /cygdrive for fixpath to work.
26258       new_path="$CYGWIN_ROOT_PATH$input_path"
26259     fi
26260   fi
26261 
26262 
26263   if test "x$path" != "x$new_path"; then
26264     BOOT_JDK="$new_path"
26265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26267   fi
26268 
26269     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26270 
26271   path="$BOOT_JDK"
26272   has_colon=`$ECHO $path | $GREP ^.:`
26273   new_path="$path"
26274   if test "x$has_colon" = x; then
26275     # Not in mixed or Windows style, start by that.
26276     new_path=`cmd //c echo $path`
26277   fi
26278 
26279 
26280   input_path="$new_path"
26281   # Check if we need to convert this using DOS-style short mode. If the path
26282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26283   # take no chances and rewrite it.
26284   # Note: m4 eats our [], so we need to use [ and ] instead.
26285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26286   if test "x$has_forbidden_chars" != x; then
26287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26289   fi
26290 
26291 
26292   windows_path="$new_path"
26293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26294     unix_path=`$CYGPATH -u "$windows_path"`
26295     new_path="$unix_path"
26296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26298     new_path="$unix_path"
26299   fi
26300 
26301   if test "x$path" != "x$new_path"; then
26302     BOOT_JDK="$new_path"
26303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26305   fi
26306 
26307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26309 
26310     else
26311       # We're on a unix platform. Hooray! :)
26312       path="$BOOT_JDK"
26313       has_space=`$ECHO "$path" | $GREP " "`
26314       if test "x$has_space" != x; then
26315         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26317         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26318       fi
26319 
26320       # Use eval to expand a potential ~
26321       eval path="$path"
26322       if test ! -f "$path" && test ! -d "$path"; then
26323         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26324       fi
26325 
26326       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26327     fi
26328   fi
26329 
26330             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26331 $as_echo_n "checking for Boot JDK... " >&6; }
26332             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26333 $as_echo "$BOOT_JDK" >&6; }
26334             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26335 $as_echo_n "checking Boot JDK version... " >&6; }
26336             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26337             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26338 $as_echo "$BOOT_JDK_VERSION" >&6; }
26339           fi # end check jdk version
26340         fi # end check javac
26341       fi # end check java
26342     fi # end check boot jdk found
26343   fi
26344 
26345     done
26346   fi
26347 
26348   fi
26349 
26350 
26351     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26352     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26353       # Do we have a bin/java?
26354       if test ! -x "$BOOT_JDK/bin/java"; then
26355         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26356 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26357         BOOT_JDK_FOUND=no
26358       else
26359         # Do we have a bin/javac?
26360         if test ! -x "$BOOT_JDK/bin/javac"; then
26361           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26363           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26364 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26365           BOOT_JDK_FOUND=no
26366         else
26367           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26368           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26369 
26370           # Extra M4 quote needed to protect [] in grep expression.
26371           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26372           if test "x$FOUND_CORRECT_VERSION" = x; then
26373             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26374 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26375             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26376 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26377             BOOT_JDK_FOUND=no
26378           else
26379             # We're done! :-)
26380             BOOT_JDK_FOUND=yes
26381 
26382   # Only process if variable expands to non-empty
26383 
26384   if test "x$BOOT_JDK" != x; then
26385     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26386 
26387   # Input might be given as Windows format, start by converting to
26388   # unix format.
26389   path="$BOOT_JDK"
26390   new_path=`$CYGPATH -u "$path"`
26391 
26392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26395   # "foo.exe" is OK but "foo" is an error.
26396   #
26397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26398   # It is also a way to make sure we got the proper file name for the real test later on.
26399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26400   if test "x$test_shortpath" = x; then
26401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26402 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26403     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26404   fi
26405 
26406   # Call helper function which possibly converts this using DOS-style short mode.
26407   # If so, the updated path is stored in $new_path.
26408 
26409   input_path="$new_path"
26410   # Check if we need to convert this using DOS-style short mode. If the path
26411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26412   # take no chances and rewrite it.
26413   # Note: m4 eats our [], so we need to use [ and ] instead.
26414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26415   if test "x$has_forbidden_chars" != x; then
26416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26420       # Going to short mode and back again did indeed matter. Since short mode is
26421       # case insensitive, let's make it lowercase to improve readability.
26422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26423       # Now convert it back to Unix-style (cygpath)
26424       input_path=`$CYGPATH -u "$shortmode_path"`
26425       new_path="$input_path"
26426     fi
26427   fi
26428 
26429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26430   if test "x$test_cygdrive_prefix" = x; then
26431     # As a simple fix, exclude /usr/bin since it's not a real path.
26432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26434       # a path prefixed by /cygdrive for fixpath to work.
26435       new_path="$CYGWIN_ROOT_PATH$input_path"
26436     fi
26437   fi
26438 
26439 
26440   if test "x$path" != "x$new_path"; then
26441     BOOT_JDK="$new_path"
26442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26444   fi
26445 
26446     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26447 
26448   path="$BOOT_JDK"
26449   has_colon=`$ECHO $path | $GREP ^.:`
26450   new_path="$path"
26451   if test "x$has_colon" = x; then
26452     # Not in mixed or Windows style, start by that.
26453     new_path=`cmd //c echo $path`
26454   fi
26455 
26456 
26457   input_path="$new_path"
26458   # Check if we need to convert this using DOS-style short mode. If the path
26459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460   # take no chances and rewrite it.
26461   # Note: m4 eats our [], so we need to use [ and ] instead.
26462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26463   if test "x$has_forbidden_chars" != x; then
26464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26466   fi
26467 
26468 
26469   windows_path="$new_path"
26470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26471     unix_path=`$CYGPATH -u "$windows_path"`
26472     new_path="$unix_path"
26473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26475     new_path="$unix_path"
26476   fi
26477 
26478   if test "x$path" != "x$new_path"; then
26479     BOOT_JDK="$new_path"
26480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26481 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26482   fi
26483 
26484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26486 
26487     else
26488       # We're on a unix platform. Hooray! :)
26489       path="$BOOT_JDK"
26490       has_space=`$ECHO "$path" | $GREP " "`
26491       if test "x$has_space" != x; then
26492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26493 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26494         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26495       fi
26496 
26497       # Use eval to expand a potential ~
26498       eval path="$path"
26499       if test ! -f "$path" && test ! -d "$path"; then
26500         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26501       fi
26502 
26503       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26504     fi
26505   fi
26506 
26507             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26508 $as_echo_n "checking for Boot JDK... " >&6; }
26509             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26510 $as_echo "$BOOT_JDK" >&6; }
26511             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26512 $as_echo_n "checking Boot JDK version... " >&6; }
26513             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26514             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26515 $as_echo "$BOOT_JDK_VERSION" >&6; }
26516           fi # end check jdk version
26517         fi # end check javac
26518       fi # end check java
26519     fi # end check boot jdk found
26520   fi
26521 
26522 
26523   if test "x$BOOT_JDK_FOUND" = xno; then
26524     # Now execute the test
26525 
26526   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26527   BOOT_JDK_SUFFIX=""
26528   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26529   if test "x$ALL_JDKS_FOUND" != x; then
26530     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26531 
26532   if test "x$BOOT_JDK_FOUND" = xno; then
26533     # Now execute the test
26534 
26535         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26536         if test -d "$BOOT_JDK"; then
26537           BOOT_JDK_FOUND=maybe
26538           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26539 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26540         fi
26541 
26542 
26543     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26544     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26545       # Do we have a bin/java?
26546       if test ! -x "$BOOT_JDK/bin/java"; then
26547         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26549         BOOT_JDK_FOUND=no
26550       else
26551         # Do we have a bin/javac?
26552         if test ! -x "$BOOT_JDK/bin/javac"; then
26553           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26554 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26555           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26556 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26557           BOOT_JDK_FOUND=no
26558         else
26559           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26560           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26561 
26562           # Extra M4 quote needed to protect [] in grep expression.
26563           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26564           if test "x$FOUND_CORRECT_VERSION" = x; then
26565             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26567             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26568 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26569             BOOT_JDK_FOUND=no
26570           else
26571             # We're done! :-)
26572             BOOT_JDK_FOUND=yes
26573 
26574   # Only process if variable expands to non-empty
26575 
26576   if test "x$BOOT_JDK" != x; then
26577     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26578 
26579   # Input might be given as Windows format, start by converting to
26580   # unix format.
26581   path="$BOOT_JDK"
26582   new_path=`$CYGPATH -u "$path"`
26583 
26584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26587   # "foo.exe" is OK but "foo" is an error.
26588   #
26589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26590   # It is also a way to make sure we got the proper file name for the real test later on.
26591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26592   if test "x$test_shortpath" = x; then
26593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26595     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26596   fi
26597 
26598   # Call helper function which possibly converts this using DOS-style short mode.
26599   # If so, the updated path is stored in $new_path.
26600 
26601   input_path="$new_path"
26602   # Check if we need to convert this using DOS-style short mode. If the path
26603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26604   # take no chances and rewrite it.
26605   # Note: m4 eats our [], so we need to use [ and ] instead.
26606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26607   if test "x$has_forbidden_chars" != x; then
26608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26612       # Going to short mode and back again did indeed matter. Since short mode is
26613       # case insensitive, let's make it lowercase to improve readability.
26614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26615       # Now convert it back to Unix-style (cygpath)
26616       input_path=`$CYGPATH -u "$shortmode_path"`
26617       new_path="$input_path"
26618     fi
26619   fi
26620 
26621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26622   if test "x$test_cygdrive_prefix" = x; then
26623     # As a simple fix, exclude /usr/bin since it's not a real path.
26624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26626       # a path prefixed by /cygdrive for fixpath to work.
26627       new_path="$CYGWIN_ROOT_PATH$input_path"
26628     fi
26629   fi
26630 
26631 
26632   if test "x$path" != "x$new_path"; then
26633     BOOT_JDK="$new_path"
26634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26636   fi
26637 
26638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639 
26640   path="$BOOT_JDK"
26641   has_colon=`$ECHO $path | $GREP ^.:`
26642   new_path="$path"
26643   if test "x$has_colon" = x; then
26644     # Not in mixed or Windows style, start by that.
26645     new_path=`cmd //c echo $path`
26646   fi
26647 
26648 
26649   input_path="$new_path"
26650   # Check if we need to convert this using DOS-style short mode. If the path
26651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26652   # take no chances and rewrite it.
26653   # Note: m4 eats our [], so we need to use [ and ] instead.
26654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26655   if test "x$has_forbidden_chars" != x; then
26656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26658   fi
26659 
26660 
26661   windows_path="$new_path"
26662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26663     unix_path=`$CYGPATH -u "$windows_path"`
26664     new_path="$unix_path"
26665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26667     new_path="$unix_path"
26668   fi
26669 
26670   if test "x$path" != "x$new_path"; then
26671     BOOT_JDK="$new_path"
26672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26674   fi
26675 
26676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26678 
26679     else
26680       # We're on a unix platform. Hooray! :)
26681       path="$BOOT_JDK"
26682       has_space=`$ECHO "$path" | $GREP " "`
26683       if test "x$has_space" != x; then
26684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26685 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26686         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26687       fi
26688 
26689       # Use eval to expand a potential ~
26690       eval path="$path"
26691       if test ! -f "$path" && test ! -d "$path"; then
26692         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26693       fi
26694 
26695       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26696     fi
26697   fi
26698 
26699             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26700 $as_echo_n "checking for Boot JDK... " >&6; }
26701             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26702 $as_echo "$BOOT_JDK" >&6; }
26703             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26704 $as_echo_n "checking Boot JDK version... " >&6; }
26705             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26707 $as_echo "$BOOT_JDK_VERSION" >&6; }
26708           fi # end check jdk version
26709         fi # end check javac
26710       fi # end check java
26711     fi # end check boot jdk found
26712   fi
26713 
26714     done
26715   fi
26716 
26717 
26718     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26719     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26720       # Do we have a bin/java?
26721       if test ! -x "$BOOT_JDK/bin/java"; then
26722         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26723 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26724         BOOT_JDK_FOUND=no
26725       else
26726         # Do we have a bin/javac?
26727         if test ! -x "$BOOT_JDK/bin/javac"; then
26728           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26729 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26730           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26731 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26732           BOOT_JDK_FOUND=no
26733         else
26734           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26735           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26736 
26737           # Extra M4 quote needed to protect [] in grep expression.
26738           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26739           if test "x$FOUND_CORRECT_VERSION" = x; then
26740             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26741 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26742             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26743 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26744             BOOT_JDK_FOUND=no
26745           else
26746             # We're done! :-)
26747             BOOT_JDK_FOUND=yes
26748 
26749   # Only process if variable expands to non-empty
26750 
26751   if test "x$BOOT_JDK" != x; then
26752     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26753 
26754   # Input might be given as Windows format, start by converting to
26755   # unix format.
26756   path="$BOOT_JDK"
26757   new_path=`$CYGPATH -u "$path"`
26758 
26759   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26760   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26761   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26762   # "foo.exe" is OK but "foo" is an error.
26763   #
26764   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26765   # It is also a way to make sure we got the proper file name for the real test later on.
26766   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26767   if test "x$test_shortpath" = x; then
26768     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26769 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26770     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26771   fi
26772 
26773   # Call helper function which possibly converts this using DOS-style short mode.
26774   # If so, the updated path is stored in $new_path.
26775 
26776   input_path="$new_path"
26777   # Check if we need to convert this using DOS-style short mode. If the path
26778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26779   # take no chances and rewrite it.
26780   # Note: m4 eats our [], so we need to use [ and ] instead.
26781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26782   if test "x$has_forbidden_chars" != x; then
26783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26784     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26785     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26786     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26787       # Going to short mode and back again did indeed matter. Since short mode is
26788       # case insensitive, let's make it lowercase to improve readability.
26789       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26790       # Now convert it back to Unix-style (cygpath)
26791       input_path=`$CYGPATH -u "$shortmode_path"`
26792       new_path="$input_path"
26793     fi
26794   fi
26795 
26796   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26797   if test "x$test_cygdrive_prefix" = x; then
26798     # As a simple fix, exclude /usr/bin since it's not a real path.
26799     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26800       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26801       # a path prefixed by /cygdrive for fixpath to work.
26802       new_path="$CYGWIN_ROOT_PATH$input_path"
26803     fi
26804   fi
26805 
26806 
26807   if test "x$path" != "x$new_path"; then
26808     BOOT_JDK="$new_path"
26809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26810 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26811   fi
26812 
26813     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814 
26815   path="$BOOT_JDK"
26816   has_colon=`$ECHO $path | $GREP ^.:`
26817   new_path="$path"
26818   if test "x$has_colon" = x; then
26819     # Not in mixed or Windows style, start by that.
26820     new_path=`cmd //c echo $path`
26821   fi
26822 
26823 
26824   input_path="$new_path"
26825   # Check if we need to convert this using DOS-style short mode. If the path
26826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26827   # take no chances and rewrite it.
26828   # Note: m4 eats our [], so we need to use [ and ] instead.
26829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26830   if test "x$has_forbidden_chars" != x; then
26831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26832     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26833   fi
26834 
26835 
26836   windows_path="$new_path"
26837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26838     unix_path=`$CYGPATH -u "$windows_path"`
26839     new_path="$unix_path"
26840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26842     new_path="$unix_path"
26843   fi
26844 
26845   if test "x$path" != "x$new_path"; then
26846     BOOT_JDK="$new_path"
26847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26848 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26849   fi
26850 
26851   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26852   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26853 
26854     else
26855       # We're on a unix platform. Hooray! :)
26856       path="$BOOT_JDK"
26857       has_space=`$ECHO "$path" | $GREP " "`
26858       if test "x$has_space" != x; then
26859         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26861         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26862       fi
26863 
26864       # Use eval to expand a potential ~
26865       eval path="$path"
26866       if test ! -f "$path" && test ! -d "$path"; then
26867         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26868       fi
26869 
26870       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26871     fi
26872   fi
26873 
26874             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26875 $as_echo_n "checking for Boot JDK... " >&6; }
26876             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26877 $as_echo "$BOOT_JDK" >&6; }
26878             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26879 $as_echo_n "checking Boot JDK version... " >&6; }
26880             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26882 $as_echo "$BOOT_JDK_VERSION" >&6; }
26883           fi # end check jdk version
26884         fi # end check javac
26885       fi # end check java
26886     fi # end check boot jdk found
26887   fi
26888 
26889   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26890 
26891   if test "x$BOOT_JDK_FOUND" = xno; then
26892     # Now execute the test
26893 
26894   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26895   BOOT_JDK_SUFFIX="/Contents/Home"
26896   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26897   if test "x$ALL_JDKS_FOUND" != x; then
26898     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26899 
26900   if test "x$BOOT_JDK_FOUND" = xno; then
26901     # Now execute the test
26902 
26903         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26904         if test -d "$BOOT_JDK"; then
26905           BOOT_JDK_FOUND=maybe
26906           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26907 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26908         fi
26909 
26910 
26911     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26912     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26913       # Do we have a bin/java?
26914       if test ! -x "$BOOT_JDK/bin/java"; then
26915         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26917         BOOT_JDK_FOUND=no
26918       else
26919         # Do we have a bin/javac?
26920         if test ! -x "$BOOT_JDK/bin/javac"; then
26921           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26923           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26924 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26925           BOOT_JDK_FOUND=no
26926         else
26927           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26928           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26929 
26930           # Extra M4 quote needed to protect [] in grep expression.
26931           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26932           if test "x$FOUND_CORRECT_VERSION" = x; then
26933             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26934 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26935             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26936 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26937             BOOT_JDK_FOUND=no
26938           else
26939             # We're done! :-)
26940             BOOT_JDK_FOUND=yes
26941 
26942   # Only process if variable expands to non-empty
26943 
26944   if test "x$BOOT_JDK" != x; then
26945     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946 
26947   # Input might be given as Windows format, start by converting to
26948   # unix format.
26949   path="$BOOT_JDK"
26950   new_path=`$CYGPATH -u "$path"`
26951 
26952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26955   # "foo.exe" is OK but "foo" is an error.
26956   #
26957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26958   # It is also a way to make sure we got the proper file name for the real test later on.
26959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26960   if test "x$test_shortpath" = x; then
26961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26962 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26963     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26964   fi
26965 
26966   # Call helper function which possibly converts this using DOS-style short mode.
26967   # If so, the updated path is stored in $new_path.
26968 
26969   input_path="$new_path"
26970   # Check if we need to convert this using DOS-style short mode. If the path
26971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26972   # take no chances and rewrite it.
26973   # Note: m4 eats our [], so we need to use [ and ] instead.
26974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26975   if test "x$has_forbidden_chars" != x; then
26976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26980       # Going to short mode and back again did indeed matter. Since short mode is
26981       # case insensitive, let's make it lowercase to improve readability.
26982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26983       # Now convert it back to Unix-style (cygpath)
26984       input_path=`$CYGPATH -u "$shortmode_path"`
26985       new_path="$input_path"
26986     fi
26987   fi
26988 
26989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26990   if test "x$test_cygdrive_prefix" = x; then
26991     # As a simple fix, exclude /usr/bin since it's not a real path.
26992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26994       # a path prefixed by /cygdrive for fixpath to work.
26995       new_path="$CYGWIN_ROOT_PATH$input_path"
26996     fi
26997   fi
26998 
26999 
27000   if test "x$path" != "x$new_path"; then
27001     BOOT_JDK="$new_path"
27002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27003 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27004   fi
27005 
27006     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27007 
27008   path="$BOOT_JDK"
27009   has_colon=`$ECHO $path | $GREP ^.:`
27010   new_path="$path"
27011   if test "x$has_colon" = x; then
27012     # Not in mixed or Windows style, start by that.
27013     new_path=`cmd //c echo $path`
27014   fi
27015 
27016 
27017   input_path="$new_path"
27018   # Check if we need to convert this using DOS-style short mode. If the path
27019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27020   # take no chances and rewrite it.
27021   # Note: m4 eats our [], so we need to use [ and ] instead.
27022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27023   if test "x$has_forbidden_chars" != x; then
27024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27026   fi
27027 
27028 
27029   windows_path="$new_path"
27030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031     unix_path=`$CYGPATH -u "$windows_path"`
27032     new_path="$unix_path"
27033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035     new_path="$unix_path"
27036   fi
27037 
27038   if test "x$path" != "x$new_path"; then
27039     BOOT_JDK="$new_path"
27040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27041 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27042   fi
27043 
27044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27046 
27047     else
27048       # We're on a unix platform. Hooray! :)
27049       path="$BOOT_JDK"
27050       has_space=`$ECHO "$path" | $GREP " "`
27051       if test "x$has_space" != x; then
27052         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27053 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27054         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27055       fi
27056 
27057       # Use eval to expand a potential ~
27058       eval path="$path"
27059       if test ! -f "$path" && test ! -d "$path"; then
27060         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27061       fi
27062 
27063       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27064     fi
27065   fi
27066 
27067             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27068 $as_echo_n "checking for Boot JDK... " >&6; }
27069             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27070 $as_echo "$BOOT_JDK" >&6; }
27071             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27072 $as_echo_n "checking Boot JDK version... " >&6; }
27073             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27074             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27075 $as_echo "$BOOT_JDK_VERSION" >&6; }
27076           fi # end check jdk version
27077         fi # end check javac
27078       fi # end check java
27079     fi # end check boot jdk found
27080   fi
27081 
27082     done
27083   fi
27084 
27085 
27086     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27087     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27088       # Do we have a bin/java?
27089       if test ! -x "$BOOT_JDK/bin/java"; then
27090         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27092         BOOT_JDK_FOUND=no
27093       else
27094         # Do we have a bin/javac?
27095         if test ! -x "$BOOT_JDK/bin/javac"; then
27096           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27098           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27099 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27100           BOOT_JDK_FOUND=no
27101         else
27102           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27103           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27104 
27105           # Extra M4 quote needed to protect [] in grep expression.
27106           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27107           if test "x$FOUND_CORRECT_VERSION" = x; then
27108             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27109 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27110             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27111 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27112             BOOT_JDK_FOUND=no
27113           else
27114             # We're done! :-)
27115             BOOT_JDK_FOUND=yes
27116 
27117   # Only process if variable expands to non-empty
27118 
27119   if test "x$BOOT_JDK" != x; then
27120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27121 
27122   # Input might be given as Windows format, start by converting to
27123   # unix format.
27124   path="$BOOT_JDK"
27125   new_path=`$CYGPATH -u "$path"`
27126 
27127   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27128   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27129   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27130   # "foo.exe" is OK but "foo" is an error.
27131   #
27132   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27133   # It is also a way to make sure we got the proper file name for the real test later on.
27134   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27135   if test "x$test_shortpath" = x; then
27136     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27137 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27138     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27139   fi
27140 
27141   # Call helper function which possibly converts this using DOS-style short mode.
27142   # If so, the updated path is stored in $new_path.
27143 
27144   input_path="$new_path"
27145   # Check if we need to convert this using DOS-style short mode. If the path
27146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27147   # take no chances and rewrite it.
27148   # Note: m4 eats our [], so we need to use [ and ] instead.
27149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27150   if test "x$has_forbidden_chars" != x; then
27151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27152     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27153     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27154     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27155       # Going to short mode and back again did indeed matter. Since short mode is
27156       # case insensitive, let's make it lowercase to improve readability.
27157       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27158       # Now convert it back to Unix-style (cygpath)
27159       input_path=`$CYGPATH -u "$shortmode_path"`
27160       new_path="$input_path"
27161     fi
27162   fi
27163 
27164   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27165   if test "x$test_cygdrive_prefix" = x; then
27166     # As a simple fix, exclude /usr/bin since it's not a real path.
27167     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27168       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27169       # a path prefixed by /cygdrive for fixpath to work.
27170       new_path="$CYGWIN_ROOT_PATH$input_path"
27171     fi
27172   fi
27173 
27174 
27175   if test "x$path" != "x$new_path"; then
27176     BOOT_JDK="$new_path"
27177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27178 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27179   fi
27180 
27181     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182 
27183   path="$BOOT_JDK"
27184   has_colon=`$ECHO $path | $GREP ^.:`
27185   new_path="$path"
27186   if test "x$has_colon" = x; then
27187     # Not in mixed or Windows style, start by that.
27188     new_path=`cmd //c echo $path`
27189   fi
27190 
27191 
27192   input_path="$new_path"
27193   # Check if we need to convert this using DOS-style short mode. If the path
27194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27195   # take no chances and rewrite it.
27196   # Note: m4 eats our [], so we need to use [ and ] instead.
27197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27198   if test "x$has_forbidden_chars" != x; then
27199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27201   fi
27202 
27203 
27204   windows_path="$new_path"
27205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27206     unix_path=`$CYGPATH -u "$windows_path"`
27207     new_path="$unix_path"
27208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27210     new_path="$unix_path"
27211   fi
27212 
27213   if test "x$path" != "x$new_path"; then
27214     BOOT_JDK="$new_path"
27215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27216 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27217   fi
27218 
27219   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27220   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27221 
27222     else
27223       # We're on a unix platform. Hooray! :)
27224       path="$BOOT_JDK"
27225       has_space=`$ECHO "$path" | $GREP " "`
27226       if test "x$has_space" != x; then
27227         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27228 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27229         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27230       fi
27231 
27232       # Use eval to expand a potential ~
27233       eval path="$path"
27234       if test ! -f "$path" && test ! -d "$path"; then
27235         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27236       fi
27237 
27238       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27239     fi
27240   fi
27241 
27242             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27243 $as_echo_n "checking for Boot JDK... " >&6; }
27244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27245 $as_echo "$BOOT_JDK" >&6; }
27246             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27247 $as_echo_n "checking Boot JDK version... " >&6; }
27248             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27249             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27250 $as_echo "$BOOT_JDK_VERSION" >&6; }
27251           fi # end check jdk version
27252         fi # end check javac
27253       fi # end check java
27254     fi # end check boot jdk found
27255   fi
27256 
27257 
27258   if test "x$BOOT_JDK_FOUND" = xno; then
27259     # Now execute the test
27260 
27261   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27262   BOOT_JDK_SUFFIX="/Contents/Home"
27263   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27264   if test "x$ALL_JDKS_FOUND" != x; then
27265     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27266 
27267   if test "x$BOOT_JDK_FOUND" = xno; then
27268     # Now execute the test
27269 
27270         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27271         if test -d "$BOOT_JDK"; then
27272           BOOT_JDK_FOUND=maybe
27273           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27274 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27275         fi
27276 
27277 
27278     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27279     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27280       # Do we have a bin/java?
27281       if test ! -x "$BOOT_JDK/bin/java"; then
27282         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27283 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27284         BOOT_JDK_FOUND=no
27285       else
27286         # Do we have a bin/javac?
27287         if test ! -x "$BOOT_JDK/bin/javac"; then
27288           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27290           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27291 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27292           BOOT_JDK_FOUND=no
27293         else
27294           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27295           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27296 
27297           # Extra M4 quote needed to protect [] in grep expression.
27298           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27299           if test "x$FOUND_CORRECT_VERSION" = x; then
27300             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27301 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27302             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27303 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27304             BOOT_JDK_FOUND=no
27305           else
27306             # We're done! :-)
27307             BOOT_JDK_FOUND=yes
27308 
27309   # Only process if variable expands to non-empty
27310 
27311   if test "x$BOOT_JDK" != x; then
27312     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27313 
27314   # Input might be given as Windows format, start by converting to
27315   # unix format.
27316   path="$BOOT_JDK"
27317   new_path=`$CYGPATH -u "$path"`
27318 
27319   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27320   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27321   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27322   # "foo.exe" is OK but "foo" is an error.
27323   #
27324   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27325   # It is also a way to make sure we got the proper file name for the real test later on.
27326   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27327   if test "x$test_shortpath" = x; then
27328     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27329 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27330     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27331   fi
27332 
27333   # Call helper function which possibly converts this using DOS-style short mode.
27334   # If so, the updated path is stored in $new_path.
27335 
27336   input_path="$new_path"
27337   # Check if we need to convert this using DOS-style short mode. If the path
27338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27339   # take no chances and rewrite it.
27340   # Note: m4 eats our [], so we need to use [ and ] instead.
27341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27342   if test "x$has_forbidden_chars" != x; then
27343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27344     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27345     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27346     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27347       # Going to short mode and back again did indeed matter. Since short mode is
27348       # case insensitive, let's make it lowercase to improve readability.
27349       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27350       # Now convert it back to Unix-style (cygpath)
27351       input_path=`$CYGPATH -u "$shortmode_path"`
27352       new_path="$input_path"
27353     fi
27354   fi
27355 
27356   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27357   if test "x$test_cygdrive_prefix" = x; then
27358     # As a simple fix, exclude /usr/bin since it's not a real path.
27359     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27360       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27361       # a path prefixed by /cygdrive for fixpath to work.
27362       new_path="$CYGWIN_ROOT_PATH$input_path"
27363     fi
27364   fi
27365 
27366 
27367   if test "x$path" != "x$new_path"; then
27368     BOOT_JDK="$new_path"
27369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27370 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27371   fi
27372 
27373     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27374 
27375   path="$BOOT_JDK"
27376   has_colon=`$ECHO $path | $GREP ^.:`
27377   new_path="$path"
27378   if test "x$has_colon" = x; then
27379     # Not in mixed or Windows style, start by that.
27380     new_path=`cmd //c echo $path`
27381   fi
27382 
27383 
27384   input_path="$new_path"
27385   # Check if we need to convert this using DOS-style short mode. If the path
27386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27387   # take no chances and rewrite it.
27388   # Note: m4 eats our [], so we need to use [ and ] instead.
27389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27390   if test "x$has_forbidden_chars" != x; then
27391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27392     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27393   fi
27394 
27395 
27396   windows_path="$new_path"
27397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27398     unix_path=`$CYGPATH -u "$windows_path"`
27399     new_path="$unix_path"
27400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27402     new_path="$unix_path"
27403   fi
27404 
27405   if test "x$path" != "x$new_path"; then
27406     BOOT_JDK="$new_path"
27407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27408 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27409   fi
27410 
27411   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27412   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27413 
27414     else
27415       # We're on a unix platform. Hooray! :)
27416       path="$BOOT_JDK"
27417       has_space=`$ECHO "$path" | $GREP " "`
27418       if test "x$has_space" != x; then
27419         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27420 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27421         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27422       fi
27423 
27424       # Use eval to expand a potential ~
27425       eval path="$path"
27426       if test ! -f "$path" && test ! -d "$path"; then
27427         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27428       fi
27429 
27430       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27431     fi
27432   fi
27433 
27434             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27435 $as_echo_n "checking for Boot JDK... " >&6; }
27436             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27437 $as_echo "$BOOT_JDK" >&6; }
27438             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27439 $as_echo_n "checking Boot JDK version... " >&6; }
27440             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27441             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27442 $as_echo "$BOOT_JDK_VERSION" >&6; }
27443           fi # end check jdk version
27444         fi # end check javac
27445       fi # end check java
27446     fi # end check boot jdk found
27447   fi
27448 
27449     done
27450   fi
27451 
27452 
27453     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27454     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27455       # Do we have a bin/java?
27456       if test ! -x "$BOOT_JDK/bin/java"; then
27457         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27459         BOOT_JDK_FOUND=no
27460       else
27461         # Do we have a bin/javac?
27462         if test ! -x "$BOOT_JDK/bin/javac"; then
27463           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27465           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27466 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27467           BOOT_JDK_FOUND=no
27468         else
27469           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27470           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27471 
27472           # Extra M4 quote needed to protect [] in grep expression.
27473           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27474           if test "x$FOUND_CORRECT_VERSION" = x; then
27475             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27477             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27478 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27479             BOOT_JDK_FOUND=no
27480           else
27481             # We're done! :-)
27482             BOOT_JDK_FOUND=yes
27483 
27484   # Only process if variable expands to non-empty
27485 
27486   if test "x$BOOT_JDK" != x; then
27487     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27488 
27489   # Input might be given as Windows format, start by converting to
27490   # unix format.
27491   path="$BOOT_JDK"
27492   new_path=`$CYGPATH -u "$path"`
27493 
27494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27497   # "foo.exe" is OK but "foo" is an error.
27498   #
27499   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27500   # It is also a way to make sure we got the proper file name for the real test later on.
27501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27502   if test "x$test_shortpath" = x; then
27503     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27504 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27505     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27506   fi
27507 
27508   # Call helper function which possibly converts this using DOS-style short mode.
27509   # If so, the updated path is stored in $new_path.
27510 
27511   input_path="$new_path"
27512   # Check if we need to convert this using DOS-style short mode. If the path
27513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27514   # take no chances and rewrite it.
27515   # Note: m4 eats our [], so we need to use [ and ] instead.
27516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27517   if test "x$has_forbidden_chars" != x; then
27518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27519     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27520     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27521     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27522       # Going to short mode and back again did indeed matter. Since short mode is
27523       # case insensitive, let's make it lowercase to improve readability.
27524       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525       # Now convert it back to Unix-style (cygpath)
27526       input_path=`$CYGPATH -u "$shortmode_path"`
27527       new_path="$input_path"
27528     fi
27529   fi
27530 
27531   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27532   if test "x$test_cygdrive_prefix" = x; then
27533     # As a simple fix, exclude /usr/bin since it's not a real path.
27534     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27535       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27536       # a path prefixed by /cygdrive for fixpath to work.
27537       new_path="$CYGWIN_ROOT_PATH$input_path"
27538     fi
27539   fi
27540 
27541 
27542   if test "x$path" != "x$new_path"; then
27543     BOOT_JDK="$new_path"
27544     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27545 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27546   fi
27547 
27548     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27549 
27550   path="$BOOT_JDK"
27551   has_colon=`$ECHO $path | $GREP ^.:`
27552   new_path="$path"
27553   if test "x$has_colon" = x; then
27554     # Not in mixed or Windows style, start by that.
27555     new_path=`cmd //c echo $path`
27556   fi
27557 
27558 
27559   input_path="$new_path"
27560   # Check if we need to convert this using DOS-style short mode. If the path
27561   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27562   # take no chances and rewrite it.
27563   # Note: m4 eats our [], so we need to use [ and ] instead.
27564   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27565   if test "x$has_forbidden_chars" != x; then
27566     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27567     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27568   fi
27569 
27570 
27571   windows_path="$new_path"
27572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27573     unix_path=`$CYGPATH -u "$windows_path"`
27574     new_path="$unix_path"
27575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27576     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27577     new_path="$unix_path"
27578   fi
27579 
27580   if test "x$path" != "x$new_path"; then
27581     BOOT_JDK="$new_path"
27582     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27583 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27584   fi
27585 
27586   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27587   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27588 
27589     else
27590       # We're on a unix platform. Hooray! :)
27591       path="$BOOT_JDK"
27592       has_space=`$ECHO "$path" | $GREP " "`
27593       if test "x$has_space" != x; then
27594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27595 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27596         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27597       fi
27598 
27599       # Use eval to expand a potential ~
27600       eval path="$path"
27601       if test ! -f "$path" && test ! -d "$path"; then
27602         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27603       fi
27604 
27605       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27606     fi
27607   fi
27608 
27609             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27610 $as_echo_n "checking for Boot JDK... " >&6; }
27611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27612 $as_echo "$BOOT_JDK" >&6; }
27613             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27614 $as_echo_n "checking Boot JDK version... " >&6; }
27615             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27616             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27617 $as_echo "$BOOT_JDK_VERSION" >&6; }
27618           fi # end check jdk version
27619         fi # end check javac
27620       fi # end check java
27621     fi # end check boot jdk found
27622   fi
27623 
27624   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27625 
27626   if test "x$BOOT_JDK_FOUND" = xno; then
27627     # Now execute the test
27628 
27629   BOOT_JDK_PREFIX="/usr/lib/jvm"
27630   BOOT_JDK_SUFFIX=""
27631   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27632   if test "x$ALL_JDKS_FOUND" != x; then
27633     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27634 
27635   if test "x$BOOT_JDK_FOUND" = xno; then
27636     # Now execute the test
27637 
27638         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27639         if test -d "$BOOT_JDK"; then
27640           BOOT_JDK_FOUND=maybe
27641           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27642 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27643         fi
27644 
27645 
27646     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27647     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27648       # Do we have a bin/java?
27649       if test ! -x "$BOOT_JDK/bin/java"; then
27650         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27652         BOOT_JDK_FOUND=no
27653       else
27654         # Do we have a bin/javac?
27655         if test ! -x "$BOOT_JDK/bin/javac"; then
27656           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27657 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27658           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27659 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27660           BOOT_JDK_FOUND=no
27661         else
27662           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27663           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27664 
27665           # Extra M4 quote needed to protect [] in grep expression.
27666           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27667           if test "x$FOUND_CORRECT_VERSION" = x; then
27668             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27670             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27671 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27672             BOOT_JDK_FOUND=no
27673           else
27674             # We're done! :-)
27675             BOOT_JDK_FOUND=yes
27676 
27677   # Only process if variable expands to non-empty
27678 
27679   if test "x$BOOT_JDK" != x; then
27680     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27681 
27682   # Input might be given as Windows format, start by converting to
27683   # unix format.
27684   path="$BOOT_JDK"
27685   new_path=`$CYGPATH -u "$path"`
27686 
27687   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27688   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27689   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27690   # "foo.exe" is OK but "foo" is an error.
27691   #
27692   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27693   # It is also a way to make sure we got the proper file name for the real test later on.
27694   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27695   if test "x$test_shortpath" = x; then
27696     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27697 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27698     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27699   fi
27700 
27701   # Call helper function which possibly converts this using DOS-style short mode.
27702   # If so, the updated path is stored in $new_path.
27703 
27704   input_path="$new_path"
27705   # Check if we need to convert this using DOS-style short mode. If the path
27706   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27707   # take no chances and rewrite it.
27708   # Note: m4 eats our [], so we need to use [ and ] instead.
27709   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27710   if test "x$has_forbidden_chars" != x; then
27711     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27712     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27713     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27714     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27715       # Going to short mode and back again did indeed matter. Since short mode is
27716       # case insensitive, let's make it lowercase to improve readability.
27717       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27718       # Now convert it back to Unix-style (cygpath)
27719       input_path=`$CYGPATH -u "$shortmode_path"`
27720       new_path="$input_path"
27721     fi
27722   fi
27723 
27724   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27725   if test "x$test_cygdrive_prefix" = x; then
27726     # As a simple fix, exclude /usr/bin since it's not a real path.
27727     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27728       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27729       # a path prefixed by /cygdrive for fixpath to work.
27730       new_path="$CYGWIN_ROOT_PATH$input_path"
27731     fi
27732   fi
27733 
27734 
27735   if test "x$path" != "x$new_path"; then
27736     BOOT_JDK="$new_path"
27737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27738 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27739   fi
27740 
27741     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27742 
27743   path="$BOOT_JDK"
27744   has_colon=`$ECHO $path | $GREP ^.:`
27745   new_path="$path"
27746   if test "x$has_colon" = x; then
27747     # Not in mixed or Windows style, start by that.
27748     new_path=`cmd //c echo $path`
27749   fi
27750 
27751 
27752   input_path="$new_path"
27753   # Check if we need to convert this using DOS-style short mode. If the path
27754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27755   # take no chances and rewrite it.
27756   # Note: m4 eats our [], so we need to use [ and ] instead.
27757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27758   if test "x$has_forbidden_chars" != x; then
27759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27760     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27761   fi
27762 
27763 
27764   windows_path="$new_path"
27765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27766     unix_path=`$CYGPATH -u "$windows_path"`
27767     new_path="$unix_path"
27768   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27769     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27770     new_path="$unix_path"
27771   fi
27772 
27773   if test "x$path" != "x$new_path"; then
27774     BOOT_JDK="$new_path"
27775     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27776 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27777   fi
27778 
27779   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27780   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27781 
27782     else
27783       # We're on a unix platform. Hooray! :)
27784       path="$BOOT_JDK"
27785       has_space=`$ECHO "$path" | $GREP " "`
27786       if test "x$has_space" != x; then
27787         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27788 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27789         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27790       fi
27791 
27792       # Use eval to expand a potential ~
27793       eval path="$path"
27794       if test ! -f "$path" && test ! -d "$path"; then
27795         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27796       fi
27797 
27798       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27799     fi
27800   fi
27801 
27802             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27803 $as_echo_n "checking for Boot JDK... " >&6; }
27804             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27805 $as_echo "$BOOT_JDK" >&6; }
27806             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27807 $as_echo_n "checking Boot JDK version... " >&6; }
27808             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27809             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27810 $as_echo "$BOOT_JDK_VERSION" >&6; }
27811           fi # end check jdk version
27812         fi # end check javac
27813       fi # end check java
27814     fi # end check boot jdk found
27815   fi
27816 
27817     done
27818   fi
27819 
27820 
27821     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27822     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27823       # Do we have a bin/java?
27824       if test ! -x "$BOOT_JDK/bin/java"; then
27825         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27827         BOOT_JDK_FOUND=no
27828       else
27829         # Do we have a bin/javac?
27830         if test ! -x "$BOOT_JDK/bin/javac"; then
27831           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27832 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27833           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27834 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27835           BOOT_JDK_FOUND=no
27836         else
27837           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27838           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27839 
27840           # Extra M4 quote needed to protect [] in grep expression.
27841           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27842           if test "x$FOUND_CORRECT_VERSION" = x; then
27843             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27844 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27845             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27846 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27847             BOOT_JDK_FOUND=no
27848           else
27849             # We're done! :-)
27850             BOOT_JDK_FOUND=yes
27851 
27852   # Only process if variable expands to non-empty
27853 
27854   if test "x$BOOT_JDK" != x; then
27855     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27856 
27857   # Input might be given as Windows format, start by converting to
27858   # unix format.
27859   path="$BOOT_JDK"
27860   new_path=`$CYGPATH -u "$path"`
27861 
27862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27865   # "foo.exe" is OK but "foo" is an error.
27866   #
27867   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27868   # It is also a way to make sure we got the proper file name for the real test later on.
27869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27870   if test "x$test_shortpath" = x; then
27871     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27873     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27874   fi
27875 
27876   # Call helper function which possibly converts this using DOS-style short mode.
27877   # If so, the updated path is stored in $new_path.
27878 
27879   input_path="$new_path"
27880   # Check if we need to convert this using DOS-style short mode. If the path
27881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27882   # take no chances and rewrite it.
27883   # Note: m4 eats our [], so we need to use [ and ] instead.
27884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27885   if test "x$has_forbidden_chars" != x; then
27886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27890       # Going to short mode and back again did indeed matter. Since short mode is
27891       # case insensitive, let's make it lowercase to improve readability.
27892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27893       # Now convert it back to Unix-style (cygpath)
27894       input_path=`$CYGPATH -u "$shortmode_path"`
27895       new_path="$input_path"
27896     fi
27897   fi
27898 
27899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27900   if test "x$test_cygdrive_prefix" = x; then
27901     # As a simple fix, exclude /usr/bin since it's not a real path.
27902     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27904       # a path prefixed by /cygdrive for fixpath to work.
27905       new_path="$CYGWIN_ROOT_PATH$input_path"
27906     fi
27907   fi
27908 
27909 
27910   if test "x$path" != "x$new_path"; then
27911     BOOT_JDK="$new_path"
27912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27914   fi
27915 
27916     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27917 
27918   path="$BOOT_JDK"
27919   has_colon=`$ECHO $path | $GREP ^.:`
27920   new_path="$path"
27921   if test "x$has_colon" = x; then
27922     # Not in mixed or Windows style, start by that.
27923     new_path=`cmd //c echo $path`
27924   fi
27925 
27926 
27927   input_path="$new_path"
27928   # Check if we need to convert this using DOS-style short mode. If the path
27929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27930   # take no chances and rewrite it.
27931   # Note: m4 eats our [], so we need to use [ and ] instead.
27932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27933   if test "x$has_forbidden_chars" != x; then
27934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27935     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27936   fi
27937 
27938 
27939   windows_path="$new_path"
27940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941     unix_path=`$CYGPATH -u "$windows_path"`
27942     new_path="$unix_path"
27943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945     new_path="$unix_path"
27946   fi
27947 
27948   if test "x$path" != "x$new_path"; then
27949     BOOT_JDK="$new_path"
27950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27952   fi
27953 
27954   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27955   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27956 
27957     else
27958       # We're on a unix platform. Hooray! :)
27959       path="$BOOT_JDK"
27960       has_space=`$ECHO "$path" | $GREP " "`
27961       if test "x$has_space" != x; then
27962         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27964         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27965       fi
27966 
27967       # Use eval to expand a potential ~
27968       eval path="$path"
27969       if test ! -f "$path" && test ! -d "$path"; then
27970         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27971       fi
27972 
27973       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27974     fi
27975   fi
27976 
27977             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27978 $as_echo_n "checking for Boot JDK... " >&6; }
27979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27980 $as_echo "$BOOT_JDK" >&6; }
27981             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27982 $as_echo_n "checking Boot JDK version... " >&6; }
27983             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27984             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27985 $as_echo "$BOOT_JDK_VERSION" >&6; }
27986           fi # end check jdk version
27987         fi # end check javac
27988       fi # end check java
27989     fi # end check boot jdk found
27990   fi
27991 
27992   fi
27993 
27994 
27995     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27996     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27997       # Do we have a bin/java?
27998       if test ! -x "$BOOT_JDK/bin/java"; then
27999         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28000 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28001         BOOT_JDK_FOUND=no
28002       else
28003         # Do we have a bin/javac?
28004         if test ! -x "$BOOT_JDK/bin/javac"; then
28005           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28007           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28008 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28009           BOOT_JDK_FOUND=no
28010         else
28011           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28012           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28013 
28014           # Extra M4 quote needed to protect [] in grep expression.
28015           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
28016           if test "x$FOUND_CORRECT_VERSION" = x; then
28017             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28019             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28020 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28021             BOOT_JDK_FOUND=no
28022           else
28023             # We're done! :-)
28024             BOOT_JDK_FOUND=yes
28025 
28026   # Only process if variable expands to non-empty
28027 
28028   if test "x$BOOT_JDK" != x; then
28029     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28030 
28031   # Input might be given as Windows format, start by converting to
28032   # unix format.
28033   path="$BOOT_JDK"
28034   new_path=`$CYGPATH -u "$path"`
28035 
28036   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28037   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28038   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28039   # "foo.exe" is OK but "foo" is an error.
28040   #
28041   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28042   # It is also a way to make sure we got the proper file name for the real test later on.
28043   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28044   if test "x$test_shortpath" = x; then
28045     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28046 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28047     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28048   fi
28049 
28050   # Call helper function which possibly converts this using DOS-style short mode.
28051   # If so, the updated path is stored in $new_path.
28052 
28053   input_path="$new_path"
28054   # Check if we need to convert this using DOS-style short mode. If the path
28055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28056   # take no chances and rewrite it.
28057   # Note: m4 eats our [], so we need to use [ and ] instead.
28058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28059   if test "x$has_forbidden_chars" != x; then
28060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28061     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28062     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28063     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28064       # Going to short mode and back again did indeed matter. Since short mode is
28065       # case insensitive, let's make it lowercase to improve readability.
28066       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28067       # Now convert it back to Unix-style (cygpath)
28068       input_path=`$CYGPATH -u "$shortmode_path"`
28069       new_path="$input_path"
28070     fi
28071   fi
28072 
28073   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28074   if test "x$test_cygdrive_prefix" = x; then
28075     # As a simple fix, exclude /usr/bin since it's not a real path.
28076     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28077       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28078       # a path prefixed by /cygdrive for fixpath to work.
28079       new_path="$CYGWIN_ROOT_PATH$input_path"
28080     fi
28081   fi
28082 
28083 
28084   if test "x$path" != "x$new_path"; then
28085     BOOT_JDK="$new_path"
28086     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28087 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28088   fi
28089 
28090     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28091 
28092   path="$BOOT_JDK"
28093   has_colon=`$ECHO $path | $GREP ^.:`
28094   new_path="$path"
28095   if test "x$has_colon" = x; then
28096     # Not in mixed or Windows style, start by that.
28097     new_path=`cmd //c echo $path`
28098   fi
28099 
28100 
28101   input_path="$new_path"
28102   # Check if we need to convert this using DOS-style short mode. If the path
28103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28104   # take no chances and rewrite it.
28105   # Note: m4 eats our [], so we need to use [ and ] instead.
28106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28107   if test "x$has_forbidden_chars" != x; then
28108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28110   fi
28111 
28112 
28113   windows_path="$new_path"
28114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28115     unix_path=`$CYGPATH -u "$windows_path"`
28116     new_path="$unix_path"
28117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28119     new_path="$unix_path"
28120   fi
28121 
28122   if test "x$path" != "x$new_path"; then
28123     BOOT_JDK="$new_path"
28124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28125 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28126   fi
28127 
28128   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28129   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28130 
28131     else
28132       # We're on a unix platform. Hooray! :)
28133       path="$BOOT_JDK"
28134       has_space=`$ECHO "$path" | $GREP " "`
28135       if test "x$has_space" != x; then
28136         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28137 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28138         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28139       fi
28140 
28141       # Use eval to expand a potential ~
28142       eval path="$path"
28143       if test ! -f "$path" && test ! -d "$path"; then
28144         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28145       fi
28146 
28147       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28148     fi
28149   fi
28150 
28151             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28152 $as_echo_n "checking for Boot JDK... " >&6; }
28153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28154 $as_echo "$BOOT_JDK" >&6; }
28155             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28156 $as_echo_n "checking Boot JDK version... " >&6; }
28157             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28158             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28159 $as_echo "$BOOT_JDK_VERSION" >&6; }
28160           fi # end check jdk version
28161         fi # end check javac
28162       fi # end check java
28163     fi # end check boot jdk found
28164   fi
28165 
28166 
28167   # If we haven't found anything yet, we've truly lost. Give up.
28168   if test "x$BOOT_JDK_FOUND" = xno; then
28169 
28170   # Print a helpful message on how to acquire the necessary build dependency.
28171   # openjdk is the help tag: freetype, cups, alsa etc
28172   MISSING_DEPENDENCY=openjdk
28173 
28174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28175     cygwin_help $MISSING_DEPENDENCY
28176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177     msys_help $MISSING_DEPENDENCY
28178   else
28179     PKGHANDLER_COMMAND=
28180 
28181     case $PKGHANDLER in
28182       apt-get)
28183         apt_help     $MISSING_DEPENDENCY ;;
28184       yum)
28185         yum_help     $MISSING_DEPENDENCY ;;
28186       port)
28187         port_help    $MISSING_DEPENDENCY ;;
28188       pkgutil)
28189         pkgutil_help $MISSING_DEPENDENCY ;;
28190       pkgadd)
28191         pkgadd_help  $MISSING_DEPENDENCY ;;
28192     esac
28193 
28194     if test "x$PKGHANDLER_COMMAND" != x; then
28195       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28196     fi
28197   fi
28198 
28199     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28200 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28201     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28202 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28203     as_fn_error $? "Cannot continue" "$LINENO" 5
28204   fi
28205 
28206 
28207 
28208   # Setup tools from the Boot JDK.
28209 
28210   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28211 
28212   # Publish this variable in the help.
28213 
28214 
28215   if [ -z "${JAVA+x}" ]; then
28216     # The variable is not set by user, try to locate tool using the code snippet
28217 
28218       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28219 $as_echo_n "checking for java in Boot JDK... " >&6; }
28220       JAVA=$BOOT_JDK/bin/java
28221       if test ! -x $JAVA; then
28222         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28223 $as_echo "not found" >&6; }
28224         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28225 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28226         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28227       fi
28228       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28229 $as_echo "ok" >&6; }
28230 
28231 
28232   else
28233     # The variable is set, but is it from the command line or the environment?
28234 
28235     # Try to remove the string !JAVA! from our list.
28236     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28237     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28238       # If it failed, the variable was not from the command line. Ignore it,
28239       # but warn the user (except for BASH, which is always set by the calling BASH).
28240       if test "xJAVA" != xBASH; then
28241         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28242 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28243       fi
28244       # Try to locate tool using the code snippet
28245 
28246       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28247 $as_echo_n "checking for java in Boot JDK... " >&6; }
28248       JAVA=$BOOT_JDK/bin/java
28249       if test ! -x $JAVA; then
28250         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28251 $as_echo "not found" >&6; }
28252         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28253 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28254         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28255       fi
28256       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28257 $as_echo "ok" >&6; }
28258 
28259 
28260     else
28261       # If it succeeded, then it was overridden by the user. We will use it
28262       # for the tool.
28263 
28264       # First remove it from the list of overridden variables, so we can test
28265       # for unknown variables in the end.
28266       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28267 
28268       # Check if we try to supply an empty value
28269       if test "x$JAVA" = x; then
28270         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28271 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28272         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28273 $as_echo_n "checking for JAVA... " >&6; }
28274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28275 $as_echo "disabled" >&6; }
28276       else
28277         # Check if the provided tool contains a complete path.
28278         tool_specified="$JAVA"
28279         tool_basename="${tool_specified##*/}"
28280         if test "x$tool_basename" = "x$tool_specified"; then
28281           # A command without a complete path is provided, search $PATH.
28282           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28283 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28284           # Extract the first word of "$tool_basename", so it can be a program name with args.
28285 set dummy $tool_basename; ac_word=$2
28286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28287 $as_echo_n "checking for $ac_word... " >&6; }
28288 if ${ac_cv_path_JAVA+:} false; then :
28289   $as_echo_n "(cached) " >&6
28290 else
28291   case $JAVA in
28292   [\\/]* | ?:[\\/]*)
28293   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28294   ;;
28295   *)
28296   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28297 for as_dir in $PATH
28298 do
28299   IFS=$as_save_IFS
28300   test -z "$as_dir" && as_dir=.
28301     for ac_exec_ext in '' $ac_executable_extensions; do
28302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28303     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28305     break 2
28306   fi
28307 done
28308   done
28309 IFS=$as_save_IFS
28310 
28311   ;;
28312 esac
28313 fi
28314 JAVA=$ac_cv_path_JAVA
28315 if test -n "$JAVA"; then
28316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28317 $as_echo "$JAVA" >&6; }
28318 else
28319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28320 $as_echo "no" >&6; }
28321 fi
28322 
28323 
28324           if test "x$JAVA" = x; then
28325             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28326           fi
28327         else
28328           # Otherwise we believe it is a complete path. Use it as it is.
28329           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28330 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28331           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28332 $as_echo_n "checking for JAVA... " >&6; }
28333           if test ! -x "$tool_specified"; then
28334             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28335 $as_echo "not found" >&6; }
28336             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28337           fi
28338           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28339 $as_echo "$tool_specified" >&6; }
28340         fi
28341       fi
28342     fi
28343 
28344   fi
28345 
28346 
28347 
28348   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28349 
28350   # Publish this variable in the help.
28351 
28352 
28353   if [ -z "${JAVAC+x}" ]; then
28354     # The variable is not set by user, try to locate tool using the code snippet
28355 
28356       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28357 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28358       JAVAC=$BOOT_JDK/bin/javac
28359       if test ! -x $JAVAC; then
28360         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28361 $as_echo "not found" >&6; }
28362         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28363 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28364         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28365       fi
28366       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28367 $as_echo "ok" >&6; }
28368 
28369 
28370   else
28371     # The variable is set, but is it from the command line or the environment?
28372 
28373     # Try to remove the string !JAVAC! from our list.
28374     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28375     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28376       # If it failed, the variable was not from the command line. Ignore it,
28377       # but warn the user (except for BASH, which is always set by the calling BASH).
28378       if test "xJAVAC" != xBASH; then
28379         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28380 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28381       fi
28382       # Try to locate tool using the code snippet
28383 
28384       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28385 $as_echo_n "checking for javac in Boot JDK... " >&6; }
28386       JAVAC=$BOOT_JDK/bin/javac
28387       if test ! -x $JAVAC; then
28388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28389 $as_echo "not found" >&6; }
28390         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28391 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28392         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28393       fi
28394       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28395 $as_echo "ok" >&6; }
28396 
28397 
28398     else
28399       # If it succeeded, then it was overridden by the user. We will use it
28400       # for the tool.
28401 
28402       # First remove it from the list of overridden variables, so we can test
28403       # for unknown variables in the end.
28404       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28405 
28406       # Check if we try to supply an empty value
28407       if test "x$JAVAC" = x; then
28408         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28409 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28410         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28411 $as_echo_n "checking for JAVAC... " >&6; }
28412         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28413 $as_echo "disabled" >&6; }
28414       else
28415         # Check if the provided tool contains a complete path.
28416         tool_specified="$JAVAC"
28417         tool_basename="${tool_specified##*/}"
28418         if test "x$tool_basename" = "x$tool_specified"; then
28419           # A command without a complete path is provided, search $PATH.
28420           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28421 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28422           # Extract the first word of "$tool_basename", so it can be a program name with args.
28423 set dummy $tool_basename; ac_word=$2
28424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28425 $as_echo_n "checking for $ac_word... " >&6; }
28426 if ${ac_cv_path_JAVAC+:} false; then :
28427   $as_echo_n "(cached) " >&6
28428 else
28429   case $JAVAC in
28430   [\\/]* | ?:[\\/]*)
28431   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28432   ;;
28433   *)
28434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28435 for as_dir in $PATH
28436 do
28437   IFS=$as_save_IFS
28438   test -z "$as_dir" && as_dir=.
28439     for ac_exec_ext in '' $ac_executable_extensions; do
28440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28441     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28443     break 2
28444   fi
28445 done
28446   done
28447 IFS=$as_save_IFS
28448 
28449   ;;
28450 esac
28451 fi
28452 JAVAC=$ac_cv_path_JAVAC
28453 if test -n "$JAVAC"; then
28454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28455 $as_echo "$JAVAC" >&6; }
28456 else
28457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28458 $as_echo "no" >&6; }
28459 fi
28460 
28461 
28462           if test "x$JAVAC" = x; then
28463             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28464           fi
28465         else
28466           # Otherwise we believe it is a complete path. Use it as it is.
28467           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28468 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28469           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28470 $as_echo_n "checking for JAVAC... " >&6; }
28471           if test ! -x "$tool_specified"; then
28472             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28473 $as_echo "not found" >&6; }
28474             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28475           fi
28476           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28477 $as_echo "$tool_specified" >&6; }
28478         fi
28479       fi
28480     fi
28481 
28482   fi
28483 
28484 
28485 
28486   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28487 
28488   # Publish this variable in the help.
28489 
28490 
28491   if [ -z "${JAVAH+x}" ]; then
28492     # The variable is not set by user, try to locate tool using the code snippet
28493 
28494       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28495 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28496       JAVAH=$BOOT_JDK/bin/javah
28497       if test ! -x $JAVAH; then
28498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28499 $as_echo "not found" >&6; }
28500         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28501 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28502         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28503       fi
28504       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28505 $as_echo "ok" >&6; }
28506 
28507 
28508   else
28509     # The variable is set, but is it from the command line or the environment?
28510 
28511     # Try to remove the string !JAVAH! from our list.
28512     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28513     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28514       # If it failed, the variable was not from the command line. Ignore it,
28515       # but warn the user (except for BASH, which is always set by the calling BASH).
28516       if test "xJAVAH" != xBASH; then
28517         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28518 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28519       fi
28520       # Try to locate tool using the code snippet
28521 
28522       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28523 $as_echo_n "checking for javah in Boot JDK... " >&6; }
28524       JAVAH=$BOOT_JDK/bin/javah
28525       if test ! -x $JAVAH; then
28526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28527 $as_echo "not found" >&6; }
28528         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28529 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28530         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28531       fi
28532       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28533 $as_echo "ok" >&6; }
28534 
28535 
28536     else
28537       # If it succeeded, then it was overridden by the user. We will use it
28538       # for the tool.
28539 
28540       # First remove it from the list of overridden variables, so we can test
28541       # for unknown variables in the end.
28542       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28543 
28544       # Check if we try to supply an empty value
28545       if test "x$JAVAH" = x; then
28546         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28547 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28548         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28549 $as_echo_n "checking for JAVAH... " >&6; }
28550         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28551 $as_echo "disabled" >&6; }
28552       else
28553         # Check if the provided tool contains a complete path.
28554         tool_specified="$JAVAH"
28555         tool_basename="${tool_specified##*/}"
28556         if test "x$tool_basename" = "x$tool_specified"; then
28557           # A command without a complete path is provided, search $PATH.
28558           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28559 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28560           # Extract the first word of "$tool_basename", so it can be a program name with args.
28561 set dummy $tool_basename; ac_word=$2
28562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28563 $as_echo_n "checking for $ac_word... " >&6; }
28564 if ${ac_cv_path_JAVAH+:} false; then :
28565   $as_echo_n "(cached) " >&6
28566 else
28567   case $JAVAH in
28568   [\\/]* | ?:[\\/]*)
28569   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28570   ;;
28571   *)
28572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28573 for as_dir in $PATH
28574 do
28575   IFS=$as_save_IFS
28576   test -z "$as_dir" && as_dir=.
28577     for ac_exec_ext in '' $ac_executable_extensions; do
28578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28579     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28581     break 2
28582   fi
28583 done
28584   done
28585 IFS=$as_save_IFS
28586 
28587   ;;
28588 esac
28589 fi
28590 JAVAH=$ac_cv_path_JAVAH
28591 if test -n "$JAVAH"; then
28592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28593 $as_echo "$JAVAH" >&6; }
28594 else
28595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28596 $as_echo "no" >&6; }
28597 fi
28598 
28599 
28600           if test "x$JAVAH" = x; then
28601             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28602           fi
28603         else
28604           # Otherwise we believe it is a complete path. Use it as it is.
28605           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28606 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28607           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28608 $as_echo_n "checking for JAVAH... " >&6; }
28609           if test ! -x "$tool_specified"; then
28610             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28611 $as_echo "not found" >&6; }
28612             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28613           fi
28614           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28615 $as_echo "$tool_specified" >&6; }
28616         fi
28617       fi
28618     fi
28619 
28620   fi
28621 
28622 
28623 
28624   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28625 
28626   # Publish this variable in the help.
28627 
28628 
28629   if [ -z "${JAR+x}" ]; then
28630     # The variable is not set by user, try to locate tool using the code snippet
28631 
28632       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28633 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28634       JAR=$BOOT_JDK/bin/jar
28635       if test ! -x $JAR; then
28636         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28637 $as_echo "not found" >&6; }
28638         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28639 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28640         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28641       fi
28642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28643 $as_echo "ok" >&6; }
28644 
28645 
28646   else
28647     # The variable is set, but is it from the command line or the environment?
28648 
28649     # Try to remove the string !JAR! from our list.
28650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28652       # If it failed, the variable was not from the command line. Ignore it,
28653       # but warn the user (except for BASH, which is always set by the calling BASH).
28654       if test "xJAR" != xBASH; then
28655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28656 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28657       fi
28658       # Try to locate tool using the code snippet
28659 
28660       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28661 $as_echo_n "checking for jar in Boot JDK... " >&6; }
28662       JAR=$BOOT_JDK/bin/jar
28663       if test ! -x $JAR; then
28664         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28665 $as_echo "not found" >&6; }
28666         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28667 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28668         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28669       fi
28670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28671 $as_echo "ok" >&6; }
28672 
28673 
28674     else
28675       # If it succeeded, then it was overridden by the user. We will use it
28676       # for the tool.
28677 
28678       # First remove it from the list of overridden variables, so we can test
28679       # for unknown variables in the end.
28680       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28681 
28682       # Check if we try to supply an empty value
28683       if test "x$JAR" = x; then
28684         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28685 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28686         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28687 $as_echo_n "checking for JAR... " >&6; }
28688         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28689 $as_echo "disabled" >&6; }
28690       else
28691         # Check if the provided tool contains a complete path.
28692         tool_specified="$JAR"
28693         tool_basename="${tool_specified##*/}"
28694         if test "x$tool_basename" = "x$tool_specified"; then
28695           # A command without a complete path is provided, search $PATH.
28696           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28697 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28698           # Extract the first word of "$tool_basename", so it can be a program name with args.
28699 set dummy $tool_basename; ac_word=$2
28700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28701 $as_echo_n "checking for $ac_word... " >&6; }
28702 if ${ac_cv_path_JAR+:} false; then :
28703   $as_echo_n "(cached) " >&6
28704 else
28705   case $JAR in
28706   [\\/]* | ?:[\\/]*)
28707   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28708   ;;
28709   *)
28710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28711 for as_dir in $PATH
28712 do
28713   IFS=$as_save_IFS
28714   test -z "$as_dir" && as_dir=.
28715     for ac_exec_ext in '' $ac_executable_extensions; do
28716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28717     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28719     break 2
28720   fi
28721 done
28722   done
28723 IFS=$as_save_IFS
28724 
28725   ;;
28726 esac
28727 fi
28728 JAR=$ac_cv_path_JAR
28729 if test -n "$JAR"; then
28730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28731 $as_echo "$JAR" >&6; }
28732 else
28733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28734 $as_echo "no" >&6; }
28735 fi
28736 
28737 
28738           if test "x$JAR" = x; then
28739             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28740           fi
28741         else
28742           # Otherwise we believe it is a complete path. Use it as it is.
28743           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28744 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28745           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28746 $as_echo_n "checking for JAR... " >&6; }
28747           if test ! -x "$tool_specified"; then
28748             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28749 $as_echo "not found" >&6; }
28750             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28751           fi
28752           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28753 $as_echo "$tool_specified" >&6; }
28754         fi
28755       fi
28756     fi
28757 
28758   fi
28759 
28760 
28761 
28762   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28763 
28764   # Publish this variable in the help.
28765 
28766 
28767   if [ -z "${JARSIGNER+x}" ]; then
28768     # The variable is not set by user, try to locate tool using the code snippet
28769 
28770       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28771 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28772       JARSIGNER=$BOOT_JDK/bin/jarsigner
28773       if test ! -x $JARSIGNER; then
28774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28775 $as_echo "not found" >&6; }
28776         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28777 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28778         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28779       fi
28780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28781 $as_echo "ok" >&6; }
28782 
28783 
28784   else
28785     # The variable is set, but is it from the command line or the environment?
28786 
28787     # Try to remove the string !JARSIGNER! from our list.
28788     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28789     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28790       # If it failed, the variable was not from the command line. Ignore it,
28791       # but warn the user (except for BASH, which is always set by the calling BASH).
28792       if test "xJARSIGNER" != xBASH; then
28793         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28794 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28795       fi
28796       # Try to locate tool using the code snippet
28797 
28798       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28799 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28800       JARSIGNER=$BOOT_JDK/bin/jarsigner
28801       if test ! -x $JARSIGNER; then
28802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28803 $as_echo "not found" >&6; }
28804         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28805 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28806         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28807       fi
28808       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28809 $as_echo "ok" >&6; }
28810 
28811 
28812     else
28813       # If it succeeded, then it was overridden by the user. We will use it
28814       # for the tool.
28815 
28816       # First remove it from the list of overridden variables, so we can test
28817       # for unknown variables in the end.
28818       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28819 
28820       # Check if we try to supply an empty value
28821       if test "x$JARSIGNER" = x; then
28822         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28823 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28825 $as_echo_n "checking for JARSIGNER... " >&6; }
28826         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28827 $as_echo "disabled" >&6; }
28828       else
28829         # Check if the provided tool contains a complete path.
28830         tool_specified="$JARSIGNER"
28831         tool_basename="${tool_specified##*/}"
28832         if test "x$tool_basename" = "x$tool_specified"; then
28833           # A command without a complete path is provided, search $PATH.
28834           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28835 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28836           # Extract the first word of "$tool_basename", so it can be a program name with args.
28837 set dummy $tool_basename; ac_word=$2
28838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28839 $as_echo_n "checking for $ac_word... " >&6; }
28840 if ${ac_cv_path_JARSIGNER+:} false; then :
28841   $as_echo_n "(cached) " >&6
28842 else
28843   case $JARSIGNER in
28844   [\\/]* | ?:[\\/]*)
28845   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28846   ;;
28847   *)
28848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28849 for as_dir in $PATH
28850 do
28851   IFS=$as_save_IFS
28852   test -z "$as_dir" && as_dir=.
28853     for ac_exec_ext in '' $ac_executable_extensions; do
28854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28855     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28857     break 2
28858   fi
28859 done
28860   done
28861 IFS=$as_save_IFS
28862 
28863   ;;
28864 esac
28865 fi
28866 JARSIGNER=$ac_cv_path_JARSIGNER
28867 if test -n "$JARSIGNER"; then
28868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28869 $as_echo "$JARSIGNER" >&6; }
28870 else
28871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28872 $as_echo "no" >&6; }
28873 fi
28874 
28875 
28876           if test "x$JARSIGNER" = x; then
28877             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28878           fi
28879         else
28880           # Otherwise we believe it is a complete path. Use it as it is.
28881           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28882 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28883           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28884 $as_echo_n "checking for JARSIGNER... " >&6; }
28885           if test ! -x "$tool_specified"; then
28886             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28887 $as_echo "not found" >&6; }
28888             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28889           fi
28890           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28891 $as_echo "$tool_specified" >&6; }
28892         fi
28893       fi
28894     fi
28895 
28896   fi
28897 
28898 
28899 
28900   # Finally, set some other options...
28901 
28902   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28903   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28904 
28905 
28906 
28907   # Check if the boot jdk is 32 or 64 bit
28908   if "$JAVA" -d64 -version > /dev/null 2>&1; then
28909     BOOT_JDK_BITS="64"
28910   else
28911     BOOT_JDK_BITS="32"
28912   fi
28913   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28914 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28916 $as_echo "$BOOT_JDK_BITS" >&6; }
28917 
28918 
28919 
28920 ###############################################################################
28921 #
28922 # Configure the sources to use. We can add or override individual directories.
28923 #
28924 ###############################################################################
28925 
28926 
28927   # Where are the sources.
28928   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28929   CORBA_TOPDIR="$SRC_ROOT/corba"
28930   JAXP_TOPDIR="$SRC_ROOT/jaxp"
28931   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28932   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28933   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28934   JDK_TOPDIR="$SRC_ROOT/jdk"
28935 
28936 
28937 
28938 
28939 
28940 
28941 
28942 
28943 
28944   # This feature is no longer supported.
28945 
28946 
28947 
28948 # Check whether --with-add-source-root was given.
28949 if test "${with_add_source_root+set}" = set; then :
28950   withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
28951 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28952 fi
28953 
28954 
28955 
28956 
28957 # Check whether --with-override-source-root was given.
28958 if test "${with_override_source_root+set}" = set; then :
28959   withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
28960 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28961 fi
28962 
28963 
28964 
28965 
28966 # Check whether --with-adds-and-overrides was given.
28967 if test "${with_adds_and_overrides+set}" = set; then :
28968   withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
28969 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28970 fi
28971 
28972 
28973 
28974 
28975 # Check whether --with-override-langtools was given.
28976 if test "${with_override_langtools+set}" = set; then :
28977   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28978 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28979 fi
28980 
28981 
28982 
28983 
28984 # Check whether --with-override-corba was given.
28985 if test "${with_override_corba+set}" = set; then :
28986   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28987 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28988 fi
28989 
28990 
28991 
28992 
28993 # Check whether --with-override-jaxp was given.
28994 if test "${with_override_jaxp+set}" = set; then :
28995   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28996 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28997 fi
28998 
28999 
29000 
29001 
29002 # Check whether --with-override-jaxws was given.
29003 if test "${with_override_jaxws+set}" = set; then :
29004   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29005 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29006 fi
29007 
29008 
29009 
29010 
29011 # Check whether --with-override-hotspot was given.
29012 if test "${with_override_hotspot+set}" = set; then :
29013   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29014 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29015 fi
29016 
29017 
29018 
29019 
29020 # Check whether --with-override-nashorn was given.
29021 if test "${with_override_nashorn+set}" = set; then :
29022   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29023 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29024 fi
29025 
29026 
29027 
29028 
29029 # Check whether --with-override-jdk was given.
29030 if test "${with_override_jdk+set}" = set; then :
29031   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29032 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29033 fi
29034 
29035 
29036 
29037 
29038   BUILD_OUTPUT="$OUTPUT_ROOT"
29039 
29040 
29041   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29042   BUILD_HOTSPOT=true
29043 
29044 
29045 
29046 # Check whether --with-import-hotspot was given.
29047 if test "${with_import_hotspot+set}" = set; then :
29048   withval=$with_import_hotspot;
29049 fi
29050 
29051   if test "x$with_import_hotspot" != x; then
29052     CURDIR="$PWD"
29053     cd "$with_import_hotspot"
29054     HOTSPOT_DIST="`pwd`"
29055     cd "$CURDIR"
29056     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29057       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29058     fi
29059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29060 $as_echo_n "checking if hotspot should be imported... " >&6; }
29061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29062 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29063     BUILD_HOTSPOT=false
29064   fi
29065 
29066   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29067 
29068 
29069 ###############################################################################
29070 #
29071 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29072 # native code.
29073 #
29074 ###############################################################################
29075 
29076 # See if we are doing a complete static build or not
29077 
29078   # Check whether --enable-static-build was given.
29079 if test "${enable_static_build+set}" = set; then :
29080   enableval=$enable_static_build;
29081 fi
29082 
29083   STATIC_BUILD=false
29084   if test "x$enable_static_build" = "xyes"; then
29085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29086 $as_echo_n "checking if static build is enabled... " >&6; }
29087     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29088 $as_echo "yes" >&6; }
29089     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29090       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29091     fi
29092     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29093     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29094     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29095     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29096     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29097     STATIC_BUILD=true
29098   elif test "x$enable_static_build" = "xno"; then
29099     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29100 $as_echo_n "checking if static build is enabled... " >&6; }
29101     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29102 $as_echo "no" >&6; }
29103   elif test "x$enable_static_build" != "x"; then
29104     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29105   fi
29106 
29107 
29108 
29109 
29110 # First determine the toolchain type (compiler family)
29111 
29112 
29113 # Check whether --with-toolchain-type was given.
29114 if test "${with_toolchain_type+set}" = set; then :
29115   withval=$with_toolchain_type;
29116 fi
29117 
29118 
29119   # Use indirect variable referencing
29120   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29121   VALID_TOOLCHAINS=${!toolchain_var_name}
29122 
29123   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29124     if test -n "$XCODEBUILD"; then
29125       # On Mac OS X, default toolchain to clang after Xcode 5
29126       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29127       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29128       if test $? -ne 0; then
29129         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29130       fi
29131       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29132           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29133           $CUT -f 1 -d .`
29134       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29135 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29136       if test $XCODE_MAJOR_VERSION -ge 5; then
29137           DEFAULT_TOOLCHAIN="clang"
29138       else
29139           DEFAULT_TOOLCHAIN="gcc"
29140       fi
29141     else
29142       # If Xcode is not installed, but the command line tools are
29143       # then we can't run xcodebuild. On these systems we should
29144       # default to clang
29145       DEFAULT_TOOLCHAIN="clang"
29146     fi
29147   else
29148     # First toolchain type in the list is the default
29149     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29150   fi
29151 
29152   if test "x$with_toolchain_type" = xlist; then
29153     # List all toolchains
29154     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29155 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29156     for toolchain in $VALID_TOOLCHAINS; do
29157       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29158       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29159       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29160     done
29161 
29162     exit 0
29163   elif test "x$with_toolchain_type" != x; then
29164     # User override; check that it is valid
29165     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29166       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29167 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29168       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29169 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29170       as_fn_error $? "Cannot continue." "$LINENO" 5
29171     fi
29172     TOOLCHAIN_TYPE=$with_toolchain_type
29173   else
29174     # No flag given, use default
29175     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29176   fi
29177 
29178 
29179   TOOLCHAIN_CC_BINARY_clang="clang"
29180   TOOLCHAIN_CC_BINARY_gcc="gcc"
29181   TOOLCHAIN_CC_BINARY_microsoft="cl"
29182   TOOLCHAIN_CC_BINARY_solstudio="cc"
29183   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29184 
29185   TOOLCHAIN_CXX_BINARY_clang="clang++"
29186   TOOLCHAIN_CXX_BINARY_gcc="g++"
29187   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29188   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29189   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29190 
29191   # Use indirect variable referencing
29192   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29193   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29194   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29195   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29196   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29197   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29198 
29199 
29200   # Define filename patterns
29201   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29202     LIBRARY_PREFIX=
29203     SHARED_LIBRARY_SUFFIX='.dll'
29204     STATIC_LIBRARY_SUFFIX='.lib'
29205     SHARED_LIBRARY='$1.dll'
29206     STATIC_LIBRARY='$1.lib'
29207     OBJ_SUFFIX='.obj'
29208     EXE_SUFFIX='.exe'
29209   else
29210     LIBRARY_PREFIX=lib
29211     SHARED_LIBRARY_SUFFIX='.so'
29212     STATIC_LIBRARY_SUFFIX='.a'
29213     SHARED_LIBRARY='lib$1.so'
29214     STATIC_LIBRARY='lib$1.a'
29215     OBJ_SUFFIX='.o'
29216     EXE_SUFFIX=''
29217     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29218       # For full static builds, we're overloading the SHARED_LIBRARY
29219       # variables in order to limit the amount of changes required.
29220       # It would be better to remove SHARED and just use LIBRARY and
29221       # LIBRARY_SUFFIX for libraries that can be built either
29222       # shared or static and use STATIC_* for libraries that are
29223       # always built statically.
29224       if test "x$STATIC_BUILD" = xtrue; then
29225         SHARED_LIBRARY='lib$1.a'
29226         SHARED_LIBRARY_SUFFIX='.a'
29227       else
29228         SHARED_LIBRARY='lib$1.dylib'
29229         SHARED_LIBRARY_SUFFIX='.dylib'
29230       fi
29231     fi
29232   fi
29233 
29234 
29235 
29236 
29237 
29238 
29239 
29240 
29241 
29242 
29243   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29244     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29245 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29246   else
29247     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29248 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29249   fi
29250 
29251 
29252 # User supplied flags should be used when configure detects compilers
29253 
29254   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29255     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29256 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29257   fi
29258 
29259   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29260     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29261 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29262   fi
29263 
29264   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29265     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29266 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29267   fi
29268 
29269 
29270 # Check whether --with-extra-cflags was given.
29271 if test "${with_extra_cflags+set}" = set; then :
29272   withval=$with_extra_cflags;
29273 fi
29274 
29275 
29276 
29277 # Check whether --with-extra-cxxflags was given.
29278 if test "${with_extra_cxxflags+set}" = set; then :
29279   withval=$with_extra_cxxflags;
29280 fi
29281 
29282 
29283 
29284 # Check whether --with-extra-ldflags was given.
29285 if test "${with_extra_ldflags+set}" = set; then :
29286   withval=$with_extra_ldflags;
29287 fi
29288 
29289 
29290   EXTRA_CFLAGS="$with_extra_cflags"
29291   EXTRA_CXXFLAGS="$with_extra_cxxflags"
29292   EXTRA_LDFLAGS="$with_extra_ldflags"
29293 
29294   # Hotspot needs these set in their legacy form
29295   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29296   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29297   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29298 
29299 
29300 
29301 
29302 
29303   # The global CFLAGS and LDLAGS variables are used by configure tests and
29304   # should include the extra parameters
29305   CFLAGS="$EXTRA_CFLAGS"
29306   CXXFLAGS="$EXTRA_CXXFLAGS"
29307   LDFLAGS="$EXTRA_LDFLAGS"
29308   CPPFLAGS=""
29309 
29310 # The sysroot cflags are needed for configure to be able to run the compilers
29311 
29312   if test "x$SYSROOT" != "x"; then
29313     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29314       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29315         # Solaris Studio does not have a concept of sysroot. Instead we must
29316         # make sure the default include and lib dirs are appended to each
29317         # compile and link command line.
29318         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29319         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29320             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29321             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29322       fi
29323     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29324       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29325       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29326     elif test "x$TOOLCHAIN_TYPE" = xclang; then
29327       SYSROOT_CFLAGS="-isysroot $SYSROOT"
29328       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29329     fi
29330     # Propagate the sysroot args to hotspot
29331     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29332     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29333     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29334     # The global CFLAGS and LDFLAGS variables need these for configure to function
29335     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29336     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29337     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29338     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29339   fi
29340 
29341   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29342     # We also need -iframework<path>/System/Library/Frameworks
29343     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29344     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29345     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29346     # set this here so it doesn't have to be peppered throughout the forest
29347     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29348     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29349   fi
29350 
29351 
29352 
29353 
29354 
29355 # Then detect the actual binaries needed
29356 
29357   # FIXME: Is this needed?
29358   ac_ext=cpp
29359 ac_cpp='$CXXCPP $CPPFLAGS'
29360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29363 
29364 
29365   # Store the CFLAGS etc passed to the configure script.
29366   ORG_CFLAGS="$CFLAGS"
29367   ORG_CXXFLAGS="$CXXFLAGS"
29368 
29369   # autoconf magic only relies on PATH, so update it if tools dir is specified
29370   OLD_PATH="$PATH"
29371 
29372   # On Windows, we need to detect the visual studio installation first.
29373   # This will change the PATH, but we need to keep that new PATH even
29374   # after toolchain detection is done, since the compiler (on x86) uses
29375   # it for DLL resolution in runtime.
29376   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29377       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29378 
29379   # Store path to cygwin link.exe to help excluding it when searching for
29380   # VS linker. This must be done before changing the PATH when looking for VS.
29381   # Extract the first word of "link", so it can be a program name with args.
29382 set dummy link; ac_word=$2
29383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29384 $as_echo_n "checking for $ac_word... " >&6; }
29385 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29386   $as_echo_n "(cached) " >&6
29387 else
29388   case $CYGWIN_LINK in
29389   [\\/]* | ?:[\\/]*)
29390   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29391   ;;
29392   *)
29393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29394 for as_dir in $PATH
29395 do
29396   IFS=$as_save_IFS
29397   test -z "$as_dir" && as_dir=.
29398     for ac_exec_ext in '' $ac_executable_extensions; do
29399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29400     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29402     break 2
29403   fi
29404 done
29405   done
29406 IFS=$as_save_IFS
29407 
29408   ;;
29409 esac
29410 fi
29411 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29412 if test -n "$CYGWIN_LINK"; then
29413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29414 $as_echo "$CYGWIN_LINK" >&6; }
29415 else
29416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29417 $as_echo "no" >&6; }
29418 fi
29419 
29420 
29421   if test "x$CYGWIN_LINK" != x; then
29422     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29423 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29424     "$CYGWIN_LINK" --version > /dev/null
29425     if test $? -eq 0 ; then
29426       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29427 $as_echo "yes" >&6; }
29428     else
29429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29430 $as_echo "no" >&6; }
29431       # This might be the VS linker. Don't exclude it later on.
29432       CYGWIN_LINK=""
29433     fi
29434   fi
29435 
29436   # First-hand choice is to locate and run the vsvars bat file.
29437 
29438 
29439 # Check whether --with-toolchain-version was given.
29440 if test "${with_toolchain_version+set}" = set; then :
29441   withval=$with_toolchain_version;
29442 fi
29443 
29444 
29445   if test "x$with_toolchain_version" = xlist; then
29446     # List all toolchains
29447     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29448 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29449     for version in $VALID_VS_VERSIONS; do
29450       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29451       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29452     done
29453 
29454     exit 0
29455   elif test "x$DEVKIT_VS_VERSION" != x; then
29456     VS_VERSION=$DEVKIT_VS_VERSION
29457     TOOLCHAIN_VERSION=$VS_VERSION
29458     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29459     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29460     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29461     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29462     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29463     VS_PATH="$TOOLCHAIN_PATH:$PATH"
29464 
29465     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29466     # can still be exported as INCLUDE for compiler invocations without
29467     # SYSROOT_CFLAGS
29468     OLDIFS="$IFS"
29469     IFS=";"
29470     for i in $DEVKIT_VS_INCLUDE; do
29471       ipath=$i
29472 
29473   unix_path="$ipath"
29474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29475     windows_path=`$CYGPATH -m "$unix_path"`
29476     ipath="$windows_path"
29477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29478     windows_path=`cmd //c echo $unix_path`
29479     ipath="$windows_path"
29480   fi
29481 
29482       VS_INCLUDE="$VS_INCLUDE;$ipath"
29483     done
29484     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29485     # as LIB for compiler invocations without SYSROOT_LDFLAGS
29486     for i in $DEVKIT_VS_LIB; do
29487       libpath=$i
29488 
29489   unix_path="$libpath"
29490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29491     windows_path=`$CYGPATH -m "$unix_path"`
29492     libpath="$windows_path"
29493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29494     windows_path=`cmd //c echo $unix_path`
29495     libpath="$windows_path"
29496   fi
29497 
29498       VS_LIB="$VS_LIB;$libpath"
29499     done
29500     IFS="$OLDIFS"
29501 
29502     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29503 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29504 
29505   elif test "x$with_toolchain_version" != x; then
29506     # User override; check that it is valid
29507     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29508       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29509 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29510       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29511 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29512       as_fn_error $? "Cannot continue." "$LINENO" 5
29513     fi
29514     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29515   else
29516     # No flag given, use default
29517     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29518   fi
29519 
29520   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29521 
29522   VS_VERSION="$VS_VERSION"
29523   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29524   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29525   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29526   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29527 
29528   # When using --with-tools-dir, assume it points to the correct and default
29529   # version of Visual Studio or that --with-toolchain-version was also set.
29530   if test "x$with_tools_dir" != x; then
29531 
29532   if test "x$VS_ENV_CMD" = x; then
29533     VS_VERSION="${VS_VERSION}"
29534     VS_BASE="$with_tools_dir/../.."
29535     METHOD="--with-tools-dir"
29536 
29537     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29538       VCVARSFILE="vc/bin/vcvars32.bat"
29539     else
29540       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29541     fi
29542 
29543 
29544   windows_path="$VS_BASE"
29545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29546     unix_path=`$CYGPATH -u "$windows_path"`
29547     VS_BASE="$unix_path"
29548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29550     VS_BASE="$unix_path"
29551   fi
29552 
29553     if test -d "$VS_BASE"; then
29554       if test -f "$VS_BASE/$VCVARSFILE"; then
29555         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29556 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29557         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29558         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29559         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29560         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29561       else
29562         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29563 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29564         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29565 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29566       fi
29567     fi
29568   fi
29569 
29570 
29571   if test "x$VS_ENV_CMD" = x; then
29572     VS_VERSION="${VS_VERSION}"
29573     VS_BASE="$with_tools_dir/../../.."
29574     METHOD="--with-tools-dir"
29575 
29576     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29577       VCVARSFILE="vc/bin/vcvars32.bat"
29578     else
29579       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29580     fi
29581 
29582 
29583   windows_path="$VS_BASE"
29584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29585     unix_path=`$CYGPATH -u "$windows_path"`
29586     VS_BASE="$unix_path"
29587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29589     VS_BASE="$unix_path"
29590   fi
29591 
29592     if test -d "$VS_BASE"; then
29593       if test -f "$VS_BASE/$VCVARSFILE"; then
29594         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29595 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29596         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29597         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29598         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29599         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29600       else
29601         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29602 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29603         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29604 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29605       fi
29606     fi
29607   fi
29608 
29609     if test "x$VS_ENV_CMD" = x; then
29610       # Having specified an argument which is incorrect will produce an instant failure;
29611       # we should not go on looking
29612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29613 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29614       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29615 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29616       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29617 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29618       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29619     fi
29620   fi
29621 
29622   VS_ENV_CMD=""
29623   VS_ENV_ARGS=""
29624 
29625   if test "x$VS_COMNTOOLS" != x; then
29626 
29627   if test "x$VS_ENV_CMD" = x; then
29628     VS_VERSION="${VS_VERSION}"
29629     VS_BASE="$VS_COMNTOOLS/../.."
29630     METHOD="$VS_COMNTOOLS_VAR variable"
29631 
29632     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29633       VCVARSFILE="vc/bin/vcvars32.bat"
29634     else
29635       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29636     fi
29637 
29638 
29639   windows_path="$VS_BASE"
29640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641     unix_path=`$CYGPATH -u "$windows_path"`
29642     VS_BASE="$unix_path"
29643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29645     VS_BASE="$unix_path"
29646   fi
29647 
29648     if test -d "$VS_BASE"; then
29649       if test -f "$VS_BASE/$VCVARSFILE"; then
29650         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29651 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29652         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29653         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29654         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29655         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29656       else
29657         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29658 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29659         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29660 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29661       fi
29662     fi
29663   fi
29664 
29665   fi
29666   if test "x$PROGRAMFILES" != x; then
29667 
29668   if test "x$VS_ENV_CMD" = x; then
29669     VS_VERSION="${VS_VERSION}"
29670     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29671     METHOD="well-known name"
29672 
29673     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29674       VCVARSFILE="vc/bin/vcvars32.bat"
29675     else
29676       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29677     fi
29678 
29679 
29680   windows_path="$VS_BASE"
29681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29682     unix_path=`$CYGPATH -u "$windows_path"`
29683     VS_BASE="$unix_path"
29684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29686     VS_BASE="$unix_path"
29687   fi
29688 
29689     if test -d "$VS_BASE"; then
29690       if test -f "$VS_BASE/$VCVARSFILE"; then
29691         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29692 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29693         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29694         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29695         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29696         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29697       else
29698         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29699 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29700         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29701 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29702       fi
29703     fi
29704   fi
29705 
29706   fi
29707   # Work around the insanely named ProgramFiles(x86) env variable
29708   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29709   if test "x$PROGRAMFILES_X86" != x; then
29710 
29711   if test "x$VS_ENV_CMD" = x; then
29712     VS_VERSION="${VS_VERSION}"
29713     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29714     METHOD="well-known name"
29715 
29716     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29717       VCVARSFILE="vc/bin/vcvars32.bat"
29718     else
29719       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29720     fi
29721 
29722 
29723   windows_path="$VS_BASE"
29724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29725     unix_path=`$CYGPATH -u "$windows_path"`
29726     VS_BASE="$unix_path"
29727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29729     VS_BASE="$unix_path"
29730   fi
29731 
29732     if test -d "$VS_BASE"; then
29733       if test -f "$VS_BASE/$VCVARSFILE"; then
29734         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29735 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29736         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29737         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29738         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29739         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29740       else
29741         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29742 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29743         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29744 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29745       fi
29746     fi
29747   fi
29748 
29749   fi
29750 
29751   if test "x$VS_ENV_CMD" = x; then
29752     VS_VERSION="${VS_VERSION}"
29753     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29754     METHOD="well-known name"
29755 
29756     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29757       VCVARSFILE="vc/bin/vcvars32.bat"
29758     else
29759       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29760     fi
29761 
29762 
29763   windows_path="$VS_BASE"
29764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29765     unix_path=`$CYGPATH -u "$windows_path"`
29766     VS_BASE="$unix_path"
29767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29769     VS_BASE="$unix_path"
29770   fi
29771 
29772     if test -d "$VS_BASE"; then
29773       if test -f "$VS_BASE/$VCVARSFILE"; then
29774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29775 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29776         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29777         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29778         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29779         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29780       else
29781         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29782 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29783         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29784 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29785       fi
29786     fi
29787   fi
29788 
29789 
29790   if test "x$VS_ENV_CMD" = x; then
29791     VS_VERSION="${VS_VERSION}"
29792     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29793     METHOD="well-known name"
29794 
29795     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29796       VCVARSFILE="vc/bin/vcvars32.bat"
29797     else
29798       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29799     fi
29800 
29801 
29802   windows_path="$VS_BASE"
29803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29804     unix_path=`$CYGPATH -u "$windows_path"`
29805     VS_BASE="$unix_path"
29806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29807     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29808     VS_BASE="$unix_path"
29809   fi
29810 
29811     if test -d "$VS_BASE"; then
29812       if test -f "$VS_BASE/$VCVARSFILE"; then
29813         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29814 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29815         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29816         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29817         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29818         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29819       else
29820         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29821 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29822         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29823 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29824       fi
29825     fi
29826   fi
29827 
29828 
29829   if test "x$SDK_INSTALL_DIR" != x; then
29830     if test "x$ProgramW6432" != x; then
29831 
29832   if test "x$VS_ENV_CMD" = x; then
29833     VS_VERSION="${VS_VERSION}"
29834     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29835     METHOD="well-known name"
29836 
29837   windows_path="$WIN_SDK_BASE"
29838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29839     unix_path=`$CYGPATH -u "$windows_path"`
29840     WIN_SDK_BASE="$unix_path"
29841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29843     WIN_SDK_BASE="$unix_path"
29844   fi
29845 
29846     if test -d "$WIN_SDK_BASE"; then
29847       # There have been cases of partial or broken SDK installations. A missing
29848       # lib dir is not going to work.
29849       if test ! -d "$WIN_SDK_BASE/lib"; then
29850         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29851 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29852         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29853 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29854       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29855         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29856 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29857         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29858         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29859           VS_ENV_ARGS="/x86"
29860         else
29861           VS_ENV_ARGS="/x64"
29862         fi
29863         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29864         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29865         # TODO: improve detection for other versions of SDK
29866         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29867       else
29868         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29869 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29870         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29871 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29872       fi
29873     fi
29874   fi
29875 
29876     fi
29877     if test "x$PROGRAMW6432" != x; then
29878 
29879   if test "x$VS_ENV_CMD" = x; then
29880     VS_VERSION="${VS_VERSION}"
29881     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29882     METHOD="well-known name"
29883 
29884   windows_path="$WIN_SDK_BASE"
29885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29886     unix_path=`$CYGPATH -u "$windows_path"`
29887     WIN_SDK_BASE="$unix_path"
29888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29890     WIN_SDK_BASE="$unix_path"
29891   fi
29892 
29893     if test -d "$WIN_SDK_BASE"; then
29894       # There have been cases of partial or broken SDK installations. A missing
29895       # lib dir is not going to work.
29896       if test ! -d "$WIN_SDK_BASE/lib"; then
29897         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29898 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29899         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29900 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29901       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29902         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29903 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29904         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29905         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29906           VS_ENV_ARGS="/x86"
29907         else
29908           VS_ENV_ARGS="/x64"
29909         fi
29910         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29911         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29912         # TODO: improve detection for other versions of SDK
29913         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29914       else
29915         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29916 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29917         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29918 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29919       fi
29920     fi
29921   fi
29922 
29923     fi
29924     if test "x$PROGRAMFILES" != x; then
29925 
29926   if test "x$VS_ENV_CMD" = x; then
29927     VS_VERSION="${VS_VERSION}"
29928     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29929     METHOD="well-known name"
29930 
29931   windows_path="$WIN_SDK_BASE"
29932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29933     unix_path=`$CYGPATH -u "$windows_path"`
29934     WIN_SDK_BASE="$unix_path"
29935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29937     WIN_SDK_BASE="$unix_path"
29938   fi
29939 
29940     if test -d "$WIN_SDK_BASE"; then
29941       # There have been cases of partial or broken SDK installations. A missing
29942       # lib dir is not going to work.
29943       if test ! -d "$WIN_SDK_BASE/lib"; then
29944         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29945 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29946         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29947 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29948       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29949         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29950 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29951         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29952         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29953           VS_ENV_ARGS="/x86"
29954         else
29955           VS_ENV_ARGS="/x64"
29956         fi
29957         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29958         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29959         # TODO: improve detection for other versions of SDK
29960         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29961       else
29962         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29963 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29964         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29965 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29966       fi
29967     fi
29968   fi
29969 
29970     fi
29971 
29972   if test "x$VS_ENV_CMD" = x; then
29973     VS_VERSION="${VS_VERSION}"
29974     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29975     METHOD="well-known name"
29976 
29977   windows_path="$WIN_SDK_BASE"
29978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29979     unix_path=`$CYGPATH -u "$windows_path"`
29980     WIN_SDK_BASE="$unix_path"
29981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29983     WIN_SDK_BASE="$unix_path"
29984   fi
29985 
29986     if test -d "$WIN_SDK_BASE"; then
29987       # There have been cases of partial or broken SDK installations. A missing
29988       # lib dir is not going to work.
29989       if test ! -d "$WIN_SDK_BASE/lib"; then
29990         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29991 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29992         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29993 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29994       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29995         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29996 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29997         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29998         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29999           VS_ENV_ARGS="/x86"
30000         else
30001           VS_ENV_ARGS="/x64"
30002         fi
30003         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30004         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30005         # TODO: improve detection for other versions of SDK
30006         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30007       else
30008         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30009 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30010         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30011 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30012       fi
30013     fi
30014   fi
30015 
30016 
30017   if test "x$VS_ENV_CMD" = x; then
30018     VS_VERSION="${VS_VERSION}"
30019     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30020     METHOD="well-known name"
30021 
30022   windows_path="$WIN_SDK_BASE"
30023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30024     unix_path=`$CYGPATH -u "$windows_path"`
30025     WIN_SDK_BASE="$unix_path"
30026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30028     WIN_SDK_BASE="$unix_path"
30029   fi
30030 
30031     if test -d "$WIN_SDK_BASE"; then
30032       # There have been cases of partial or broken SDK installations. A missing
30033       # lib dir is not going to work.
30034       if test ! -d "$WIN_SDK_BASE/lib"; then
30035         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30036 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30037         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30038 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30039       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30040         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30041 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30042         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30043         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30044           VS_ENV_ARGS="/x86"
30045         else
30046           VS_ENV_ARGS="/x64"
30047         fi
30048         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30049         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30050         # TODO: improve detection for other versions of SDK
30051         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30052       else
30053         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30054 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30055         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30056 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30057       fi
30058     fi
30059   fi
30060 
30061   fi
30062 
30063     if test "x$VS_ENV_CMD" != x; then
30064       TOOLCHAIN_VERSION=$VS_VERSION
30065       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30066       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30067       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30068       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30069       # The rest of the variables are already evaled while probing
30070       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30071 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30072       break
30073     fi
30074   done
30075 
30076 
30077   # If we have a devkit, skip all of the below.
30078   if test "x$DEVKIT_VS_VERSION" = x; then
30079     if test "x$VS_ENV_CMD" != x; then
30080       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30081 
30082   # Only process if variable expands to non-empty
30083 
30084   if test "x$VS_ENV_CMD" != x; then
30085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30086 
30087   # First separate the path from the arguments. This will split at the first
30088   # space.
30089   complete="$VS_ENV_CMD"
30090   path="${complete%% *}"
30091   tmp="$complete EOL"
30092   arguments="${tmp#* }"
30093 
30094   # Input might be given as Windows format, start by converting to
30095   # unix format.
30096   new_path=`$CYGPATH -u "$path"`
30097 
30098   # Now try to locate executable using which
30099   new_path=`$WHICH "$new_path" 2> /dev/null`
30100   # bat and cmd files are not always considered executable in cygwin causing which
30101   # to not find them
30102   if test "x$new_path" = x \
30103       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30104       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30105     new_path=`$CYGPATH -u "$path"`
30106   fi
30107   if test "x$new_path" = x; then
30108     # Oops. Which didn't find the executable.
30109     # The splitting of arguments from the executable at a space might have been incorrect,
30110     # since paths with space are more likely in Windows. Give it another try with the whole
30111     # argument.
30112     path="$complete"
30113     arguments="EOL"
30114     new_path=`$CYGPATH -u "$path"`
30115     new_path=`$WHICH "$new_path" 2> /dev/null`
30116     # bat and cmd files are not always considered executable in cygwin causing which
30117     # to not find them
30118     if test "x$new_path" = x \
30119         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30120         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30121       new_path=`$CYGPATH -u "$path"`
30122     fi
30123     if test "x$new_path" = x; then
30124       # It's still not found. Now this is an unrecoverable error.
30125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30126 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30127       has_space=`$ECHO "$complete" | $GREP " "`
30128       if test "x$has_space" != x; then
30129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30131       fi
30132       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30133     fi
30134   fi
30135 
30136   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30137   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30138   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30139   # "foo.exe" is OK but "foo" is an error.
30140   #
30141   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30142   # It is also a way to make sure we got the proper file name for the real test later on.
30143   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30144   if test "x$test_shortpath" = x; then
30145     # Short path failed, file does not exist as specified.
30146     # Try adding .exe or .cmd
30147     if test -f "${new_path}.exe"; then
30148       input_to_shortpath="${new_path}.exe"
30149     elif test -f "${new_path}.cmd"; then
30150       input_to_shortpath="${new_path}.cmd"
30151     else
30152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30153 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30154       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30155 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30156       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30157     fi
30158   else
30159     input_to_shortpath="$new_path"
30160   fi
30161 
30162   # Call helper function which possibly converts this using DOS-style short mode.
30163   # If so, the updated path is stored in $new_path.
30164   new_path="$input_to_shortpath"
30165 
30166   input_path="$input_to_shortpath"
30167   # Check if we need to convert this using DOS-style short mode. If the path
30168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30169   # take no chances and rewrite it.
30170   # Note: m4 eats our [], so we need to use [ and ] instead.
30171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30172   if test "x$has_forbidden_chars" != x; then
30173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30177       # Going to short mode and back again did indeed matter. Since short mode is
30178       # case insensitive, let's make it lowercase to improve readability.
30179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30180       # Now convert it back to Unix-style (cygpath)
30181       input_path=`$CYGPATH -u "$shortmode_path"`
30182       new_path="$input_path"
30183     fi
30184   fi
30185 
30186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30187   if test "x$test_cygdrive_prefix" = x; then
30188     # As a simple fix, exclude /usr/bin since it's not a real path.
30189     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30191       # a path prefixed by /cygdrive for fixpath to work.
30192       new_path="$CYGWIN_ROOT_PATH$input_path"
30193     fi
30194   fi
30195 
30196   # remove trailing .exe if any
30197   new_path="${new_path/%.exe/}"
30198 
30199     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30200 
30201   # First separate the path from the arguments. This will split at the first
30202   # space.
30203   complete="$VS_ENV_CMD"
30204   path="${complete%% *}"
30205   tmp="$complete EOL"
30206   arguments="${tmp#* }"
30207 
30208   # Input might be given as Windows format, start by converting to
30209   # unix format.
30210   new_path="$path"
30211 
30212   windows_path="$new_path"
30213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30214     unix_path=`$CYGPATH -u "$windows_path"`
30215     new_path="$unix_path"
30216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30218     new_path="$unix_path"
30219   fi
30220 
30221 
30222   # Now try to locate executable using which
30223   new_path=`$WHICH "$new_path" 2> /dev/null`
30224 
30225   if test "x$new_path" = x; then
30226     # Oops. Which didn't find the executable.
30227     # The splitting of arguments from the executable at a space might have been incorrect,
30228     # since paths with space are more likely in Windows. Give it another try with the whole
30229     # argument.
30230     path="$complete"
30231     arguments="EOL"
30232     new_path="$path"
30233 
30234   windows_path="$new_path"
30235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30236     unix_path=`$CYGPATH -u "$windows_path"`
30237     new_path="$unix_path"
30238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30240     new_path="$unix_path"
30241   fi
30242 
30243 
30244     new_path=`$WHICH "$new_path" 2> /dev/null`
30245     # bat and cmd files are not always considered executable in MSYS causing which
30246     # to not find them
30247     if test "x$new_path" = x \
30248         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30249         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30250       new_path="$path"
30251 
30252   windows_path="$new_path"
30253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30254     unix_path=`$CYGPATH -u "$windows_path"`
30255     new_path="$unix_path"
30256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30258     new_path="$unix_path"
30259   fi
30260 
30261     fi
30262 
30263     if test "x$new_path" = x; then
30264       # It's still not found. Now this is an unrecoverable error.
30265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30266 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30267       has_space=`$ECHO "$complete" | $GREP " "`
30268       if test "x$has_space" != x; then
30269         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30270 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30271       fi
30272       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30273     fi
30274   fi
30275 
30276   # Now new_path has a complete unix path to the binary
30277   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30278     # Keep paths in /bin as-is, but remove trailing .exe if any
30279     new_path="${new_path/%.exe/}"
30280     # Do not save /bin paths to all_fixpath_prefixes!
30281   else
30282     # Not in mixed or Windows style, start by that.
30283     new_path=`cmd //c echo $new_path`
30284 
30285   input_path="$new_path"
30286   # Check if we need to convert this using DOS-style short mode. If the path
30287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30288   # take no chances and rewrite it.
30289   # Note: m4 eats our [], so we need to use [ and ] instead.
30290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30291   if test "x$has_forbidden_chars" != x; then
30292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30294   fi
30295 
30296     # Output is in $new_path
30297 
30298   windows_path="$new_path"
30299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30300     unix_path=`$CYGPATH -u "$windows_path"`
30301     new_path="$unix_path"
30302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30304     new_path="$unix_path"
30305   fi
30306 
30307     # remove trailing .exe if any
30308     new_path="${new_path/%.exe/}"
30309 
30310     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30311     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30312   fi
30313 
30314     else
30315       # We're on a unix platform. Hooray! :)
30316       # First separate the path from the arguments. This will split at the first
30317       # space.
30318       complete="$VS_ENV_CMD"
30319       path="${complete%% *}"
30320       tmp="$complete EOL"
30321       arguments="${tmp#* }"
30322 
30323       # Cannot rely on the command "which" here since it doesn't always work.
30324       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30325       if test -z "$is_absolute_path"; then
30326         # Path to executable is not absolute. Find it.
30327         IFS_save="$IFS"
30328         IFS=:
30329         for p in $PATH; do
30330           if test -f "$p/$path" && test -x "$p/$path"; then
30331             new_path="$p/$path"
30332             break
30333           fi
30334         done
30335         IFS="$IFS_save"
30336       else
30337         # This is an absolute path, we can use it without further modifications.
30338         new_path="$path"
30339       fi
30340 
30341       if test "x$new_path" = x; then
30342         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30343 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30344         has_space=`$ECHO "$complete" | $GREP " "`
30345         if test "x$has_space" != x; then
30346           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30347 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30348         fi
30349         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30350       fi
30351     fi
30352 
30353     # Now join together the path and the arguments once again
30354     if test "x$arguments" != xEOL; then
30355       new_complete="$new_path ${arguments% *}"
30356     else
30357       new_complete="$new_path"
30358     fi
30359 
30360     if test "x$complete" != "x$new_complete"; then
30361       VS_ENV_CMD="$new_complete"
30362       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30363 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30364     fi
30365   fi
30366 
30367 
30368       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30369       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30370 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30371 
30372       # We need to create a couple of temporary files.
30373       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30374       $MKDIR -p $VS_ENV_TMP_DIR
30375 
30376       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30377       # Instead create a shell script which will set the relevant variables when run.
30378       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30379 
30380   unix_path="$WINPATH_VS_ENV_CMD"
30381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30382     windows_path=`$CYGPATH -m "$unix_path"`
30383     WINPATH_VS_ENV_CMD="$windows_path"
30384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30385     windows_path=`cmd //c echo $unix_path`
30386     WINPATH_VS_ENV_CMD="$windows_path"
30387   fi
30388 
30389       WINPATH_BASH="$BASH"
30390 
30391   unix_path="$WINPATH_BASH"
30392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30393     windows_path=`$CYGPATH -m "$unix_path"`
30394     WINPATH_BASH="$windows_path"
30395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30396     windows_path=`cmd //c echo $unix_path`
30397     WINPATH_BASH="$windows_path"
30398   fi
30399 
30400 
30401       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30402       # script (executable by bash) that will setup the important variables.
30403       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30404       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30405       # This will end up something like:
30406       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30407       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30408       # These will end up something like:
30409       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30410       # The trailing space for everyone except PATH is no typo, but is needed due
30411       # to trailing \ in the Windows paths. These will be stripped later.
30412       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30413           >> $EXTRACT_VC_ENV_BAT_FILE
30414       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30415           >> $EXTRACT_VC_ENV_BAT_FILE
30416       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30417           >> $EXTRACT_VC_ENV_BAT_FILE
30418       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30419           >> $EXTRACT_VC_ENV_BAT_FILE
30420       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30421           >> $EXTRACT_VC_ENV_BAT_FILE
30422       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30423           >> $EXTRACT_VC_ENV_BAT_FILE
30424 
30425       # Now execute the newly created bat file.
30426       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30427       # Change directory so we don't need to mess with Windows paths in redirects.
30428       cd $VS_ENV_TMP_DIR
30429       cmd /c extract-vs-env.bat | $CAT
30430       cd $CURDIR
30431 
30432       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30433         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30434 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30435         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30436 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30437         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30438 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30439         as_fn_error $? "Cannot continue" "$LINENO" 5
30440       fi
30441 
30442       # Now set all paths and other env variables. This will allow the rest of
30443       # the configure script to find and run the compiler in the proper way.
30444       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30445 $as_echo "$as_me: Setting extracted environment variables" >&6;}
30446       . $VS_ENV_TMP_DIR/set-vs-env.sh
30447       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30448       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30449     else
30450       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30451       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30452 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30453     fi
30454   fi
30455 
30456   # At this point, we should have correct variables in the environment, or we can't continue.
30457   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30458 $as_echo_n "checking for Visual Studio variables... " >&6; }
30459 
30460   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30461       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30462     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30464 $as_echo "present but broken" >&6; }
30465       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30466     else
30467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30468 $as_echo "ok" >&6; }
30469       # Remove any trailing "\" ";" and " " from the variables.
30470       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30471       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30472       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30473       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30474       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30475       # Remove any paths containing # (typically F#) as that messes up make. This
30476       # is needed if visual studio was installed with F# support.
30477       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30478 
30479 
30480 
30481 
30482 
30483       # Convert VS_INCLUDE into SYSROOT_CFLAGS
30484       OLDIFS="$IFS"
30485       IFS=";"
30486       for i in $VS_INCLUDE; do
30487         ipath=$i
30488         # Only process non-empty elements
30489         if test "x$ipath" != x; then
30490           IFS="$OLDIFS"
30491           # Check that directory exists before calling fixup_path
30492           testpath=$ipath
30493 
30494   windows_path="$testpath"
30495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30496     unix_path=`$CYGPATH -u "$windows_path"`
30497     testpath="$unix_path"
30498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30500     testpath="$unix_path"
30501   fi
30502 
30503           if test -d "$testpath"; then
30504 
30505   # Only process if variable expands to non-empty
30506 
30507   if test "x$ipath" != x; then
30508     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30509 
30510   # Input might be given as Windows format, start by converting to
30511   # unix format.
30512   path="$ipath"
30513   new_path=`$CYGPATH -u "$path"`
30514 
30515   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30516   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30517   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30518   # "foo.exe" is OK but "foo" is an error.
30519   #
30520   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30521   # It is also a way to make sure we got the proper file name for the real test later on.
30522   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30523   if test "x$test_shortpath" = x; then
30524     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30525 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30526     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30527   fi
30528 
30529   # Call helper function which possibly converts this using DOS-style short mode.
30530   # If so, the updated path is stored in $new_path.
30531 
30532   input_path="$new_path"
30533   # Check if we need to convert this using DOS-style short mode. If the path
30534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30535   # take no chances and rewrite it.
30536   # Note: m4 eats our [], so we need to use [ and ] instead.
30537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30538   if test "x$has_forbidden_chars" != x; then
30539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30540     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30541     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30542     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30543       # Going to short mode and back again did indeed matter. Since short mode is
30544       # case insensitive, let's make it lowercase to improve readability.
30545       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30546       # Now convert it back to Unix-style (cygpath)
30547       input_path=`$CYGPATH -u "$shortmode_path"`
30548       new_path="$input_path"
30549     fi
30550   fi
30551 
30552   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30553   if test "x$test_cygdrive_prefix" = x; then
30554     # As a simple fix, exclude /usr/bin since it's not a real path.
30555     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30556       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30557       # a path prefixed by /cygdrive for fixpath to work.
30558       new_path="$CYGWIN_ROOT_PATH$input_path"
30559     fi
30560   fi
30561 
30562 
30563   if test "x$path" != "x$new_path"; then
30564     ipath="$new_path"
30565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30566 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30567   fi
30568 
30569     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30570 
30571   path="$ipath"
30572   has_colon=`$ECHO $path | $GREP ^.:`
30573   new_path="$path"
30574   if test "x$has_colon" = x; then
30575     # Not in mixed or Windows style, start by that.
30576     new_path=`cmd //c echo $path`
30577   fi
30578 
30579 
30580   input_path="$new_path"
30581   # Check if we need to convert this using DOS-style short mode. If the path
30582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30583   # take no chances and rewrite it.
30584   # Note: m4 eats our [], so we need to use [ and ] instead.
30585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30586   if test "x$has_forbidden_chars" != x; then
30587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30588     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30589   fi
30590 
30591 
30592   windows_path="$new_path"
30593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30594     unix_path=`$CYGPATH -u "$windows_path"`
30595     new_path="$unix_path"
30596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30598     new_path="$unix_path"
30599   fi
30600 
30601   if test "x$path" != "x$new_path"; then
30602     ipath="$new_path"
30603     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30604 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30605   fi
30606 
30607   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30608   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30609 
30610     else
30611       # We're on a unix platform. Hooray! :)
30612       path="$ipath"
30613       has_space=`$ECHO "$path" | $GREP " "`
30614       if test "x$has_space" != x; then
30615         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30616 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30617         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30618       fi
30619 
30620       # Use eval to expand a potential ~
30621       eval path="$path"
30622       if test ! -f "$path" && test ! -d "$path"; then
30623         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30624       fi
30625 
30626       ipath="`cd "$path"; $THEPWDCMD -L`"
30627     fi
30628   fi
30629 
30630             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30631           fi
30632           IFS=";"
30633         fi
30634       done
30635       # Convert VS_LIB into SYSROOT_LDFLAGS
30636       for i in $VS_LIB; do
30637         libpath=$i
30638         # Only process non-empty elements
30639         if test "x$libpath" != x; then
30640           IFS="$OLDIFS"
30641           # Check that directory exists before calling fixup_path
30642           testpath=$libpath
30643 
30644   windows_path="$testpath"
30645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30646     unix_path=`$CYGPATH -u "$windows_path"`
30647     testpath="$unix_path"
30648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30650     testpath="$unix_path"
30651   fi
30652 
30653           if test -d "$testpath"; then
30654 
30655   # Only process if variable expands to non-empty
30656 
30657   if test "x$libpath" != x; then
30658     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30659 
30660   # Input might be given as Windows format, start by converting to
30661   # unix format.
30662   path="$libpath"
30663   new_path=`$CYGPATH -u "$path"`
30664 
30665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30668   # "foo.exe" is OK but "foo" is an error.
30669   #
30670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30671   # It is also a way to make sure we got the proper file name for the real test later on.
30672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30673   if test "x$test_shortpath" = x; then
30674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30675 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30676     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30677   fi
30678 
30679   # Call helper function which possibly converts this using DOS-style short mode.
30680   # If so, the updated path is stored in $new_path.
30681 
30682   input_path="$new_path"
30683   # Check if we need to convert this using DOS-style short mode. If the path
30684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30685   # take no chances and rewrite it.
30686   # Note: m4 eats our [], so we need to use [ and ] instead.
30687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30688   if test "x$has_forbidden_chars" != x; then
30689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30693       # Going to short mode and back again did indeed matter. Since short mode is
30694       # case insensitive, let's make it lowercase to improve readability.
30695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30696       # Now convert it back to Unix-style (cygpath)
30697       input_path=`$CYGPATH -u "$shortmode_path"`
30698       new_path="$input_path"
30699     fi
30700   fi
30701 
30702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30703   if test "x$test_cygdrive_prefix" = x; then
30704     # As a simple fix, exclude /usr/bin since it's not a real path.
30705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30707       # a path prefixed by /cygdrive for fixpath to work.
30708       new_path="$CYGWIN_ROOT_PATH$input_path"
30709     fi
30710   fi
30711 
30712 
30713   if test "x$path" != "x$new_path"; then
30714     libpath="$new_path"
30715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30716 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30717   fi
30718 
30719     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30720 
30721   path="$libpath"
30722   has_colon=`$ECHO $path | $GREP ^.:`
30723   new_path="$path"
30724   if test "x$has_colon" = x; then
30725     # Not in mixed or Windows style, start by that.
30726     new_path=`cmd //c echo $path`
30727   fi
30728 
30729 
30730   input_path="$new_path"
30731   # Check if we need to convert this using DOS-style short mode. If the path
30732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30733   # take no chances and rewrite it.
30734   # Note: m4 eats our [], so we need to use [ and ] instead.
30735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30736   if test "x$has_forbidden_chars" != x; then
30737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30739   fi
30740 
30741 
30742   windows_path="$new_path"
30743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30744     unix_path=`$CYGPATH -u "$windows_path"`
30745     new_path="$unix_path"
30746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30748     new_path="$unix_path"
30749   fi
30750 
30751   if test "x$path" != "x$new_path"; then
30752     libpath="$new_path"
30753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30754 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30755   fi
30756 
30757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30759 
30760     else
30761       # We're on a unix platform. Hooray! :)
30762       path="$libpath"
30763       has_space=`$ECHO "$path" | $GREP " "`
30764       if test "x$has_space" != x; then
30765         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30766 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30767         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30768       fi
30769 
30770       # Use eval to expand a potential ~
30771       eval path="$path"
30772       if test ! -f "$path" && test ! -d "$path"; then
30773         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30774       fi
30775 
30776       libpath="`cd "$path"; $THEPWDCMD -L`"
30777     fi
30778   fi
30779 
30780             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30781           fi
30782           IFS=";"
30783         fi
30784       done
30785       IFS="$OLDIFS"
30786     fi
30787   else
30788     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30789 $as_echo "not found" >&6; }
30790 
30791     if test "x$VS_ENV_CMD" = x; then
30792       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30793 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30794       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30795 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30796     else
30797       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30798 $as_echo "$as_me: Running the extraction script failed." >&6;}
30799     fi
30800     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30801 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30802     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30803 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30804     as_fn_error $? "Cannot continue" "$LINENO" 5
30805   fi
30806 
30807     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30808     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30809     PATH="$VS_PATH"
30810     # The microsoft toolchain also requires INCLUDE and LIB to be set.
30811     export INCLUDE="$VS_INCLUDE"
30812     export LIB="$VS_LIB"
30813   fi
30814 
30815   # For solaris we really need solaris tools, and not the GNU equivalent.
30816   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30817   # so add that to path before starting to probe.
30818   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30819   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30820     PATH="/usr/ccs/bin:$PATH"
30821   fi
30822 
30823   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30824   # override all other locations.
30825   if test "x$TOOLCHAIN_PATH" != x; then
30826     PATH=$TOOLCHAIN_PATH:$PATH
30827   fi
30828 
30829 
30830   #
30831   # Setup the compilers (CC and CXX)
30832   #
30833 
30834   COMPILER_NAME=C
30835   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30836 
30837   if test "x$CC" != x; then
30838     # User has supplied compiler name already, always let that override.
30839     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30840 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30841     if test "x`basename $CC`" = "x$CC"; then
30842       # A command without a complete path is provided, search $PATH.
30843 
30844       for ac_prog in $CC
30845 do
30846   # Extract the first word of "$ac_prog", so it can be a program name with args.
30847 set dummy $ac_prog; ac_word=$2
30848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30849 $as_echo_n "checking for $ac_word... " >&6; }
30850 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30851   $as_echo_n "(cached) " >&6
30852 else
30853   case $POTENTIAL_CC in
30854   [\\/]* | ?:[\\/]*)
30855   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30856   ;;
30857   *)
30858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30859 for as_dir in $PATH
30860 do
30861   IFS=$as_save_IFS
30862   test -z "$as_dir" && as_dir=.
30863     for ac_exec_ext in '' $ac_executable_extensions; do
30864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30865     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30867     break 2
30868   fi
30869 done
30870   done
30871 IFS=$as_save_IFS
30872 
30873   ;;
30874 esac
30875 fi
30876 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30877 if test -n "$POTENTIAL_CC"; then
30878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30879 $as_echo "$POTENTIAL_CC" >&6; }
30880 else
30881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30882 $as_echo "no" >&6; }
30883 fi
30884 
30885 
30886   test -n "$POTENTIAL_CC" && break
30887 done
30888 
30889       if test "x$POTENTIAL_CC" != x; then
30890         CC=$POTENTIAL_CC
30891       else
30892         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30893       fi
30894     else
30895       # Otherwise it might already be a complete path
30896       if test ! -x "$CC"; then
30897         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30898       fi
30899     fi
30900   else
30901     # No user supplied value. Locate compiler ourselves.
30902 
30903     # If we are cross compiling, assume cross compilation tools follows the
30904     # cross compilation standard where they are prefixed with the autoconf
30905     # standard name for the target. For example the binary
30906     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30907     # If we are not cross compiling, then the default compiler name will be
30908     # used.
30909 
30910     CC=
30911     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30912     # before checking the rest of the PATH.
30913     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30914     # step, this should not be necessary.
30915     if test -n "$TOOLCHAIN_PATH"; then
30916       PATH_save="$PATH"
30917       PATH="$TOOLCHAIN_PATH"
30918       for ac_prog in $SEARCH_LIST
30919 do
30920   # Extract the first word of "$ac_prog", so it can be a program name with args.
30921 set dummy $ac_prog; ac_word=$2
30922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30923 $as_echo_n "checking for $ac_word... " >&6; }
30924 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30925   $as_echo_n "(cached) " >&6
30926 else
30927   case $TOOLCHAIN_PATH_CC in
30928   [\\/]* | ?:[\\/]*)
30929   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30930   ;;
30931   *)
30932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30933 for as_dir in $PATH
30934 do
30935   IFS=$as_save_IFS
30936   test -z "$as_dir" && as_dir=.
30937     for ac_exec_ext in '' $ac_executable_extensions; do
30938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30939     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30941     break 2
30942   fi
30943 done
30944   done
30945 IFS=$as_save_IFS
30946 
30947   ;;
30948 esac
30949 fi
30950 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30951 if test -n "$TOOLCHAIN_PATH_CC"; then
30952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30953 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30954 else
30955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30956 $as_echo "no" >&6; }
30957 fi
30958 
30959 
30960   test -n "$TOOLCHAIN_PATH_CC" && break
30961 done
30962 
30963       CC=$TOOLCHAIN_PATH_CC
30964       PATH="$PATH_save"
30965     fi
30966 
30967     # AC_PATH_PROGS can't be run multiple times with the same variable,
30968     # so create a new name for this run.
30969     if test "x$CC" = x; then
30970       for ac_prog in $SEARCH_LIST
30971 do
30972   # Extract the first word of "$ac_prog", so it can be a program name with args.
30973 set dummy $ac_prog; ac_word=$2
30974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30975 $as_echo_n "checking for $ac_word... " >&6; }
30976 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30977   $as_echo_n "(cached) " >&6
30978 else
30979   case $POTENTIAL_CC in
30980   [\\/]* | ?:[\\/]*)
30981   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30982   ;;
30983   *)
30984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30985 for as_dir in $PATH
30986 do
30987   IFS=$as_save_IFS
30988   test -z "$as_dir" && as_dir=.
30989     for ac_exec_ext in '' $ac_executable_extensions; do
30990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30991     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30993     break 2
30994   fi
30995 done
30996   done
30997 IFS=$as_save_IFS
30998 
30999   ;;
31000 esac
31001 fi
31002 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31003 if test -n "$POTENTIAL_CC"; then
31004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31005 $as_echo "$POTENTIAL_CC" >&6; }
31006 else
31007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31008 $as_echo "no" >&6; }
31009 fi
31010 
31011 
31012   test -n "$POTENTIAL_CC" && break
31013 done
31014 
31015       CC=$POTENTIAL_CC
31016     fi
31017 
31018     if test "x$CC" = x; then
31019 
31020   # Print a helpful message on how to acquire the necessary build dependency.
31021   # devkit is the help tag: freetype, cups, alsa etc
31022   MISSING_DEPENDENCY=devkit
31023 
31024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31025     cygwin_help $MISSING_DEPENDENCY
31026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31027     msys_help $MISSING_DEPENDENCY
31028   else
31029     PKGHANDLER_COMMAND=
31030 
31031     case $PKGHANDLER in
31032       apt-get)
31033         apt_help     $MISSING_DEPENDENCY ;;
31034       yum)
31035         yum_help     $MISSING_DEPENDENCY ;;
31036       port)
31037         port_help    $MISSING_DEPENDENCY ;;
31038       pkgutil)
31039         pkgutil_help $MISSING_DEPENDENCY ;;
31040       pkgadd)
31041         pkgadd_help  $MISSING_DEPENDENCY ;;
31042     esac
31043 
31044     if test "x$PKGHANDLER_COMMAND" != x; then
31045       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31046     fi
31047   fi
31048 
31049       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31050     fi
31051   fi
31052 
31053   # Now we have a compiler binary in CC. Make sure it's okay.
31054 
31055   # Only process if variable expands to non-empty
31056 
31057   if test "x$CC" != x; then
31058     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31059 
31060   # First separate the path from the arguments. This will split at the first
31061   # space.
31062   complete="$CC"
31063   path="${complete%% *}"
31064   tmp="$complete EOL"
31065   arguments="${tmp#* }"
31066 
31067   # Input might be given as Windows format, start by converting to
31068   # unix format.
31069   new_path=`$CYGPATH -u "$path"`
31070 
31071   # Now try to locate executable using which
31072   new_path=`$WHICH "$new_path" 2> /dev/null`
31073   # bat and cmd files are not always considered executable in cygwin causing which
31074   # to not find them
31075   if test "x$new_path" = x \
31076       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31077       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31078     new_path=`$CYGPATH -u "$path"`
31079   fi
31080   if test "x$new_path" = x; then
31081     # Oops. Which didn't find the executable.
31082     # The splitting of arguments from the executable at a space might have been incorrect,
31083     # since paths with space are more likely in Windows. Give it another try with the whole
31084     # argument.
31085     path="$complete"
31086     arguments="EOL"
31087     new_path=`$CYGPATH -u "$path"`
31088     new_path=`$WHICH "$new_path" 2> /dev/null`
31089     # bat and cmd files are not always considered executable in cygwin causing which
31090     # to not find them
31091     if test "x$new_path" = x \
31092         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31093         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31094       new_path=`$CYGPATH -u "$path"`
31095     fi
31096     if test "x$new_path" = x; then
31097       # It's still not found. Now this is an unrecoverable error.
31098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31099 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31100       has_space=`$ECHO "$complete" | $GREP " "`
31101       if test "x$has_space" != x; then
31102         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31103 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31104       fi
31105       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31106     fi
31107   fi
31108 
31109   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31110   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31111   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31112   # "foo.exe" is OK but "foo" is an error.
31113   #
31114   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31115   # It is also a way to make sure we got the proper file name for the real test later on.
31116   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31117   if test "x$test_shortpath" = x; then
31118     # Short path failed, file does not exist as specified.
31119     # Try adding .exe or .cmd
31120     if test -f "${new_path}.exe"; then
31121       input_to_shortpath="${new_path}.exe"
31122     elif test -f "${new_path}.cmd"; then
31123       input_to_shortpath="${new_path}.cmd"
31124     else
31125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31126 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31127       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31128 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31129       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31130     fi
31131   else
31132     input_to_shortpath="$new_path"
31133   fi
31134 
31135   # Call helper function which possibly converts this using DOS-style short mode.
31136   # If so, the updated path is stored in $new_path.
31137   new_path="$input_to_shortpath"
31138 
31139   input_path="$input_to_shortpath"
31140   # Check if we need to convert this using DOS-style short mode. If the path
31141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31142   # take no chances and rewrite it.
31143   # Note: m4 eats our [], so we need to use [ and ] instead.
31144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31145   if test "x$has_forbidden_chars" != x; then
31146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31150       # Going to short mode and back again did indeed matter. Since short mode is
31151       # case insensitive, let's make it lowercase to improve readability.
31152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31153       # Now convert it back to Unix-style (cygpath)
31154       input_path=`$CYGPATH -u "$shortmode_path"`
31155       new_path="$input_path"
31156     fi
31157   fi
31158 
31159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31160   if test "x$test_cygdrive_prefix" = x; then
31161     # As a simple fix, exclude /usr/bin since it's not a real path.
31162     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31164       # a path prefixed by /cygdrive for fixpath to work.
31165       new_path="$CYGWIN_ROOT_PATH$input_path"
31166     fi
31167   fi
31168 
31169   # remove trailing .exe if any
31170   new_path="${new_path/%.exe/}"
31171 
31172     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31173 
31174   # First separate the path from the arguments. This will split at the first
31175   # space.
31176   complete="$CC"
31177   path="${complete%% *}"
31178   tmp="$complete EOL"
31179   arguments="${tmp#* }"
31180 
31181   # Input might be given as Windows format, start by converting to
31182   # unix format.
31183   new_path="$path"
31184 
31185   windows_path="$new_path"
31186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31187     unix_path=`$CYGPATH -u "$windows_path"`
31188     new_path="$unix_path"
31189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31191     new_path="$unix_path"
31192   fi
31193 
31194 
31195   # Now try to locate executable using which
31196   new_path=`$WHICH "$new_path" 2> /dev/null`
31197 
31198   if test "x$new_path" = x; then
31199     # Oops. Which didn't find the executable.
31200     # The splitting of arguments from the executable at a space might have been incorrect,
31201     # since paths with space are more likely in Windows. Give it another try with the whole
31202     # argument.
31203     path="$complete"
31204     arguments="EOL"
31205     new_path="$path"
31206 
31207   windows_path="$new_path"
31208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31209     unix_path=`$CYGPATH -u "$windows_path"`
31210     new_path="$unix_path"
31211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31213     new_path="$unix_path"
31214   fi
31215 
31216 
31217     new_path=`$WHICH "$new_path" 2> /dev/null`
31218     # bat and cmd files are not always considered executable in MSYS causing which
31219     # to not find them
31220     if test "x$new_path" = x \
31221         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31222         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31223       new_path="$path"
31224 
31225   windows_path="$new_path"
31226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31227     unix_path=`$CYGPATH -u "$windows_path"`
31228     new_path="$unix_path"
31229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31231     new_path="$unix_path"
31232   fi
31233 
31234     fi
31235 
31236     if test "x$new_path" = x; then
31237       # It's still not found. Now this is an unrecoverable error.
31238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31239 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31240       has_space=`$ECHO "$complete" | $GREP " "`
31241       if test "x$has_space" != x; then
31242         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31243 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31244       fi
31245       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31246     fi
31247   fi
31248 
31249   # Now new_path has a complete unix path to the binary
31250   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31251     # Keep paths in /bin as-is, but remove trailing .exe if any
31252     new_path="${new_path/%.exe/}"
31253     # Do not save /bin paths to all_fixpath_prefixes!
31254   else
31255     # Not in mixed or Windows style, start by that.
31256     new_path=`cmd //c echo $new_path`
31257 
31258   input_path="$new_path"
31259   # Check if we need to convert this using DOS-style short mode. If the path
31260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31261   # take no chances and rewrite it.
31262   # Note: m4 eats our [], so we need to use [ and ] instead.
31263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31264   if test "x$has_forbidden_chars" != x; then
31265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31267   fi
31268 
31269     # Output is in $new_path
31270 
31271   windows_path="$new_path"
31272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31273     unix_path=`$CYGPATH -u "$windows_path"`
31274     new_path="$unix_path"
31275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31277     new_path="$unix_path"
31278   fi
31279 
31280     # remove trailing .exe if any
31281     new_path="${new_path/%.exe/}"
31282 
31283     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31284     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31285   fi
31286 
31287     else
31288       # We're on a unix platform. Hooray! :)
31289       # First separate the path from the arguments. This will split at the first
31290       # space.
31291       complete="$CC"
31292       path="${complete%% *}"
31293       tmp="$complete EOL"
31294       arguments="${tmp#* }"
31295 
31296       # Cannot rely on the command "which" here since it doesn't always work.
31297       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31298       if test -z "$is_absolute_path"; then
31299         # Path to executable is not absolute. Find it.
31300         IFS_save="$IFS"
31301         IFS=:
31302         for p in $PATH; do
31303           if test -f "$p/$path" && test -x "$p/$path"; then
31304             new_path="$p/$path"
31305             break
31306           fi
31307         done
31308         IFS="$IFS_save"
31309       else
31310         # This is an absolute path, we can use it without further modifications.
31311         new_path="$path"
31312       fi
31313 
31314       if test "x$new_path" = x; then
31315         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31316 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31317         has_space=`$ECHO "$complete" | $GREP " "`
31318         if test "x$has_space" != x; then
31319           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31320 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31321         fi
31322         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31323       fi
31324     fi
31325 
31326     # Now join together the path and the arguments once again
31327     if test "x$arguments" != xEOL; then
31328       new_complete="$new_path ${arguments% *}"
31329     else
31330       new_complete="$new_path"
31331     fi
31332 
31333     if test "x$complete" != "x$new_complete"; then
31334       CC="$new_complete"
31335       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31336 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31337     fi
31338   fi
31339 
31340   TEST_COMPILER="$CC"
31341   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31342   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31343   if test "x$OPENJDK_BUILD_OS" != xaix; then
31344     # FIXME: This test should not be needed anymore; we don't do that for any platform.
31345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31346 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
31347 
31348   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31349     # Follow a chain of symbolic links. Use readlink
31350     # where it exists, else fall back to horribly
31351     # complicated shell code.
31352     if test "x$READLINK_TESTED" != yes; then
31353       # On MacOSX there is a readlink tool with a different
31354       # purpose than the GNU readlink tool. Check the found readlink.
31355       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31356       if test "x$ISGNU" = x; then
31357         # A readlink that we do not know how to use.
31358         # Are there other non-GNU readlinks out there?
31359         READLINK_TESTED=yes
31360         READLINK=
31361       fi
31362     fi
31363 
31364     if test "x$READLINK" != x; then
31365       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31366     else
31367       # Save the current directory for restoring afterwards
31368       STARTDIR=$PWD
31369       COUNTER=0
31370       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31371       sym_link_file=`$BASENAME $TEST_COMPILER`
31372       cd $sym_link_dir
31373       # Use -P flag to resolve symlinks in directories.
31374       cd `$THEPWDCMD -P`
31375       sym_link_dir=`$THEPWDCMD -P`
31376       # Resolve file symlinks
31377       while test $COUNTER -lt 20; do
31378         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31379         if test "x$ISLINK" == x; then
31380           # This is not a symbolic link! We are done!
31381           break
31382         fi
31383         # Again resolve directory symlinks since the target of the just found
31384         # link could be in a different directory
31385         cd `$DIRNAME $ISLINK`
31386         sym_link_dir=`$THEPWDCMD -P`
31387         sym_link_file=`$BASENAME $ISLINK`
31388         let COUNTER=COUNTER+1
31389       done
31390       cd $STARTDIR
31391       TEST_COMPILER=$sym_link_dir/$sym_link_file
31392     fi
31393   fi
31394 
31395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31396 $as_echo "$TEST_COMPILER" >&6; }
31397   fi
31398   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31399 $as_echo_n "checking if CC is disguised ccache... " >&6; }
31400 
31401   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31402   if test "x$COMPILER_BASENAME" = "xccache"; then
31403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31404 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31405     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31406     # We want to control ccache invocation ourselves, so ignore this cc and try
31407     # searching again.
31408 
31409     # Remove the path to the fake ccache cc from the PATH
31410     RETRY_COMPILER_SAVED_PATH="$PATH"
31411     COMPILER_DIRNAME=`$DIRNAME $CC`
31412     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31413 
31414     # Try again looking for our compiler
31415     if test -n "$ac_tool_prefix"; then
31416   for ac_prog in $TOOLCHAIN_CC_BINARY
31417   do
31418     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31419 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31421 $as_echo_n "checking for $ac_word... " >&6; }
31422 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31423   $as_echo_n "(cached) " >&6
31424 else
31425   if test -n "$PROPER_COMPILER_CC"; then
31426   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31427 else
31428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31429 for as_dir in $PATH
31430 do
31431   IFS=$as_save_IFS
31432   test -z "$as_dir" && as_dir=.
31433     for ac_exec_ext in '' $ac_executable_extensions; do
31434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31435     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31437     break 2
31438   fi
31439 done
31440   done
31441 IFS=$as_save_IFS
31442 
31443 fi
31444 fi
31445 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31446 if test -n "$PROPER_COMPILER_CC"; then
31447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31448 $as_echo "$PROPER_COMPILER_CC" >&6; }
31449 else
31450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31451 $as_echo "no" >&6; }
31452 fi
31453 
31454 
31455     test -n "$PROPER_COMPILER_CC" && break
31456   done
31457 fi
31458 if test -z "$PROPER_COMPILER_CC"; then
31459   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31460   for ac_prog in $TOOLCHAIN_CC_BINARY
31461 do
31462   # Extract the first word of "$ac_prog", so it can be a program name with args.
31463 set dummy $ac_prog; ac_word=$2
31464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31465 $as_echo_n "checking for $ac_word... " >&6; }
31466 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31467   $as_echo_n "(cached) " >&6
31468 else
31469   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31470   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31471 else
31472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31473 for as_dir in $PATH
31474 do
31475   IFS=$as_save_IFS
31476   test -z "$as_dir" && as_dir=.
31477     for ac_exec_ext in '' $ac_executable_extensions; do
31478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31479     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31481     break 2
31482   fi
31483 done
31484   done
31485 IFS=$as_save_IFS
31486 
31487 fi
31488 fi
31489 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31490 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31492 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31493 else
31494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31495 $as_echo "no" >&6; }
31496 fi
31497 
31498 
31499   test -n "$ac_ct_PROPER_COMPILER_CC" && break
31500 done
31501 
31502   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31503     PROPER_COMPILER_CC=""
31504   else
31505     case $cross_compiling:$ac_tool_warned in
31506 yes:)
31507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31508 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31509 ac_tool_warned=yes ;;
31510 esac
31511     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31512   fi
31513 fi
31514 
31515 
31516   # Only process if variable expands to non-empty
31517 
31518   if test "x$PROPER_COMPILER_CC" != x; then
31519     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31520 
31521   # First separate the path from the arguments. This will split at the first
31522   # space.
31523   complete="$PROPER_COMPILER_CC"
31524   path="${complete%% *}"
31525   tmp="$complete EOL"
31526   arguments="${tmp#* }"
31527 
31528   # Input might be given as Windows format, start by converting to
31529   # unix format.
31530   new_path=`$CYGPATH -u "$path"`
31531 
31532   # Now try to locate executable using which
31533   new_path=`$WHICH "$new_path" 2> /dev/null`
31534   # bat and cmd files are not always considered executable in cygwin causing which
31535   # to not find them
31536   if test "x$new_path" = x \
31537       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31538       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31539     new_path=`$CYGPATH -u "$path"`
31540   fi
31541   if test "x$new_path" = x; then
31542     # Oops. Which didn't find the executable.
31543     # The splitting of arguments from the executable at a space might have been incorrect,
31544     # since paths with space are more likely in Windows. Give it another try with the whole
31545     # argument.
31546     path="$complete"
31547     arguments="EOL"
31548     new_path=`$CYGPATH -u "$path"`
31549     new_path=`$WHICH "$new_path" 2> /dev/null`
31550     # bat and cmd files are not always considered executable in cygwin causing which
31551     # to not find them
31552     if test "x$new_path" = x \
31553         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31554         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31555       new_path=`$CYGPATH -u "$path"`
31556     fi
31557     if test "x$new_path" = x; then
31558       # It's still not found. Now this is an unrecoverable error.
31559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31560 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31561       has_space=`$ECHO "$complete" | $GREP " "`
31562       if test "x$has_space" != x; then
31563         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31564 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31565       fi
31566       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31567     fi
31568   fi
31569 
31570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31573   # "foo.exe" is OK but "foo" is an error.
31574   #
31575   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31576   # It is also a way to make sure we got the proper file name for the real test later on.
31577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31578   if test "x$test_shortpath" = x; then
31579     # Short path failed, file does not exist as specified.
31580     # Try adding .exe or .cmd
31581     if test -f "${new_path}.exe"; then
31582       input_to_shortpath="${new_path}.exe"
31583     elif test -f "${new_path}.cmd"; then
31584       input_to_shortpath="${new_path}.cmd"
31585     else
31586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31587 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31588       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31589 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31590       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31591     fi
31592   else
31593     input_to_shortpath="$new_path"
31594   fi
31595 
31596   # Call helper function which possibly converts this using DOS-style short mode.
31597   # If so, the updated path is stored in $new_path.
31598   new_path="$input_to_shortpath"
31599 
31600   input_path="$input_to_shortpath"
31601   # Check if we need to convert this using DOS-style short mode. If the path
31602   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31603   # take no chances and rewrite it.
31604   # Note: m4 eats our [], so we need to use [ and ] instead.
31605   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31606   if test "x$has_forbidden_chars" != x; then
31607     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31608     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31609     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31610     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31611       # Going to short mode and back again did indeed matter. Since short mode is
31612       # case insensitive, let's make it lowercase to improve readability.
31613       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31614       # Now convert it back to Unix-style (cygpath)
31615       input_path=`$CYGPATH -u "$shortmode_path"`
31616       new_path="$input_path"
31617     fi
31618   fi
31619 
31620   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31621   if test "x$test_cygdrive_prefix" = x; then
31622     # As a simple fix, exclude /usr/bin since it's not a real path.
31623     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31624       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31625       # a path prefixed by /cygdrive for fixpath to work.
31626       new_path="$CYGWIN_ROOT_PATH$input_path"
31627     fi
31628   fi
31629 
31630   # remove trailing .exe if any
31631   new_path="${new_path/%.exe/}"
31632 
31633     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31634 
31635   # First separate the path from the arguments. This will split at the first
31636   # space.
31637   complete="$PROPER_COMPILER_CC"
31638   path="${complete%% *}"
31639   tmp="$complete EOL"
31640   arguments="${tmp#* }"
31641 
31642   # Input might be given as Windows format, start by converting to
31643   # unix format.
31644   new_path="$path"
31645 
31646   windows_path="$new_path"
31647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31648     unix_path=`$CYGPATH -u "$windows_path"`
31649     new_path="$unix_path"
31650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31652     new_path="$unix_path"
31653   fi
31654 
31655 
31656   # Now try to locate executable using which
31657   new_path=`$WHICH "$new_path" 2> /dev/null`
31658 
31659   if test "x$new_path" = x; then
31660     # Oops. Which didn't find the executable.
31661     # The splitting of arguments from the executable at a space might have been incorrect,
31662     # since paths with space are more likely in Windows. Give it another try with the whole
31663     # argument.
31664     path="$complete"
31665     arguments="EOL"
31666     new_path="$path"
31667 
31668   windows_path="$new_path"
31669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31670     unix_path=`$CYGPATH -u "$windows_path"`
31671     new_path="$unix_path"
31672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31674     new_path="$unix_path"
31675   fi
31676 
31677 
31678     new_path=`$WHICH "$new_path" 2> /dev/null`
31679     # bat and cmd files are not always considered executable in MSYS causing which
31680     # to not find them
31681     if test "x$new_path" = x \
31682         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31683         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31684       new_path="$path"
31685 
31686   windows_path="$new_path"
31687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31688     unix_path=`$CYGPATH -u "$windows_path"`
31689     new_path="$unix_path"
31690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31692     new_path="$unix_path"
31693   fi
31694 
31695     fi
31696 
31697     if test "x$new_path" = x; then
31698       # It's still not found. Now this is an unrecoverable error.
31699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31700 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31701       has_space=`$ECHO "$complete" | $GREP " "`
31702       if test "x$has_space" != x; then
31703         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31704 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31705       fi
31706       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31707     fi
31708   fi
31709 
31710   # Now new_path has a complete unix path to the binary
31711   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31712     # Keep paths in /bin as-is, but remove trailing .exe if any
31713     new_path="${new_path/%.exe/}"
31714     # Do not save /bin paths to all_fixpath_prefixes!
31715   else
31716     # Not in mixed or Windows style, start by that.
31717     new_path=`cmd //c echo $new_path`
31718 
31719   input_path="$new_path"
31720   # Check if we need to convert this using DOS-style short mode. If the path
31721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31722   # take no chances and rewrite it.
31723   # Note: m4 eats our [], so we need to use [ and ] instead.
31724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31725   if test "x$has_forbidden_chars" != x; then
31726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31727     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31728   fi
31729 
31730     # Output is in $new_path
31731 
31732   windows_path="$new_path"
31733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31734     unix_path=`$CYGPATH -u "$windows_path"`
31735     new_path="$unix_path"
31736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31738     new_path="$unix_path"
31739   fi
31740 
31741     # remove trailing .exe if any
31742     new_path="${new_path/%.exe/}"
31743 
31744     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31745     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31746   fi
31747 
31748     else
31749       # We're on a unix platform. Hooray! :)
31750       # First separate the path from the arguments. This will split at the first
31751       # space.
31752       complete="$PROPER_COMPILER_CC"
31753       path="${complete%% *}"
31754       tmp="$complete EOL"
31755       arguments="${tmp#* }"
31756 
31757       # Cannot rely on the command "which" here since it doesn't always work.
31758       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31759       if test -z "$is_absolute_path"; then
31760         # Path to executable is not absolute. Find it.
31761         IFS_save="$IFS"
31762         IFS=:
31763         for p in $PATH; do
31764           if test -f "$p/$path" && test -x "$p/$path"; then
31765             new_path="$p/$path"
31766             break
31767           fi
31768         done
31769         IFS="$IFS_save"
31770       else
31771         # This is an absolute path, we can use it without further modifications.
31772         new_path="$path"
31773       fi
31774 
31775       if test "x$new_path" = x; then
31776         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31777 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31778         has_space=`$ECHO "$complete" | $GREP " "`
31779         if test "x$has_space" != x; then
31780           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31781 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31782         fi
31783         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31784       fi
31785     fi
31786 
31787     # Now join together the path and the arguments once again
31788     if test "x$arguments" != xEOL; then
31789       new_complete="$new_path ${arguments% *}"
31790     else
31791       new_complete="$new_path"
31792     fi
31793 
31794     if test "x$complete" != "x$new_complete"; then
31795       PROPER_COMPILER_CC="$new_complete"
31796       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31797 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31798     fi
31799   fi
31800 
31801     PATH="$RETRY_COMPILER_SAVED_PATH"
31802 
31803     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31804 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31805 
31806   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31807     # Follow a chain of symbolic links. Use readlink
31808     # where it exists, else fall back to horribly
31809     # complicated shell code.
31810     if test "x$READLINK_TESTED" != yes; then
31811       # On MacOSX there is a readlink tool with a different
31812       # purpose than the GNU readlink tool. Check the found readlink.
31813       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31814       if test "x$ISGNU" = x; then
31815         # A readlink that we do not know how to use.
31816         # Are there other non-GNU readlinks out there?
31817         READLINK_TESTED=yes
31818         READLINK=
31819       fi
31820     fi
31821 
31822     if test "x$READLINK" != x; then
31823       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31824     else
31825       # Save the current directory for restoring afterwards
31826       STARTDIR=$PWD
31827       COUNTER=0
31828       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31829       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31830       cd $sym_link_dir
31831       # Use -P flag to resolve symlinks in directories.
31832       cd `$THEPWDCMD -P`
31833       sym_link_dir=`$THEPWDCMD -P`
31834       # Resolve file symlinks
31835       while test $COUNTER -lt 20; do
31836         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31837         if test "x$ISLINK" == x; then
31838           # This is not a symbolic link! We are done!
31839           break
31840         fi
31841         # Again resolve directory symlinks since the target of the just found
31842         # link could be in a different directory
31843         cd `$DIRNAME $ISLINK`
31844         sym_link_dir=`$THEPWDCMD -P`
31845         sym_link_file=`$BASENAME $ISLINK`
31846         let COUNTER=COUNTER+1
31847       done
31848       cd $STARTDIR
31849       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31850     fi
31851   fi
31852 
31853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31854 $as_echo "$PROPER_COMPILER_CC" >&6; }
31855     CC="$PROPER_COMPILER_CC"
31856   else
31857     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31858 $as_echo "no, keeping CC" >&6; }
31859   fi
31860 
31861 
31862   COMPILER=$CC
31863   COMPILER_NAME=$COMPILER_NAME
31864 
31865   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31866     # cc -V output typically looks like
31867     #     cc: Sun C 5.12 Linux_i386 2011/11/16
31868     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31869     # Check that this is likely to be the Solaris Studio cc.
31870     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31871     if test $? -ne 0; then
31872       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31873       { $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
31874 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31875       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31876 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31877       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31878 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31879       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31880     fi
31881     # Remove usage instructions (if present), and
31882     # collapse compiler output into a single line
31883     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31884         $SED -e 's/ *[Uu]sage:.*//'`
31885     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31886         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31887   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31888     # xlc -qversion output typically looks like
31889     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31890     #     Version: 11.01.0000.0015
31891     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31892     # Check that this is likely to be the IBM XL C compiler.
31893     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31894     if test $? -ne 0; then
31895       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31896       { $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
31897 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31898       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31899 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31900       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31901 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31902       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31903     fi
31904     # Collapse compiler output into a single line
31905     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31906     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31907         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31908   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31909     # There is no specific version flag, but all output starts with a version string.
31910     # First line typically looks something like:
31911     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31912     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31913     # Check that this is likely to be Microsoft CL.EXE.
31914     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31915     if test $? -ne 0; then
31916       { $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
31917 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31918       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31919 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31920       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31921     fi
31922     # Collapse compiler output into a single line
31923     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31924     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31925         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31926   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31927     # gcc --version output typically looks like
31928     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31929     #     Copyright (C) 2013 Free Software Foundation, Inc.
31930     #     This is free software; see the source for copying conditions.  There is NO
31931     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31932     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31933     # Check that this is likely to be GCC.
31934     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31935     if test $? -ne 0; then
31936       { $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
31937 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31938       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31939 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31940       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31941     fi
31942     # Remove Copyright and legalese from version string, and
31943     # collapse into a single line
31944     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31945         $SED -e 's/ *Copyright .*//'`
31946     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31947         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31948   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31949     # clang --version output typically looks like
31950     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31951     #    clang version 3.3 (tags/RELEASE_33/final)
31952     # or
31953     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31954     #    Target: x86_64-pc-linux-gnu
31955     #    Thread model: posix
31956     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31957     # Check that this is likely to be clang
31958     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31959     if test $? -ne 0; then
31960       { $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
31961 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31962       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31963 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31964       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31965     fi
31966     # Collapse compiler output into a single line
31967     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31968     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31969         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31970   else
31971       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31972   fi
31973   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31974   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31975   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31976   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31977 
31978   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31979 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31980 
31981 
31982   # Now that we have resolved CC ourself, let autoconf have its go at it
31983   ac_ext=c
31984 ac_cpp='$CPP $CPPFLAGS'
31985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31988 if test -n "$ac_tool_prefix"; then
31989   for ac_prog in $CC
31990   do
31991     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31992 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31994 $as_echo_n "checking for $ac_word... " >&6; }
31995 if ${ac_cv_prog_CC+:} false; then :
31996   $as_echo_n "(cached) " >&6
31997 else
31998   if test -n "$CC"; then
31999   ac_cv_prog_CC="$CC" # Let the user override the test.
32000 else
32001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32002 for as_dir in $PATH
32003 do
32004   IFS=$as_save_IFS
32005   test -z "$as_dir" && as_dir=.
32006     for ac_exec_ext in '' $ac_executable_extensions; do
32007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32008     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32010     break 2
32011   fi
32012 done
32013   done
32014 IFS=$as_save_IFS
32015 
32016 fi
32017 fi
32018 CC=$ac_cv_prog_CC
32019 if test -n "$CC"; then
32020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32021 $as_echo "$CC" >&6; }
32022 else
32023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32024 $as_echo "no" >&6; }
32025 fi
32026 
32027 
32028     test -n "$CC" && break
32029   done
32030 fi
32031 if test -z "$CC"; then
32032   ac_ct_CC=$CC
32033   for ac_prog in $CC
32034 do
32035   # Extract the first word of "$ac_prog", so it can be a program name with args.
32036 set dummy $ac_prog; ac_word=$2
32037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32038 $as_echo_n "checking for $ac_word... " >&6; }
32039 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32040   $as_echo_n "(cached) " >&6
32041 else
32042   if test -n "$ac_ct_CC"; then
32043   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32044 else
32045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32046 for as_dir in $PATH
32047 do
32048   IFS=$as_save_IFS
32049   test -z "$as_dir" && as_dir=.
32050     for ac_exec_ext in '' $ac_executable_extensions; do
32051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32052     ac_cv_prog_ac_ct_CC="$ac_prog"
32053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32054     break 2
32055   fi
32056 done
32057   done
32058 IFS=$as_save_IFS
32059 
32060 fi
32061 fi
32062 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32063 if test -n "$ac_ct_CC"; then
32064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32065 $as_echo "$ac_ct_CC" >&6; }
32066 else
32067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32068 $as_echo "no" >&6; }
32069 fi
32070 
32071 
32072   test -n "$ac_ct_CC" && break
32073 done
32074 
32075   if test "x$ac_ct_CC" = x; then
32076     CC=""
32077   else
32078     case $cross_compiling:$ac_tool_warned in
32079 yes:)
32080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32081 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32082 ac_tool_warned=yes ;;
32083 esac
32084     CC=$ac_ct_CC
32085   fi
32086 fi
32087 
32088 
32089 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32091 as_fn_error $? "no acceptable C compiler found in \$PATH
32092 See \`config.log' for more details" "$LINENO" 5; }
32093 
32094 # Provide some information about the compiler.
32095 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32096 set X $ac_compile
32097 ac_compiler=$2
32098 for ac_option in --version -v -V -qversion; do
32099   { { ac_try="$ac_compiler $ac_option >&5"
32100 case "(($ac_try" in
32101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32102   *) ac_try_echo=$ac_try;;
32103 esac
32104 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32105 $as_echo "$ac_try_echo"; } >&5
32106   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32107   ac_status=$?
32108   if test -s conftest.err; then
32109     sed '10a\
32110 ... rest of stderr output deleted ...
32111          10q' conftest.err >conftest.er1
32112     cat conftest.er1 >&5
32113   fi
32114   rm -f conftest.er1 conftest.err
32115   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32116   test $ac_status = 0; }
32117 done
32118 
32119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32120 /* end confdefs.h.  */
32121 
32122 int
32123 main ()
32124 {
32125 
32126   ;
32127   return 0;
32128 }
32129 _ACEOF
32130 ac_clean_files_save=$ac_clean_files
32131 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32132 # Try to create an executable without -o first, disregard a.out.
32133 # It will help us diagnose broken compilers, and finding out an intuition
32134 # of exeext.
32135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32136 $as_echo_n "checking whether the C compiler works... " >&6; }
32137 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32138 
32139 # The possible output files:
32140 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32141 
32142 ac_rmfiles=
32143 for ac_file in $ac_files
32144 do
32145   case $ac_file in
32146     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32147     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32148   esac
32149 done
32150 rm -f $ac_rmfiles
32151 
32152 if { { ac_try="$ac_link_default"
32153 case "(($ac_try" in
32154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32155   *) ac_try_echo=$ac_try;;
32156 esac
32157 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32158 $as_echo "$ac_try_echo"; } >&5
32159   (eval "$ac_link_default") 2>&5
32160   ac_status=$?
32161   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32162   test $ac_status = 0; }; then :
32163   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32164 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32165 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32166 # so that the user can short-circuit this test for compilers unknown to
32167 # Autoconf.
32168 for ac_file in $ac_files ''
32169 do
32170   test -f "$ac_file" || continue
32171   case $ac_file in
32172     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32173         ;;
32174     [ab].out )
32175         # We found the default executable, but exeext='' is most
32176         # certainly right.
32177         break;;
32178     *.* )
32179         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32180         then :; else
32181            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32182         fi
32183         # We set ac_cv_exeext here because the later test for it is not
32184         # safe: cross compilers may not add the suffix if given an `-o'
32185         # argument, so we may need to know it at that point already.
32186         # Even if this section looks crufty: it has the advantage of
32187         # actually working.
32188         break;;
32189     * )
32190         break;;
32191   esac
32192 done
32193 test "$ac_cv_exeext" = no && ac_cv_exeext=
32194 
32195 else
32196   ac_file=''
32197 fi
32198 if test -z "$ac_file"; then :
32199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32200 $as_echo "no" >&6; }
32201 $as_echo "$as_me: failed program was:" >&5
32202 sed 's/^/| /' conftest.$ac_ext >&5
32203 
32204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32205 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32206 as_fn_error 77 "C compiler cannot create executables
32207 See \`config.log' for more details" "$LINENO" 5; }
32208 else
32209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32210 $as_echo "yes" >&6; }
32211 fi
32212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32213 $as_echo_n "checking for C compiler default output file name... " >&6; }
32214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32215 $as_echo "$ac_file" >&6; }
32216 ac_exeext=$ac_cv_exeext
32217 
32218 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32219 ac_clean_files=$ac_clean_files_save
32220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32221 $as_echo_n "checking for suffix of executables... " >&6; }
32222 if { { ac_try="$ac_link"
32223 case "(($ac_try" in
32224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32225   *) ac_try_echo=$ac_try;;
32226 esac
32227 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32228 $as_echo "$ac_try_echo"; } >&5
32229   (eval "$ac_link") 2>&5
32230   ac_status=$?
32231   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32232   test $ac_status = 0; }; then :
32233   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32234 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32235 # work properly (i.e., refer to `conftest.exe'), while it won't with
32236 # `rm'.
32237 for ac_file in conftest.exe conftest conftest.*; do
32238   test -f "$ac_file" || continue
32239   case $ac_file in
32240     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32241     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32242           break;;
32243     * ) break;;
32244   esac
32245 done
32246 else
32247   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32248 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32249 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32250 See \`config.log' for more details" "$LINENO" 5; }
32251 fi
32252 rm -f conftest conftest$ac_cv_exeext
32253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32254 $as_echo "$ac_cv_exeext" >&6; }
32255 
32256 rm -f conftest.$ac_ext
32257 EXEEXT=$ac_cv_exeext
32258 ac_exeext=$EXEEXT
32259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32260 /* end confdefs.h.  */
32261 #include <stdio.h>
32262 int
32263 main ()
32264 {
32265 FILE *f = fopen ("conftest.out", "w");
32266  return ferror (f) || fclose (f) != 0;
32267 
32268   ;
32269   return 0;
32270 }
32271 _ACEOF
32272 ac_clean_files="$ac_clean_files conftest.out"
32273 # Check that the compiler produces executables we can run.  If not, either
32274 # the compiler is broken, or we cross compile.
32275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32276 $as_echo_n "checking whether we are cross compiling... " >&6; }
32277 if test "$cross_compiling" != yes; then
32278   { { ac_try="$ac_link"
32279 case "(($ac_try" in
32280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32281   *) ac_try_echo=$ac_try;;
32282 esac
32283 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32284 $as_echo "$ac_try_echo"; } >&5
32285   (eval "$ac_link") 2>&5
32286   ac_status=$?
32287   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32288   test $ac_status = 0; }
32289   if { ac_try='./conftest$ac_cv_exeext'
32290   { { case "(($ac_try" in
32291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32292   *) ac_try_echo=$ac_try;;
32293 esac
32294 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32295 $as_echo "$ac_try_echo"; } >&5
32296   (eval "$ac_try") 2>&5
32297   ac_status=$?
32298   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32299   test $ac_status = 0; }; }; then
32300     cross_compiling=no
32301   else
32302     if test "$cross_compiling" = maybe; then
32303         cross_compiling=yes
32304     else
32305         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32306 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32307 as_fn_error $? "cannot run C compiled programs.
32308 If you meant to cross compile, use \`--host'.
32309 See \`config.log' for more details" "$LINENO" 5; }
32310     fi
32311   fi
32312 fi
32313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32314 $as_echo "$cross_compiling" >&6; }
32315 
32316 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32317 ac_clean_files=$ac_clean_files_save
32318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32319 $as_echo_n "checking for suffix of object files... " >&6; }
32320 if ${ac_cv_objext+:} false; then :
32321   $as_echo_n "(cached) " >&6
32322 else
32323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32324 /* end confdefs.h.  */
32325 
32326 int
32327 main ()
32328 {
32329 
32330   ;
32331   return 0;
32332 }
32333 _ACEOF
32334 rm -f conftest.o conftest.obj
32335 if { { ac_try="$ac_compile"
32336 case "(($ac_try" in
32337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32338   *) ac_try_echo=$ac_try;;
32339 esac
32340 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32341 $as_echo "$ac_try_echo"; } >&5
32342   (eval "$ac_compile") 2>&5
32343   ac_status=$?
32344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32345   test $ac_status = 0; }; then :
32346   for ac_file in conftest.o conftest.obj conftest.*; do
32347   test -f "$ac_file" || continue;
32348   case $ac_file in
32349     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32350     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32351        break;;
32352   esac
32353 done
32354 else
32355   $as_echo "$as_me: failed program was:" >&5
32356 sed 's/^/| /' conftest.$ac_ext >&5
32357 
32358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32359 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32360 as_fn_error $? "cannot compute suffix of object files: cannot compile
32361 See \`config.log' for more details" "$LINENO" 5; }
32362 fi
32363 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32364 fi
32365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32366 $as_echo "$ac_cv_objext" >&6; }
32367 OBJEXT=$ac_cv_objext
32368 ac_objext=$OBJEXT
32369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32370 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32371 if ${ac_cv_c_compiler_gnu+:} false; then :
32372   $as_echo_n "(cached) " >&6
32373 else
32374   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32375 /* end confdefs.h.  */
32376 
32377 int
32378 main ()
32379 {
32380 #ifndef __GNUC__
32381        choke me
32382 #endif
32383 
32384   ;
32385   return 0;
32386 }
32387 _ACEOF
32388 if ac_fn_c_try_compile "$LINENO"; then :
32389   ac_compiler_gnu=yes
32390 else
32391   ac_compiler_gnu=no
32392 fi
32393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32394 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32395 
32396 fi
32397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32398 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32399 if test $ac_compiler_gnu = yes; then
32400   GCC=yes
32401 else
32402   GCC=
32403 fi
32404 ac_test_CFLAGS=${CFLAGS+set}
32405 ac_save_CFLAGS=$CFLAGS
32406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32407 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32408 if ${ac_cv_prog_cc_g+:} false; then :
32409   $as_echo_n "(cached) " >&6
32410 else
32411   ac_save_c_werror_flag=$ac_c_werror_flag
32412    ac_c_werror_flag=yes
32413    ac_cv_prog_cc_g=no
32414    CFLAGS="-g"
32415    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32416 /* end confdefs.h.  */
32417 
32418 int
32419 main ()
32420 {
32421 
32422   ;
32423   return 0;
32424 }
32425 _ACEOF
32426 if ac_fn_c_try_compile "$LINENO"; then :
32427   ac_cv_prog_cc_g=yes
32428 else
32429   CFLAGS=""
32430       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32431 /* end confdefs.h.  */
32432 
32433 int
32434 main ()
32435 {
32436 
32437   ;
32438   return 0;
32439 }
32440 _ACEOF
32441 if ac_fn_c_try_compile "$LINENO"; then :
32442 
32443 else
32444   ac_c_werror_flag=$ac_save_c_werror_flag
32445          CFLAGS="-g"
32446          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32447 /* end confdefs.h.  */
32448 
32449 int
32450 main ()
32451 {
32452 
32453   ;
32454   return 0;
32455 }
32456 _ACEOF
32457 if ac_fn_c_try_compile "$LINENO"; then :
32458   ac_cv_prog_cc_g=yes
32459 fi
32460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32461 fi
32462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32463 fi
32464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32465    ac_c_werror_flag=$ac_save_c_werror_flag
32466 fi
32467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32468 $as_echo "$ac_cv_prog_cc_g" >&6; }
32469 if test "$ac_test_CFLAGS" = set; then
32470   CFLAGS=$ac_save_CFLAGS
32471 elif test $ac_cv_prog_cc_g = yes; then
32472   if test "$GCC" = yes; then
32473     CFLAGS="-g -O2"
32474   else
32475     CFLAGS="-g"
32476   fi
32477 else
32478   if test "$GCC" = yes; then
32479     CFLAGS="-O2"
32480   else
32481     CFLAGS=
32482   fi
32483 fi
32484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32485 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32486 if ${ac_cv_prog_cc_c89+:} false; then :
32487   $as_echo_n "(cached) " >&6
32488 else
32489   ac_cv_prog_cc_c89=no
32490 ac_save_CC=$CC
32491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32492 /* end confdefs.h.  */
32493 #include <stdarg.h>
32494 #include <stdio.h>
32495 struct stat;
32496 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32497 struct buf { int x; };
32498 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32499 static char *e (p, i)
32500      char **p;
32501      int i;
32502 {
32503   return p[i];
32504 }
32505 static char *f (char * (*g) (char **, int), char **p, ...)
32506 {
32507   char *s;
32508   va_list v;
32509   va_start (v,p);
32510   s = g (p, va_arg (v,int));
32511   va_end (v);
32512   return s;
32513 }
32514 
32515 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32516    function prototypes and stuff, but not '\xHH' hex character constants.
32517    These don't provoke an error unfortunately, instead are silently treated
32518    as 'x'.  The following induces an error, until -std is added to get
32519    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32520    array size at least.  It's necessary to write '\x00'==0 to get something
32521    that's true only with -std.  */
32522 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32523 
32524 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32525    inside strings and character constants.  */
32526 #define FOO(x) 'x'
32527 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32528 
32529 int test (int i, double x);
32530 struct s1 {int (*f) (int a);};
32531 struct s2 {int (*f) (double a);};
32532 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32533 int argc;
32534 char **argv;
32535 int
32536 main ()
32537 {
32538 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32539   ;
32540   return 0;
32541 }
32542 _ACEOF
32543 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32544         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32545 do
32546   CC="$ac_save_CC $ac_arg"
32547   if ac_fn_c_try_compile "$LINENO"; then :
32548   ac_cv_prog_cc_c89=$ac_arg
32549 fi
32550 rm -f core conftest.err conftest.$ac_objext
32551   test "x$ac_cv_prog_cc_c89" != "xno" && break
32552 done
32553 rm -f conftest.$ac_ext
32554 CC=$ac_save_CC
32555 
32556 fi
32557 # AC_CACHE_VAL
32558 case "x$ac_cv_prog_cc_c89" in
32559   x)
32560     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32561 $as_echo "none needed" >&6; } ;;
32562   xno)
32563     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32564 $as_echo "unsupported" >&6; } ;;
32565   *)
32566     CC="$CC $ac_cv_prog_cc_c89"
32567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32568 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32569 esac
32570 if test "x$ac_cv_prog_cc_c89" != xno; then :
32571 
32572 fi
32573 
32574 ac_ext=cpp
32575 ac_cpp='$CXXCPP $CPPFLAGS'
32576 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32577 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32578 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32579 
32580 
32581 
32582   COMPILER_NAME=C++
32583   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32584 
32585   if test "x$CXX" != x; then
32586     # User has supplied compiler name already, always let that override.
32587     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32588 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32589     if test "x`basename $CXX`" = "x$CXX"; then
32590       # A command without a complete path is provided, search $PATH.
32591 
32592       for ac_prog in $CXX
32593 do
32594   # Extract the first word of "$ac_prog", so it can be a program name with args.
32595 set dummy $ac_prog; ac_word=$2
32596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32597 $as_echo_n "checking for $ac_word... " >&6; }
32598 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32599   $as_echo_n "(cached) " >&6
32600 else
32601   case $POTENTIAL_CXX in
32602   [\\/]* | ?:[\\/]*)
32603   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32604   ;;
32605   *)
32606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32607 for as_dir in $PATH
32608 do
32609   IFS=$as_save_IFS
32610   test -z "$as_dir" && as_dir=.
32611     for ac_exec_ext in '' $ac_executable_extensions; do
32612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32613     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32615     break 2
32616   fi
32617 done
32618   done
32619 IFS=$as_save_IFS
32620 
32621   ;;
32622 esac
32623 fi
32624 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32625 if test -n "$POTENTIAL_CXX"; then
32626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32627 $as_echo "$POTENTIAL_CXX" >&6; }
32628 else
32629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32630 $as_echo "no" >&6; }
32631 fi
32632 
32633 
32634   test -n "$POTENTIAL_CXX" && break
32635 done
32636 
32637       if test "x$POTENTIAL_CXX" != x; then
32638         CXX=$POTENTIAL_CXX
32639       else
32640         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32641       fi
32642     else
32643       # Otherwise it might already be a complete path
32644       if test ! -x "$CXX"; then
32645         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32646       fi
32647     fi
32648   else
32649     # No user supplied value. Locate compiler ourselves.
32650 
32651     # If we are cross compiling, assume cross compilation tools follows the
32652     # cross compilation standard where they are prefixed with the autoconf
32653     # standard name for the target. For example the binary
32654     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32655     # If we are not cross compiling, then the default compiler name will be
32656     # used.
32657 
32658     CXX=
32659     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32660     # before checking the rest of the PATH.
32661     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32662     # step, this should not be necessary.
32663     if test -n "$TOOLCHAIN_PATH"; then
32664       PATH_save="$PATH"
32665       PATH="$TOOLCHAIN_PATH"
32666       for ac_prog in $SEARCH_LIST
32667 do
32668   # Extract the first word of "$ac_prog", so it can be a program name with args.
32669 set dummy $ac_prog; ac_word=$2
32670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32671 $as_echo_n "checking for $ac_word... " >&6; }
32672 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32673   $as_echo_n "(cached) " >&6
32674 else
32675   case $TOOLCHAIN_PATH_CXX in
32676   [\\/]* | ?:[\\/]*)
32677   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32678   ;;
32679   *)
32680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32681 for as_dir in $PATH
32682 do
32683   IFS=$as_save_IFS
32684   test -z "$as_dir" && as_dir=.
32685     for ac_exec_ext in '' $ac_executable_extensions; do
32686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32687     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32689     break 2
32690   fi
32691 done
32692   done
32693 IFS=$as_save_IFS
32694 
32695   ;;
32696 esac
32697 fi
32698 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32699 if test -n "$TOOLCHAIN_PATH_CXX"; then
32700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32701 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32702 else
32703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32704 $as_echo "no" >&6; }
32705 fi
32706 
32707 
32708   test -n "$TOOLCHAIN_PATH_CXX" && break
32709 done
32710 
32711       CXX=$TOOLCHAIN_PATH_CXX
32712       PATH="$PATH_save"
32713     fi
32714 
32715     # AC_PATH_PROGS can't be run multiple times with the same variable,
32716     # so create a new name for this run.
32717     if test "x$CXX" = x; then
32718       for ac_prog in $SEARCH_LIST
32719 do
32720   # Extract the first word of "$ac_prog", so it can be a program name with args.
32721 set dummy $ac_prog; ac_word=$2
32722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32723 $as_echo_n "checking for $ac_word... " >&6; }
32724 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32725   $as_echo_n "(cached) " >&6
32726 else
32727   case $POTENTIAL_CXX in
32728   [\\/]* | ?:[\\/]*)
32729   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32730   ;;
32731   *)
32732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32733 for as_dir in $PATH
32734 do
32735   IFS=$as_save_IFS
32736   test -z "$as_dir" && as_dir=.
32737     for ac_exec_ext in '' $ac_executable_extensions; do
32738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32739     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32741     break 2
32742   fi
32743 done
32744   done
32745 IFS=$as_save_IFS
32746 
32747   ;;
32748 esac
32749 fi
32750 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32751 if test -n "$POTENTIAL_CXX"; then
32752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32753 $as_echo "$POTENTIAL_CXX" >&6; }
32754 else
32755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32756 $as_echo "no" >&6; }
32757 fi
32758 
32759 
32760   test -n "$POTENTIAL_CXX" && break
32761 done
32762 
32763       CXX=$POTENTIAL_CXX
32764     fi
32765 
32766     if test "x$CXX" = x; then
32767 
32768   # Print a helpful message on how to acquire the necessary build dependency.
32769   # devkit is the help tag: freetype, cups, alsa etc
32770   MISSING_DEPENDENCY=devkit
32771 
32772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32773     cygwin_help $MISSING_DEPENDENCY
32774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32775     msys_help $MISSING_DEPENDENCY
32776   else
32777     PKGHANDLER_COMMAND=
32778 
32779     case $PKGHANDLER in
32780       apt-get)
32781         apt_help     $MISSING_DEPENDENCY ;;
32782       yum)
32783         yum_help     $MISSING_DEPENDENCY ;;
32784       port)
32785         port_help    $MISSING_DEPENDENCY ;;
32786       pkgutil)
32787         pkgutil_help $MISSING_DEPENDENCY ;;
32788       pkgadd)
32789         pkgadd_help  $MISSING_DEPENDENCY ;;
32790     esac
32791 
32792     if test "x$PKGHANDLER_COMMAND" != x; then
32793       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32794     fi
32795   fi
32796 
32797       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32798     fi
32799   fi
32800 
32801   # Now we have a compiler binary in CXX. Make sure it's okay.
32802 
32803   # Only process if variable expands to non-empty
32804 
32805   if test "x$CXX" != x; then
32806     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32807 
32808   # First separate the path from the arguments. This will split at the first
32809   # space.
32810   complete="$CXX"
32811   path="${complete%% *}"
32812   tmp="$complete EOL"
32813   arguments="${tmp#* }"
32814 
32815   # Input might be given as Windows format, start by converting to
32816   # unix format.
32817   new_path=`$CYGPATH -u "$path"`
32818 
32819   # Now try to locate executable using which
32820   new_path=`$WHICH "$new_path" 2> /dev/null`
32821   # bat and cmd files are not always considered executable in cygwin causing which
32822   # to not find them
32823   if test "x$new_path" = x \
32824       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32825       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32826     new_path=`$CYGPATH -u "$path"`
32827   fi
32828   if test "x$new_path" = x; then
32829     # Oops. Which didn't find the executable.
32830     # The splitting of arguments from the executable at a space might have been incorrect,
32831     # since paths with space are more likely in Windows. Give it another try with the whole
32832     # argument.
32833     path="$complete"
32834     arguments="EOL"
32835     new_path=`$CYGPATH -u "$path"`
32836     new_path=`$WHICH "$new_path" 2> /dev/null`
32837     # bat and cmd files are not always considered executable in cygwin causing which
32838     # to not find them
32839     if test "x$new_path" = x \
32840         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32841         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32842       new_path=`$CYGPATH -u "$path"`
32843     fi
32844     if test "x$new_path" = x; then
32845       # It's still not found. Now this is an unrecoverable error.
32846       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32847 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32848       has_space=`$ECHO "$complete" | $GREP " "`
32849       if test "x$has_space" != x; then
32850         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32851 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32852       fi
32853       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32854     fi
32855   fi
32856 
32857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32860   # "foo.exe" is OK but "foo" is an error.
32861   #
32862   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32863   # It is also a way to make sure we got the proper file name for the real test later on.
32864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32865   if test "x$test_shortpath" = x; then
32866     # Short path failed, file does not exist as specified.
32867     # Try adding .exe or .cmd
32868     if test -f "${new_path}.exe"; then
32869       input_to_shortpath="${new_path}.exe"
32870     elif test -f "${new_path}.cmd"; then
32871       input_to_shortpath="${new_path}.cmd"
32872     else
32873       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32874 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32875       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32876 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32877       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32878     fi
32879   else
32880     input_to_shortpath="$new_path"
32881   fi
32882 
32883   # Call helper function which possibly converts this using DOS-style short mode.
32884   # If so, the updated path is stored in $new_path.
32885   new_path="$input_to_shortpath"
32886 
32887   input_path="$input_to_shortpath"
32888   # Check if we need to convert this using DOS-style short mode. If the path
32889   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32890   # take no chances and rewrite it.
32891   # Note: m4 eats our [], so we need to use [ and ] instead.
32892   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32893   if test "x$has_forbidden_chars" != x; then
32894     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32895     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32896     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32897     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32898       # Going to short mode and back again did indeed matter. Since short mode is
32899       # case insensitive, let's make it lowercase to improve readability.
32900       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32901       # Now convert it back to Unix-style (cygpath)
32902       input_path=`$CYGPATH -u "$shortmode_path"`
32903       new_path="$input_path"
32904     fi
32905   fi
32906 
32907   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32908   if test "x$test_cygdrive_prefix" = x; then
32909     # As a simple fix, exclude /usr/bin since it's not a real path.
32910     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32911       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32912       # a path prefixed by /cygdrive for fixpath to work.
32913       new_path="$CYGWIN_ROOT_PATH$input_path"
32914     fi
32915   fi
32916 
32917   # remove trailing .exe if any
32918   new_path="${new_path/%.exe/}"
32919 
32920     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32921 
32922   # First separate the path from the arguments. This will split at the first
32923   # space.
32924   complete="$CXX"
32925   path="${complete%% *}"
32926   tmp="$complete EOL"
32927   arguments="${tmp#* }"
32928 
32929   # Input might be given as Windows format, start by converting to
32930   # unix format.
32931   new_path="$path"
32932 
32933   windows_path="$new_path"
32934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32935     unix_path=`$CYGPATH -u "$windows_path"`
32936     new_path="$unix_path"
32937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32939     new_path="$unix_path"
32940   fi
32941 
32942 
32943   # Now try to locate executable using which
32944   new_path=`$WHICH "$new_path" 2> /dev/null`
32945 
32946   if test "x$new_path" = x; then
32947     # Oops. Which didn't find the executable.
32948     # The splitting of arguments from the executable at a space might have been incorrect,
32949     # since paths with space are more likely in Windows. Give it another try with the whole
32950     # argument.
32951     path="$complete"
32952     arguments="EOL"
32953     new_path="$path"
32954 
32955   windows_path="$new_path"
32956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32957     unix_path=`$CYGPATH -u "$windows_path"`
32958     new_path="$unix_path"
32959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32961     new_path="$unix_path"
32962   fi
32963 
32964 
32965     new_path=`$WHICH "$new_path" 2> /dev/null`
32966     # bat and cmd files are not always considered executable in MSYS causing which
32967     # to not find them
32968     if test "x$new_path" = x \
32969         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32970         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32971       new_path="$path"
32972 
32973   windows_path="$new_path"
32974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32975     unix_path=`$CYGPATH -u "$windows_path"`
32976     new_path="$unix_path"
32977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32979     new_path="$unix_path"
32980   fi
32981 
32982     fi
32983 
32984     if test "x$new_path" = x; then
32985       # It's still not found. Now this is an unrecoverable error.
32986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32987 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32988       has_space=`$ECHO "$complete" | $GREP " "`
32989       if test "x$has_space" != x; then
32990         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32991 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32992       fi
32993       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32994     fi
32995   fi
32996 
32997   # Now new_path has a complete unix path to the binary
32998   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32999     # Keep paths in /bin as-is, but remove trailing .exe if any
33000     new_path="${new_path/%.exe/}"
33001     # Do not save /bin paths to all_fixpath_prefixes!
33002   else
33003     # Not in mixed or Windows style, start by that.
33004     new_path=`cmd //c echo $new_path`
33005 
33006   input_path="$new_path"
33007   # Check if we need to convert this using DOS-style short mode. If the path
33008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33009   # take no chances and rewrite it.
33010   # Note: m4 eats our [], so we need to use [ and ] instead.
33011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33012   if test "x$has_forbidden_chars" != x; then
33013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33015   fi
33016 
33017     # Output is in $new_path
33018 
33019   windows_path="$new_path"
33020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33021     unix_path=`$CYGPATH -u "$windows_path"`
33022     new_path="$unix_path"
33023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33025     new_path="$unix_path"
33026   fi
33027 
33028     # remove trailing .exe if any
33029     new_path="${new_path/%.exe/}"
33030 
33031     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33032     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33033   fi
33034 
33035     else
33036       # We're on a unix platform. Hooray! :)
33037       # First separate the path from the arguments. This will split at the first
33038       # space.
33039       complete="$CXX"
33040       path="${complete%% *}"
33041       tmp="$complete EOL"
33042       arguments="${tmp#* }"
33043 
33044       # Cannot rely on the command "which" here since it doesn't always work.
33045       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33046       if test -z "$is_absolute_path"; then
33047         # Path to executable is not absolute. Find it.
33048         IFS_save="$IFS"
33049         IFS=:
33050         for p in $PATH; do
33051           if test -f "$p/$path" && test -x "$p/$path"; then
33052             new_path="$p/$path"
33053             break
33054           fi
33055         done
33056         IFS="$IFS_save"
33057       else
33058         # This is an absolute path, we can use it without further modifications.
33059         new_path="$path"
33060       fi
33061 
33062       if test "x$new_path" = x; then
33063         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33064 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33065         has_space=`$ECHO "$complete" | $GREP " "`
33066         if test "x$has_space" != x; then
33067           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33068 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33069         fi
33070         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33071       fi
33072     fi
33073 
33074     # Now join together the path and the arguments once again
33075     if test "x$arguments" != xEOL; then
33076       new_complete="$new_path ${arguments% *}"
33077     else
33078       new_complete="$new_path"
33079     fi
33080 
33081     if test "x$complete" != "x$new_complete"; then
33082       CXX="$new_complete"
33083       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33084 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33085     fi
33086   fi
33087 
33088   TEST_COMPILER="$CXX"
33089   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33090   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33091   if test "x$OPENJDK_BUILD_OS" != xaix; then
33092     # FIXME: This test should not be needed anymore; we don't do that for any platform.
33093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33094 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33095 
33096   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33097     # Follow a chain of symbolic links. Use readlink
33098     # where it exists, else fall back to horribly
33099     # complicated shell code.
33100     if test "x$READLINK_TESTED" != yes; then
33101       # On MacOSX there is a readlink tool with a different
33102       # purpose than the GNU readlink tool. Check the found readlink.
33103       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33104       if test "x$ISGNU" = x; then
33105         # A readlink that we do not know how to use.
33106         # Are there other non-GNU readlinks out there?
33107         READLINK_TESTED=yes
33108         READLINK=
33109       fi
33110     fi
33111 
33112     if test "x$READLINK" != x; then
33113       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33114     else
33115       # Save the current directory for restoring afterwards
33116       STARTDIR=$PWD
33117       COUNTER=0
33118       sym_link_dir=`$DIRNAME $TEST_COMPILER`
33119       sym_link_file=`$BASENAME $TEST_COMPILER`
33120       cd $sym_link_dir
33121       # Use -P flag to resolve symlinks in directories.
33122       cd `$THEPWDCMD -P`
33123       sym_link_dir=`$THEPWDCMD -P`
33124       # Resolve file symlinks
33125       while test $COUNTER -lt 20; do
33126         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33127         if test "x$ISLINK" == x; then
33128           # This is not a symbolic link! We are done!
33129           break
33130         fi
33131         # Again resolve directory symlinks since the target of the just found
33132         # link could be in a different directory
33133         cd `$DIRNAME $ISLINK`
33134         sym_link_dir=`$THEPWDCMD -P`
33135         sym_link_file=`$BASENAME $ISLINK`
33136         let COUNTER=COUNTER+1
33137       done
33138       cd $STARTDIR
33139       TEST_COMPILER=$sym_link_dir/$sym_link_file
33140     fi
33141   fi
33142 
33143     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33144 $as_echo "$TEST_COMPILER" >&6; }
33145   fi
33146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33147 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
33148 
33149   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33150   if test "x$COMPILER_BASENAME" = "xccache"; then
33151     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33152 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33153     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33154     # We want to control ccache invocation ourselves, so ignore this cc and try
33155     # searching again.
33156 
33157     # Remove the path to the fake ccache cc from the PATH
33158     RETRY_COMPILER_SAVED_PATH="$PATH"
33159     COMPILER_DIRNAME=`$DIRNAME $CXX`
33160     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33161 
33162     # Try again looking for our compiler
33163     if test -n "$ac_tool_prefix"; then
33164   for ac_prog in $TOOLCHAIN_CXX_BINARY
33165   do
33166     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33167 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33169 $as_echo_n "checking for $ac_word... " >&6; }
33170 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33171   $as_echo_n "(cached) " >&6
33172 else
33173   if test -n "$PROPER_COMPILER_CXX"; then
33174   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33175 else
33176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33177 for as_dir in $PATH
33178 do
33179   IFS=$as_save_IFS
33180   test -z "$as_dir" && as_dir=.
33181     for ac_exec_ext in '' $ac_executable_extensions; do
33182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33183     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33185     break 2
33186   fi
33187 done
33188   done
33189 IFS=$as_save_IFS
33190 
33191 fi
33192 fi
33193 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33194 if test -n "$PROPER_COMPILER_CXX"; then
33195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33196 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33197 else
33198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33199 $as_echo "no" >&6; }
33200 fi
33201 
33202 
33203     test -n "$PROPER_COMPILER_CXX" && break
33204   done
33205 fi
33206 if test -z "$PROPER_COMPILER_CXX"; then
33207   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33208   for ac_prog in $TOOLCHAIN_CXX_BINARY
33209 do
33210   # Extract the first word of "$ac_prog", so it can be a program name with args.
33211 set dummy $ac_prog; ac_word=$2
33212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33213 $as_echo_n "checking for $ac_word... " >&6; }
33214 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33215   $as_echo_n "(cached) " >&6
33216 else
33217   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33218   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33219 else
33220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33221 for as_dir in $PATH
33222 do
33223   IFS=$as_save_IFS
33224   test -z "$as_dir" && as_dir=.
33225     for ac_exec_ext in '' $ac_executable_extensions; do
33226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33227     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33229     break 2
33230   fi
33231 done
33232   done
33233 IFS=$as_save_IFS
33234 
33235 fi
33236 fi
33237 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33238 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33240 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33241 else
33242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33243 $as_echo "no" >&6; }
33244 fi
33245 
33246 
33247   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33248 done
33249 
33250   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33251     PROPER_COMPILER_CXX=""
33252   else
33253     case $cross_compiling:$ac_tool_warned in
33254 yes:)
33255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33256 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33257 ac_tool_warned=yes ;;
33258 esac
33259     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33260   fi
33261 fi
33262 
33263 
33264   # Only process if variable expands to non-empty
33265 
33266   if test "x$PROPER_COMPILER_CXX" != x; then
33267     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33268 
33269   # First separate the path from the arguments. This will split at the first
33270   # space.
33271   complete="$PROPER_COMPILER_CXX"
33272   path="${complete%% *}"
33273   tmp="$complete EOL"
33274   arguments="${tmp#* }"
33275 
33276   # Input might be given as Windows format, start by converting to
33277   # unix format.
33278   new_path=`$CYGPATH -u "$path"`
33279 
33280   # Now try to locate executable using which
33281   new_path=`$WHICH "$new_path" 2> /dev/null`
33282   # bat and cmd files are not always considered executable in cygwin causing which
33283   # to not find them
33284   if test "x$new_path" = x \
33285       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33286       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33287     new_path=`$CYGPATH -u "$path"`
33288   fi
33289   if test "x$new_path" = x; then
33290     # Oops. Which didn't find the executable.
33291     # The splitting of arguments from the executable at a space might have been incorrect,
33292     # since paths with space are more likely in Windows. Give it another try with the whole
33293     # argument.
33294     path="$complete"
33295     arguments="EOL"
33296     new_path=`$CYGPATH -u "$path"`
33297     new_path=`$WHICH "$new_path" 2> /dev/null`
33298     # bat and cmd files are not always considered executable in cygwin causing which
33299     # to not find them
33300     if test "x$new_path" = x \
33301         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33302         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33303       new_path=`$CYGPATH -u "$path"`
33304     fi
33305     if test "x$new_path" = x; then
33306       # It's still not found. Now this is an unrecoverable error.
33307       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33308 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33309       has_space=`$ECHO "$complete" | $GREP " "`
33310       if test "x$has_space" != x; then
33311         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33312 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33313       fi
33314       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33315     fi
33316   fi
33317 
33318   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33319   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33320   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33321   # "foo.exe" is OK but "foo" is an error.
33322   #
33323   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33324   # It is also a way to make sure we got the proper file name for the real test later on.
33325   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33326   if test "x$test_shortpath" = x; then
33327     # Short path failed, file does not exist as specified.
33328     # Try adding .exe or .cmd
33329     if test -f "${new_path}.exe"; then
33330       input_to_shortpath="${new_path}.exe"
33331     elif test -f "${new_path}.cmd"; then
33332       input_to_shortpath="${new_path}.cmd"
33333     else
33334       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33335 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33336       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33337 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33338       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33339     fi
33340   else
33341     input_to_shortpath="$new_path"
33342   fi
33343 
33344   # Call helper function which possibly converts this using DOS-style short mode.
33345   # If so, the updated path is stored in $new_path.
33346   new_path="$input_to_shortpath"
33347 
33348   input_path="$input_to_shortpath"
33349   # Check if we need to convert this using DOS-style short mode. If the path
33350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33351   # take no chances and rewrite it.
33352   # Note: m4 eats our [], so we need to use [ and ] instead.
33353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33354   if test "x$has_forbidden_chars" != x; then
33355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33356     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33357     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33358     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33359       # Going to short mode and back again did indeed matter. Since short mode is
33360       # case insensitive, let's make it lowercase to improve readability.
33361       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33362       # Now convert it back to Unix-style (cygpath)
33363       input_path=`$CYGPATH -u "$shortmode_path"`
33364       new_path="$input_path"
33365     fi
33366   fi
33367 
33368   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33369   if test "x$test_cygdrive_prefix" = x; then
33370     # As a simple fix, exclude /usr/bin since it's not a real path.
33371     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33372       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33373       # a path prefixed by /cygdrive for fixpath to work.
33374       new_path="$CYGWIN_ROOT_PATH$input_path"
33375     fi
33376   fi
33377 
33378   # remove trailing .exe if any
33379   new_path="${new_path/%.exe/}"
33380 
33381     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33382 
33383   # First separate the path from the arguments. This will split at the first
33384   # space.
33385   complete="$PROPER_COMPILER_CXX"
33386   path="${complete%% *}"
33387   tmp="$complete EOL"
33388   arguments="${tmp#* }"
33389 
33390   # Input might be given as Windows format, start by converting to
33391   # unix format.
33392   new_path="$path"
33393 
33394   windows_path="$new_path"
33395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33396     unix_path=`$CYGPATH -u "$windows_path"`
33397     new_path="$unix_path"
33398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33400     new_path="$unix_path"
33401   fi
33402 
33403 
33404   # Now try to locate executable using which
33405   new_path=`$WHICH "$new_path" 2> /dev/null`
33406 
33407   if test "x$new_path" = x; then
33408     # Oops. Which didn't find the executable.
33409     # The splitting of arguments from the executable at a space might have been incorrect,
33410     # since paths with space are more likely in Windows. Give it another try with the whole
33411     # argument.
33412     path="$complete"
33413     arguments="EOL"
33414     new_path="$path"
33415 
33416   windows_path="$new_path"
33417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33418     unix_path=`$CYGPATH -u "$windows_path"`
33419     new_path="$unix_path"
33420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33422     new_path="$unix_path"
33423   fi
33424 
33425 
33426     new_path=`$WHICH "$new_path" 2> /dev/null`
33427     # bat and cmd files are not always considered executable in MSYS causing which
33428     # to not find them
33429     if test "x$new_path" = x \
33430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33432       new_path="$path"
33433 
33434   windows_path="$new_path"
33435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33436     unix_path=`$CYGPATH -u "$windows_path"`
33437     new_path="$unix_path"
33438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33440     new_path="$unix_path"
33441   fi
33442 
33443     fi
33444 
33445     if test "x$new_path" = x; then
33446       # It's still not found. Now this is an unrecoverable error.
33447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33448 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33449       has_space=`$ECHO "$complete" | $GREP " "`
33450       if test "x$has_space" != x; then
33451         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33452 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33453       fi
33454       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33455     fi
33456   fi
33457 
33458   # Now new_path has a complete unix path to the binary
33459   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33460     # Keep paths in /bin as-is, but remove trailing .exe if any
33461     new_path="${new_path/%.exe/}"
33462     # Do not save /bin paths to all_fixpath_prefixes!
33463   else
33464     # Not in mixed or Windows style, start by that.
33465     new_path=`cmd //c echo $new_path`
33466 
33467   input_path="$new_path"
33468   # Check if we need to convert this using DOS-style short mode. If the path
33469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33470   # take no chances and rewrite it.
33471   # Note: m4 eats our [], so we need to use [ and ] instead.
33472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33473   if test "x$has_forbidden_chars" != x; then
33474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33476   fi
33477 
33478     # Output is in $new_path
33479 
33480   windows_path="$new_path"
33481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33482     unix_path=`$CYGPATH -u "$windows_path"`
33483     new_path="$unix_path"
33484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33486     new_path="$unix_path"
33487   fi
33488 
33489     # remove trailing .exe if any
33490     new_path="${new_path/%.exe/}"
33491 
33492     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33493     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33494   fi
33495 
33496     else
33497       # We're on a unix platform. Hooray! :)
33498       # First separate the path from the arguments. This will split at the first
33499       # space.
33500       complete="$PROPER_COMPILER_CXX"
33501       path="${complete%% *}"
33502       tmp="$complete EOL"
33503       arguments="${tmp#* }"
33504 
33505       # Cannot rely on the command "which" here since it doesn't always work.
33506       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33507       if test -z "$is_absolute_path"; then
33508         # Path to executable is not absolute. Find it.
33509         IFS_save="$IFS"
33510         IFS=:
33511         for p in $PATH; do
33512           if test -f "$p/$path" && test -x "$p/$path"; then
33513             new_path="$p/$path"
33514             break
33515           fi
33516         done
33517         IFS="$IFS_save"
33518       else
33519         # This is an absolute path, we can use it without further modifications.
33520         new_path="$path"
33521       fi
33522 
33523       if test "x$new_path" = x; then
33524         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33525 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33526         has_space=`$ECHO "$complete" | $GREP " "`
33527         if test "x$has_space" != x; then
33528           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33529 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33530         fi
33531         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33532       fi
33533     fi
33534 
33535     # Now join together the path and the arguments once again
33536     if test "x$arguments" != xEOL; then
33537       new_complete="$new_path ${arguments% *}"
33538     else
33539       new_complete="$new_path"
33540     fi
33541 
33542     if test "x$complete" != "x$new_complete"; then
33543       PROPER_COMPILER_CXX="$new_complete"
33544       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33545 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33546     fi
33547   fi
33548 
33549     PATH="$RETRY_COMPILER_SAVED_PATH"
33550 
33551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33552 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33553 
33554   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33555     # Follow a chain of symbolic links. Use readlink
33556     # where it exists, else fall back to horribly
33557     # complicated shell code.
33558     if test "x$READLINK_TESTED" != yes; then
33559       # On MacOSX there is a readlink tool with a different
33560       # purpose than the GNU readlink tool. Check the found readlink.
33561       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33562       if test "x$ISGNU" = x; then
33563         # A readlink that we do not know how to use.
33564         # Are there other non-GNU readlinks out there?
33565         READLINK_TESTED=yes
33566         READLINK=
33567       fi
33568     fi
33569 
33570     if test "x$READLINK" != x; then
33571       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33572     else
33573       # Save the current directory for restoring afterwards
33574       STARTDIR=$PWD
33575       COUNTER=0
33576       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33577       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33578       cd $sym_link_dir
33579       # Use -P flag to resolve symlinks in directories.
33580       cd `$THEPWDCMD -P`
33581       sym_link_dir=`$THEPWDCMD -P`
33582       # Resolve file symlinks
33583       while test $COUNTER -lt 20; do
33584         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33585         if test "x$ISLINK" == x; then
33586           # This is not a symbolic link! We are done!
33587           break
33588         fi
33589         # Again resolve directory symlinks since the target of the just found
33590         # link could be in a different directory
33591         cd `$DIRNAME $ISLINK`
33592         sym_link_dir=`$THEPWDCMD -P`
33593         sym_link_file=`$BASENAME $ISLINK`
33594         let COUNTER=COUNTER+1
33595       done
33596       cd $STARTDIR
33597       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33598     fi
33599   fi
33600 
33601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33602 $as_echo "$PROPER_COMPILER_CXX" >&6; }
33603     CXX="$PROPER_COMPILER_CXX"
33604   else
33605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33606 $as_echo "no, keeping CXX" >&6; }
33607   fi
33608 
33609 
33610   COMPILER=$CXX
33611   COMPILER_NAME=$COMPILER_NAME
33612 
33613   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33614     # cc -V output typically looks like
33615     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33616     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33617     # Check that this is likely to be the Solaris Studio cc.
33618     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33619     if test $? -ne 0; then
33620       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33621       { $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
33622 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33626 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33627       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628     fi
33629     # Remove usage instructions (if present), and
33630     # collapse compiler output into a single line
33631     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632         $SED -e 's/ *[Uu]sage:.*//'`
33633     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33634         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33635   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33636     # xlc -qversion output typically looks like
33637     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33638     #     Version: 11.01.0000.0015
33639     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33640     # Check that this is likely to be the IBM XL C compiler.
33641     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33642     if test $? -ne 0; then
33643       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644       { $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
33645 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33646       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33647 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33648       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33649 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33650       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651     fi
33652     # Collapse compiler output into a single line
33653     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33654     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33656   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33657     # There is no specific version flag, but all output starts with a version string.
33658     # First line typically looks something like:
33659     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33660     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33661     # Check that this is likely to be Microsoft CL.EXE.
33662     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33663     if test $? -ne 0; then
33664       { $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
33665 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33666       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33667 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33668       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33669     fi
33670     # Collapse compiler output into a single line
33671     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33672     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33673         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33674   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33675     # gcc --version output typically looks like
33676     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33677     #     Copyright (C) 2013 Free Software Foundation, Inc.
33678     #     This is free software; see the source for copying conditions.  There is NO
33679     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33680     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33681     # Check that this is likely to be GCC.
33682     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33683     if test $? -ne 0; then
33684       { $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
33685 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33686       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33687 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33688       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689     fi
33690     # Remove Copyright and legalese from version string, and
33691     # collapse into a single line
33692     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693         $SED -e 's/ *Copyright .*//'`
33694     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33695         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33696   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33697     # clang --version output typically looks like
33698     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33699     #    clang version 3.3 (tags/RELEASE_33/final)
33700     # or
33701     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33702     #    Target: x86_64-pc-linux-gnu
33703     #    Thread model: posix
33704     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33705     # Check that this is likely to be clang
33706     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33707     if test $? -ne 0; then
33708       { $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
33709 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33710       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33711 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33712       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33713     fi
33714     # Collapse compiler output into a single line
33715     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33716     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33717         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33718   else
33719       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33720   fi
33721   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33722   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33723   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33724   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33725 
33726   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33727 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33728 
33729 
33730   # Now that we have resolved CXX ourself, let autoconf have its go at it
33731   ac_ext=cpp
33732 ac_cpp='$CXXCPP $CPPFLAGS'
33733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33734 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33736 if test -z "$CXX"; then
33737   if test -n "$CCC"; then
33738     CXX=$CCC
33739   else
33740     if test -n "$ac_tool_prefix"; then
33741   for ac_prog in $CXX
33742   do
33743     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33744 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33746 $as_echo_n "checking for $ac_word... " >&6; }
33747 if ${ac_cv_prog_CXX+:} false; then :
33748   $as_echo_n "(cached) " >&6
33749 else
33750   if test -n "$CXX"; then
33751   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33752 else
33753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33754 for as_dir in $PATH
33755 do
33756   IFS=$as_save_IFS
33757   test -z "$as_dir" && as_dir=.
33758     for ac_exec_ext in '' $ac_executable_extensions; do
33759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33760     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33762     break 2
33763   fi
33764 done
33765   done
33766 IFS=$as_save_IFS
33767 
33768 fi
33769 fi
33770 CXX=$ac_cv_prog_CXX
33771 if test -n "$CXX"; then
33772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33773 $as_echo "$CXX" >&6; }
33774 else
33775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33776 $as_echo "no" >&6; }
33777 fi
33778 
33779 
33780     test -n "$CXX" && break
33781   done
33782 fi
33783 if test -z "$CXX"; then
33784   ac_ct_CXX=$CXX
33785   for ac_prog in $CXX
33786 do
33787   # Extract the first word of "$ac_prog", so it can be a program name with args.
33788 set dummy $ac_prog; ac_word=$2
33789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33790 $as_echo_n "checking for $ac_word... " >&6; }
33791 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33792   $as_echo_n "(cached) " >&6
33793 else
33794   if test -n "$ac_ct_CXX"; then
33795   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33796 else
33797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33798 for as_dir in $PATH
33799 do
33800   IFS=$as_save_IFS
33801   test -z "$as_dir" && as_dir=.
33802     for ac_exec_ext in '' $ac_executable_extensions; do
33803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33804     ac_cv_prog_ac_ct_CXX="$ac_prog"
33805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33806     break 2
33807   fi
33808 done
33809   done
33810 IFS=$as_save_IFS
33811 
33812 fi
33813 fi
33814 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33815 if test -n "$ac_ct_CXX"; then
33816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33817 $as_echo "$ac_ct_CXX" >&6; }
33818 else
33819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33820 $as_echo "no" >&6; }
33821 fi
33822 
33823 
33824   test -n "$ac_ct_CXX" && break
33825 done
33826 
33827   if test "x$ac_ct_CXX" = x; then
33828     CXX="g++"
33829   else
33830     case $cross_compiling:$ac_tool_warned in
33831 yes:)
33832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33833 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33834 ac_tool_warned=yes ;;
33835 esac
33836     CXX=$ac_ct_CXX
33837   fi
33838 fi
33839 
33840   fi
33841 fi
33842 # Provide some information about the compiler.
33843 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33844 set X $ac_compile
33845 ac_compiler=$2
33846 for ac_option in --version -v -V -qversion; do
33847   { { ac_try="$ac_compiler $ac_option >&5"
33848 case "(($ac_try" in
33849   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33850   *) ac_try_echo=$ac_try;;
33851 esac
33852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33853 $as_echo "$ac_try_echo"; } >&5
33854   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33855   ac_status=$?
33856   if test -s conftest.err; then
33857     sed '10a\
33858 ... rest of stderr output deleted ...
33859          10q' conftest.err >conftest.er1
33860     cat conftest.er1 >&5
33861   fi
33862   rm -f conftest.er1 conftest.err
33863   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33864   test $ac_status = 0; }
33865 done
33866 
33867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33868 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33869 if ${ac_cv_cxx_compiler_gnu+:} false; then :
33870   $as_echo_n "(cached) " >&6
33871 else
33872   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33873 /* end confdefs.h.  */
33874 
33875 int
33876 main ()
33877 {
33878 #ifndef __GNUC__
33879        choke me
33880 #endif
33881 
33882   ;
33883   return 0;
33884 }
33885 _ACEOF
33886 if ac_fn_cxx_try_compile "$LINENO"; then :
33887   ac_compiler_gnu=yes
33888 else
33889   ac_compiler_gnu=no
33890 fi
33891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33892 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33893 
33894 fi
33895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33896 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33897 if test $ac_compiler_gnu = yes; then
33898   GXX=yes
33899 else
33900   GXX=
33901 fi
33902 ac_test_CXXFLAGS=${CXXFLAGS+set}
33903 ac_save_CXXFLAGS=$CXXFLAGS
33904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33905 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
33906 if ${ac_cv_prog_cxx_g+:} false; then :
33907   $as_echo_n "(cached) " >&6
33908 else
33909   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33910    ac_cxx_werror_flag=yes
33911    ac_cv_prog_cxx_g=no
33912    CXXFLAGS="-g"
33913    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33914 /* end confdefs.h.  */
33915 
33916 int
33917 main ()
33918 {
33919 
33920   ;
33921   return 0;
33922 }
33923 _ACEOF
33924 if ac_fn_cxx_try_compile "$LINENO"; then :
33925   ac_cv_prog_cxx_g=yes
33926 else
33927   CXXFLAGS=""
33928       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33929 /* end confdefs.h.  */
33930 
33931 int
33932 main ()
33933 {
33934 
33935   ;
33936   return 0;
33937 }
33938 _ACEOF
33939 if ac_fn_cxx_try_compile "$LINENO"; then :
33940 
33941 else
33942   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33943          CXXFLAGS="-g"
33944          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33945 /* end confdefs.h.  */
33946 
33947 int
33948 main ()
33949 {
33950 
33951   ;
33952   return 0;
33953 }
33954 _ACEOF
33955 if ac_fn_cxx_try_compile "$LINENO"; then :
33956   ac_cv_prog_cxx_g=yes
33957 fi
33958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33959 fi
33960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33961 fi
33962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33963    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33964 fi
33965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33966 $as_echo "$ac_cv_prog_cxx_g" >&6; }
33967 if test "$ac_test_CXXFLAGS" = set; then
33968   CXXFLAGS=$ac_save_CXXFLAGS
33969 elif test $ac_cv_prog_cxx_g = yes; then
33970   if test "$GXX" = yes; then
33971     CXXFLAGS="-g -O2"
33972   else
33973     CXXFLAGS="-g"
33974   fi
33975 else
33976   if test "$GXX" = yes; then
33977     CXXFLAGS="-O2"
33978   else
33979     CXXFLAGS=
33980   fi
33981 fi
33982 ac_ext=cpp
33983 ac_cpp='$CXXCPP $CPPFLAGS'
33984 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33985 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33986 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33987 
33988 
33989   #
33990   # Setup the preprocessor (CPP and CXXCPP)
33991   #
33992   ac_ext=c
33993 ac_cpp='$CPP $CPPFLAGS'
33994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33998 $as_echo_n "checking how to run the C preprocessor... " >&6; }
33999 # On Suns, sometimes $CPP names a directory.
34000 if test -n "$CPP" && test -d "$CPP"; then
34001   CPP=
34002 fi
34003 if test -z "$CPP"; then
34004   if ${ac_cv_prog_CPP+:} false; then :
34005   $as_echo_n "(cached) " >&6
34006 else
34007       # Double quotes because CPP needs to be expanded
34008     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34009     do
34010       ac_preproc_ok=false
34011 for ac_c_preproc_warn_flag in '' yes
34012 do
34013   # Use a header file that comes with gcc, so configuring glibc
34014   # with a fresh cross-compiler works.
34015   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34016   # <limits.h> exists even on freestanding compilers.
34017   # On the NeXT, cc -E runs the code through the compiler's parser,
34018   # not just through cpp. "Syntax error" is here to catch this case.
34019   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34020 /* end confdefs.h.  */
34021 #ifdef __STDC__
34022 # include <limits.h>
34023 #else
34024 # include <assert.h>
34025 #endif
34026                      Syntax error
34027 _ACEOF
34028 if ac_fn_c_try_cpp "$LINENO"; then :
34029 
34030 else
34031   # Broken: fails on valid input.
34032 continue
34033 fi
34034 rm -f conftest.err conftest.i conftest.$ac_ext
34035 
34036   # OK, works on sane cases.  Now check whether nonexistent headers
34037   # can be detected and how.
34038   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34039 /* end confdefs.h.  */
34040 #include <ac_nonexistent.h>
34041 _ACEOF
34042 if ac_fn_c_try_cpp "$LINENO"; then :
34043   # Broken: success on invalid input.
34044 continue
34045 else
34046   # Passes both tests.
34047 ac_preproc_ok=:
34048 break
34049 fi
34050 rm -f conftest.err conftest.i conftest.$ac_ext
34051 
34052 done
34053 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34054 rm -f conftest.i conftest.err conftest.$ac_ext
34055 if $ac_preproc_ok; then :
34056   break
34057 fi
34058 
34059     done
34060     ac_cv_prog_CPP=$CPP
34061 
34062 fi
34063   CPP=$ac_cv_prog_CPP
34064 else
34065   ac_cv_prog_CPP=$CPP
34066 fi
34067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34068 $as_echo "$CPP" >&6; }
34069 ac_preproc_ok=false
34070 for ac_c_preproc_warn_flag in '' yes
34071 do
34072   # Use a header file that comes with gcc, so configuring glibc
34073   # with a fresh cross-compiler works.
34074   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34075   # <limits.h> exists even on freestanding compilers.
34076   # On the NeXT, cc -E runs the code through the compiler's parser,
34077   # not just through cpp. "Syntax error" is here to catch this case.
34078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34079 /* end confdefs.h.  */
34080 #ifdef __STDC__
34081 # include <limits.h>
34082 #else
34083 # include <assert.h>
34084 #endif
34085                      Syntax error
34086 _ACEOF
34087 if ac_fn_c_try_cpp "$LINENO"; then :
34088 
34089 else
34090   # Broken: fails on valid input.
34091 continue
34092 fi
34093 rm -f conftest.err conftest.i conftest.$ac_ext
34094 
34095   # OK, works on sane cases.  Now check whether nonexistent headers
34096   # can be detected and how.
34097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34098 /* end confdefs.h.  */
34099 #include <ac_nonexistent.h>
34100 _ACEOF
34101 if ac_fn_c_try_cpp "$LINENO"; then :
34102   # Broken: success on invalid input.
34103 continue
34104 else
34105   # Passes both tests.
34106 ac_preproc_ok=:
34107 break
34108 fi
34109 rm -f conftest.err conftest.i conftest.$ac_ext
34110 
34111 done
34112 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34113 rm -f conftest.i conftest.err conftest.$ac_ext
34114 if $ac_preproc_ok; then :
34115 
34116 else
34117   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34118 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34119 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34120 See \`config.log' for more details" "$LINENO" 5; }
34121 fi
34122 
34123 ac_ext=cpp
34124 ac_cpp='$CXXCPP $CPPFLAGS'
34125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34128 
34129 
34130   # Only process if variable expands to non-empty
34131 
34132   if test "x$CPP" != x; then
34133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34134 
34135   # First separate the path from the arguments. This will split at the first
34136   # space.
34137   complete="$CPP"
34138   path="${complete%% *}"
34139   tmp="$complete EOL"
34140   arguments="${tmp#* }"
34141 
34142   # Input might be given as Windows format, start by converting to
34143   # unix format.
34144   new_path=`$CYGPATH -u "$path"`
34145 
34146   # Now try to locate executable using which
34147   new_path=`$WHICH "$new_path" 2> /dev/null`
34148   # bat and cmd files are not always considered executable in cygwin causing which
34149   # to not find them
34150   if test "x$new_path" = x \
34151       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34152       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34153     new_path=`$CYGPATH -u "$path"`
34154   fi
34155   if test "x$new_path" = x; then
34156     # Oops. Which didn't find the executable.
34157     # The splitting of arguments from the executable at a space might have been incorrect,
34158     # since paths with space are more likely in Windows. Give it another try with the whole
34159     # argument.
34160     path="$complete"
34161     arguments="EOL"
34162     new_path=`$CYGPATH -u "$path"`
34163     new_path=`$WHICH "$new_path" 2> /dev/null`
34164     # bat and cmd files are not always considered executable in cygwin causing which
34165     # to not find them
34166     if test "x$new_path" = x \
34167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34169       new_path=`$CYGPATH -u "$path"`
34170     fi
34171     if test "x$new_path" = x; then
34172       # It's still not found. Now this is an unrecoverable error.
34173       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34174 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34175       has_space=`$ECHO "$complete" | $GREP " "`
34176       if test "x$has_space" != x; then
34177         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34178 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34179       fi
34180       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34181     fi
34182   fi
34183 
34184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34187   # "foo.exe" is OK but "foo" is an error.
34188   #
34189   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34190   # It is also a way to make sure we got the proper file name for the real test later on.
34191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34192   if test "x$test_shortpath" = x; then
34193     # Short path failed, file does not exist as specified.
34194     # Try adding .exe or .cmd
34195     if test -f "${new_path}.exe"; then
34196       input_to_shortpath="${new_path}.exe"
34197     elif test -f "${new_path}.cmd"; then
34198       input_to_shortpath="${new_path}.cmd"
34199     else
34200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34201 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34202       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34203 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34204       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34205     fi
34206   else
34207     input_to_shortpath="$new_path"
34208   fi
34209 
34210   # Call helper function which possibly converts this using DOS-style short mode.
34211   # If so, the updated path is stored in $new_path.
34212   new_path="$input_to_shortpath"
34213 
34214   input_path="$input_to_shortpath"
34215   # Check if we need to convert this using DOS-style short mode. If the path
34216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34217   # take no chances and rewrite it.
34218   # Note: m4 eats our [], so we need to use [ and ] instead.
34219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34220   if test "x$has_forbidden_chars" != x; then
34221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34222     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34223     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34224     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34225       # Going to short mode and back again did indeed matter. Since short mode is
34226       # case insensitive, let's make it lowercase to improve readability.
34227       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34228       # Now convert it back to Unix-style (cygpath)
34229       input_path=`$CYGPATH -u "$shortmode_path"`
34230       new_path="$input_path"
34231     fi
34232   fi
34233 
34234   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34235   if test "x$test_cygdrive_prefix" = x; then
34236     # As a simple fix, exclude /usr/bin since it's not a real path.
34237     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34238       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34239       # a path prefixed by /cygdrive for fixpath to work.
34240       new_path="$CYGWIN_ROOT_PATH$input_path"
34241     fi
34242   fi
34243 
34244   # remove trailing .exe if any
34245   new_path="${new_path/%.exe/}"
34246 
34247     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34248 
34249   # First separate the path from the arguments. This will split at the first
34250   # space.
34251   complete="$CPP"
34252   path="${complete%% *}"
34253   tmp="$complete EOL"
34254   arguments="${tmp#* }"
34255 
34256   # Input might be given as Windows format, start by converting to
34257   # unix format.
34258   new_path="$path"
34259 
34260   windows_path="$new_path"
34261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34262     unix_path=`$CYGPATH -u "$windows_path"`
34263     new_path="$unix_path"
34264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34266     new_path="$unix_path"
34267   fi
34268 
34269 
34270   # Now try to locate executable using which
34271   new_path=`$WHICH "$new_path" 2> /dev/null`
34272 
34273   if test "x$new_path" = x; then
34274     # Oops. Which didn't find the executable.
34275     # The splitting of arguments from the executable at a space might have been incorrect,
34276     # since paths with space are more likely in Windows. Give it another try with the whole
34277     # argument.
34278     path="$complete"
34279     arguments="EOL"
34280     new_path="$path"
34281 
34282   windows_path="$new_path"
34283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34284     unix_path=`$CYGPATH -u "$windows_path"`
34285     new_path="$unix_path"
34286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34288     new_path="$unix_path"
34289   fi
34290 
34291 
34292     new_path=`$WHICH "$new_path" 2> /dev/null`
34293     # bat and cmd files are not always considered executable in MSYS causing which
34294     # to not find them
34295     if test "x$new_path" = x \
34296         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34297         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34298       new_path="$path"
34299 
34300   windows_path="$new_path"
34301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34302     unix_path=`$CYGPATH -u "$windows_path"`
34303     new_path="$unix_path"
34304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34306     new_path="$unix_path"
34307   fi
34308 
34309     fi
34310 
34311     if test "x$new_path" = x; then
34312       # It's still not found. Now this is an unrecoverable error.
34313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34314 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34315       has_space=`$ECHO "$complete" | $GREP " "`
34316       if test "x$has_space" != x; then
34317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34319       fi
34320       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34321     fi
34322   fi
34323 
34324   # Now new_path has a complete unix path to the binary
34325   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34326     # Keep paths in /bin as-is, but remove trailing .exe if any
34327     new_path="${new_path/%.exe/}"
34328     # Do not save /bin paths to all_fixpath_prefixes!
34329   else
34330     # Not in mixed or Windows style, start by that.
34331     new_path=`cmd //c echo $new_path`
34332 
34333   input_path="$new_path"
34334   # Check if we need to convert this using DOS-style short mode. If the path
34335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34336   # take no chances and rewrite it.
34337   # Note: m4 eats our [], so we need to use [ and ] instead.
34338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34339   if test "x$has_forbidden_chars" != x; then
34340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34342   fi
34343 
34344     # Output is in $new_path
34345 
34346   windows_path="$new_path"
34347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34348     unix_path=`$CYGPATH -u "$windows_path"`
34349     new_path="$unix_path"
34350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34352     new_path="$unix_path"
34353   fi
34354 
34355     # remove trailing .exe if any
34356     new_path="${new_path/%.exe/}"
34357 
34358     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34359     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34360   fi
34361 
34362     else
34363       # We're on a unix platform. Hooray! :)
34364       # First separate the path from the arguments. This will split at the first
34365       # space.
34366       complete="$CPP"
34367       path="${complete%% *}"
34368       tmp="$complete EOL"
34369       arguments="${tmp#* }"
34370 
34371       # Cannot rely on the command "which" here since it doesn't always work.
34372       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34373       if test -z "$is_absolute_path"; then
34374         # Path to executable is not absolute. Find it.
34375         IFS_save="$IFS"
34376         IFS=:
34377         for p in $PATH; do
34378           if test -f "$p/$path" && test -x "$p/$path"; then
34379             new_path="$p/$path"
34380             break
34381           fi
34382         done
34383         IFS="$IFS_save"
34384       else
34385         # This is an absolute path, we can use it without further modifications.
34386         new_path="$path"
34387       fi
34388 
34389       if test "x$new_path" = x; then
34390         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34391 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34392         has_space=`$ECHO "$complete" | $GREP " "`
34393         if test "x$has_space" != x; then
34394           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34395 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34396         fi
34397         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34398       fi
34399     fi
34400 
34401     # Now join together the path and the arguments once again
34402     if test "x$arguments" != xEOL; then
34403       new_complete="$new_path ${arguments% *}"
34404     else
34405       new_complete="$new_path"
34406     fi
34407 
34408     if test "x$complete" != "x$new_complete"; then
34409       CPP="$new_complete"
34410       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34411 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34412     fi
34413   fi
34414 
34415   ac_ext=cpp
34416 ac_cpp='$CXXCPP $CPPFLAGS'
34417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34421 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34422 if test -z "$CXXCPP"; then
34423   if ${ac_cv_prog_CXXCPP+:} false; then :
34424   $as_echo_n "(cached) " >&6
34425 else
34426       # Double quotes because CXXCPP needs to be expanded
34427     for CXXCPP in "$CXX -E" "/lib/cpp"
34428     do
34429       ac_preproc_ok=false
34430 for ac_cxx_preproc_warn_flag in '' yes
34431 do
34432   # Use a header file that comes with gcc, so configuring glibc
34433   # with a fresh cross-compiler works.
34434   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34435   # <limits.h> exists even on freestanding compilers.
34436   # On the NeXT, cc -E runs the code through the compiler's parser,
34437   # not just through cpp. "Syntax error" is here to catch this case.
34438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34439 /* end confdefs.h.  */
34440 #ifdef __STDC__
34441 # include <limits.h>
34442 #else
34443 # include <assert.h>
34444 #endif
34445                      Syntax error
34446 _ACEOF
34447 if ac_fn_cxx_try_cpp "$LINENO"; then :
34448 
34449 else
34450   # Broken: fails on valid input.
34451 continue
34452 fi
34453 rm -f conftest.err conftest.i conftest.$ac_ext
34454 
34455   # OK, works on sane cases.  Now check whether nonexistent headers
34456   # can be detected and how.
34457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34458 /* end confdefs.h.  */
34459 #include <ac_nonexistent.h>
34460 _ACEOF
34461 if ac_fn_cxx_try_cpp "$LINENO"; then :
34462   # Broken: success on invalid input.
34463 continue
34464 else
34465   # Passes both tests.
34466 ac_preproc_ok=:
34467 break
34468 fi
34469 rm -f conftest.err conftest.i conftest.$ac_ext
34470 
34471 done
34472 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34473 rm -f conftest.i conftest.err conftest.$ac_ext
34474 if $ac_preproc_ok; then :
34475   break
34476 fi
34477 
34478     done
34479     ac_cv_prog_CXXCPP=$CXXCPP
34480 
34481 fi
34482   CXXCPP=$ac_cv_prog_CXXCPP
34483 else
34484   ac_cv_prog_CXXCPP=$CXXCPP
34485 fi
34486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34487 $as_echo "$CXXCPP" >&6; }
34488 ac_preproc_ok=false
34489 for ac_cxx_preproc_warn_flag in '' yes
34490 do
34491   # Use a header file that comes with gcc, so configuring glibc
34492   # with a fresh cross-compiler works.
34493   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34494   # <limits.h> exists even on freestanding compilers.
34495   # On the NeXT, cc -E runs the code through the compiler's parser,
34496   # not just through cpp. "Syntax error" is here to catch this case.
34497   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34498 /* end confdefs.h.  */
34499 #ifdef __STDC__
34500 # include <limits.h>
34501 #else
34502 # include <assert.h>
34503 #endif
34504                      Syntax error
34505 _ACEOF
34506 if ac_fn_cxx_try_cpp "$LINENO"; then :
34507 
34508 else
34509   # Broken: fails on valid input.
34510 continue
34511 fi
34512 rm -f conftest.err conftest.i conftest.$ac_ext
34513 
34514   # OK, works on sane cases.  Now check whether nonexistent headers
34515   # can be detected and how.
34516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34517 /* end confdefs.h.  */
34518 #include <ac_nonexistent.h>
34519 _ACEOF
34520 if ac_fn_cxx_try_cpp "$LINENO"; then :
34521   # Broken: success on invalid input.
34522 continue
34523 else
34524   # Passes both tests.
34525 ac_preproc_ok=:
34526 break
34527 fi
34528 rm -f conftest.err conftest.i conftest.$ac_ext
34529 
34530 done
34531 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34532 rm -f conftest.i conftest.err conftest.$ac_ext
34533 if $ac_preproc_ok; then :
34534 
34535 else
34536   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34538 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34539 See \`config.log' for more details" "$LINENO" 5; }
34540 fi
34541 
34542 ac_ext=cpp
34543 ac_cpp='$CXXCPP $CPPFLAGS'
34544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34547 
34548 
34549   # Only process if variable expands to non-empty
34550 
34551   if test "x$CXXCPP" != x; then
34552     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34553 
34554   # First separate the path from the arguments. This will split at the first
34555   # space.
34556   complete="$CXXCPP"
34557   path="${complete%% *}"
34558   tmp="$complete EOL"
34559   arguments="${tmp#* }"
34560 
34561   # Input might be given as Windows format, start by converting to
34562   # unix format.
34563   new_path=`$CYGPATH -u "$path"`
34564 
34565   # Now try to locate executable using which
34566   new_path=`$WHICH "$new_path" 2> /dev/null`
34567   # bat and cmd files are not always considered executable in cygwin causing which
34568   # to not find them
34569   if test "x$new_path" = x \
34570       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34571       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34572     new_path=`$CYGPATH -u "$path"`
34573   fi
34574   if test "x$new_path" = x; then
34575     # Oops. Which didn't find the executable.
34576     # The splitting of arguments from the executable at a space might have been incorrect,
34577     # since paths with space are more likely in Windows. Give it another try with the whole
34578     # argument.
34579     path="$complete"
34580     arguments="EOL"
34581     new_path=`$CYGPATH -u "$path"`
34582     new_path=`$WHICH "$new_path" 2> /dev/null`
34583     # bat and cmd files are not always considered executable in cygwin causing which
34584     # to not find them
34585     if test "x$new_path" = x \
34586         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34587         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34588       new_path=`$CYGPATH -u "$path"`
34589     fi
34590     if test "x$new_path" = x; then
34591       # It's still not found. Now this is an unrecoverable error.
34592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34593 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34594       has_space=`$ECHO "$complete" | $GREP " "`
34595       if test "x$has_space" != x; then
34596         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34597 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34598       fi
34599       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34600     fi
34601   fi
34602 
34603   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34604   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34605   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34606   # "foo.exe" is OK but "foo" is an error.
34607   #
34608   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34609   # It is also a way to make sure we got the proper file name for the real test later on.
34610   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34611   if test "x$test_shortpath" = x; then
34612     # Short path failed, file does not exist as specified.
34613     # Try adding .exe or .cmd
34614     if test -f "${new_path}.exe"; then
34615       input_to_shortpath="${new_path}.exe"
34616     elif test -f "${new_path}.cmd"; then
34617       input_to_shortpath="${new_path}.cmd"
34618     else
34619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34620 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34621       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34622 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34623       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34624     fi
34625   else
34626     input_to_shortpath="$new_path"
34627   fi
34628 
34629   # Call helper function which possibly converts this using DOS-style short mode.
34630   # If so, the updated path is stored in $new_path.
34631   new_path="$input_to_shortpath"
34632 
34633   input_path="$input_to_shortpath"
34634   # Check if we need to convert this using DOS-style short mode. If the path
34635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34636   # take no chances and rewrite it.
34637   # Note: m4 eats our [], so we need to use [ and ] instead.
34638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34639   if test "x$has_forbidden_chars" != x; then
34640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34641     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34642     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34643     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34644       # Going to short mode and back again did indeed matter. Since short mode is
34645       # case insensitive, let's make it lowercase to improve readability.
34646       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34647       # Now convert it back to Unix-style (cygpath)
34648       input_path=`$CYGPATH -u "$shortmode_path"`
34649       new_path="$input_path"
34650     fi
34651   fi
34652 
34653   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34654   if test "x$test_cygdrive_prefix" = x; then
34655     # As a simple fix, exclude /usr/bin since it's not a real path.
34656     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34657       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34658       # a path prefixed by /cygdrive for fixpath to work.
34659       new_path="$CYGWIN_ROOT_PATH$input_path"
34660     fi
34661   fi
34662 
34663   # remove trailing .exe if any
34664   new_path="${new_path/%.exe/}"
34665 
34666     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34667 
34668   # First separate the path from the arguments. This will split at the first
34669   # space.
34670   complete="$CXXCPP"
34671   path="${complete%% *}"
34672   tmp="$complete EOL"
34673   arguments="${tmp#* }"
34674 
34675   # Input might be given as Windows format, start by converting to
34676   # unix format.
34677   new_path="$path"
34678 
34679   windows_path="$new_path"
34680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34681     unix_path=`$CYGPATH -u "$windows_path"`
34682     new_path="$unix_path"
34683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34685     new_path="$unix_path"
34686   fi
34687 
34688 
34689   # Now try to locate executable using which
34690   new_path=`$WHICH "$new_path" 2> /dev/null`
34691 
34692   if test "x$new_path" = x; then
34693     # Oops. Which didn't find the executable.
34694     # The splitting of arguments from the executable at a space might have been incorrect,
34695     # since paths with space are more likely in Windows. Give it another try with the whole
34696     # argument.
34697     path="$complete"
34698     arguments="EOL"
34699     new_path="$path"
34700 
34701   windows_path="$new_path"
34702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34703     unix_path=`$CYGPATH -u "$windows_path"`
34704     new_path="$unix_path"
34705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34707     new_path="$unix_path"
34708   fi
34709 
34710 
34711     new_path=`$WHICH "$new_path" 2> /dev/null`
34712     # bat and cmd files are not always considered executable in MSYS causing which
34713     # to not find them
34714     if test "x$new_path" = x \
34715         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34716         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34717       new_path="$path"
34718 
34719   windows_path="$new_path"
34720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34721     unix_path=`$CYGPATH -u "$windows_path"`
34722     new_path="$unix_path"
34723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34725     new_path="$unix_path"
34726   fi
34727 
34728     fi
34729 
34730     if test "x$new_path" = x; then
34731       # It's still not found. Now this is an unrecoverable error.
34732       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34733 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34734       has_space=`$ECHO "$complete" | $GREP " "`
34735       if test "x$has_space" != x; then
34736         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34737 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34738       fi
34739       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34740     fi
34741   fi
34742 
34743   # Now new_path has a complete unix path to the binary
34744   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34745     # Keep paths in /bin as-is, but remove trailing .exe if any
34746     new_path="${new_path/%.exe/}"
34747     # Do not save /bin paths to all_fixpath_prefixes!
34748   else
34749     # Not in mixed or Windows style, start by that.
34750     new_path=`cmd //c echo $new_path`
34751 
34752   input_path="$new_path"
34753   # Check if we need to convert this using DOS-style short mode. If the path
34754   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34755   # take no chances and rewrite it.
34756   # Note: m4 eats our [], so we need to use [ and ] instead.
34757   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34758   if test "x$has_forbidden_chars" != x; then
34759     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34760     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34761   fi
34762 
34763     # Output is in $new_path
34764 
34765   windows_path="$new_path"
34766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34767     unix_path=`$CYGPATH -u "$windows_path"`
34768     new_path="$unix_path"
34769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34771     new_path="$unix_path"
34772   fi
34773 
34774     # remove trailing .exe if any
34775     new_path="${new_path/%.exe/}"
34776 
34777     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34778     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34779   fi
34780 
34781     else
34782       # We're on a unix platform. Hooray! :)
34783       # First separate the path from the arguments. This will split at the first
34784       # space.
34785       complete="$CXXCPP"
34786       path="${complete%% *}"
34787       tmp="$complete EOL"
34788       arguments="${tmp#* }"
34789 
34790       # Cannot rely on the command "which" here since it doesn't always work.
34791       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34792       if test -z "$is_absolute_path"; then
34793         # Path to executable is not absolute. Find it.
34794         IFS_save="$IFS"
34795         IFS=:
34796         for p in $PATH; do
34797           if test -f "$p/$path" && test -x "$p/$path"; then
34798             new_path="$p/$path"
34799             break
34800           fi
34801         done
34802         IFS="$IFS_save"
34803       else
34804         # This is an absolute path, we can use it without further modifications.
34805         new_path="$path"
34806       fi
34807 
34808       if test "x$new_path" = x; then
34809         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34810 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34811         has_space=`$ECHO "$complete" | $GREP " "`
34812         if test "x$has_space" != x; then
34813           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34814 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34815         fi
34816         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34817       fi
34818     fi
34819 
34820     # Now join together the path and the arguments once again
34821     if test "x$arguments" != xEOL; then
34822       new_complete="$new_path ${arguments% *}"
34823     else
34824       new_complete="$new_path"
34825     fi
34826 
34827     if test "x$complete" != "x$new_complete"; then
34828       CXXCPP="$new_complete"
34829       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34830 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34831     fi
34832   fi
34833 
34834 
34835   #
34836   # Setup the linker (LD)
34837   #
34838   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34839     # In the Microsoft toolchain we have a separate LD command "link".
34840     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34841     # a cygwin program for something completely different.
34842     # Extract the first word of "link", so it can be a program name with args.
34843 set dummy link; ac_word=$2
34844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34845 $as_echo_n "checking for $ac_word... " >&6; }
34846 if ${ac_cv_prog_LD+:} false; then :
34847   $as_echo_n "(cached) " >&6
34848 else
34849   if test -n "$LD"; then
34850   ac_cv_prog_LD="$LD" # Let the user override the test.
34851 else
34852   ac_prog_rejected=no
34853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34854 for as_dir in $PATH
34855 do
34856   IFS=$as_save_IFS
34857   test -z "$as_dir" && as_dir=.
34858     for ac_exec_ext in '' $ac_executable_extensions; do
34859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34860     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34861        ac_prog_rejected=yes
34862        continue
34863      fi
34864     ac_cv_prog_LD="link"
34865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34866     break 2
34867   fi
34868 done
34869   done
34870 IFS=$as_save_IFS
34871 
34872 if test $ac_prog_rejected = yes; then
34873   # We found a bogon in the path, so make sure we never use it.
34874   set dummy $ac_cv_prog_LD
34875   shift
34876   if test $# != 0; then
34877     # We chose a different compiler from the bogus one.
34878     # However, it has the same basename, so the bogon will be chosen
34879     # first if we set LD to just the basename; use the full file name.
34880     shift
34881     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34882   fi
34883 fi
34884 fi
34885 fi
34886 LD=$ac_cv_prog_LD
34887 if test -n "$LD"; then
34888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34889 $as_echo "$LD" >&6; }
34890 else
34891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34892 $as_echo "no" >&6; }
34893 fi
34894 
34895 
34896 
34897   # Only process if variable expands to non-empty
34898 
34899   if test "x$LD" != x; then
34900     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34901 
34902   # First separate the path from the arguments. This will split at the first
34903   # space.
34904   complete="$LD"
34905   path="${complete%% *}"
34906   tmp="$complete EOL"
34907   arguments="${tmp#* }"
34908 
34909   # Input might be given as Windows format, start by converting to
34910   # unix format.
34911   new_path=`$CYGPATH -u "$path"`
34912 
34913   # Now try to locate executable using which
34914   new_path=`$WHICH "$new_path" 2> /dev/null`
34915   # bat and cmd files are not always considered executable in cygwin causing which
34916   # to not find them
34917   if test "x$new_path" = x \
34918       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34919       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34920     new_path=`$CYGPATH -u "$path"`
34921   fi
34922   if test "x$new_path" = x; then
34923     # Oops. Which didn't find the executable.
34924     # The splitting of arguments from the executable at a space might have been incorrect,
34925     # since paths with space are more likely in Windows. Give it another try with the whole
34926     # argument.
34927     path="$complete"
34928     arguments="EOL"
34929     new_path=`$CYGPATH -u "$path"`
34930     new_path=`$WHICH "$new_path" 2> /dev/null`
34931     # bat and cmd files are not always considered executable in cygwin causing which
34932     # to not find them
34933     if test "x$new_path" = x \
34934         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34935         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34936       new_path=`$CYGPATH -u "$path"`
34937     fi
34938     if test "x$new_path" = x; then
34939       # It's still not found. Now this is an unrecoverable error.
34940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34941 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34942       has_space=`$ECHO "$complete" | $GREP " "`
34943       if test "x$has_space" != x; then
34944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34946       fi
34947       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34948     fi
34949   fi
34950 
34951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34954   # "foo.exe" is OK but "foo" is an error.
34955   #
34956   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34957   # It is also a way to make sure we got the proper file name for the real test later on.
34958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34959   if test "x$test_shortpath" = x; then
34960     # Short path failed, file does not exist as specified.
34961     # Try adding .exe or .cmd
34962     if test -f "${new_path}.exe"; then
34963       input_to_shortpath="${new_path}.exe"
34964     elif test -f "${new_path}.cmd"; then
34965       input_to_shortpath="${new_path}.cmd"
34966     else
34967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34968 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34969       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34970 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34971       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34972     fi
34973   else
34974     input_to_shortpath="$new_path"
34975   fi
34976 
34977   # Call helper function which possibly converts this using DOS-style short mode.
34978   # If so, the updated path is stored in $new_path.
34979   new_path="$input_to_shortpath"
34980 
34981   input_path="$input_to_shortpath"
34982   # Check if we need to convert this using DOS-style short mode. If the path
34983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34984   # take no chances and rewrite it.
34985   # Note: m4 eats our [], so we need to use [ and ] instead.
34986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34987   if test "x$has_forbidden_chars" != x; then
34988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34989     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34990     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34991     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34992       # Going to short mode and back again did indeed matter. Since short mode is
34993       # case insensitive, let's make it lowercase to improve readability.
34994       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34995       # Now convert it back to Unix-style (cygpath)
34996       input_path=`$CYGPATH -u "$shortmode_path"`
34997       new_path="$input_path"
34998     fi
34999   fi
35000 
35001   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35002   if test "x$test_cygdrive_prefix" = x; then
35003     # As a simple fix, exclude /usr/bin since it's not a real path.
35004     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35005       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35006       # a path prefixed by /cygdrive for fixpath to work.
35007       new_path="$CYGWIN_ROOT_PATH$input_path"
35008     fi
35009   fi
35010 
35011   # remove trailing .exe if any
35012   new_path="${new_path/%.exe/}"
35013 
35014     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35015 
35016   # First separate the path from the arguments. This will split at the first
35017   # space.
35018   complete="$LD"
35019   path="${complete%% *}"
35020   tmp="$complete EOL"
35021   arguments="${tmp#* }"
35022 
35023   # Input might be given as Windows format, start by converting to
35024   # unix format.
35025   new_path="$path"
35026 
35027   windows_path="$new_path"
35028   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35029     unix_path=`$CYGPATH -u "$windows_path"`
35030     new_path="$unix_path"
35031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35032     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35033     new_path="$unix_path"
35034   fi
35035 
35036 
35037   # Now try to locate executable using which
35038   new_path=`$WHICH "$new_path" 2> /dev/null`
35039 
35040   if test "x$new_path" = x; then
35041     # Oops. Which didn't find the executable.
35042     # The splitting of arguments from the executable at a space might have been incorrect,
35043     # since paths with space are more likely in Windows. Give it another try with the whole
35044     # argument.
35045     path="$complete"
35046     arguments="EOL"
35047     new_path="$path"
35048 
35049   windows_path="$new_path"
35050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35051     unix_path=`$CYGPATH -u "$windows_path"`
35052     new_path="$unix_path"
35053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35055     new_path="$unix_path"
35056   fi
35057 
35058 
35059     new_path=`$WHICH "$new_path" 2> /dev/null`
35060     # bat and cmd files are not always considered executable in MSYS causing which
35061     # to not find them
35062     if test "x$new_path" = x \
35063         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35064         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35065       new_path="$path"
35066 
35067   windows_path="$new_path"
35068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35069     unix_path=`$CYGPATH -u "$windows_path"`
35070     new_path="$unix_path"
35071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35073     new_path="$unix_path"
35074   fi
35075 
35076     fi
35077 
35078     if test "x$new_path" = x; then
35079       # It's still not found. Now this is an unrecoverable error.
35080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35081 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35082       has_space=`$ECHO "$complete" | $GREP " "`
35083       if test "x$has_space" != x; then
35084         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35085 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35086       fi
35087       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35088     fi
35089   fi
35090 
35091   # Now new_path has a complete unix path to the binary
35092   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35093     # Keep paths in /bin as-is, but remove trailing .exe if any
35094     new_path="${new_path/%.exe/}"
35095     # Do not save /bin paths to all_fixpath_prefixes!
35096   else
35097     # Not in mixed or Windows style, start by that.
35098     new_path=`cmd //c echo $new_path`
35099 
35100   input_path="$new_path"
35101   # Check if we need to convert this using DOS-style short mode. If the path
35102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35103   # take no chances and rewrite it.
35104   # Note: m4 eats our [], so we need to use [ and ] instead.
35105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35106   if test "x$has_forbidden_chars" != x; then
35107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35108     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35109   fi
35110 
35111     # Output is in $new_path
35112 
35113   windows_path="$new_path"
35114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35115     unix_path=`$CYGPATH -u "$windows_path"`
35116     new_path="$unix_path"
35117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35119     new_path="$unix_path"
35120   fi
35121 
35122     # remove trailing .exe if any
35123     new_path="${new_path/%.exe/}"
35124 
35125     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35126     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35127   fi
35128 
35129     else
35130       # We're on a unix platform. Hooray! :)
35131       # First separate the path from the arguments. This will split at the first
35132       # space.
35133       complete="$LD"
35134       path="${complete%% *}"
35135       tmp="$complete EOL"
35136       arguments="${tmp#* }"
35137 
35138       # Cannot rely on the command "which" here since it doesn't always work.
35139       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35140       if test -z "$is_absolute_path"; then
35141         # Path to executable is not absolute. Find it.
35142         IFS_save="$IFS"
35143         IFS=:
35144         for p in $PATH; do
35145           if test -f "$p/$path" && test -x "$p/$path"; then
35146             new_path="$p/$path"
35147             break
35148           fi
35149         done
35150         IFS="$IFS_save"
35151       else
35152         # This is an absolute path, we can use it without further modifications.
35153         new_path="$path"
35154       fi
35155 
35156       if test "x$new_path" = x; then
35157         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35158 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35159         has_space=`$ECHO "$complete" | $GREP " "`
35160         if test "x$has_space" != x; then
35161           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35162 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35163         fi
35164         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35165       fi
35166     fi
35167 
35168     # Now join together the path and the arguments once again
35169     if test "x$arguments" != xEOL; then
35170       new_complete="$new_path ${arguments% *}"
35171     else
35172       new_complete="$new_path"
35173     fi
35174 
35175     if test "x$complete" != "x$new_complete"; then
35176       LD="$new_complete"
35177       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35178 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35179     fi
35180   fi
35181 
35182     # Verify that we indeed succeeded with this trick.
35183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35184 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35185     "$LD" --version > /dev/null
35186     if test $? -eq 0 ; then
35187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35188 $as_echo "no" >&6; }
35189       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35190     else
35191       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35192 $as_echo "yes" >&6; }
35193     fi
35194     LDCXX="$LD"
35195   else
35196     # All other toolchains use the compiler to link.
35197     LD="$CC"
35198     LDCXX="$CXX"
35199   fi
35200 
35201   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35202 
35203 
35204   #
35205   # Setup the assembler (AS)
35206   #
35207   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35208     # FIXME: should this really be solaris, or solstudio?
35209 
35210 
35211   # Publish this variable in the help.
35212 
35213 
35214   if [ -z "${AS+x}" ]; then
35215     # The variable is not set by user, try to locate tool using the code snippet
35216     for ac_prog in as
35217 do
35218   # Extract the first word of "$ac_prog", so it can be a program name with args.
35219 set dummy $ac_prog; ac_word=$2
35220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35221 $as_echo_n "checking for $ac_word... " >&6; }
35222 if ${ac_cv_path_AS+:} false; then :
35223   $as_echo_n "(cached) " >&6
35224 else
35225   case $AS in
35226   [\\/]* | ?:[\\/]*)
35227   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35228   ;;
35229   *)
35230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35231 for as_dir in $PATH
35232 do
35233   IFS=$as_save_IFS
35234   test -z "$as_dir" && as_dir=.
35235     for ac_exec_ext in '' $ac_executable_extensions; do
35236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35237     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35239     break 2
35240   fi
35241 done
35242   done
35243 IFS=$as_save_IFS
35244 
35245   ;;
35246 esac
35247 fi
35248 AS=$ac_cv_path_AS
35249 if test -n "$AS"; then
35250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35251 $as_echo "$AS" >&6; }
35252 else
35253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35254 $as_echo "no" >&6; }
35255 fi
35256 
35257 
35258   test -n "$AS" && break
35259 done
35260 
35261   else
35262     # The variable is set, but is it from the command line or the environment?
35263 
35264     # Try to remove the string !AS! from our list.
35265     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35266     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35267       # If it failed, the variable was not from the command line. Ignore it,
35268       # but warn the user (except for BASH, which is always set by the calling BASH).
35269       if test "xAS" != xBASH; then
35270         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35271 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35272       fi
35273       # Try to locate tool using the code snippet
35274       for ac_prog in as
35275 do
35276   # Extract the first word of "$ac_prog", so it can be a program name with args.
35277 set dummy $ac_prog; ac_word=$2
35278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35279 $as_echo_n "checking for $ac_word... " >&6; }
35280 if ${ac_cv_path_AS+:} false; then :
35281   $as_echo_n "(cached) " >&6
35282 else
35283   case $AS in
35284   [\\/]* | ?:[\\/]*)
35285   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35286   ;;
35287   *)
35288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35289 for as_dir in $PATH
35290 do
35291   IFS=$as_save_IFS
35292   test -z "$as_dir" && as_dir=.
35293     for ac_exec_ext in '' $ac_executable_extensions; do
35294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35295     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35297     break 2
35298   fi
35299 done
35300   done
35301 IFS=$as_save_IFS
35302 
35303   ;;
35304 esac
35305 fi
35306 AS=$ac_cv_path_AS
35307 if test -n "$AS"; then
35308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35309 $as_echo "$AS" >&6; }
35310 else
35311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35312 $as_echo "no" >&6; }
35313 fi
35314 
35315 
35316   test -n "$AS" && break
35317 done
35318 
35319     else
35320       # If it succeeded, then it was overridden by the user. We will use it
35321       # for the tool.
35322 
35323       # First remove it from the list of overridden variables, so we can test
35324       # for unknown variables in the end.
35325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35326 
35327       # Check if we try to supply an empty value
35328       if test "x$AS" = x; then
35329         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35330 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35332 $as_echo_n "checking for AS... " >&6; }
35333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35334 $as_echo "disabled" >&6; }
35335       else
35336         # Check if the provided tool contains a complete path.
35337         tool_specified="$AS"
35338         tool_basename="${tool_specified##*/}"
35339         if test "x$tool_basename" = "x$tool_specified"; then
35340           # A command without a complete path is provided, search $PATH.
35341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35342 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35343           # Extract the first word of "$tool_basename", so it can be a program name with args.
35344 set dummy $tool_basename; ac_word=$2
35345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35346 $as_echo_n "checking for $ac_word... " >&6; }
35347 if ${ac_cv_path_AS+:} false; then :
35348   $as_echo_n "(cached) " >&6
35349 else
35350   case $AS in
35351   [\\/]* | ?:[\\/]*)
35352   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35353   ;;
35354   *)
35355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35356 for as_dir in $PATH
35357 do
35358   IFS=$as_save_IFS
35359   test -z "$as_dir" && as_dir=.
35360     for ac_exec_ext in '' $ac_executable_extensions; do
35361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35362     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35364     break 2
35365   fi
35366 done
35367   done
35368 IFS=$as_save_IFS
35369 
35370   ;;
35371 esac
35372 fi
35373 AS=$ac_cv_path_AS
35374 if test -n "$AS"; then
35375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35376 $as_echo "$AS" >&6; }
35377 else
35378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35379 $as_echo "no" >&6; }
35380 fi
35381 
35382 
35383           if test "x$AS" = x; then
35384             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35385           fi
35386         else
35387           # Otherwise we believe it is a complete path. Use it as it is.
35388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35389 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35390           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35391 $as_echo_n "checking for AS... " >&6; }
35392           if test ! -x "$tool_specified"; then
35393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35394 $as_echo "not found" >&6; }
35395             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35396           fi
35397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35398 $as_echo "$tool_specified" >&6; }
35399         fi
35400       fi
35401     fi
35402 
35403   fi
35404 
35405 
35406 
35407   # Only process if variable expands to non-empty
35408 
35409   if test "x$AS" != x; then
35410     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411 
35412   # First separate the path from the arguments. This will split at the first
35413   # space.
35414   complete="$AS"
35415   path="${complete%% *}"
35416   tmp="$complete EOL"
35417   arguments="${tmp#* }"
35418 
35419   # Input might be given as Windows format, start by converting to
35420   # unix format.
35421   new_path=`$CYGPATH -u "$path"`
35422 
35423   # Now try to locate executable using which
35424   new_path=`$WHICH "$new_path" 2> /dev/null`
35425   # bat and cmd files are not always considered executable in cygwin causing which
35426   # to not find them
35427   if test "x$new_path" = x \
35428       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35429       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35430     new_path=`$CYGPATH -u "$path"`
35431   fi
35432   if test "x$new_path" = x; then
35433     # Oops. Which didn't find the executable.
35434     # The splitting of arguments from the executable at a space might have been incorrect,
35435     # since paths with space are more likely in Windows. Give it another try with the whole
35436     # argument.
35437     path="$complete"
35438     arguments="EOL"
35439     new_path=`$CYGPATH -u "$path"`
35440     new_path=`$WHICH "$new_path" 2> /dev/null`
35441     # bat and cmd files are not always considered executable in cygwin causing which
35442     # to not find them
35443     if test "x$new_path" = x \
35444         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35445         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35446       new_path=`$CYGPATH -u "$path"`
35447     fi
35448     if test "x$new_path" = x; then
35449       # It's still not found. Now this is an unrecoverable error.
35450       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35451 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35452       has_space=`$ECHO "$complete" | $GREP " "`
35453       if test "x$has_space" != x; then
35454         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35455 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35456       fi
35457       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35458     fi
35459   fi
35460 
35461   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35462   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35463   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35464   # "foo.exe" is OK but "foo" is an error.
35465   #
35466   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35467   # It is also a way to make sure we got the proper file name for the real test later on.
35468   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35469   if test "x$test_shortpath" = x; then
35470     # Short path failed, file does not exist as specified.
35471     # Try adding .exe or .cmd
35472     if test -f "${new_path}.exe"; then
35473       input_to_shortpath="${new_path}.exe"
35474     elif test -f "${new_path}.cmd"; then
35475       input_to_shortpath="${new_path}.cmd"
35476     else
35477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35478 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35479       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35480 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35481       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35482     fi
35483   else
35484     input_to_shortpath="$new_path"
35485   fi
35486 
35487   # Call helper function which possibly converts this using DOS-style short mode.
35488   # If so, the updated path is stored in $new_path.
35489   new_path="$input_to_shortpath"
35490 
35491   input_path="$input_to_shortpath"
35492   # Check if we need to convert this using DOS-style short mode. If the path
35493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35494   # take no chances and rewrite it.
35495   # Note: m4 eats our [], so we need to use [ and ] instead.
35496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35497   if test "x$has_forbidden_chars" != x; then
35498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35502       # Going to short mode and back again did indeed matter. Since short mode is
35503       # case insensitive, let's make it lowercase to improve readability.
35504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35505       # Now convert it back to Unix-style (cygpath)
35506       input_path=`$CYGPATH -u "$shortmode_path"`
35507       new_path="$input_path"
35508     fi
35509   fi
35510 
35511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35512   if test "x$test_cygdrive_prefix" = x; then
35513     # As a simple fix, exclude /usr/bin since it's not a real path.
35514     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35516       # a path prefixed by /cygdrive for fixpath to work.
35517       new_path="$CYGWIN_ROOT_PATH$input_path"
35518     fi
35519   fi
35520 
35521   # remove trailing .exe if any
35522   new_path="${new_path/%.exe/}"
35523 
35524     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35525 
35526   # First separate the path from the arguments. This will split at the first
35527   # space.
35528   complete="$AS"
35529   path="${complete%% *}"
35530   tmp="$complete EOL"
35531   arguments="${tmp#* }"
35532 
35533   # Input might be given as Windows format, start by converting to
35534   # unix format.
35535   new_path="$path"
35536 
35537   windows_path="$new_path"
35538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35539     unix_path=`$CYGPATH -u "$windows_path"`
35540     new_path="$unix_path"
35541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35543     new_path="$unix_path"
35544   fi
35545 
35546 
35547   # Now try to locate executable using which
35548   new_path=`$WHICH "$new_path" 2> /dev/null`
35549 
35550   if test "x$new_path" = x; then
35551     # Oops. Which didn't find the executable.
35552     # The splitting of arguments from the executable at a space might have been incorrect,
35553     # since paths with space are more likely in Windows. Give it another try with the whole
35554     # argument.
35555     path="$complete"
35556     arguments="EOL"
35557     new_path="$path"
35558 
35559   windows_path="$new_path"
35560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35561     unix_path=`$CYGPATH -u "$windows_path"`
35562     new_path="$unix_path"
35563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35565     new_path="$unix_path"
35566   fi
35567 
35568 
35569     new_path=`$WHICH "$new_path" 2> /dev/null`
35570     # bat and cmd files are not always considered executable in MSYS causing which
35571     # to not find them
35572     if test "x$new_path" = x \
35573         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35574         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35575       new_path="$path"
35576 
35577   windows_path="$new_path"
35578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35579     unix_path=`$CYGPATH -u "$windows_path"`
35580     new_path="$unix_path"
35581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35583     new_path="$unix_path"
35584   fi
35585 
35586     fi
35587 
35588     if test "x$new_path" = x; then
35589       # It's still not found. Now this is an unrecoverable error.
35590       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35591 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35592       has_space=`$ECHO "$complete" | $GREP " "`
35593       if test "x$has_space" != x; then
35594         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35595 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35596       fi
35597       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35598     fi
35599   fi
35600 
35601   # Now new_path has a complete unix path to the binary
35602   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35603     # Keep paths in /bin as-is, but remove trailing .exe if any
35604     new_path="${new_path/%.exe/}"
35605     # Do not save /bin paths to all_fixpath_prefixes!
35606   else
35607     # Not in mixed or Windows style, start by that.
35608     new_path=`cmd //c echo $new_path`
35609 
35610   input_path="$new_path"
35611   # Check if we need to convert this using DOS-style short mode. If the path
35612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35613   # take no chances and rewrite it.
35614   # Note: m4 eats our [], so we need to use [ and ] instead.
35615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35616   if test "x$has_forbidden_chars" != x; then
35617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35618     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35619   fi
35620 
35621     # Output is in $new_path
35622 
35623   windows_path="$new_path"
35624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35625     unix_path=`$CYGPATH -u "$windows_path"`
35626     new_path="$unix_path"
35627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35629     new_path="$unix_path"
35630   fi
35631 
35632     # remove trailing .exe if any
35633     new_path="${new_path/%.exe/}"
35634 
35635     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35636     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35637   fi
35638 
35639     else
35640       # We're on a unix platform. Hooray! :)
35641       # First separate the path from the arguments. This will split at the first
35642       # space.
35643       complete="$AS"
35644       path="${complete%% *}"
35645       tmp="$complete EOL"
35646       arguments="${tmp#* }"
35647 
35648       # Cannot rely on the command "which" here since it doesn't always work.
35649       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35650       if test -z "$is_absolute_path"; then
35651         # Path to executable is not absolute. Find it.
35652         IFS_save="$IFS"
35653         IFS=:
35654         for p in $PATH; do
35655           if test -f "$p/$path" && test -x "$p/$path"; then
35656             new_path="$p/$path"
35657             break
35658           fi
35659         done
35660         IFS="$IFS_save"
35661       else
35662         # This is an absolute path, we can use it without further modifications.
35663         new_path="$path"
35664       fi
35665 
35666       if test "x$new_path" = x; then
35667         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35668 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35669         has_space=`$ECHO "$complete" | $GREP " "`
35670         if test "x$has_space" != x; then
35671           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35672 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35673         fi
35674         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35675       fi
35676     fi
35677 
35678     # Now join together the path and the arguments once again
35679     if test "x$arguments" != xEOL; then
35680       new_complete="$new_path ${arguments% *}"
35681     else
35682       new_complete="$new_path"
35683     fi
35684 
35685     if test "x$complete" != "x$new_complete"; then
35686       AS="$new_complete"
35687       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35688 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35689     fi
35690   fi
35691 
35692   else
35693     # FIXME: is this correct for microsoft?
35694     AS="$CC -c"
35695   fi
35696 
35697 
35698   #
35699   # Setup the archiver (AR)
35700   #
35701   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35702     # The corresponding ar tool is lib.exe (used to create static libraries)
35703     # Extract the first word of "lib", so it can be a program name with args.
35704 set dummy lib; ac_word=$2
35705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35706 $as_echo_n "checking for $ac_word... " >&6; }
35707 if ${ac_cv_prog_AR+:} false; then :
35708   $as_echo_n "(cached) " >&6
35709 else
35710   if test -n "$AR"; then
35711   ac_cv_prog_AR="$AR" # Let the user override the test.
35712 else
35713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35714 for as_dir in $PATH
35715 do
35716   IFS=$as_save_IFS
35717   test -z "$as_dir" && as_dir=.
35718     for ac_exec_ext in '' $ac_executable_extensions; do
35719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35720     ac_cv_prog_AR="lib"
35721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35722     break 2
35723   fi
35724 done
35725   done
35726 IFS=$as_save_IFS
35727 
35728 fi
35729 fi
35730 AR=$ac_cv_prog_AR
35731 if test -n "$AR"; then
35732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35733 $as_echo "$AR" >&6; }
35734 else
35735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35736 $as_echo "no" >&6; }
35737 fi
35738 
35739 
35740   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35741 
35742 
35743   # Publish this variable in the help.
35744 
35745 
35746   if [ -z "${AR+x}" ]; then
35747     # The variable is not set by user, try to locate tool using the code snippet
35748     if test -n "$ac_tool_prefix"; then
35749   for ac_prog in ar gcc-ar
35750   do
35751     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35752 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35754 $as_echo_n "checking for $ac_word... " >&6; }
35755 if ${ac_cv_prog_AR+:} false; then :
35756   $as_echo_n "(cached) " >&6
35757 else
35758   if test -n "$AR"; then
35759   ac_cv_prog_AR="$AR" # Let the user override the test.
35760 else
35761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35762 for as_dir in $PATH
35763 do
35764   IFS=$as_save_IFS
35765   test -z "$as_dir" && as_dir=.
35766     for ac_exec_ext in '' $ac_executable_extensions; do
35767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35768     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35770     break 2
35771   fi
35772 done
35773   done
35774 IFS=$as_save_IFS
35775 
35776 fi
35777 fi
35778 AR=$ac_cv_prog_AR
35779 if test -n "$AR"; then
35780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35781 $as_echo "$AR" >&6; }
35782 else
35783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35784 $as_echo "no" >&6; }
35785 fi
35786 
35787 
35788     test -n "$AR" && break
35789   done
35790 fi
35791 if test -z "$AR"; then
35792   ac_ct_AR=$AR
35793   for ac_prog in ar gcc-ar
35794 do
35795   # Extract the first word of "$ac_prog", so it can be a program name with args.
35796 set dummy $ac_prog; ac_word=$2
35797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35798 $as_echo_n "checking for $ac_word... " >&6; }
35799 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35800   $as_echo_n "(cached) " >&6
35801 else
35802   if test -n "$ac_ct_AR"; then
35803   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35804 else
35805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35806 for as_dir in $PATH
35807 do
35808   IFS=$as_save_IFS
35809   test -z "$as_dir" && as_dir=.
35810     for ac_exec_ext in '' $ac_executable_extensions; do
35811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35812     ac_cv_prog_ac_ct_AR="$ac_prog"
35813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35814     break 2
35815   fi
35816 done
35817   done
35818 IFS=$as_save_IFS
35819 
35820 fi
35821 fi
35822 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35823 if test -n "$ac_ct_AR"; then
35824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35825 $as_echo "$ac_ct_AR" >&6; }
35826 else
35827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35828 $as_echo "no" >&6; }
35829 fi
35830 
35831 
35832   test -n "$ac_ct_AR" && break
35833 done
35834 
35835   if test "x$ac_ct_AR" = x; then
35836     AR=""
35837   else
35838     case $cross_compiling:$ac_tool_warned in
35839 yes:)
35840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35841 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35842 ac_tool_warned=yes ;;
35843 esac
35844     AR=$ac_ct_AR
35845   fi
35846 fi
35847 
35848   else
35849     # The variable is set, but is it from the command line or the environment?
35850 
35851     # Try to remove the string !AR! from our list.
35852     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35853     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35854       # If it failed, the variable was not from the command line. Ignore it,
35855       # but warn the user (except for BASH, which is always set by the calling BASH).
35856       if test "xAR" != xBASH; then
35857         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35858 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35859       fi
35860       # Try to locate tool using the code snippet
35861       if test -n "$ac_tool_prefix"; then
35862   for ac_prog in ar gcc-ar
35863   do
35864     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35865 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35867 $as_echo_n "checking for $ac_word... " >&6; }
35868 if ${ac_cv_prog_AR+:} false; then :
35869   $as_echo_n "(cached) " >&6
35870 else
35871   if test -n "$AR"; then
35872   ac_cv_prog_AR="$AR" # Let the user override the test.
35873 else
35874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35875 for as_dir in $PATH
35876 do
35877   IFS=$as_save_IFS
35878   test -z "$as_dir" && as_dir=.
35879     for ac_exec_ext in '' $ac_executable_extensions; do
35880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35881     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35883     break 2
35884   fi
35885 done
35886   done
35887 IFS=$as_save_IFS
35888 
35889 fi
35890 fi
35891 AR=$ac_cv_prog_AR
35892 if test -n "$AR"; then
35893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35894 $as_echo "$AR" >&6; }
35895 else
35896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35897 $as_echo "no" >&6; }
35898 fi
35899 
35900 
35901     test -n "$AR" && break
35902   done
35903 fi
35904 if test -z "$AR"; then
35905   ac_ct_AR=$AR
35906   for ac_prog in ar gcc-ar
35907 do
35908   # Extract the first word of "$ac_prog", so it can be a program name with args.
35909 set dummy $ac_prog; ac_word=$2
35910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35911 $as_echo_n "checking for $ac_word... " >&6; }
35912 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35913   $as_echo_n "(cached) " >&6
35914 else
35915   if test -n "$ac_ct_AR"; then
35916   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35917 else
35918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35919 for as_dir in $PATH
35920 do
35921   IFS=$as_save_IFS
35922   test -z "$as_dir" && as_dir=.
35923     for ac_exec_ext in '' $ac_executable_extensions; do
35924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35925     ac_cv_prog_ac_ct_AR="$ac_prog"
35926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35927     break 2
35928   fi
35929 done
35930   done
35931 IFS=$as_save_IFS
35932 
35933 fi
35934 fi
35935 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35936 if test -n "$ac_ct_AR"; then
35937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35938 $as_echo "$ac_ct_AR" >&6; }
35939 else
35940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35941 $as_echo "no" >&6; }
35942 fi
35943 
35944 
35945   test -n "$ac_ct_AR" && break
35946 done
35947 
35948   if test "x$ac_ct_AR" = x; then
35949     AR=""
35950   else
35951     case $cross_compiling:$ac_tool_warned in
35952 yes:)
35953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35954 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35955 ac_tool_warned=yes ;;
35956 esac
35957     AR=$ac_ct_AR
35958   fi
35959 fi
35960 
35961     else
35962       # If it succeeded, then it was overridden by the user. We will use it
35963       # for the tool.
35964 
35965       # First remove it from the list of overridden variables, so we can test
35966       # for unknown variables in the end.
35967       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35968 
35969       # Check if we try to supply an empty value
35970       if test "x$AR" = x; then
35971         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35972 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35974 $as_echo_n "checking for AR... " >&6; }
35975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35976 $as_echo "disabled" >&6; }
35977       else
35978         # Check if the provided tool contains a complete path.
35979         tool_specified="$AR"
35980         tool_basename="${tool_specified##*/}"
35981         if test "x$tool_basename" = "x$tool_specified"; then
35982           # A command without a complete path is provided, search $PATH.
35983           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35984 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35985           # Extract the first word of "$tool_basename", so it can be a program name with args.
35986 set dummy $tool_basename; ac_word=$2
35987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35988 $as_echo_n "checking for $ac_word... " >&6; }
35989 if ${ac_cv_path_AR+:} false; then :
35990   $as_echo_n "(cached) " >&6
35991 else
35992   case $AR in
35993   [\\/]* | ?:[\\/]*)
35994   ac_cv_path_AR="$AR" # Let the user override the test with a path.
35995   ;;
35996   *)
35997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35998 for as_dir in $PATH
35999 do
36000   IFS=$as_save_IFS
36001   test -z "$as_dir" && as_dir=.
36002     for ac_exec_ext in '' $ac_executable_extensions; do
36003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36004     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36006     break 2
36007   fi
36008 done
36009   done
36010 IFS=$as_save_IFS
36011 
36012   ;;
36013 esac
36014 fi
36015 AR=$ac_cv_path_AR
36016 if test -n "$AR"; then
36017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36018 $as_echo "$AR" >&6; }
36019 else
36020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36021 $as_echo "no" >&6; }
36022 fi
36023 
36024 
36025           if test "x$AR" = x; then
36026             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36027           fi
36028         else
36029           # Otherwise we believe it is a complete path. Use it as it is.
36030           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36031 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36032           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36033 $as_echo_n "checking for AR... " >&6; }
36034           if test ! -x "$tool_specified"; then
36035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36036 $as_echo "not found" >&6; }
36037             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36038           fi
36039           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36040 $as_echo "$tool_specified" >&6; }
36041         fi
36042       fi
36043     fi
36044 
36045   fi
36046 
36047 
36048   else
36049 
36050 
36051   # Publish this variable in the help.
36052 
36053 
36054   if [ -z "${AR+x}" ]; then
36055     # The variable is not set by user, try to locate tool using the code snippet
36056     if test -n "$ac_tool_prefix"; then
36057   for ac_prog in ar
36058   do
36059     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36060 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36062 $as_echo_n "checking for $ac_word... " >&6; }
36063 if ${ac_cv_prog_AR+:} false; then :
36064   $as_echo_n "(cached) " >&6
36065 else
36066   if test -n "$AR"; then
36067   ac_cv_prog_AR="$AR" # Let the user override the test.
36068 else
36069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36070 for as_dir in $PATH
36071 do
36072   IFS=$as_save_IFS
36073   test -z "$as_dir" && as_dir=.
36074     for ac_exec_ext in '' $ac_executable_extensions; do
36075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36076     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36078     break 2
36079   fi
36080 done
36081   done
36082 IFS=$as_save_IFS
36083 
36084 fi
36085 fi
36086 AR=$ac_cv_prog_AR
36087 if test -n "$AR"; then
36088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36089 $as_echo "$AR" >&6; }
36090 else
36091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36092 $as_echo "no" >&6; }
36093 fi
36094 
36095 
36096     test -n "$AR" && break
36097   done
36098 fi
36099 if test -z "$AR"; then
36100   ac_ct_AR=$AR
36101   for ac_prog in ar
36102 do
36103   # Extract the first word of "$ac_prog", so it can be a program name with args.
36104 set dummy $ac_prog; ac_word=$2
36105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36106 $as_echo_n "checking for $ac_word... " >&6; }
36107 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36108   $as_echo_n "(cached) " >&6
36109 else
36110   if test -n "$ac_ct_AR"; then
36111   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36112 else
36113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36114 for as_dir in $PATH
36115 do
36116   IFS=$as_save_IFS
36117   test -z "$as_dir" && as_dir=.
36118     for ac_exec_ext in '' $ac_executable_extensions; do
36119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36120     ac_cv_prog_ac_ct_AR="$ac_prog"
36121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36122     break 2
36123   fi
36124 done
36125   done
36126 IFS=$as_save_IFS
36127 
36128 fi
36129 fi
36130 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36131 if test -n "$ac_ct_AR"; then
36132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36133 $as_echo "$ac_ct_AR" >&6; }
36134 else
36135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36136 $as_echo "no" >&6; }
36137 fi
36138 
36139 
36140   test -n "$ac_ct_AR" && break
36141 done
36142 
36143   if test "x$ac_ct_AR" = x; then
36144     AR=""
36145   else
36146     case $cross_compiling:$ac_tool_warned in
36147 yes:)
36148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36149 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36150 ac_tool_warned=yes ;;
36151 esac
36152     AR=$ac_ct_AR
36153   fi
36154 fi
36155 
36156   else
36157     # The variable is set, but is it from the command line or the environment?
36158 
36159     # Try to remove the string !AR! from our list.
36160     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36161     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36162       # If it failed, the variable was not from the command line. Ignore it,
36163       # but warn the user (except for BASH, which is always set by the calling BASH).
36164       if test "xAR" != xBASH; then
36165         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36166 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36167       fi
36168       # Try to locate tool using the code snippet
36169       if test -n "$ac_tool_prefix"; then
36170   for ac_prog in ar
36171   do
36172     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36173 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36175 $as_echo_n "checking for $ac_word... " >&6; }
36176 if ${ac_cv_prog_AR+:} false; then :
36177   $as_echo_n "(cached) " >&6
36178 else
36179   if test -n "$AR"; then
36180   ac_cv_prog_AR="$AR" # Let the user override the test.
36181 else
36182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36183 for as_dir in $PATH
36184 do
36185   IFS=$as_save_IFS
36186   test -z "$as_dir" && as_dir=.
36187     for ac_exec_ext in '' $ac_executable_extensions; do
36188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36189     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36191     break 2
36192   fi
36193 done
36194   done
36195 IFS=$as_save_IFS
36196 
36197 fi
36198 fi
36199 AR=$ac_cv_prog_AR
36200 if test -n "$AR"; then
36201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36202 $as_echo "$AR" >&6; }
36203 else
36204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36205 $as_echo "no" >&6; }
36206 fi
36207 
36208 
36209     test -n "$AR" && break
36210   done
36211 fi
36212 if test -z "$AR"; then
36213   ac_ct_AR=$AR
36214   for ac_prog in ar
36215 do
36216   # Extract the first word of "$ac_prog", so it can be a program name with args.
36217 set dummy $ac_prog; ac_word=$2
36218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36219 $as_echo_n "checking for $ac_word... " >&6; }
36220 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36221   $as_echo_n "(cached) " >&6
36222 else
36223   if test -n "$ac_ct_AR"; then
36224   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36225 else
36226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36227 for as_dir in $PATH
36228 do
36229   IFS=$as_save_IFS
36230   test -z "$as_dir" && as_dir=.
36231     for ac_exec_ext in '' $ac_executable_extensions; do
36232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36233     ac_cv_prog_ac_ct_AR="$ac_prog"
36234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36235     break 2
36236   fi
36237 done
36238   done
36239 IFS=$as_save_IFS
36240 
36241 fi
36242 fi
36243 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36244 if test -n "$ac_ct_AR"; then
36245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36246 $as_echo "$ac_ct_AR" >&6; }
36247 else
36248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36249 $as_echo "no" >&6; }
36250 fi
36251 
36252 
36253   test -n "$ac_ct_AR" && break
36254 done
36255 
36256   if test "x$ac_ct_AR" = x; then
36257     AR=""
36258   else
36259     case $cross_compiling:$ac_tool_warned in
36260 yes:)
36261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36262 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36263 ac_tool_warned=yes ;;
36264 esac
36265     AR=$ac_ct_AR
36266   fi
36267 fi
36268 
36269     else
36270       # If it succeeded, then it was overridden by the user. We will use it
36271       # for the tool.
36272 
36273       # First remove it from the list of overridden variables, so we can test
36274       # for unknown variables in the end.
36275       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36276 
36277       # Check if we try to supply an empty value
36278       if test "x$AR" = x; then
36279         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36280 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36281         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36282 $as_echo_n "checking for AR... " >&6; }
36283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36284 $as_echo "disabled" >&6; }
36285       else
36286         # Check if the provided tool contains a complete path.
36287         tool_specified="$AR"
36288         tool_basename="${tool_specified##*/}"
36289         if test "x$tool_basename" = "x$tool_specified"; then
36290           # A command without a complete path is provided, search $PATH.
36291           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36292 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36293           # Extract the first word of "$tool_basename", so it can be a program name with args.
36294 set dummy $tool_basename; ac_word=$2
36295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36296 $as_echo_n "checking for $ac_word... " >&6; }
36297 if ${ac_cv_path_AR+:} false; then :
36298   $as_echo_n "(cached) " >&6
36299 else
36300   case $AR in
36301   [\\/]* | ?:[\\/]*)
36302   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36303   ;;
36304   *)
36305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36306 for as_dir in $PATH
36307 do
36308   IFS=$as_save_IFS
36309   test -z "$as_dir" && as_dir=.
36310     for ac_exec_ext in '' $ac_executable_extensions; do
36311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36312     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36314     break 2
36315   fi
36316 done
36317   done
36318 IFS=$as_save_IFS
36319 
36320   ;;
36321 esac
36322 fi
36323 AR=$ac_cv_path_AR
36324 if test -n "$AR"; then
36325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36326 $as_echo "$AR" >&6; }
36327 else
36328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36329 $as_echo "no" >&6; }
36330 fi
36331 
36332 
36333           if test "x$AR" = x; then
36334             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36335           fi
36336         else
36337           # Otherwise we believe it is a complete path. Use it as it is.
36338           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36339 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36340           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36341 $as_echo_n "checking for AR... " >&6; }
36342           if test ! -x "$tool_specified"; then
36343             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36344 $as_echo "not found" >&6; }
36345             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36346           fi
36347           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36348 $as_echo "$tool_specified" >&6; }
36349         fi
36350       fi
36351     fi
36352 
36353   fi
36354 
36355 
36356   fi
36357 
36358   # Only process if variable expands to non-empty
36359 
36360   if test "x$AR" != x; then
36361     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362 
36363   # First separate the path from the arguments. This will split at the first
36364   # space.
36365   complete="$AR"
36366   path="${complete%% *}"
36367   tmp="$complete EOL"
36368   arguments="${tmp#* }"
36369 
36370   # Input might be given as Windows format, start by converting to
36371   # unix format.
36372   new_path=`$CYGPATH -u "$path"`
36373 
36374   # Now try to locate executable using which
36375   new_path=`$WHICH "$new_path" 2> /dev/null`
36376   # bat and cmd files are not always considered executable in cygwin causing which
36377   # to not find them
36378   if test "x$new_path" = x \
36379       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36380       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36381     new_path=`$CYGPATH -u "$path"`
36382   fi
36383   if test "x$new_path" = x; then
36384     # Oops. Which didn't find the executable.
36385     # The splitting of arguments from the executable at a space might have been incorrect,
36386     # since paths with space are more likely in Windows. Give it another try with the whole
36387     # argument.
36388     path="$complete"
36389     arguments="EOL"
36390     new_path=`$CYGPATH -u "$path"`
36391     new_path=`$WHICH "$new_path" 2> /dev/null`
36392     # bat and cmd files are not always considered executable in cygwin causing which
36393     # to not find them
36394     if test "x$new_path" = x \
36395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36397       new_path=`$CYGPATH -u "$path"`
36398     fi
36399     if test "x$new_path" = x; then
36400       # It's still not found. Now this is an unrecoverable error.
36401       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36402 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36403       has_space=`$ECHO "$complete" | $GREP " "`
36404       if test "x$has_space" != x; then
36405         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36406 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36407       fi
36408       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36409     fi
36410   fi
36411 
36412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36415   # "foo.exe" is OK but "foo" is an error.
36416   #
36417   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36418   # It is also a way to make sure we got the proper file name for the real test later on.
36419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36420   if test "x$test_shortpath" = x; then
36421     # Short path failed, file does not exist as specified.
36422     # Try adding .exe or .cmd
36423     if test -f "${new_path}.exe"; then
36424       input_to_shortpath="${new_path}.exe"
36425     elif test -f "${new_path}.cmd"; then
36426       input_to_shortpath="${new_path}.cmd"
36427     else
36428       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36429 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36430       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36431 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36432       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36433     fi
36434   else
36435     input_to_shortpath="$new_path"
36436   fi
36437 
36438   # Call helper function which possibly converts this using DOS-style short mode.
36439   # If so, the updated path is stored in $new_path.
36440   new_path="$input_to_shortpath"
36441 
36442   input_path="$input_to_shortpath"
36443   # Check if we need to convert this using DOS-style short mode. If the path
36444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36445   # take no chances and rewrite it.
36446   # Note: m4 eats our [], so we need to use [ and ] instead.
36447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36448   if test "x$has_forbidden_chars" != x; then
36449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36450     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36451     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36452     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36453       # Going to short mode and back again did indeed matter. Since short mode is
36454       # case insensitive, let's make it lowercase to improve readability.
36455       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36456       # Now convert it back to Unix-style (cygpath)
36457       input_path=`$CYGPATH -u "$shortmode_path"`
36458       new_path="$input_path"
36459     fi
36460   fi
36461 
36462   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36463   if test "x$test_cygdrive_prefix" = x; then
36464     # As a simple fix, exclude /usr/bin since it's not a real path.
36465     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36466       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36467       # a path prefixed by /cygdrive for fixpath to work.
36468       new_path="$CYGWIN_ROOT_PATH$input_path"
36469     fi
36470   fi
36471 
36472   # remove trailing .exe if any
36473   new_path="${new_path/%.exe/}"
36474 
36475     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36476 
36477   # First separate the path from the arguments. This will split at the first
36478   # space.
36479   complete="$AR"
36480   path="${complete%% *}"
36481   tmp="$complete EOL"
36482   arguments="${tmp#* }"
36483 
36484   # Input might be given as Windows format, start by converting to
36485   # unix format.
36486   new_path="$path"
36487 
36488   windows_path="$new_path"
36489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36490     unix_path=`$CYGPATH -u "$windows_path"`
36491     new_path="$unix_path"
36492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36494     new_path="$unix_path"
36495   fi
36496 
36497 
36498   # Now try to locate executable using which
36499   new_path=`$WHICH "$new_path" 2> /dev/null`
36500 
36501   if test "x$new_path" = x; then
36502     # Oops. Which didn't find the executable.
36503     # The splitting of arguments from the executable at a space might have been incorrect,
36504     # since paths with space are more likely in Windows. Give it another try with the whole
36505     # argument.
36506     path="$complete"
36507     arguments="EOL"
36508     new_path="$path"
36509 
36510   windows_path="$new_path"
36511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36512     unix_path=`$CYGPATH -u "$windows_path"`
36513     new_path="$unix_path"
36514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36516     new_path="$unix_path"
36517   fi
36518 
36519 
36520     new_path=`$WHICH "$new_path" 2> /dev/null`
36521     # bat and cmd files are not always considered executable in MSYS causing which
36522     # to not find them
36523     if test "x$new_path" = x \
36524         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36525         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36526       new_path="$path"
36527 
36528   windows_path="$new_path"
36529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36530     unix_path=`$CYGPATH -u "$windows_path"`
36531     new_path="$unix_path"
36532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36534     new_path="$unix_path"
36535   fi
36536 
36537     fi
36538 
36539     if test "x$new_path" = x; then
36540       # It's still not found. Now this is an unrecoverable error.
36541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36542 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36543       has_space=`$ECHO "$complete" | $GREP " "`
36544       if test "x$has_space" != x; then
36545         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36546 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36547       fi
36548       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36549     fi
36550   fi
36551 
36552   # Now new_path has a complete unix path to the binary
36553   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36554     # Keep paths in /bin as-is, but remove trailing .exe if any
36555     new_path="${new_path/%.exe/}"
36556     # Do not save /bin paths to all_fixpath_prefixes!
36557   else
36558     # Not in mixed or Windows style, start by that.
36559     new_path=`cmd //c echo $new_path`
36560 
36561   input_path="$new_path"
36562   # Check if we need to convert this using DOS-style short mode. If the path
36563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36564   # take no chances and rewrite it.
36565   # Note: m4 eats our [], so we need to use [ and ] instead.
36566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36567   if test "x$has_forbidden_chars" != x; then
36568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36570   fi
36571 
36572     # Output is in $new_path
36573 
36574   windows_path="$new_path"
36575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36576     unix_path=`$CYGPATH -u "$windows_path"`
36577     new_path="$unix_path"
36578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36580     new_path="$unix_path"
36581   fi
36582 
36583     # remove trailing .exe if any
36584     new_path="${new_path/%.exe/}"
36585 
36586     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36587     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36588   fi
36589 
36590     else
36591       # We're on a unix platform. Hooray! :)
36592       # First separate the path from the arguments. This will split at the first
36593       # space.
36594       complete="$AR"
36595       path="${complete%% *}"
36596       tmp="$complete EOL"
36597       arguments="${tmp#* }"
36598 
36599       # Cannot rely on the command "which" here since it doesn't always work.
36600       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36601       if test -z "$is_absolute_path"; then
36602         # Path to executable is not absolute. Find it.
36603         IFS_save="$IFS"
36604         IFS=:
36605         for p in $PATH; do
36606           if test -f "$p/$path" && test -x "$p/$path"; then
36607             new_path="$p/$path"
36608             break
36609           fi
36610         done
36611         IFS="$IFS_save"
36612       else
36613         # This is an absolute path, we can use it without further modifications.
36614         new_path="$path"
36615       fi
36616 
36617       if test "x$new_path" = x; then
36618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36619 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36620         has_space=`$ECHO "$complete" | $GREP " "`
36621         if test "x$has_space" != x; then
36622           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36623 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36624         fi
36625         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36626       fi
36627     fi
36628 
36629     # Now join together the path and the arguments once again
36630     if test "x$arguments" != xEOL; then
36631       new_complete="$new_path ${arguments% *}"
36632     else
36633       new_complete="$new_path"
36634     fi
36635 
36636     if test "x$complete" != "x$new_complete"; then
36637       AR="$new_complete"
36638       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36639 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36640     fi
36641   fi
36642 
36643 
36644 
36645   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36646 
36647 
36648   # Publish this variable in the help.
36649 
36650 
36651   if [ -z "${LIPO+x}" ]; then
36652     # The variable is not set by user, try to locate tool using the code snippet
36653     for ac_prog in lipo
36654 do
36655   # Extract the first word of "$ac_prog", so it can be a program name with args.
36656 set dummy $ac_prog; ac_word=$2
36657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36658 $as_echo_n "checking for $ac_word... " >&6; }
36659 if ${ac_cv_path_LIPO+:} false; then :
36660   $as_echo_n "(cached) " >&6
36661 else
36662   case $LIPO in
36663   [\\/]* | ?:[\\/]*)
36664   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36665   ;;
36666   *)
36667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36668 for as_dir in $PATH
36669 do
36670   IFS=$as_save_IFS
36671   test -z "$as_dir" && as_dir=.
36672     for ac_exec_ext in '' $ac_executable_extensions; do
36673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36674     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36676     break 2
36677   fi
36678 done
36679   done
36680 IFS=$as_save_IFS
36681 
36682   ;;
36683 esac
36684 fi
36685 LIPO=$ac_cv_path_LIPO
36686 if test -n "$LIPO"; then
36687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36688 $as_echo "$LIPO" >&6; }
36689 else
36690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36691 $as_echo "no" >&6; }
36692 fi
36693 
36694 
36695   test -n "$LIPO" && break
36696 done
36697 
36698   else
36699     # The variable is set, but is it from the command line or the environment?
36700 
36701     # Try to remove the string !LIPO! from our list.
36702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36704       # If it failed, the variable was not from the command line. Ignore it,
36705       # but warn the user (except for BASH, which is always set by the calling BASH).
36706       if test "xLIPO" != xBASH; then
36707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36708 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36709       fi
36710       # Try to locate tool using the code snippet
36711       for ac_prog in lipo
36712 do
36713   # Extract the first word of "$ac_prog", so it can be a program name with args.
36714 set dummy $ac_prog; ac_word=$2
36715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36716 $as_echo_n "checking for $ac_word... " >&6; }
36717 if ${ac_cv_path_LIPO+:} false; then :
36718   $as_echo_n "(cached) " >&6
36719 else
36720   case $LIPO in
36721   [\\/]* | ?:[\\/]*)
36722   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36723   ;;
36724   *)
36725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36726 for as_dir in $PATH
36727 do
36728   IFS=$as_save_IFS
36729   test -z "$as_dir" && as_dir=.
36730     for ac_exec_ext in '' $ac_executable_extensions; do
36731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36732     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36734     break 2
36735   fi
36736 done
36737   done
36738 IFS=$as_save_IFS
36739 
36740   ;;
36741 esac
36742 fi
36743 LIPO=$ac_cv_path_LIPO
36744 if test -n "$LIPO"; then
36745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36746 $as_echo "$LIPO" >&6; }
36747 else
36748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36749 $as_echo "no" >&6; }
36750 fi
36751 
36752 
36753   test -n "$LIPO" && break
36754 done
36755 
36756     else
36757       # If it succeeded, then it was overridden by the user. We will use it
36758       # for the tool.
36759 
36760       # First remove it from the list of overridden variables, so we can test
36761       # for unknown variables in the end.
36762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36763 
36764       # Check if we try to supply an empty value
36765       if test "x$LIPO" = x; then
36766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36767 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36769 $as_echo_n "checking for LIPO... " >&6; }
36770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36771 $as_echo "disabled" >&6; }
36772       else
36773         # Check if the provided tool contains a complete path.
36774         tool_specified="$LIPO"
36775         tool_basename="${tool_specified##*/}"
36776         if test "x$tool_basename" = "x$tool_specified"; then
36777           # A command without a complete path is provided, search $PATH.
36778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36779 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36780           # Extract the first word of "$tool_basename", so it can be a program name with args.
36781 set dummy $tool_basename; ac_word=$2
36782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36783 $as_echo_n "checking for $ac_word... " >&6; }
36784 if ${ac_cv_path_LIPO+:} false; then :
36785   $as_echo_n "(cached) " >&6
36786 else
36787   case $LIPO in
36788   [\\/]* | ?:[\\/]*)
36789   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36790   ;;
36791   *)
36792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36793 for as_dir in $PATH
36794 do
36795   IFS=$as_save_IFS
36796   test -z "$as_dir" && as_dir=.
36797     for ac_exec_ext in '' $ac_executable_extensions; do
36798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36799     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36801     break 2
36802   fi
36803 done
36804   done
36805 IFS=$as_save_IFS
36806 
36807   ;;
36808 esac
36809 fi
36810 LIPO=$ac_cv_path_LIPO
36811 if test -n "$LIPO"; then
36812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36813 $as_echo "$LIPO" >&6; }
36814 else
36815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36816 $as_echo "no" >&6; }
36817 fi
36818 
36819 
36820           if test "x$LIPO" = x; then
36821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36822           fi
36823         else
36824           # Otherwise we believe it is a complete path. Use it as it is.
36825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36826 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36828 $as_echo_n "checking for LIPO... " >&6; }
36829           if test ! -x "$tool_specified"; then
36830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36831 $as_echo "not found" >&6; }
36832             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36833           fi
36834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36835 $as_echo "$tool_specified" >&6; }
36836         fi
36837       fi
36838     fi
36839 
36840   fi
36841 
36842 
36843 
36844   # Only process if variable expands to non-empty
36845 
36846   if test "x$LIPO" != x; then
36847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36848 
36849   # First separate the path from the arguments. This will split at the first
36850   # space.
36851   complete="$LIPO"
36852   path="${complete%% *}"
36853   tmp="$complete EOL"
36854   arguments="${tmp#* }"
36855 
36856   # Input might be given as Windows format, start by converting to
36857   # unix format.
36858   new_path=`$CYGPATH -u "$path"`
36859 
36860   # Now try to locate executable using which
36861   new_path=`$WHICH "$new_path" 2> /dev/null`
36862   # bat and cmd files are not always considered executable in cygwin causing which
36863   # to not find them
36864   if test "x$new_path" = x \
36865       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36866       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36867     new_path=`$CYGPATH -u "$path"`
36868   fi
36869   if test "x$new_path" = x; then
36870     # Oops. Which didn't find the executable.
36871     # The splitting of arguments from the executable at a space might have been incorrect,
36872     # since paths with space are more likely in Windows. Give it another try with the whole
36873     # argument.
36874     path="$complete"
36875     arguments="EOL"
36876     new_path=`$CYGPATH -u "$path"`
36877     new_path=`$WHICH "$new_path" 2> /dev/null`
36878     # bat and cmd files are not always considered executable in cygwin causing which
36879     # to not find them
36880     if test "x$new_path" = x \
36881         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36882         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36883       new_path=`$CYGPATH -u "$path"`
36884     fi
36885     if test "x$new_path" = x; then
36886       # It's still not found. Now this is an unrecoverable error.
36887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36888 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36889       has_space=`$ECHO "$complete" | $GREP " "`
36890       if test "x$has_space" != x; then
36891         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36892 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36893       fi
36894       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36895     fi
36896   fi
36897 
36898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36901   # "foo.exe" is OK but "foo" is an error.
36902   #
36903   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36904   # It is also a way to make sure we got the proper file name for the real test later on.
36905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36906   if test "x$test_shortpath" = x; then
36907     # Short path failed, file does not exist as specified.
36908     # Try adding .exe or .cmd
36909     if test -f "${new_path}.exe"; then
36910       input_to_shortpath="${new_path}.exe"
36911     elif test -f "${new_path}.cmd"; then
36912       input_to_shortpath="${new_path}.cmd"
36913     else
36914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36915 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36916       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36917 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36918       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36919     fi
36920   else
36921     input_to_shortpath="$new_path"
36922   fi
36923 
36924   # Call helper function which possibly converts this using DOS-style short mode.
36925   # If so, the updated path is stored in $new_path.
36926   new_path="$input_to_shortpath"
36927 
36928   input_path="$input_to_shortpath"
36929   # Check if we need to convert this using DOS-style short mode. If the path
36930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36931   # take no chances and rewrite it.
36932   # Note: m4 eats our [], so we need to use [ and ] instead.
36933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36934   if test "x$has_forbidden_chars" != x; then
36935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36936     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36937     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36938     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36939       # Going to short mode and back again did indeed matter. Since short mode is
36940       # case insensitive, let's make it lowercase to improve readability.
36941       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36942       # Now convert it back to Unix-style (cygpath)
36943       input_path=`$CYGPATH -u "$shortmode_path"`
36944       new_path="$input_path"
36945     fi
36946   fi
36947 
36948   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36949   if test "x$test_cygdrive_prefix" = x; then
36950     # As a simple fix, exclude /usr/bin since it's not a real path.
36951     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36952       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36953       # a path prefixed by /cygdrive for fixpath to work.
36954       new_path="$CYGWIN_ROOT_PATH$input_path"
36955     fi
36956   fi
36957 
36958   # remove trailing .exe if any
36959   new_path="${new_path/%.exe/}"
36960 
36961     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36962 
36963   # First separate the path from the arguments. This will split at the first
36964   # space.
36965   complete="$LIPO"
36966   path="${complete%% *}"
36967   tmp="$complete EOL"
36968   arguments="${tmp#* }"
36969 
36970   # Input might be given as Windows format, start by converting to
36971   # unix format.
36972   new_path="$path"
36973 
36974   windows_path="$new_path"
36975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36976     unix_path=`$CYGPATH -u "$windows_path"`
36977     new_path="$unix_path"
36978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36980     new_path="$unix_path"
36981   fi
36982 
36983 
36984   # Now try to locate executable using which
36985   new_path=`$WHICH "$new_path" 2> /dev/null`
36986 
36987   if test "x$new_path" = x; then
36988     # Oops. Which didn't find the executable.
36989     # The splitting of arguments from the executable at a space might have been incorrect,
36990     # since paths with space are more likely in Windows. Give it another try with the whole
36991     # argument.
36992     path="$complete"
36993     arguments="EOL"
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     new_path=`$WHICH "$new_path" 2> /dev/null`
37007     # bat and cmd files are not always considered executable in MSYS causing which
37008     # to not find them
37009     if test "x$new_path" = x \
37010         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37011         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37012       new_path="$path"
37013 
37014   windows_path="$new_path"
37015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016     unix_path=`$CYGPATH -u "$windows_path"`
37017     new_path="$unix_path"
37018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020     new_path="$unix_path"
37021   fi
37022 
37023     fi
37024 
37025     if test "x$new_path" = x; then
37026       # It's still not found. Now this is an unrecoverable error.
37027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37028 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37029       has_space=`$ECHO "$complete" | $GREP " "`
37030       if test "x$has_space" != x; then
37031         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37032 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37033       fi
37034       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37035     fi
37036   fi
37037 
37038   # Now new_path has a complete unix path to the binary
37039   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37040     # Keep paths in /bin as-is, but remove trailing .exe if any
37041     new_path="${new_path/%.exe/}"
37042     # Do not save /bin paths to all_fixpath_prefixes!
37043   else
37044     # Not in mixed or Windows style, start by that.
37045     new_path=`cmd //c echo $new_path`
37046 
37047   input_path="$new_path"
37048   # Check if we need to convert this using DOS-style short mode. If the path
37049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37050   # take no chances and rewrite it.
37051   # Note: m4 eats our [], so we need to use [ and ] instead.
37052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37053   if test "x$has_forbidden_chars" != x; then
37054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37055     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37056   fi
37057 
37058     # Output is in $new_path
37059 
37060   windows_path="$new_path"
37061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37062     unix_path=`$CYGPATH -u "$windows_path"`
37063     new_path="$unix_path"
37064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37066     new_path="$unix_path"
37067   fi
37068 
37069     # remove trailing .exe if any
37070     new_path="${new_path/%.exe/}"
37071 
37072     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37073     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37074   fi
37075 
37076     else
37077       # We're on a unix platform. Hooray! :)
37078       # First separate the path from the arguments. This will split at the first
37079       # space.
37080       complete="$LIPO"
37081       path="${complete%% *}"
37082       tmp="$complete EOL"
37083       arguments="${tmp#* }"
37084 
37085       # Cannot rely on the command "which" here since it doesn't always work.
37086       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37087       if test -z "$is_absolute_path"; then
37088         # Path to executable is not absolute. Find it.
37089         IFS_save="$IFS"
37090         IFS=:
37091         for p in $PATH; do
37092           if test -f "$p/$path" && test -x "$p/$path"; then
37093             new_path="$p/$path"
37094             break
37095           fi
37096         done
37097         IFS="$IFS_save"
37098       else
37099         # This is an absolute path, we can use it without further modifications.
37100         new_path="$path"
37101       fi
37102 
37103       if test "x$new_path" = x; then
37104         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37105 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37106         has_space=`$ECHO "$complete" | $GREP " "`
37107         if test "x$has_space" != x; then
37108           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37109 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37110         fi
37111         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37112       fi
37113     fi
37114 
37115     # Now join together the path and the arguments once again
37116     if test "x$arguments" != xEOL; then
37117       new_complete="$new_path ${arguments% *}"
37118     else
37119       new_complete="$new_path"
37120     fi
37121 
37122     if test "x$complete" != "x$new_complete"; then
37123       LIPO="$new_complete"
37124       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37125 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37126     fi
37127   fi
37128 
37129   fi
37130 
37131   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37132     # Extract the first word of "mt", so it can be a program name with args.
37133 set dummy mt; ac_word=$2
37134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37135 $as_echo_n "checking for $ac_word... " >&6; }
37136 if ${ac_cv_prog_MT+:} false; then :
37137   $as_echo_n "(cached) " >&6
37138 else
37139   if test -n "$MT"; then
37140   ac_cv_prog_MT="$MT" # Let the user override the test.
37141 else
37142   ac_prog_rejected=no
37143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37144 for as_dir in $PATH
37145 do
37146   IFS=$as_save_IFS
37147   test -z "$as_dir" && as_dir=.
37148     for ac_exec_ext in '' $ac_executable_extensions; do
37149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37150     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37151        ac_prog_rejected=yes
37152        continue
37153      fi
37154     ac_cv_prog_MT="mt"
37155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37156     break 2
37157   fi
37158 done
37159   done
37160 IFS=$as_save_IFS
37161 
37162 if test $ac_prog_rejected = yes; then
37163   # We found a bogon in the path, so make sure we never use it.
37164   set dummy $ac_cv_prog_MT
37165   shift
37166   if test $# != 0; then
37167     # We chose a different compiler from the bogus one.
37168     # However, it has the same basename, so the bogon will be chosen
37169     # first if we set MT to just the basename; use the full file name.
37170     shift
37171     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37172   fi
37173 fi
37174 fi
37175 fi
37176 MT=$ac_cv_prog_MT
37177 if test -n "$MT"; then
37178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37179 $as_echo "$MT" >&6; }
37180 else
37181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37182 $as_echo "no" >&6; }
37183 fi
37184 
37185 
37186 
37187   # Only process if variable expands to non-empty
37188 
37189   if test "x$MT" != x; then
37190     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37191 
37192   # First separate the path from the arguments. This will split at the first
37193   # space.
37194   complete="$MT"
37195   path="${complete%% *}"
37196   tmp="$complete EOL"
37197   arguments="${tmp#* }"
37198 
37199   # Input might be given as Windows format, start by converting to
37200   # unix format.
37201   new_path=`$CYGPATH -u "$path"`
37202 
37203   # Now try to locate executable using which
37204   new_path=`$WHICH "$new_path" 2> /dev/null`
37205   # bat and cmd files are not always considered executable in cygwin causing which
37206   # to not find them
37207   if test "x$new_path" = x \
37208       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37209       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37210     new_path=`$CYGPATH -u "$path"`
37211   fi
37212   if test "x$new_path" = x; then
37213     # Oops. Which didn't find the executable.
37214     # The splitting of arguments from the executable at a space might have been incorrect,
37215     # since paths with space are more likely in Windows. Give it another try with the whole
37216     # argument.
37217     path="$complete"
37218     arguments="EOL"
37219     new_path=`$CYGPATH -u "$path"`
37220     new_path=`$WHICH "$new_path" 2> /dev/null`
37221     # bat and cmd files are not always considered executable in cygwin causing which
37222     # to not find them
37223     if test "x$new_path" = x \
37224         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37225         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37226       new_path=`$CYGPATH -u "$path"`
37227     fi
37228     if test "x$new_path" = x; then
37229       # It's still not found. Now this is an unrecoverable error.
37230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37231 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37232       has_space=`$ECHO "$complete" | $GREP " "`
37233       if test "x$has_space" != x; then
37234         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37236       fi
37237       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37238     fi
37239   fi
37240 
37241   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37242   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37243   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37244   # "foo.exe" is OK but "foo" is an error.
37245   #
37246   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37247   # It is also a way to make sure we got the proper file name for the real test later on.
37248   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37249   if test "x$test_shortpath" = x; then
37250     # Short path failed, file does not exist as specified.
37251     # Try adding .exe or .cmd
37252     if test -f "${new_path}.exe"; then
37253       input_to_shortpath="${new_path}.exe"
37254     elif test -f "${new_path}.cmd"; then
37255       input_to_shortpath="${new_path}.cmd"
37256     else
37257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37258 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37259       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37260 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37261       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37262     fi
37263   else
37264     input_to_shortpath="$new_path"
37265   fi
37266 
37267   # Call helper function which possibly converts this using DOS-style short mode.
37268   # If so, the updated path is stored in $new_path.
37269   new_path="$input_to_shortpath"
37270 
37271   input_path="$input_to_shortpath"
37272   # Check if we need to convert this using DOS-style short mode. If the path
37273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37274   # take no chances and rewrite it.
37275   # Note: m4 eats our [], so we need to use [ and ] instead.
37276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37277   if test "x$has_forbidden_chars" != x; then
37278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37282       # Going to short mode and back again did indeed matter. Since short mode is
37283       # case insensitive, let's make it lowercase to improve readability.
37284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37285       # Now convert it back to Unix-style (cygpath)
37286       input_path=`$CYGPATH -u "$shortmode_path"`
37287       new_path="$input_path"
37288     fi
37289   fi
37290 
37291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37292   if test "x$test_cygdrive_prefix" = x; then
37293     # As a simple fix, exclude /usr/bin since it's not a real path.
37294     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37296       # a path prefixed by /cygdrive for fixpath to work.
37297       new_path="$CYGWIN_ROOT_PATH$input_path"
37298     fi
37299   fi
37300 
37301   # remove trailing .exe if any
37302   new_path="${new_path/%.exe/}"
37303 
37304     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37305 
37306   # First separate the path from the arguments. This will split at the first
37307   # space.
37308   complete="$MT"
37309   path="${complete%% *}"
37310   tmp="$complete EOL"
37311   arguments="${tmp#* }"
37312 
37313   # Input might be given as Windows format, start by converting to
37314   # unix format.
37315   new_path="$path"
37316 
37317   windows_path="$new_path"
37318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37319     unix_path=`$CYGPATH -u "$windows_path"`
37320     new_path="$unix_path"
37321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37323     new_path="$unix_path"
37324   fi
37325 
37326 
37327   # Now try to locate executable using which
37328   new_path=`$WHICH "$new_path" 2> /dev/null`
37329 
37330   if test "x$new_path" = x; then
37331     # Oops. Which didn't find the executable.
37332     # The splitting of arguments from the executable at a space might have been incorrect,
37333     # since paths with space are more likely in Windows. Give it another try with the whole
37334     # argument.
37335     path="$complete"
37336     arguments="EOL"
37337     new_path="$path"
37338 
37339   windows_path="$new_path"
37340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37341     unix_path=`$CYGPATH -u "$windows_path"`
37342     new_path="$unix_path"
37343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37345     new_path="$unix_path"
37346   fi
37347 
37348 
37349     new_path=`$WHICH "$new_path" 2> /dev/null`
37350     # bat and cmd files are not always considered executable in MSYS causing which
37351     # to not find them
37352     if test "x$new_path" = x \
37353         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37354         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37355       new_path="$path"
37356 
37357   windows_path="$new_path"
37358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37359     unix_path=`$CYGPATH -u "$windows_path"`
37360     new_path="$unix_path"
37361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37363     new_path="$unix_path"
37364   fi
37365 
37366     fi
37367 
37368     if test "x$new_path" = x; then
37369       # It's still not found. Now this is an unrecoverable error.
37370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37371 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37372       has_space=`$ECHO "$complete" | $GREP " "`
37373       if test "x$has_space" != x; then
37374         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37375 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37376       fi
37377       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37378     fi
37379   fi
37380 
37381   # Now new_path has a complete unix path to the binary
37382   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37383     # Keep paths in /bin as-is, but remove trailing .exe if any
37384     new_path="${new_path/%.exe/}"
37385     # Do not save /bin paths to all_fixpath_prefixes!
37386   else
37387     # Not in mixed or Windows style, start by that.
37388     new_path=`cmd //c echo $new_path`
37389 
37390   input_path="$new_path"
37391   # Check if we need to convert this using DOS-style short mode. If the path
37392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37393   # take no chances and rewrite it.
37394   # Note: m4 eats our [], so we need to use [ and ] instead.
37395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37396   if test "x$has_forbidden_chars" != x; then
37397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37398     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37399   fi
37400 
37401     # Output is in $new_path
37402 
37403   windows_path="$new_path"
37404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37405     unix_path=`$CYGPATH -u "$windows_path"`
37406     new_path="$unix_path"
37407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37409     new_path="$unix_path"
37410   fi
37411 
37412     # remove trailing .exe if any
37413     new_path="${new_path/%.exe/}"
37414 
37415     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37416     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37417   fi
37418 
37419     else
37420       # We're on a unix platform. Hooray! :)
37421       # First separate the path from the arguments. This will split at the first
37422       # space.
37423       complete="$MT"
37424       path="${complete%% *}"
37425       tmp="$complete EOL"
37426       arguments="${tmp#* }"
37427 
37428       # Cannot rely on the command "which" here since it doesn't always work.
37429       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37430       if test -z "$is_absolute_path"; then
37431         # Path to executable is not absolute. Find it.
37432         IFS_save="$IFS"
37433         IFS=:
37434         for p in $PATH; do
37435           if test -f "$p/$path" && test -x "$p/$path"; then
37436             new_path="$p/$path"
37437             break
37438           fi
37439         done
37440         IFS="$IFS_save"
37441       else
37442         # This is an absolute path, we can use it without further modifications.
37443         new_path="$path"
37444       fi
37445 
37446       if test "x$new_path" = x; then
37447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37448 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37449         has_space=`$ECHO "$complete" | $GREP " "`
37450         if test "x$has_space" != x; then
37451           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37452 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37453         fi
37454         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37455       fi
37456     fi
37457 
37458     # Now join together the path and the arguments once again
37459     if test "x$arguments" != xEOL; then
37460       new_complete="$new_path ${arguments% *}"
37461     else
37462       new_complete="$new_path"
37463     fi
37464 
37465     if test "x$complete" != "x$new_complete"; then
37466       MT="$new_complete"
37467       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37468 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37469     fi
37470   fi
37471 
37472     # Setup the resource compiler (RC)
37473     # Extract the first word of "rc", so it can be a program name with args.
37474 set dummy rc; ac_word=$2
37475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37476 $as_echo_n "checking for $ac_word... " >&6; }
37477 if ${ac_cv_prog_RC+:} false; then :
37478   $as_echo_n "(cached) " >&6
37479 else
37480   if test -n "$RC"; then
37481   ac_cv_prog_RC="$RC" # Let the user override the test.
37482 else
37483   ac_prog_rejected=no
37484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37485 for as_dir in $PATH
37486 do
37487   IFS=$as_save_IFS
37488   test -z "$as_dir" && as_dir=.
37489     for ac_exec_ext in '' $ac_executable_extensions; do
37490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37491     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37492        ac_prog_rejected=yes
37493        continue
37494      fi
37495     ac_cv_prog_RC="rc"
37496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37497     break 2
37498   fi
37499 done
37500   done
37501 IFS=$as_save_IFS
37502 
37503 if test $ac_prog_rejected = yes; then
37504   # We found a bogon in the path, so make sure we never use it.
37505   set dummy $ac_cv_prog_RC
37506   shift
37507   if test $# != 0; then
37508     # We chose a different compiler from the bogus one.
37509     # However, it has the same basename, so the bogon will be chosen
37510     # first if we set RC to just the basename; use the full file name.
37511     shift
37512     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37513   fi
37514 fi
37515 fi
37516 fi
37517 RC=$ac_cv_prog_RC
37518 if test -n "$RC"; then
37519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37520 $as_echo "$RC" >&6; }
37521 else
37522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37523 $as_echo "no" >&6; }
37524 fi
37525 
37526 
37527 
37528   # Only process if variable expands to non-empty
37529 
37530   if test "x$RC" != x; then
37531     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37532 
37533   # First separate the path from the arguments. This will split at the first
37534   # space.
37535   complete="$RC"
37536   path="${complete%% *}"
37537   tmp="$complete EOL"
37538   arguments="${tmp#* }"
37539 
37540   # Input might be given as Windows format, start by converting to
37541   # unix format.
37542   new_path=`$CYGPATH -u "$path"`
37543 
37544   # Now try to locate executable using which
37545   new_path=`$WHICH "$new_path" 2> /dev/null`
37546   # bat and cmd files are not always considered executable in cygwin causing which
37547   # to not find them
37548   if test "x$new_path" = x \
37549       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37550       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37551     new_path=`$CYGPATH -u "$path"`
37552   fi
37553   if test "x$new_path" = x; then
37554     # Oops. Which didn't find the executable.
37555     # The splitting of arguments from the executable at a space might have been incorrect,
37556     # since paths with space are more likely in Windows. Give it another try with the whole
37557     # argument.
37558     path="$complete"
37559     arguments="EOL"
37560     new_path=`$CYGPATH -u "$path"`
37561     new_path=`$WHICH "$new_path" 2> /dev/null`
37562     # bat and cmd files are not always considered executable in cygwin causing which
37563     # to not find them
37564     if test "x$new_path" = x \
37565         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37566         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37567       new_path=`$CYGPATH -u "$path"`
37568     fi
37569     if test "x$new_path" = x; then
37570       # It's still not found. Now this is an unrecoverable error.
37571       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37572 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37573       has_space=`$ECHO "$complete" | $GREP " "`
37574       if test "x$has_space" != x; then
37575         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37576 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37577       fi
37578       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37579     fi
37580   fi
37581 
37582   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37583   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37584   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37585   # "foo.exe" is OK but "foo" is an error.
37586   #
37587   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37588   # It is also a way to make sure we got the proper file name for the real test later on.
37589   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37590   if test "x$test_shortpath" = x; then
37591     # Short path failed, file does not exist as specified.
37592     # Try adding .exe or .cmd
37593     if test -f "${new_path}.exe"; then
37594       input_to_shortpath="${new_path}.exe"
37595     elif test -f "${new_path}.cmd"; then
37596       input_to_shortpath="${new_path}.cmd"
37597     else
37598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37599 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37600       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37601 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37602       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37603     fi
37604   else
37605     input_to_shortpath="$new_path"
37606   fi
37607 
37608   # Call helper function which possibly converts this using DOS-style short mode.
37609   # If so, the updated path is stored in $new_path.
37610   new_path="$input_to_shortpath"
37611 
37612   input_path="$input_to_shortpath"
37613   # Check if we need to convert this using DOS-style short mode. If the path
37614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37615   # take no chances and rewrite it.
37616   # Note: m4 eats our [], so we need to use [ and ] instead.
37617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37618   if test "x$has_forbidden_chars" != x; then
37619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37620     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37621     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37622     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37623       # Going to short mode and back again did indeed matter. Since short mode is
37624       # case insensitive, let's make it lowercase to improve readability.
37625       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37626       # Now convert it back to Unix-style (cygpath)
37627       input_path=`$CYGPATH -u "$shortmode_path"`
37628       new_path="$input_path"
37629     fi
37630   fi
37631 
37632   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37633   if test "x$test_cygdrive_prefix" = x; then
37634     # As a simple fix, exclude /usr/bin since it's not a real path.
37635     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37636       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37637       # a path prefixed by /cygdrive for fixpath to work.
37638       new_path="$CYGWIN_ROOT_PATH$input_path"
37639     fi
37640   fi
37641 
37642   # remove trailing .exe if any
37643   new_path="${new_path/%.exe/}"
37644 
37645     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37646 
37647   # First separate the path from the arguments. This will split at the first
37648   # space.
37649   complete="$RC"
37650   path="${complete%% *}"
37651   tmp="$complete EOL"
37652   arguments="${tmp#* }"
37653 
37654   # Input might be given as Windows format, start by converting to
37655   # unix format.
37656   new_path="$path"
37657 
37658   windows_path="$new_path"
37659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37660     unix_path=`$CYGPATH -u "$windows_path"`
37661     new_path="$unix_path"
37662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37664     new_path="$unix_path"
37665   fi
37666 
37667 
37668   # Now try to locate executable using which
37669   new_path=`$WHICH "$new_path" 2> /dev/null`
37670 
37671   if test "x$new_path" = x; then
37672     # Oops. Which didn't find the executable.
37673     # The splitting of arguments from the executable at a space might have been incorrect,
37674     # since paths with space are more likely in Windows. Give it another try with the whole
37675     # argument.
37676     path="$complete"
37677     arguments="EOL"
37678     new_path="$path"
37679 
37680   windows_path="$new_path"
37681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37682     unix_path=`$CYGPATH -u "$windows_path"`
37683     new_path="$unix_path"
37684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37686     new_path="$unix_path"
37687   fi
37688 
37689 
37690     new_path=`$WHICH "$new_path" 2> /dev/null`
37691     # bat and cmd files are not always considered executable in MSYS causing which
37692     # to not find them
37693     if test "x$new_path" = x \
37694         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37695         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37696       new_path="$path"
37697 
37698   windows_path="$new_path"
37699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37700     unix_path=`$CYGPATH -u "$windows_path"`
37701     new_path="$unix_path"
37702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37704     new_path="$unix_path"
37705   fi
37706 
37707     fi
37708 
37709     if test "x$new_path" = x; then
37710       # It's still not found. Now this is an unrecoverable error.
37711       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37712 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37713       has_space=`$ECHO "$complete" | $GREP " "`
37714       if test "x$has_space" != x; then
37715         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37717       fi
37718       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37719     fi
37720   fi
37721 
37722   # Now new_path has a complete unix path to the binary
37723   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37724     # Keep paths in /bin as-is, but remove trailing .exe if any
37725     new_path="${new_path/%.exe/}"
37726     # Do not save /bin paths to all_fixpath_prefixes!
37727   else
37728     # Not in mixed or Windows style, start by that.
37729     new_path=`cmd //c echo $new_path`
37730 
37731   input_path="$new_path"
37732   # Check if we need to convert this using DOS-style short mode. If the path
37733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37734   # take no chances and rewrite it.
37735   # Note: m4 eats our [], so we need to use [ and ] instead.
37736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37737   if test "x$has_forbidden_chars" != x; then
37738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37739     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37740   fi
37741 
37742     # Output is in $new_path
37743 
37744   windows_path="$new_path"
37745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37746     unix_path=`$CYGPATH -u "$windows_path"`
37747     new_path="$unix_path"
37748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37750     new_path="$unix_path"
37751   fi
37752 
37753     # remove trailing .exe if any
37754     new_path="${new_path/%.exe/}"
37755 
37756     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37757     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37758   fi
37759 
37760     else
37761       # We're on a unix platform. Hooray! :)
37762       # First separate the path from the arguments. This will split at the first
37763       # space.
37764       complete="$RC"
37765       path="${complete%% *}"
37766       tmp="$complete EOL"
37767       arguments="${tmp#* }"
37768 
37769       # Cannot rely on the command "which" here since it doesn't always work.
37770       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37771       if test -z "$is_absolute_path"; then
37772         # Path to executable is not absolute. Find it.
37773         IFS_save="$IFS"
37774         IFS=:
37775         for p in $PATH; do
37776           if test -f "$p/$path" && test -x "$p/$path"; then
37777             new_path="$p/$path"
37778             break
37779           fi
37780         done
37781         IFS="$IFS_save"
37782       else
37783         # This is an absolute path, we can use it without further modifications.
37784         new_path="$path"
37785       fi
37786 
37787       if test "x$new_path" = x; then
37788         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37789 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37790         has_space=`$ECHO "$complete" | $GREP " "`
37791         if test "x$has_space" != x; then
37792           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37793 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37794         fi
37795         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37796       fi
37797     fi
37798 
37799     # Now join together the path and the arguments once again
37800     if test "x$arguments" != xEOL; then
37801       new_complete="$new_path ${arguments% *}"
37802     else
37803       new_complete="$new_path"
37804     fi
37805 
37806     if test "x$complete" != "x$new_complete"; then
37807       RC="$new_complete"
37808       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37809 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37810     fi
37811   fi
37812 
37813     # Extract the first word of "dumpbin", so it can be a program name with args.
37814 set dummy dumpbin; ac_word=$2
37815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37816 $as_echo_n "checking for $ac_word... " >&6; }
37817 if ${ac_cv_prog_DUMPBIN+:} false; then :
37818   $as_echo_n "(cached) " >&6
37819 else
37820   if test -n "$DUMPBIN"; then
37821   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37822 else
37823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37824 for as_dir in $PATH
37825 do
37826   IFS=$as_save_IFS
37827   test -z "$as_dir" && as_dir=.
37828     for ac_exec_ext in '' $ac_executable_extensions; do
37829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37830     ac_cv_prog_DUMPBIN="dumpbin"
37831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37832     break 2
37833   fi
37834 done
37835   done
37836 IFS=$as_save_IFS
37837 
37838 fi
37839 fi
37840 DUMPBIN=$ac_cv_prog_DUMPBIN
37841 if test -n "$DUMPBIN"; then
37842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37843 $as_echo "$DUMPBIN" >&6; }
37844 else
37845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37846 $as_echo "no" >&6; }
37847 fi
37848 
37849 
37850 
37851   # Only process if variable expands to non-empty
37852 
37853   if test "x$DUMPBIN" != x; then
37854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37855 
37856   # First separate the path from the arguments. This will split at the first
37857   # space.
37858   complete="$DUMPBIN"
37859   path="${complete%% *}"
37860   tmp="$complete EOL"
37861   arguments="${tmp#* }"
37862 
37863   # Input might be given as Windows format, start by converting to
37864   # unix format.
37865   new_path=`$CYGPATH -u "$path"`
37866 
37867   # Now try to locate executable using which
37868   new_path=`$WHICH "$new_path" 2> /dev/null`
37869   # bat and cmd files are not always considered executable in cygwin causing which
37870   # to not find them
37871   if test "x$new_path" = x \
37872       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37873       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37874     new_path=`$CYGPATH -u "$path"`
37875   fi
37876   if test "x$new_path" = x; then
37877     # Oops. Which didn't find the executable.
37878     # The splitting of arguments from the executable at a space might have been incorrect,
37879     # since paths with space are more likely in Windows. Give it another try with the whole
37880     # argument.
37881     path="$complete"
37882     arguments="EOL"
37883     new_path=`$CYGPATH -u "$path"`
37884     new_path=`$WHICH "$new_path" 2> /dev/null`
37885     # bat and cmd files are not always considered executable in cygwin causing which
37886     # to not find them
37887     if test "x$new_path" = x \
37888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37890       new_path=`$CYGPATH -u "$path"`
37891     fi
37892     if test "x$new_path" = x; then
37893       # It's still not found. Now this is an unrecoverable error.
37894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37895 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37896       has_space=`$ECHO "$complete" | $GREP " "`
37897       if test "x$has_space" != x; then
37898         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37899 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37900       fi
37901       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37902     fi
37903   fi
37904 
37905   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37906   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37907   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37908   # "foo.exe" is OK but "foo" is an error.
37909   #
37910   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37911   # It is also a way to make sure we got the proper file name for the real test later on.
37912   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37913   if test "x$test_shortpath" = x; then
37914     # Short path failed, file does not exist as specified.
37915     # Try adding .exe or .cmd
37916     if test -f "${new_path}.exe"; then
37917       input_to_shortpath="${new_path}.exe"
37918     elif test -f "${new_path}.cmd"; then
37919       input_to_shortpath="${new_path}.cmd"
37920     else
37921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37922 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37923       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37924 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37925       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37926     fi
37927   else
37928     input_to_shortpath="$new_path"
37929   fi
37930 
37931   # Call helper function which possibly converts this using DOS-style short mode.
37932   # If so, the updated path is stored in $new_path.
37933   new_path="$input_to_shortpath"
37934 
37935   input_path="$input_to_shortpath"
37936   # Check if we need to convert this using DOS-style short mode. If the path
37937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37938   # take no chances and rewrite it.
37939   # Note: m4 eats our [], so we need to use [ and ] instead.
37940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37941   if test "x$has_forbidden_chars" != x; then
37942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37946       # Going to short mode and back again did indeed matter. Since short mode is
37947       # case insensitive, let's make it lowercase to improve readability.
37948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37949       # Now convert it back to Unix-style (cygpath)
37950       input_path=`$CYGPATH -u "$shortmode_path"`
37951       new_path="$input_path"
37952     fi
37953   fi
37954 
37955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37956   if test "x$test_cygdrive_prefix" = x; then
37957     # As a simple fix, exclude /usr/bin since it's not a real path.
37958     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37960       # a path prefixed by /cygdrive for fixpath to work.
37961       new_path="$CYGWIN_ROOT_PATH$input_path"
37962     fi
37963   fi
37964 
37965   # remove trailing .exe if any
37966   new_path="${new_path/%.exe/}"
37967 
37968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37969 
37970   # First separate the path from the arguments. This will split at the first
37971   # space.
37972   complete="$DUMPBIN"
37973   path="${complete%% *}"
37974   tmp="$complete EOL"
37975   arguments="${tmp#* }"
37976 
37977   # Input might be given as Windows format, start by converting to
37978   # unix format.
37979   new_path="$path"
37980 
37981   windows_path="$new_path"
37982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37983     unix_path=`$CYGPATH -u "$windows_path"`
37984     new_path="$unix_path"
37985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37987     new_path="$unix_path"
37988   fi
37989 
37990 
37991   # Now try to locate executable using which
37992   new_path=`$WHICH "$new_path" 2> /dev/null`
37993 
37994   if test "x$new_path" = x; then
37995     # Oops. Which didn't find the executable.
37996     # The splitting of arguments from the executable at a space might have been incorrect,
37997     # since paths with space are more likely in Windows. Give it another try with the whole
37998     # argument.
37999     path="$complete"
38000     arguments="EOL"
38001     new_path="$path"
38002 
38003   windows_path="$new_path"
38004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38005     unix_path=`$CYGPATH -u "$windows_path"`
38006     new_path="$unix_path"
38007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38009     new_path="$unix_path"
38010   fi
38011 
38012 
38013     new_path=`$WHICH "$new_path" 2> /dev/null`
38014     # bat and cmd files are not always considered executable in MSYS causing which
38015     # to not find them
38016     if test "x$new_path" = x \
38017         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38018         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38019       new_path="$path"
38020 
38021   windows_path="$new_path"
38022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38023     unix_path=`$CYGPATH -u "$windows_path"`
38024     new_path="$unix_path"
38025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38027     new_path="$unix_path"
38028   fi
38029 
38030     fi
38031 
38032     if test "x$new_path" = x; then
38033       # It's still not found. Now this is an unrecoverable error.
38034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38035 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38036       has_space=`$ECHO "$complete" | $GREP " "`
38037       if test "x$has_space" != x; then
38038         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38039 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38040       fi
38041       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38042     fi
38043   fi
38044 
38045   # Now new_path has a complete unix path to the binary
38046   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38047     # Keep paths in /bin as-is, but remove trailing .exe if any
38048     new_path="${new_path/%.exe/}"
38049     # Do not save /bin paths to all_fixpath_prefixes!
38050   else
38051     # Not in mixed or Windows style, start by that.
38052     new_path=`cmd //c echo $new_path`
38053 
38054   input_path="$new_path"
38055   # Check if we need to convert this using DOS-style short mode. If the path
38056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38057   # take no chances and rewrite it.
38058   # Note: m4 eats our [], so we need to use [ and ] instead.
38059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38060   if test "x$has_forbidden_chars" != x; then
38061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38063   fi
38064 
38065     # Output is in $new_path
38066 
38067   windows_path="$new_path"
38068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38069     unix_path=`$CYGPATH -u "$windows_path"`
38070     new_path="$unix_path"
38071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38073     new_path="$unix_path"
38074   fi
38075 
38076     # remove trailing .exe if any
38077     new_path="${new_path/%.exe/}"
38078 
38079     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38080     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38081   fi
38082 
38083     else
38084       # We're on a unix platform. Hooray! :)
38085       # First separate the path from the arguments. This will split at the first
38086       # space.
38087       complete="$DUMPBIN"
38088       path="${complete%% *}"
38089       tmp="$complete EOL"
38090       arguments="${tmp#* }"
38091 
38092       # Cannot rely on the command "which" here since it doesn't always work.
38093       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38094       if test -z "$is_absolute_path"; then
38095         # Path to executable is not absolute. Find it.
38096         IFS_save="$IFS"
38097         IFS=:
38098         for p in $PATH; do
38099           if test -f "$p/$path" && test -x "$p/$path"; then
38100             new_path="$p/$path"
38101             break
38102           fi
38103         done
38104         IFS="$IFS_save"
38105       else
38106         # This is an absolute path, we can use it without further modifications.
38107         new_path="$path"
38108       fi
38109 
38110       if test "x$new_path" = x; then
38111         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38112 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38113         has_space=`$ECHO "$complete" | $GREP " "`
38114         if test "x$has_space" != x; then
38115           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38116 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38117         fi
38118         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38119       fi
38120     fi
38121 
38122     # Now join together the path and the arguments once again
38123     if test "x$arguments" != xEOL; then
38124       new_complete="$new_path ${arguments% *}"
38125     else
38126       new_complete="$new_path"
38127     fi
38128 
38129     if test "x$complete" != "x$new_complete"; then
38130       DUMPBIN="$new_complete"
38131       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38132 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38133     fi
38134   fi
38135 
38136     # We need to check for 'msbuild.exe' because at the place where we expect to
38137     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38138     # won't find the 'msbuild.exe' executable in that case (and the
38139     # 'ac_executable_extensions' is unusable due to performance reasons).
38140     # Notice that we intentionally don't fix up the path to MSBUILD because we
38141     # will call it in a DOS shell during freetype detection on Windows (see
38142     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38143     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38144 set dummy msbuild.exe; ac_word=$2
38145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38146 $as_echo_n "checking for $ac_word... " >&6; }
38147 if ${ac_cv_prog_MSBUILD+:} false; then :
38148   $as_echo_n "(cached) " >&6
38149 else
38150   if test -n "$MSBUILD"; then
38151   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38152 else
38153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38154 for as_dir in $PATH
38155 do
38156   IFS=$as_save_IFS
38157   test -z "$as_dir" && as_dir=.
38158     for ac_exec_ext in '' $ac_executable_extensions; do
38159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38160     ac_cv_prog_MSBUILD="msbuild.exe"
38161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38162     break 2
38163   fi
38164 done
38165   done
38166 IFS=$as_save_IFS
38167 
38168 fi
38169 fi
38170 MSBUILD=$ac_cv_prog_MSBUILD
38171 if test -n "$MSBUILD"; then
38172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38173 $as_echo "$MSBUILD" >&6; }
38174 else
38175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38176 $as_echo "no" >&6; }
38177 fi
38178 
38179 
38180   fi
38181 
38182   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38183 
38184 
38185   # Publish this variable in the help.
38186 
38187 
38188   if [ -z "${STRIP+x}" ]; then
38189     # The variable is not set by user, try to locate tool using the code snippet
38190     for ac_prog in strip
38191 do
38192   # Extract the first word of "$ac_prog", so it can be a program name with args.
38193 set dummy $ac_prog; ac_word=$2
38194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38195 $as_echo_n "checking for $ac_word... " >&6; }
38196 if ${ac_cv_path_STRIP+:} false; then :
38197   $as_echo_n "(cached) " >&6
38198 else
38199   case $STRIP in
38200   [\\/]* | ?:[\\/]*)
38201   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38202   ;;
38203   *)
38204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38205 for as_dir in $PATH
38206 do
38207   IFS=$as_save_IFS
38208   test -z "$as_dir" && as_dir=.
38209     for ac_exec_ext in '' $ac_executable_extensions; do
38210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38211     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38213     break 2
38214   fi
38215 done
38216   done
38217 IFS=$as_save_IFS
38218 
38219   ;;
38220 esac
38221 fi
38222 STRIP=$ac_cv_path_STRIP
38223 if test -n "$STRIP"; then
38224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38225 $as_echo "$STRIP" >&6; }
38226 else
38227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38228 $as_echo "no" >&6; }
38229 fi
38230 
38231 
38232   test -n "$STRIP" && break
38233 done
38234 
38235   else
38236     # The variable is set, but is it from the command line or the environment?
38237 
38238     # Try to remove the string !STRIP! from our list.
38239     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38240     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38241       # If it failed, the variable was not from the command line. Ignore it,
38242       # but warn the user (except for BASH, which is always set by the calling BASH).
38243       if test "xSTRIP" != xBASH; then
38244         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38245 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38246       fi
38247       # Try to locate tool using the code snippet
38248       for ac_prog in strip
38249 do
38250   # Extract the first word of "$ac_prog", so it can be a program name with args.
38251 set dummy $ac_prog; ac_word=$2
38252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38253 $as_echo_n "checking for $ac_word... " >&6; }
38254 if ${ac_cv_path_STRIP+:} false; then :
38255   $as_echo_n "(cached) " >&6
38256 else
38257   case $STRIP in
38258   [\\/]* | ?:[\\/]*)
38259   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38260   ;;
38261   *)
38262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38263 for as_dir in $PATH
38264 do
38265   IFS=$as_save_IFS
38266   test -z "$as_dir" && as_dir=.
38267     for ac_exec_ext in '' $ac_executable_extensions; do
38268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38269     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38271     break 2
38272   fi
38273 done
38274   done
38275 IFS=$as_save_IFS
38276 
38277   ;;
38278 esac
38279 fi
38280 STRIP=$ac_cv_path_STRIP
38281 if test -n "$STRIP"; then
38282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38283 $as_echo "$STRIP" >&6; }
38284 else
38285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38286 $as_echo "no" >&6; }
38287 fi
38288 
38289 
38290   test -n "$STRIP" && break
38291 done
38292 
38293     else
38294       # If it succeeded, then it was overridden by the user. We will use it
38295       # for the tool.
38296 
38297       # First remove it from the list of overridden variables, so we can test
38298       # for unknown variables in the end.
38299       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38300 
38301       # Check if we try to supply an empty value
38302       if test "x$STRIP" = x; then
38303         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38304 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38305         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38306 $as_echo_n "checking for STRIP... " >&6; }
38307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38308 $as_echo "disabled" >&6; }
38309       else
38310         # Check if the provided tool contains a complete path.
38311         tool_specified="$STRIP"
38312         tool_basename="${tool_specified##*/}"
38313         if test "x$tool_basename" = "x$tool_specified"; then
38314           # A command without a complete path is provided, search $PATH.
38315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38316 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38317           # Extract the first word of "$tool_basename", so it can be a program name with args.
38318 set dummy $tool_basename; ac_word=$2
38319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320 $as_echo_n "checking for $ac_word... " >&6; }
38321 if ${ac_cv_path_STRIP+:} false; then :
38322   $as_echo_n "(cached) " >&6
38323 else
38324   case $STRIP in
38325   [\\/]* | ?:[\\/]*)
38326   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38327   ;;
38328   *)
38329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38330 for as_dir in $PATH
38331 do
38332   IFS=$as_save_IFS
38333   test -z "$as_dir" && as_dir=.
38334     for ac_exec_ext in '' $ac_executable_extensions; do
38335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38336     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38338     break 2
38339   fi
38340 done
38341   done
38342 IFS=$as_save_IFS
38343 
38344   ;;
38345 esac
38346 fi
38347 STRIP=$ac_cv_path_STRIP
38348 if test -n "$STRIP"; then
38349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38350 $as_echo "$STRIP" >&6; }
38351 else
38352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38353 $as_echo "no" >&6; }
38354 fi
38355 
38356 
38357           if test "x$STRIP" = x; then
38358             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38359           fi
38360         else
38361           # Otherwise we believe it is a complete path. Use it as it is.
38362           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38363 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38364           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38365 $as_echo_n "checking for STRIP... " >&6; }
38366           if test ! -x "$tool_specified"; then
38367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38368 $as_echo "not found" >&6; }
38369             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38370           fi
38371           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38372 $as_echo "$tool_specified" >&6; }
38373         fi
38374       fi
38375     fi
38376 
38377   fi
38378 
38379 
38380 
38381   # Only process if variable expands to non-empty
38382 
38383   if test "x$STRIP" != x; then
38384     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38385 
38386   # First separate the path from the arguments. This will split at the first
38387   # space.
38388   complete="$STRIP"
38389   path="${complete%% *}"
38390   tmp="$complete EOL"
38391   arguments="${tmp#* }"
38392 
38393   # Input might be given as Windows format, start by converting to
38394   # unix format.
38395   new_path=`$CYGPATH -u "$path"`
38396 
38397   # Now try to locate executable using which
38398   new_path=`$WHICH "$new_path" 2> /dev/null`
38399   # bat and cmd files are not always considered executable in cygwin causing which
38400   # to not find them
38401   if test "x$new_path" = x \
38402       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38403       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38404     new_path=`$CYGPATH -u "$path"`
38405   fi
38406   if test "x$new_path" = x; then
38407     # Oops. Which didn't find the executable.
38408     # The splitting of arguments from the executable at a space might have been incorrect,
38409     # since paths with space are more likely in Windows. Give it another try with the whole
38410     # argument.
38411     path="$complete"
38412     arguments="EOL"
38413     new_path=`$CYGPATH -u "$path"`
38414     new_path=`$WHICH "$new_path" 2> /dev/null`
38415     # bat and cmd files are not always considered executable in cygwin causing which
38416     # to not find them
38417     if test "x$new_path" = x \
38418         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38419         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38420       new_path=`$CYGPATH -u "$path"`
38421     fi
38422     if test "x$new_path" = x; then
38423       # It's still not found. Now this is an unrecoverable error.
38424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38425 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38426       has_space=`$ECHO "$complete" | $GREP " "`
38427       if test "x$has_space" != x; then
38428         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38429 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38430       fi
38431       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38432     fi
38433   fi
38434 
38435   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38436   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38437   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38438   # "foo.exe" is OK but "foo" is an error.
38439   #
38440   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38441   # It is also a way to make sure we got the proper file name for the real test later on.
38442   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38443   if test "x$test_shortpath" = x; then
38444     # Short path failed, file does not exist as specified.
38445     # Try adding .exe or .cmd
38446     if test -f "${new_path}.exe"; then
38447       input_to_shortpath="${new_path}.exe"
38448     elif test -f "${new_path}.cmd"; then
38449       input_to_shortpath="${new_path}.cmd"
38450     else
38451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38452 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38453       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38454 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38455       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38456     fi
38457   else
38458     input_to_shortpath="$new_path"
38459   fi
38460 
38461   # Call helper function which possibly converts this using DOS-style short mode.
38462   # If so, the updated path is stored in $new_path.
38463   new_path="$input_to_shortpath"
38464 
38465   input_path="$input_to_shortpath"
38466   # Check if we need to convert this using DOS-style short mode. If the path
38467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38468   # take no chances and rewrite it.
38469   # Note: m4 eats our [], so we need to use [ and ] instead.
38470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38471   if test "x$has_forbidden_chars" != x; then
38472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38473     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38474     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38475     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38476       # Going to short mode and back again did indeed matter. Since short mode is
38477       # case insensitive, let's make it lowercase to improve readability.
38478       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38479       # Now convert it back to Unix-style (cygpath)
38480       input_path=`$CYGPATH -u "$shortmode_path"`
38481       new_path="$input_path"
38482     fi
38483   fi
38484 
38485   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38486   if test "x$test_cygdrive_prefix" = x; then
38487     # As a simple fix, exclude /usr/bin since it's not a real path.
38488     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38489       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38490       # a path prefixed by /cygdrive for fixpath to work.
38491       new_path="$CYGWIN_ROOT_PATH$input_path"
38492     fi
38493   fi
38494 
38495   # remove trailing .exe if any
38496   new_path="${new_path/%.exe/}"
38497 
38498     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38499 
38500   # First separate the path from the arguments. This will split at the first
38501   # space.
38502   complete="$STRIP"
38503   path="${complete%% *}"
38504   tmp="$complete EOL"
38505   arguments="${tmp#* }"
38506 
38507   # Input might be given as Windows format, start by converting to
38508   # unix format.
38509   new_path="$path"
38510 
38511   windows_path="$new_path"
38512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38513     unix_path=`$CYGPATH -u "$windows_path"`
38514     new_path="$unix_path"
38515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38517     new_path="$unix_path"
38518   fi
38519 
38520 
38521   # Now try to locate executable using which
38522   new_path=`$WHICH "$new_path" 2> /dev/null`
38523 
38524   if test "x$new_path" = x; then
38525     # Oops. Which didn't find the executable.
38526     # The splitting of arguments from the executable at a space might have been incorrect,
38527     # since paths with space are more likely in Windows. Give it another try with the whole
38528     # argument.
38529     path="$complete"
38530     arguments="EOL"
38531     new_path="$path"
38532 
38533   windows_path="$new_path"
38534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38535     unix_path=`$CYGPATH -u "$windows_path"`
38536     new_path="$unix_path"
38537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38539     new_path="$unix_path"
38540   fi
38541 
38542 
38543     new_path=`$WHICH "$new_path" 2> /dev/null`
38544     # bat and cmd files are not always considered executable in MSYS causing which
38545     # to not find them
38546     if test "x$new_path" = x \
38547         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38548         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38549       new_path="$path"
38550 
38551   windows_path="$new_path"
38552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38553     unix_path=`$CYGPATH -u "$windows_path"`
38554     new_path="$unix_path"
38555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38557     new_path="$unix_path"
38558   fi
38559 
38560     fi
38561 
38562     if test "x$new_path" = x; then
38563       # It's still not found. Now this is an unrecoverable error.
38564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38565 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38566       has_space=`$ECHO "$complete" | $GREP " "`
38567       if test "x$has_space" != x; then
38568         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38569 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38570       fi
38571       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38572     fi
38573   fi
38574 
38575   # Now new_path has a complete unix path to the binary
38576   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38577     # Keep paths in /bin as-is, but remove trailing .exe if any
38578     new_path="${new_path/%.exe/}"
38579     # Do not save /bin paths to all_fixpath_prefixes!
38580   else
38581     # Not in mixed or Windows style, start by that.
38582     new_path=`cmd //c echo $new_path`
38583 
38584   input_path="$new_path"
38585   # Check if we need to convert this using DOS-style short mode. If the path
38586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38587   # take no chances and rewrite it.
38588   # Note: m4 eats our [], so we need to use [ and ] instead.
38589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38590   if test "x$has_forbidden_chars" != x; then
38591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38593   fi
38594 
38595     # Output is in $new_path
38596 
38597   windows_path="$new_path"
38598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38599     unix_path=`$CYGPATH -u "$windows_path"`
38600     new_path="$unix_path"
38601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38603     new_path="$unix_path"
38604   fi
38605 
38606     # remove trailing .exe if any
38607     new_path="${new_path/%.exe/}"
38608 
38609     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38610     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38611   fi
38612 
38613     else
38614       # We're on a unix platform. Hooray! :)
38615       # First separate the path from the arguments. This will split at the first
38616       # space.
38617       complete="$STRIP"
38618       path="${complete%% *}"
38619       tmp="$complete EOL"
38620       arguments="${tmp#* }"
38621 
38622       # Cannot rely on the command "which" here since it doesn't always work.
38623       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38624       if test -z "$is_absolute_path"; then
38625         # Path to executable is not absolute. Find it.
38626         IFS_save="$IFS"
38627         IFS=:
38628         for p in $PATH; do
38629           if test -f "$p/$path" && test -x "$p/$path"; then
38630             new_path="$p/$path"
38631             break
38632           fi
38633         done
38634         IFS="$IFS_save"
38635       else
38636         # This is an absolute path, we can use it without further modifications.
38637         new_path="$path"
38638       fi
38639 
38640       if test "x$new_path" = x; then
38641         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38642 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38643         has_space=`$ECHO "$complete" | $GREP " "`
38644         if test "x$has_space" != x; then
38645           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38646 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38647         fi
38648         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38649       fi
38650     fi
38651 
38652     # Now join together the path and the arguments once again
38653     if test "x$arguments" != xEOL; then
38654       new_complete="$new_path ${arguments% *}"
38655     else
38656       new_complete="$new_path"
38657     fi
38658 
38659     if test "x$complete" != "x$new_complete"; then
38660       STRIP="$new_complete"
38661       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38662 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38663     fi
38664   fi
38665 
38666 
38667 
38668   # Publish this variable in the help.
38669 
38670 
38671   if [ -z "${NM+x}" ]; then
38672     # The variable is not set by user, try to locate tool using the code snippet
38673     for ac_prog in nm
38674 do
38675   # Extract the first word of "$ac_prog", so it can be a program name with args.
38676 set dummy $ac_prog; ac_word=$2
38677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38678 $as_echo_n "checking for $ac_word... " >&6; }
38679 if ${ac_cv_path_NM+:} false; then :
38680   $as_echo_n "(cached) " >&6
38681 else
38682   case $NM in
38683   [\\/]* | ?:[\\/]*)
38684   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38685   ;;
38686   *)
38687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38688 for as_dir in $PATH
38689 do
38690   IFS=$as_save_IFS
38691   test -z "$as_dir" && as_dir=.
38692     for ac_exec_ext in '' $ac_executable_extensions; do
38693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38694     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38696     break 2
38697   fi
38698 done
38699   done
38700 IFS=$as_save_IFS
38701 
38702   ;;
38703 esac
38704 fi
38705 NM=$ac_cv_path_NM
38706 if test -n "$NM"; then
38707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38708 $as_echo "$NM" >&6; }
38709 else
38710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38711 $as_echo "no" >&6; }
38712 fi
38713 
38714 
38715   test -n "$NM" && break
38716 done
38717 
38718   else
38719     # The variable is set, but is it from the command line or the environment?
38720 
38721     # Try to remove the string !NM! from our list.
38722     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38723     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38724       # If it failed, the variable was not from the command line. Ignore it,
38725       # but warn the user (except for BASH, which is always set by the calling BASH).
38726       if test "xNM" != xBASH; then
38727         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38728 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38729       fi
38730       # Try to locate tool using the code snippet
38731       for ac_prog in nm
38732 do
38733   # Extract the first word of "$ac_prog", so it can be a program name with args.
38734 set dummy $ac_prog; ac_word=$2
38735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38736 $as_echo_n "checking for $ac_word... " >&6; }
38737 if ${ac_cv_path_NM+:} false; then :
38738   $as_echo_n "(cached) " >&6
38739 else
38740   case $NM in
38741   [\\/]* | ?:[\\/]*)
38742   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38743   ;;
38744   *)
38745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38746 for as_dir in $PATH
38747 do
38748   IFS=$as_save_IFS
38749   test -z "$as_dir" && as_dir=.
38750     for ac_exec_ext in '' $ac_executable_extensions; do
38751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38752     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38754     break 2
38755   fi
38756 done
38757   done
38758 IFS=$as_save_IFS
38759 
38760   ;;
38761 esac
38762 fi
38763 NM=$ac_cv_path_NM
38764 if test -n "$NM"; then
38765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38766 $as_echo "$NM" >&6; }
38767 else
38768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38769 $as_echo "no" >&6; }
38770 fi
38771 
38772 
38773   test -n "$NM" && break
38774 done
38775 
38776     else
38777       # If it succeeded, then it was overridden by the user. We will use it
38778       # for the tool.
38779 
38780       # First remove it from the list of overridden variables, so we can test
38781       # for unknown variables in the end.
38782       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38783 
38784       # Check if we try to supply an empty value
38785       if test "x$NM" = x; then
38786         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38787 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38788         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38789 $as_echo_n "checking for NM... " >&6; }
38790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38791 $as_echo "disabled" >&6; }
38792       else
38793         # Check if the provided tool contains a complete path.
38794         tool_specified="$NM"
38795         tool_basename="${tool_specified##*/}"
38796         if test "x$tool_basename" = "x$tool_specified"; then
38797           # A command without a complete path is provided, search $PATH.
38798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38799 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38800           # Extract the first word of "$tool_basename", so it can be a program name with args.
38801 set dummy $tool_basename; ac_word=$2
38802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38803 $as_echo_n "checking for $ac_word... " >&6; }
38804 if ${ac_cv_path_NM+:} false; then :
38805   $as_echo_n "(cached) " >&6
38806 else
38807   case $NM in
38808   [\\/]* | ?:[\\/]*)
38809   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38810   ;;
38811   *)
38812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38813 for as_dir in $PATH
38814 do
38815   IFS=$as_save_IFS
38816   test -z "$as_dir" && as_dir=.
38817     for ac_exec_ext in '' $ac_executable_extensions; do
38818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38819     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38821     break 2
38822   fi
38823 done
38824   done
38825 IFS=$as_save_IFS
38826 
38827   ;;
38828 esac
38829 fi
38830 NM=$ac_cv_path_NM
38831 if test -n "$NM"; then
38832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38833 $as_echo "$NM" >&6; }
38834 else
38835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38836 $as_echo "no" >&6; }
38837 fi
38838 
38839 
38840           if test "x$NM" = x; then
38841             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38842           fi
38843         else
38844           # Otherwise we believe it is a complete path. Use it as it is.
38845           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38846 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38847           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38848 $as_echo_n "checking for NM... " >&6; }
38849           if test ! -x "$tool_specified"; then
38850             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38851 $as_echo "not found" >&6; }
38852             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38853           fi
38854           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38855 $as_echo "$tool_specified" >&6; }
38856         fi
38857       fi
38858     fi
38859 
38860   fi
38861 
38862 
38863 
38864   # Only process if variable expands to non-empty
38865 
38866   if test "x$NM" != x; then
38867     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38868 
38869   # First separate the path from the arguments. This will split at the first
38870   # space.
38871   complete="$NM"
38872   path="${complete%% *}"
38873   tmp="$complete EOL"
38874   arguments="${tmp#* }"
38875 
38876   # Input might be given as Windows format, start by converting to
38877   # unix format.
38878   new_path=`$CYGPATH -u "$path"`
38879 
38880   # Now try to locate executable using which
38881   new_path=`$WHICH "$new_path" 2> /dev/null`
38882   # bat and cmd files are not always considered executable in cygwin causing which
38883   # to not find them
38884   if test "x$new_path" = x \
38885       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38886       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38887     new_path=`$CYGPATH -u "$path"`
38888   fi
38889   if test "x$new_path" = x; then
38890     # Oops. Which didn't find the executable.
38891     # The splitting of arguments from the executable at a space might have been incorrect,
38892     # since paths with space are more likely in Windows. Give it another try with the whole
38893     # argument.
38894     path="$complete"
38895     arguments="EOL"
38896     new_path=`$CYGPATH -u "$path"`
38897     new_path=`$WHICH "$new_path" 2> /dev/null`
38898     # bat and cmd files are not always considered executable in cygwin causing which
38899     # to not find them
38900     if test "x$new_path" = x \
38901         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38902         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38903       new_path=`$CYGPATH -u "$path"`
38904     fi
38905     if test "x$new_path" = x; then
38906       # It's still not found. Now this is an unrecoverable error.
38907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38908 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38909       has_space=`$ECHO "$complete" | $GREP " "`
38910       if test "x$has_space" != x; then
38911         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38912 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38913       fi
38914       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38915     fi
38916   fi
38917 
38918   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38919   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38920   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38921   # "foo.exe" is OK but "foo" is an error.
38922   #
38923   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38924   # It is also a way to make sure we got the proper file name for the real test later on.
38925   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38926   if test "x$test_shortpath" = x; then
38927     # Short path failed, file does not exist as specified.
38928     # Try adding .exe or .cmd
38929     if test -f "${new_path}.exe"; then
38930       input_to_shortpath="${new_path}.exe"
38931     elif test -f "${new_path}.cmd"; then
38932       input_to_shortpath="${new_path}.cmd"
38933     else
38934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38935 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38936       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38937 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38938       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38939     fi
38940   else
38941     input_to_shortpath="$new_path"
38942   fi
38943 
38944   # Call helper function which possibly converts this using DOS-style short mode.
38945   # If so, the updated path is stored in $new_path.
38946   new_path="$input_to_shortpath"
38947 
38948   input_path="$input_to_shortpath"
38949   # Check if we need to convert this using DOS-style short mode. If the path
38950   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38951   # take no chances and rewrite it.
38952   # Note: m4 eats our [], so we need to use [ and ] instead.
38953   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38954   if test "x$has_forbidden_chars" != x; then
38955     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38956     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38957     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38958     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38959       # Going to short mode and back again did indeed matter. Since short mode is
38960       # case insensitive, let's make it lowercase to improve readability.
38961       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38962       # Now convert it back to Unix-style (cygpath)
38963       input_path=`$CYGPATH -u "$shortmode_path"`
38964       new_path="$input_path"
38965     fi
38966   fi
38967 
38968   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38969   if test "x$test_cygdrive_prefix" = x; then
38970     # As a simple fix, exclude /usr/bin since it's not a real path.
38971     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38972       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38973       # a path prefixed by /cygdrive for fixpath to work.
38974       new_path="$CYGWIN_ROOT_PATH$input_path"
38975     fi
38976   fi
38977 
38978   # remove trailing .exe if any
38979   new_path="${new_path/%.exe/}"
38980 
38981     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38982 
38983   # First separate the path from the arguments. This will split at the first
38984   # space.
38985   complete="$NM"
38986   path="${complete%% *}"
38987   tmp="$complete EOL"
38988   arguments="${tmp#* }"
38989 
38990   # Input might be given as Windows format, start by converting to
38991   # unix format.
38992   new_path="$path"
38993 
38994   windows_path="$new_path"
38995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38996     unix_path=`$CYGPATH -u "$windows_path"`
38997     new_path="$unix_path"
38998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39000     new_path="$unix_path"
39001   fi
39002 
39003 
39004   # Now try to locate executable using which
39005   new_path=`$WHICH "$new_path" 2> /dev/null`
39006 
39007   if test "x$new_path" = x; then
39008     # Oops. Which didn't find the executable.
39009     # The splitting of arguments from the executable at a space might have been incorrect,
39010     # since paths with space are more likely in Windows. Give it another try with the whole
39011     # argument.
39012     path="$complete"
39013     arguments="EOL"
39014     new_path="$path"
39015 
39016   windows_path="$new_path"
39017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39018     unix_path=`$CYGPATH -u "$windows_path"`
39019     new_path="$unix_path"
39020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39022     new_path="$unix_path"
39023   fi
39024 
39025 
39026     new_path=`$WHICH "$new_path" 2> /dev/null`
39027     # bat and cmd files are not always considered executable in MSYS causing which
39028     # to not find them
39029     if test "x$new_path" = x \
39030         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39031         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39032       new_path="$path"
39033 
39034   windows_path="$new_path"
39035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39036     unix_path=`$CYGPATH -u "$windows_path"`
39037     new_path="$unix_path"
39038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39040     new_path="$unix_path"
39041   fi
39042 
39043     fi
39044 
39045     if test "x$new_path" = x; then
39046       # It's still not found. Now this is an unrecoverable error.
39047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39048 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39049       has_space=`$ECHO "$complete" | $GREP " "`
39050       if test "x$has_space" != x; then
39051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39053       fi
39054       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39055     fi
39056   fi
39057 
39058   # Now new_path has a complete unix path to the binary
39059   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39060     # Keep paths in /bin as-is, but remove trailing .exe if any
39061     new_path="${new_path/%.exe/}"
39062     # Do not save /bin paths to all_fixpath_prefixes!
39063   else
39064     # Not in mixed or Windows style, start by that.
39065     new_path=`cmd //c echo $new_path`
39066 
39067   input_path="$new_path"
39068   # Check if we need to convert this using DOS-style short mode. If the path
39069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39070   # take no chances and rewrite it.
39071   # Note: m4 eats our [], so we need to use [ and ] instead.
39072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39073   if test "x$has_forbidden_chars" != x; then
39074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39076   fi
39077 
39078     # Output is in $new_path
39079 
39080   windows_path="$new_path"
39081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39082     unix_path=`$CYGPATH -u "$windows_path"`
39083     new_path="$unix_path"
39084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39086     new_path="$unix_path"
39087   fi
39088 
39089     # remove trailing .exe if any
39090     new_path="${new_path/%.exe/}"
39091 
39092     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39093     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39094   fi
39095 
39096     else
39097       # We're on a unix platform. Hooray! :)
39098       # First separate the path from the arguments. This will split at the first
39099       # space.
39100       complete="$NM"
39101       path="${complete%% *}"
39102       tmp="$complete EOL"
39103       arguments="${tmp#* }"
39104 
39105       # Cannot rely on the command "which" here since it doesn't always work.
39106       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39107       if test -z "$is_absolute_path"; then
39108         # Path to executable is not absolute. Find it.
39109         IFS_save="$IFS"
39110         IFS=:
39111         for p in $PATH; do
39112           if test -f "$p/$path" && test -x "$p/$path"; then
39113             new_path="$p/$path"
39114             break
39115           fi
39116         done
39117         IFS="$IFS_save"
39118       else
39119         # This is an absolute path, we can use it without further modifications.
39120         new_path="$path"
39121       fi
39122 
39123       if test "x$new_path" = x; then
39124         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39125 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39126         has_space=`$ECHO "$complete" | $GREP " "`
39127         if test "x$has_space" != x; then
39128           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39129 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39130         fi
39131         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39132       fi
39133     fi
39134 
39135     # Now join together the path and the arguments once again
39136     if test "x$arguments" != xEOL; then
39137       new_complete="$new_path ${arguments% *}"
39138     else
39139       new_complete="$new_path"
39140     fi
39141 
39142     if test "x$complete" != "x$new_complete"; then
39143       NM="$new_complete"
39144       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39145 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39146     fi
39147   fi
39148 
39149 
39150 
39151   # Publish this variable in the help.
39152 
39153 
39154   if [ -z "${GNM+x}" ]; then
39155     # The variable is not set by user, try to locate tool using the code snippet
39156     for ac_prog in gnm
39157 do
39158   # Extract the first word of "$ac_prog", so it can be a program name with args.
39159 set dummy $ac_prog; ac_word=$2
39160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39161 $as_echo_n "checking for $ac_word... " >&6; }
39162 if ${ac_cv_path_GNM+:} false; then :
39163   $as_echo_n "(cached) " >&6
39164 else
39165   case $GNM in
39166   [\\/]* | ?:[\\/]*)
39167   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39168   ;;
39169   *)
39170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39171 for as_dir in $PATH
39172 do
39173   IFS=$as_save_IFS
39174   test -z "$as_dir" && as_dir=.
39175     for ac_exec_ext in '' $ac_executable_extensions; do
39176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39177     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39179     break 2
39180   fi
39181 done
39182   done
39183 IFS=$as_save_IFS
39184 
39185   ;;
39186 esac
39187 fi
39188 GNM=$ac_cv_path_GNM
39189 if test -n "$GNM"; then
39190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39191 $as_echo "$GNM" >&6; }
39192 else
39193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39194 $as_echo "no" >&6; }
39195 fi
39196 
39197 
39198   test -n "$GNM" && break
39199 done
39200 
39201   else
39202     # The variable is set, but is it from the command line or the environment?
39203 
39204     # Try to remove the string !GNM! from our list.
39205     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39206     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39207       # If it failed, the variable was not from the command line. Ignore it,
39208       # but warn the user (except for BASH, which is always set by the calling BASH).
39209       if test "xGNM" != xBASH; then
39210         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39211 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39212       fi
39213       # Try to locate tool using the code snippet
39214       for ac_prog in gnm
39215 do
39216   # Extract the first word of "$ac_prog", so it can be a program name with args.
39217 set dummy $ac_prog; ac_word=$2
39218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39219 $as_echo_n "checking for $ac_word... " >&6; }
39220 if ${ac_cv_path_GNM+:} false; then :
39221   $as_echo_n "(cached) " >&6
39222 else
39223   case $GNM in
39224   [\\/]* | ?:[\\/]*)
39225   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39226   ;;
39227   *)
39228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39229 for as_dir in $PATH
39230 do
39231   IFS=$as_save_IFS
39232   test -z "$as_dir" && as_dir=.
39233     for ac_exec_ext in '' $ac_executable_extensions; do
39234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39235     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39237     break 2
39238   fi
39239 done
39240   done
39241 IFS=$as_save_IFS
39242 
39243   ;;
39244 esac
39245 fi
39246 GNM=$ac_cv_path_GNM
39247 if test -n "$GNM"; then
39248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39249 $as_echo "$GNM" >&6; }
39250 else
39251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39252 $as_echo "no" >&6; }
39253 fi
39254 
39255 
39256   test -n "$GNM" && break
39257 done
39258 
39259     else
39260       # If it succeeded, then it was overridden by the user. We will use it
39261       # for the tool.
39262 
39263       # First remove it from the list of overridden variables, so we can test
39264       # for unknown variables in the end.
39265       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39266 
39267       # Check if we try to supply an empty value
39268       if test "x$GNM" = x; then
39269         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39270 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39272 $as_echo_n "checking for GNM... " >&6; }
39273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39274 $as_echo "disabled" >&6; }
39275       else
39276         # Check if the provided tool contains a complete path.
39277         tool_specified="$GNM"
39278         tool_basename="${tool_specified##*/}"
39279         if test "x$tool_basename" = "x$tool_specified"; then
39280           # A command without a complete path is provided, search $PATH.
39281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39282 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39283           # Extract the first word of "$tool_basename", so it can be a program name with args.
39284 set dummy $tool_basename; ac_word=$2
39285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39286 $as_echo_n "checking for $ac_word... " >&6; }
39287 if ${ac_cv_path_GNM+:} false; then :
39288   $as_echo_n "(cached) " >&6
39289 else
39290   case $GNM in
39291   [\\/]* | ?:[\\/]*)
39292   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39293   ;;
39294   *)
39295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39296 for as_dir in $PATH
39297 do
39298   IFS=$as_save_IFS
39299   test -z "$as_dir" && as_dir=.
39300     for ac_exec_ext in '' $ac_executable_extensions; do
39301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39302     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39304     break 2
39305   fi
39306 done
39307   done
39308 IFS=$as_save_IFS
39309 
39310   ;;
39311 esac
39312 fi
39313 GNM=$ac_cv_path_GNM
39314 if test -n "$GNM"; then
39315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39316 $as_echo "$GNM" >&6; }
39317 else
39318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39319 $as_echo "no" >&6; }
39320 fi
39321 
39322 
39323           if test "x$GNM" = x; then
39324             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39325           fi
39326         else
39327           # Otherwise we believe it is a complete path. Use it as it is.
39328           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39329 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39330           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39331 $as_echo_n "checking for GNM... " >&6; }
39332           if test ! -x "$tool_specified"; then
39333             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39334 $as_echo "not found" >&6; }
39335             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39336           fi
39337           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39338 $as_echo "$tool_specified" >&6; }
39339         fi
39340       fi
39341     fi
39342 
39343   fi
39344 
39345 
39346 
39347   # Only process if variable expands to non-empty
39348 
39349   if test "x$GNM" != x; then
39350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39351 
39352   # First separate the path from the arguments. This will split at the first
39353   # space.
39354   complete="$GNM"
39355   path="${complete%% *}"
39356   tmp="$complete EOL"
39357   arguments="${tmp#* }"
39358 
39359   # Input might be given as Windows format, start by converting to
39360   # unix format.
39361   new_path=`$CYGPATH -u "$path"`
39362 
39363   # Now try to locate executable using which
39364   new_path=`$WHICH "$new_path" 2> /dev/null`
39365   # bat and cmd files are not always considered executable in cygwin causing which
39366   # to not find them
39367   if test "x$new_path" = x \
39368       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39369       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39370     new_path=`$CYGPATH -u "$path"`
39371   fi
39372   if test "x$new_path" = x; then
39373     # Oops. Which didn't find the executable.
39374     # The splitting of arguments from the executable at a space might have been incorrect,
39375     # since paths with space are more likely in Windows. Give it another try with the whole
39376     # argument.
39377     path="$complete"
39378     arguments="EOL"
39379     new_path=`$CYGPATH -u "$path"`
39380     new_path=`$WHICH "$new_path" 2> /dev/null`
39381     # bat and cmd files are not always considered executable in cygwin causing which
39382     # to not find them
39383     if test "x$new_path" = x \
39384         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39385         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39386       new_path=`$CYGPATH -u "$path"`
39387     fi
39388     if test "x$new_path" = x; then
39389       # It's still not found. Now this is an unrecoverable error.
39390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39391 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39392       has_space=`$ECHO "$complete" | $GREP " "`
39393       if test "x$has_space" != x; then
39394         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39395 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39396       fi
39397       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39398     fi
39399   fi
39400 
39401   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39402   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39403   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39404   # "foo.exe" is OK but "foo" is an error.
39405   #
39406   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39407   # It is also a way to make sure we got the proper file name for the real test later on.
39408   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39409   if test "x$test_shortpath" = x; then
39410     # Short path failed, file does not exist as specified.
39411     # Try adding .exe or .cmd
39412     if test -f "${new_path}.exe"; then
39413       input_to_shortpath="${new_path}.exe"
39414     elif test -f "${new_path}.cmd"; then
39415       input_to_shortpath="${new_path}.cmd"
39416     else
39417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39418 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39419       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39420 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39421       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39422     fi
39423   else
39424     input_to_shortpath="$new_path"
39425   fi
39426 
39427   # Call helper function which possibly converts this using DOS-style short mode.
39428   # If so, the updated path is stored in $new_path.
39429   new_path="$input_to_shortpath"
39430 
39431   input_path="$input_to_shortpath"
39432   # Check if we need to convert this using DOS-style short mode. If the path
39433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39434   # take no chances and rewrite it.
39435   # Note: m4 eats our [], so we need to use [ and ] instead.
39436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39437   if test "x$has_forbidden_chars" != x; then
39438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39442       # Going to short mode and back again did indeed matter. Since short mode is
39443       # case insensitive, let's make it lowercase to improve readability.
39444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39445       # Now convert it back to Unix-style (cygpath)
39446       input_path=`$CYGPATH -u "$shortmode_path"`
39447       new_path="$input_path"
39448     fi
39449   fi
39450 
39451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39452   if test "x$test_cygdrive_prefix" = x; then
39453     # As a simple fix, exclude /usr/bin since it's not a real path.
39454     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39456       # a path prefixed by /cygdrive for fixpath to work.
39457       new_path="$CYGWIN_ROOT_PATH$input_path"
39458     fi
39459   fi
39460 
39461   # remove trailing .exe if any
39462   new_path="${new_path/%.exe/}"
39463 
39464     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39465 
39466   # First separate the path from the arguments. This will split at the first
39467   # space.
39468   complete="$GNM"
39469   path="${complete%% *}"
39470   tmp="$complete EOL"
39471   arguments="${tmp#* }"
39472 
39473   # Input might be given as Windows format, start by converting to
39474   # unix format.
39475   new_path="$path"
39476 
39477   windows_path="$new_path"
39478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39479     unix_path=`$CYGPATH -u "$windows_path"`
39480     new_path="$unix_path"
39481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39483     new_path="$unix_path"
39484   fi
39485 
39486 
39487   # Now try to locate executable using which
39488   new_path=`$WHICH "$new_path" 2> /dev/null`
39489 
39490   if test "x$new_path" = x; then
39491     # Oops. Which didn't find the executable.
39492     # The splitting of arguments from the executable at a space might have been incorrect,
39493     # since paths with space are more likely in Windows. Give it another try with the whole
39494     # argument.
39495     path="$complete"
39496     arguments="EOL"
39497     new_path="$path"
39498 
39499   windows_path="$new_path"
39500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39501     unix_path=`$CYGPATH -u "$windows_path"`
39502     new_path="$unix_path"
39503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39505     new_path="$unix_path"
39506   fi
39507 
39508 
39509     new_path=`$WHICH "$new_path" 2> /dev/null`
39510     # bat and cmd files are not always considered executable in MSYS causing which
39511     # to not find them
39512     if test "x$new_path" = x \
39513         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39514         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39515       new_path="$path"
39516 
39517   windows_path="$new_path"
39518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39519     unix_path=`$CYGPATH -u "$windows_path"`
39520     new_path="$unix_path"
39521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39523     new_path="$unix_path"
39524   fi
39525 
39526     fi
39527 
39528     if test "x$new_path" = x; then
39529       # It's still not found. Now this is an unrecoverable error.
39530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39531 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39532       has_space=`$ECHO "$complete" | $GREP " "`
39533       if test "x$has_space" != x; then
39534         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39536       fi
39537       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39538     fi
39539   fi
39540 
39541   # Now new_path has a complete unix path to the binary
39542   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39543     # Keep paths in /bin as-is, but remove trailing .exe if any
39544     new_path="${new_path/%.exe/}"
39545     # Do not save /bin paths to all_fixpath_prefixes!
39546   else
39547     # Not in mixed or Windows style, start by that.
39548     new_path=`cmd //c echo $new_path`
39549 
39550   input_path="$new_path"
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39559   fi
39560 
39561     # Output is in $new_path
39562 
39563   windows_path="$new_path"
39564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39565     unix_path=`$CYGPATH -u "$windows_path"`
39566     new_path="$unix_path"
39567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39569     new_path="$unix_path"
39570   fi
39571 
39572     # remove trailing .exe if any
39573     new_path="${new_path/%.exe/}"
39574 
39575     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39576     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39577   fi
39578 
39579     else
39580       # We're on a unix platform. Hooray! :)
39581       # First separate the path from the arguments. This will split at the first
39582       # space.
39583       complete="$GNM"
39584       path="${complete%% *}"
39585       tmp="$complete EOL"
39586       arguments="${tmp#* }"
39587 
39588       # Cannot rely on the command "which" here since it doesn't always work.
39589       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39590       if test -z "$is_absolute_path"; then
39591         # Path to executable is not absolute. Find it.
39592         IFS_save="$IFS"
39593         IFS=:
39594         for p in $PATH; do
39595           if test -f "$p/$path" && test -x "$p/$path"; then
39596             new_path="$p/$path"
39597             break
39598           fi
39599         done
39600         IFS="$IFS_save"
39601       else
39602         # This is an absolute path, we can use it without further modifications.
39603         new_path="$path"
39604       fi
39605 
39606       if test "x$new_path" = x; then
39607         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39608 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39609         has_space=`$ECHO "$complete" | $GREP " "`
39610         if test "x$has_space" != x; then
39611           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39612 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39613         fi
39614         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39615       fi
39616     fi
39617 
39618     # Now join together the path and the arguments once again
39619     if test "x$arguments" != xEOL; then
39620       new_complete="$new_path ${arguments% *}"
39621     else
39622       new_complete="$new_path"
39623     fi
39624 
39625     if test "x$complete" != "x$new_complete"; then
39626       GNM="$new_complete"
39627       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39628 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39629     fi
39630   fi
39631 
39632   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39633     # FIXME: we should unify this with the solaris case above.
39634 
39635 
39636   # Publish this variable in the help.
39637 
39638 
39639   if [ -z "${STRIP+x}" ]; then
39640     # The variable is not set by user, try to locate tool using the code snippet
39641     if test -n "$ac_tool_prefix"; then
39642   for ac_prog in strip
39643   do
39644     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39645 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39647 $as_echo_n "checking for $ac_word... " >&6; }
39648 if ${ac_cv_prog_STRIP+:} false; then :
39649   $as_echo_n "(cached) " >&6
39650 else
39651   if test -n "$STRIP"; then
39652   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39653 else
39654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39655 for as_dir in $PATH
39656 do
39657   IFS=$as_save_IFS
39658   test -z "$as_dir" && as_dir=.
39659     for ac_exec_ext in '' $ac_executable_extensions; do
39660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39661     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39663     break 2
39664   fi
39665 done
39666   done
39667 IFS=$as_save_IFS
39668 
39669 fi
39670 fi
39671 STRIP=$ac_cv_prog_STRIP
39672 if test -n "$STRIP"; then
39673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39674 $as_echo "$STRIP" >&6; }
39675 else
39676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39677 $as_echo "no" >&6; }
39678 fi
39679 
39680 
39681     test -n "$STRIP" && break
39682   done
39683 fi
39684 if test -z "$STRIP"; then
39685   ac_ct_STRIP=$STRIP
39686   for ac_prog in strip
39687 do
39688   # Extract the first word of "$ac_prog", so it can be a program name with args.
39689 set dummy $ac_prog; ac_word=$2
39690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39691 $as_echo_n "checking for $ac_word... " >&6; }
39692 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39693   $as_echo_n "(cached) " >&6
39694 else
39695   if test -n "$ac_ct_STRIP"; then
39696   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39697 else
39698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39699 for as_dir in $PATH
39700 do
39701   IFS=$as_save_IFS
39702   test -z "$as_dir" && as_dir=.
39703     for ac_exec_ext in '' $ac_executable_extensions; do
39704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39705     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39707     break 2
39708   fi
39709 done
39710   done
39711 IFS=$as_save_IFS
39712 
39713 fi
39714 fi
39715 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39716 if test -n "$ac_ct_STRIP"; then
39717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39718 $as_echo "$ac_ct_STRIP" >&6; }
39719 else
39720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39721 $as_echo "no" >&6; }
39722 fi
39723 
39724 
39725   test -n "$ac_ct_STRIP" && break
39726 done
39727 
39728   if test "x$ac_ct_STRIP" = x; then
39729     STRIP=""
39730   else
39731     case $cross_compiling:$ac_tool_warned in
39732 yes:)
39733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39734 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39735 ac_tool_warned=yes ;;
39736 esac
39737     STRIP=$ac_ct_STRIP
39738   fi
39739 fi
39740 
39741   else
39742     # The variable is set, but is it from the command line or the environment?
39743 
39744     # Try to remove the string !STRIP! from our list.
39745     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39746     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39747       # If it failed, the variable was not from the command line. Ignore it,
39748       # but warn the user (except for BASH, which is always set by the calling BASH).
39749       if test "xSTRIP" != xBASH; then
39750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39751 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39752       fi
39753       # Try to locate tool using the code snippet
39754       if test -n "$ac_tool_prefix"; then
39755   for ac_prog in strip
39756   do
39757     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39758 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39760 $as_echo_n "checking for $ac_word... " >&6; }
39761 if ${ac_cv_prog_STRIP+:} false; then :
39762   $as_echo_n "(cached) " >&6
39763 else
39764   if test -n "$STRIP"; then
39765   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39766 else
39767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39768 for as_dir in $PATH
39769 do
39770   IFS=$as_save_IFS
39771   test -z "$as_dir" && as_dir=.
39772     for ac_exec_ext in '' $ac_executable_extensions; do
39773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39774     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39776     break 2
39777   fi
39778 done
39779   done
39780 IFS=$as_save_IFS
39781 
39782 fi
39783 fi
39784 STRIP=$ac_cv_prog_STRIP
39785 if test -n "$STRIP"; then
39786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39787 $as_echo "$STRIP" >&6; }
39788 else
39789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39790 $as_echo "no" >&6; }
39791 fi
39792 
39793 
39794     test -n "$STRIP" && break
39795   done
39796 fi
39797 if test -z "$STRIP"; then
39798   ac_ct_STRIP=$STRIP
39799   for ac_prog in strip
39800 do
39801   # Extract the first word of "$ac_prog", so it can be a program name with args.
39802 set dummy $ac_prog; ac_word=$2
39803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39804 $as_echo_n "checking for $ac_word... " >&6; }
39805 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39806   $as_echo_n "(cached) " >&6
39807 else
39808   if test -n "$ac_ct_STRIP"; then
39809   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39810 else
39811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39812 for as_dir in $PATH
39813 do
39814   IFS=$as_save_IFS
39815   test -z "$as_dir" && as_dir=.
39816     for ac_exec_ext in '' $ac_executable_extensions; do
39817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39818     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39820     break 2
39821   fi
39822 done
39823   done
39824 IFS=$as_save_IFS
39825 
39826 fi
39827 fi
39828 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39829 if test -n "$ac_ct_STRIP"; then
39830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39831 $as_echo "$ac_ct_STRIP" >&6; }
39832 else
39833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39834 $as_echo "no" >&6; }
39835 fi
39836 
39837 
39838   test -n "$ac_ct_STRIP" && break
39839 done
39840 
39841   if test "x$ac_ct_STRIP" = x; then
39842     STRIP=""
39843   else
39844     case $cross_compiling:$ac_tool_warned in
39845 yes:)
39846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39847 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39848 ac_tool_warned=yes ;;
39849 esac
39850     STRIP=$ac_ct_STRIP
39851   fi
39852 fi
39853 
39854     else
39855       # If it succeeded, then it was overridden by the user. We will use it
39856       # for the tool.
39857 
39858       # First remove it from the list of overridden variables, so we can test
39859       # for unknown variables in the end.
39860       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39861 
39862       # Check if we try to supply an empty value
39863       if test "x$STRIP" = x; then
39864         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39865 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39866         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39867 $as_echo_n "checking for STRIP... " >&6; }
39868         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39869 $as_echo "disabled" >&6; }
39870       else
39871         # Check if the provided tool contains a complete path.
39872         tool_specified="$STRIP"
39873         tool_basename="${tool_specified##*/}"
39874         if test "x$tool_basename" = "x$tool_specified"; then
39875           # A command without a complete path is provided, search $PATH.
39876           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39877 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39878           # Extract the first word of "$tool_basename", so it can be a program name with args.
39879 set dummy $tool_basename; ac_word=$2
39880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39881 $as_echo_n "checking for $ac_word... " >&6; }
39882 if ${ac_cv_path_STRIP+:} false; then :
39883   $as_echo_n "(cached) " >&6
39884 else
39885   case $STRIP in
39886   [\\/]* | ?:[\\/]*)
39887   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39888   ;;
39889   *)
39890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39891 for as_dir in $PATH
39892 do
39893   IFS=$as_save_IFS
39894   test -z "$as_dir" && as_dir=.
39895     for ac_exec_ext in '' $ac_executable_extensions; do
39896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39897     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39899     break 2
39900   fi
39901 done
39902   done
39903 IFS=$as_save_IFS
39904 
39905   ;;
39906 esac
39907 fi
39908 STRIP=$ac_cv_path_STRIP
39909 if test -n "$STRIP"; then
39910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39911 $as_echo "$STRIP" >&6; }
39912 else
39913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39914 $as_echo "no" >&6; }
39915 fi
39916 
39917 
39918           if test "x$STRIP" = x; then
39919             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39920           fi
39921         else
39922           # Otherwise we believe it is a complete path. Use it as it is.
39923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39924 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39925           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39926 $as_echo_n "checking for STRIP... " >&6; }
39927           if test ! -x "$tool_specified"; then
39928             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39929 $as_echo "not found" >&6; }
39930             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39931           fi
39932           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39933 $as_echo "$tool_specified" >&6; }
39934         fi
39935       fi
39936     fi
39937 
39938   fi
39939 
39940 
39941 
39942   # Only process if variable expands to non-empty
39943 
39944   if test "x$STRIP" != x; then
39945     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39946 
39947   # First separate the path from the arguments. This will split at the first
39948   # space.
39949   complete="$STRIP"
39950   path="${complete%% *}"
39951   tmp="$complete EOL"
39952   arguments="${tmp#* }"
39953 
39954   # Input might be given as Windows format, start by converting to
39955   # unix format.
39956   new_path=`$CYGPATH -u "$path"`
39957 
39958   # Now try to locate executable using which
39959   new_path=`$WHICH "$new_path" 2> /dev/null`
39960   # bat and cmd files are not always considered executable in cygwin causing which
39961   # to not find them
39962   if test "x$new_path" = x \
39963       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39964       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39965     new_path=`$CYGPATH -u "$path"`
39966   fi
39967   if test "x$new_path" = x; then
39968     # Oops. Which didn't find the executable.
39969     # The splitting of arguments from the executable at a space might have been incorrect,
39970     # since paths with space are more likely in Windows. Give it another try with the whole
39971     # argument.
39972     path="$complete"
39973     arguments="EOL"
39974     new_path=`$CYGPATH -u "$path"`
39975     new_path=`$WHICH "$new_path" 2> /dev/null`
39976     # bat and cmd files are not always considered executable in cygwin causing which
39977     # to not find them
39978     if test "x$new_path" = x \
39979         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39980         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39981       new_path=`$CYGPATH -u "$path"`
39982     fi
39983     if test "x$new_path" = x; then
39984       # It's still not found. Now this is an unrecoverable error.
39985       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39986 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39987       has_space=`$ECHO "$complete" | $GREP " "`
39988       if test "x$has_space" != x; then
39989         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39990 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39991       fi
39992       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39993     fi
39994   fi
39995 
39996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39999   # "foo.exe" is OK but "foo" is an error.
40000   #
40001   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40002   # It is also a way to make sure we got the proper file name for the real test later on.
40003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40004   if test "x$test_shortpath" = x; then
40005     # Short path failed, file does not exist as specified.
40006     # Try adding .exe or .cmd
40007     if test -f "${new_path}.exe"; then
40008       input_to_shortpath="${new_path}.exe"
40009     elif test -f "${new_path}.cmd"; then
40010       input_to_shortpath="${new_path}.cmd"
40011     else
40012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40013 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40014       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40015 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40016       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40017     fi
40018   else
40019     input_to_shortpath="$new_path"
40020   fi
40021 
40022   # Call helper function which possibly converts this using DOS-style short mode.
40023   # If so, the updated path is stored in $new_path.
40024   new_path="$input_to_shortpath"
40025 
40026   input_path="$input_to_shortpath"
40027   # Check if we need to convert this using DOS-style short mode. If the path
40028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40029   # take no chances and rewrite it.
40030   # Note: m4 eats our [], so we need to use [ and ] instead.
40031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40032   if test "x$has_forbidden_chars" != x; then
40033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40037       # Going to short mode and back again did indeed matter. Since short mode is
40038       # case insensitive, let's make it lowercase to improve readability.
40039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40040       # Now convert it back to Unix-style (cygpath)
40041       input_path=`$CYGPATH -u "$shortmode_path"`
40042       new_path="$input_path"
40043     fi
40044   fi
40045 
40046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40047   if test "x$test_cygdrive_prefix" = x; then
40048     # As a simple fix, exclude /usr/bin since it's not a real path.
40049     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40051       # a path prefixed by /cygdrive for fixpath to work.
40052       new_path="$CYGWIN_ROOT_PATH$input_path"
40053     fi
40054   fi
40055 
40056   # remove trailing .exe if any
40057   new_path="${new_path/%.exe/}"
40058 
40059     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40060 
40061   # First separate the path from the arguments. This will split at the first
40062   # space.
40063   complete="$STRIP"
40064   path="${complete%% *}"
40065   tmp="$complete EOL"
40066   arguments="${tmp#* }"
40067 
40068   # Input might be given as Windows format, start by converting to
40069   # unix format.
40070   new_path="$path"
40071 
40072   windows_path="$new_path"
40073   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40074     unix_path=`$CYGPATH -u "$windows_path"`
40075     new_path="$unix_path"
40076   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40077     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40078     new_path="$unix_path"
40079   fi
40080 
40081 
40082   # Now try to locate executable using which
40083   new_path=`$WHICH "$new_path" 2> /dev/null`
40084 
40085   if test "x$new_path" = x; then
40086     # Oops. Which didn't find the executable.
40087     # The splitting of arguments from the executable at a space might have been incorrect,
40088     # since paths with space are more likely in Windows. Give it another try with the whole
40089     # argument.
40090     path="$complete"
40091     arguments="EOL"
40092     new_path="$path"
40093 
40094   windows_path="$new_path"
40095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40096     unix_path=`$CYGPATH -u "$windows_path"`
40097     new_path="$unix_path"
40098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40100     new_path="$unix_path"
40101   fi
40102 
40103 
40104     new_path=`$WHICH "$new_path" 2> /dev/null`
40105     # bat and cmd files are not always considered executable in MSYS causing which
40106     # to not find them
40107     if test "x$new_path" = x \
40108         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40109         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40110       new_path="$path"
40111 
40112   windows_path="$new_path"
40113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40114     unix_path=`$CYGPATH -u "$windows_path"`
40115     new_path="$unix_path"
40116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40118     new_path="$unix_path"
40119   fi
40120 
40121     fi
40122 
40123     if test "x$new_path" = x; then
40124       # It's still not found. Now this is an unrecoverable error.
40125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40126 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40127       has_space=`$ECHO "$complete" | $GREP " "`
40128       if test "x$has_space" != x; then
40129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40131       fi
40132       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40133     fi
40134   fi
40135 
40136   # Now new_path has a complete unix path to the binary
40137   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40138     # Keep paths in /bin as-is, but remove trailing .exe if any
40139     new_path="${new_path/%.exe/}"
40140     # Do not save /bin paths to all_fixpath_prefixes!
40141   else
40142     # Not in mixed or Windows style, start by that.
40143     new_path=`cmd //c echo $new_path`
40144 
40145   input_path="$new_path"
40146   # Check if we need to convert this using DOS-style short mode. If the path
40147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40148   # take no chances and rewrite it.
40149   # Note: m4 eats our [], so we need to use [ and ] instead.
40150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40151   if test "x$has_forbidden_chars" != x; then
40152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40153     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40154   fi
40155 
40156     # Output is in $new_path
40157 
40158   windows_path="$new_path"
40159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40160     unix_path=`$CYGPATH -u "$windows_path"`
40161     new_path="$unix_path"
40162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40164     new_path="$unix_path"
40165   fi
40166 
40167     # remove trailing .exe if any
40168     new_path="${new_path/%.exe/}"
40169 
40170     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40171     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40172   fi
40173 
40174     else
40175       # We're on a unix platform. Hooray! :)
40176       # First separate the path from the arguments. This will split at the first
40177       # space.
40178       complete="$STRIP"
40179       path="${complete%% *}"
40180       tmp="$complete EOL"
40181       arguments="${tmp#* }"
40182 
40183       # Cannot rely on the command "which" here since it doesn't always work.
40184       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40185       if test -z "$is_absolute_path"; then
40186         # Path to executable is not absolute. Find it.
40187         IFS_save="$IFS"
40188         IFS=:
40189         for p in $PATH; do
40190           if test -f "$p/$path" && test -x "$p/$path"; then
40191             new_path="$p/$path"
40192             break
40193           fi
40194         done
40195         IFS="$IFS_save"
40196       else
40197         # This is an absolute path, we can use it without further modifications.
40198         new_path="$path"
40199       fi
40200 
40201       if test "x$new_path" = x; then
40202         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40203 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40204         has_space=`$ECHO "$complete" | $GREP " "`
40205         if test "x$has_space" != x; then
40206           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40207 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40208         fi
40209         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40210       fi
40211     fi
40212 
40213     # Now join together the path and the arguments once again
40214     if test "x$arguments" != xEOL; then
40215       new_complete="$new_path ${arguments% *}"
40216     else
40217       new_complete="$new_path"
40218     fi
40219 
40220     if test "x$complete" != "x$new_complete"; then
40221       STRIP="$new_complete"
40222       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40223 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40224     fi
40225   fi
40226 
40227     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40228 
40229 
40230   # Publish this variable in the help.
40231 
40232 
40233   if [ -z "${NM+x}" ]; then
40234     # The variable is not set by user, try to locate tool using the code snippet
40235     if test -n "$ac_tool_prefix"; then
40236   for ac_prog in nm gcc-nm
40237   do
40238     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40239 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40241 $as_echo_n "checking for $ac_word... " >&6; }
40242 if ${ac_cv_prog_NM+:} false; then :
40243   $as_echo_n "(cached) " >&6
40244 else
40245   if test -n "$NM"; then
40246   ac_cv_prog_NM="$NM" # Let the user override the test.
40247 else
40248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40249 for as_dir in $PATH
40250 do
40251   IFS=$as_save_IFS
40252   test -z "$as_dir" && as_dir=.
40253     for ac_exec_ext in '' $ac_executable_extensions; do
40254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40255     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40257     break 2
40258   fi
40259 done
40260   done
40261 IFS=$as_save_IFS
40262 
40263 fi
40264 fi
40265 NM=$ac_cv_prog_NM
40266 if test -n "$NM"; then
40267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40268 $as_echo "$NM" >&6; }
40269 else
40270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40271 $as_echo "no" >&6; }
40272 fi
40273 
40274 
40275     test -n "$NM" && break
40276   done
40277 fi
40278 if test -z "$NM"; then
40279   ac_ct_NM=$NM
40280   for ac_prog in nm gcc-nm
40281 do
40282   # Extract the first word of "$ac_prog", so it can be a program name with args.
40283 set dummy $ac_prog; ac_word=$2
40284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40285 $as_echo_n "checking for $ac_word... " >&6; }
40286 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40287   $as_echo_n "(cached) " >&6
40288 else
40289   if test -n "$ac_ct_NM"; then
40290   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40291 else
40292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40293 for as_dir in $PATH
40294 do
40295   IFS=$as_save_IFS
40296   test -z "$as_dir" && as_dir=.
40297     for ac_exec_ext in '' $ac_executable_extensions; do
40298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40299     ac_cv_prog_ac_ct_NM="$ac_prog"
40300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40301     break 2
40302   fi
40303 done
40304   done
40305 IFS=$as_save_IFS
40306 
40307 fi
40308 fi
40309 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40310 if test -n "$ac_ct_NM"; then
40311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40312 $as_echo "$ac_ct_NM" >&6; }
40313 else
40314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40315 $as_echo "no" >&6; }
40316 fi
40317 
40318 
40319   test -n "$ac_ct_NM" && break
40320 done
40321 
40322   if test "x$ac_ct_NM" = x; then
40323     NM=""
40324   else
40325     case $cross_compiling:$ac_tool_warned in
40326 yes:)
40327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40328 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40329 ac_tool_warned=yes ;;
40330 esac
40331     NM=$ac_ct_NM
40332   fi
40333 fi
40334 
40335   else
40336     # The variable is set, but is it from the command line or the environment?
40337 
40338     # Try to remove the string !NM! from our list.
40339     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40340     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40341       # If it failed, the variable was not from the command line. Ignore it,
40342       # but warn the user (except for BASH, which is always set by the calling BASH).
40343       if test "xNM" != xBASH; then
40344         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40345 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40346       fi
40347       # Try to locate tool using the code snippet
40348       if test -n "$ac_tool_prefix"; then
40349   for ac_prog in nm gcc-nm
40350   do
40351     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40354 $as_echo_n "checking for $ac_word... " >&6; }
40355 if ${ac_cv_prog_NM+:} false; then :
40356   $as_echo_n "(cached) " >&6
40357 else
40358   if test -n "$NM"; then
40359   ac_cv_prog_NM="$NM" # Let the user override the test.
40360 else
40361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40362 for as_dir in $PATH
40363 do
40364   IFS=$as_save_IFS
40365   test -z "$as_dir" && as_dir=.
40366     for ac_exec_ext in '' $ac_executable_extensions; do
40367   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40368     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40370     break 2
40371   fi
40372 done
40373   done
40374 IFS=$as_save_IFS
40375 
40376 fi
40377 fi
40378 NM=$ac_cv_prog_NM
40379 if test -n "$NM"; then
40380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40381 $as_echo "$NM" >&6; }
40382 else
40383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40384 $as_echo "no" >&6; }
40385 fi
40386 
40387 
40388     test -n "$NM" && break
40389   done
40390 fi
40391 if test -z "$NM"; then
40392   ac_ct_NM=$NM
40393   for ac_prog in nm gcc-nm
40394 do
40395   # Extract the first word of "$ac_prog", so it can be a program name with args.
40396 set dummy $ac_prog; ac_word=$2
40397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40398 $as_echo_n "checking for $ac_word... " >&6; }
40399 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40400   $as_echo_n "(cached) " >&6
40401 else
40402   if test -n "$ac_ct_NM"; then
40403   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40404 else
40405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40406 for as_dir in $PATH
40407 do
40408   IFS=$as_save_IFS
40409   test -z "$as_dir" && as_dir=.
40410     for ac_exec_ext in '' $ac_executable_extensions; do
40411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40412     ac_cv_prog_ac_ct_NM="$ac_prog"
40413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40414     break 2
40415   fi
40416 done
40417   done
40418 IFS=$as_save_IFS
40419 
40420 fi
40421 fi
40422 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40423 if test -n "$ac_ct_NM"; then
40424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40425 $as_echo "$ac_ct_NM" >&6; }
40426 else
40427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40428 $as_echo "no" >&6; }
40429 fi
40430 
40431 
40432   test -n "$ac_ct_NM" && break
40433 done
40434 
40435   if test "x$ac_ct_NM" = x; then
40436     NM=""
40437   else
40438     case $cross_compiling:$ac_tool_warned in
40439 yes:)
40440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40441 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40442 ac_tool_warned=yes ;;
40443 esac
40444     NM=$ac_ct_NM
40445   fi
40446 fi
40447 
40448     else
40449       # If it succeeded, then it was overridden by the user. We will use it
40450       # for the tool.
40451 
40452       # First remove it from the list of overridden variables, so we can test
40453       # for unknown variables in the end.
40454       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40455 
40456       # Check if we try to supply an empty value
40457       if test "x$NM" = x; then
40458         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40459 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40461 $as_echo_n "checking for NM... " >&6; }
40462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40463 $as_echo "disabled" >&6; }
40464       else
40465         # Check if the provided tool contains a complete path.
40466         tool_specified="$NM"
40467         tool_basename="${tool_specified##*/}"
40468         if test "x$tool_basename" = "x$tool_specified"; then
40469           # A command without a complete path is provided, search $PATH.
40470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40471 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40472           # Extract the first word of "$tool_basename", so it can be a program name with args.
40473 set dummy $tool_basename; ac_word=$2
40474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40475 $as_echo_n "checking for $ac_word... " >&6; }
40476 if ${ac_cv_path_NM+:} false; then :
40477   $as_echo_n "(cached) " >&6
40478 else
40479   case $NM in
40480   [\\/]* | ?:[\\/]*)
40481   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40482   ;;
40483   *)
40484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40485 for as_dir in $PATH
40486 do
40487   IFS=$as_save_IFS
40488   test -z "$as_dir" && as_dir=.
40489     for ac_exec_ext in '' $ac_executable_extensions; do
40490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40491     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40493     break 2
40494   fi
40495 done
40496   done
40497 IFS=$as_save_IFS
40498 
40499   ;;
40500 esac
40501 fi
40502 NM=$ac_cv_path_NM
40503 if test -n "$NM"; then
40504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40505 $as_echo "$NM" >&6; }
40506 else
40507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40508 $as_echo "no" >&6; }
40509 fi
40510 
40511 
40512           if test "x$NM" = x; then
40513             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40514           fi
40515         else
40516           # Otherwise we believe it is a complete path. Use it as it is.
40517           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40518 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40519           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40520 $as_echo_n "checking for NM... " >&6; }
40521           if test ! -x "$tool_specified"; then
40522             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40523 $as_echo "not found" >&6; }
40524             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40525           fi
40526           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40527 $as_echo "$tool_specified" >&6; }
40528         fi
40529       fi
40530     fi
40531 
40532   fi
40533 
40534 
40535     else
40536 
40537 
40538   # Publish this variable in the help.
40539 
40540 
40541   if [ -z "${NM+x}" ]; then
40542     # The variable is not set by user, try to locate tool using the code snippet
40543     if test -n "$ac_tool_prefix"; then
40544   for ac_prog in nm
40545   do
40546     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40547 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40549 $as_echo_n "checking for $ac_word... " >&6; }
40550 if ${ac_cv_prog_NM+:} false; then :
40551   $as_echo_n "(cached) " >&6
40552 else
40553   if test -n "$NM"; then
40554   ac_cv_prog_NM="$NM" # Let the user override the test.
40555 else
40556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40557 for as_dir in $PATH
40558 do
40559   IFS=$as_save_IFS
40560   test -z "$as_dir" && as_dir=.
40561     for ac_exec_ext in '' $ac_executable_extensions; do
40562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40563     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40565     break 2
40566   fi
40567 done
40568   done
40569 IFS=$as_save_IFS
40570 
40571 fi
40572 fi
40573 NM=$ac_cv_prog_NM
40574 if test -n "$NM"; then
40575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40576 $as_echo "$NM" >&6; }
40577 else
40578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40579 $as_echo "no" >&6; }
40580 fi
40581 
40582 
40583     test -n "$NM" && break
40584   done
40585 fi
40586 if test -z "$NM"; then
40587   ac_ct_NM=$NM
40588   for ac_prog in nm
40589 do
40590   # Extract the first word of "$ac_prog", so it can be a program name with args.
40591 set dummy $ac_prog; ac_word=$2
40592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40593 $as_echo_n "checking for $ac_word... " >&6; }
40594 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40595   $as_echo_n "(cached) " >&6
40596 else
40597   if test -n "$ac_ct_NM"; then
40598   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40599 else
40600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40601 for as_dir in $PATH
40602 do
40603   IFS=$as_save_IFS
40604   test -z "$as_dir" && as_dir=.
40605     for ac_exec_ext in '' $ac_executable_extensions; do
40606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40607     ac_cv_prog_ac_ct_NM="$ac_prog"
40608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40609     break 2
40610   fi
40611 done
40612   done
40613 IFS=$as_save_IFS
40614 
40615 fi
40616 fi
40617 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40618 if test -n "$ac_ct_NM"; then
40619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40620 $as_echo "$ac_ct_NM" >&6; }
40621 else
40622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40623 $as_echo "no" >&6; }
40624 fi
40625 
40626 
40627   test -n "$ac_ct_NM" && break
40628 done
40629 
40630   if test "x$ac_ct_NM" = x; then
40631     NM=""
40632   else
40633     case $cross_compiling:$ac_tool_warned in
40634 yes:)
40635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40636 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40637 ac_tool_warned=yes ;;
40638 esac
40639     NM=$ac_ct_NM
40640   fi
40641 fi
40642 
40643   else
40644     # The variable is set, but is it from the command line or the environment?
40645 
40646     # Try to remove the string !NM! from our list.
40647     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40648     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40649       # If it failed, the variable was not from the command line. Ignore it,
40650       # but warn the user (except for BASH, which is always set by the calling BASH).
40651       if test "xNM" != xBASH; then
40652         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40653 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40654       fi
40655       # Try to locate tool using the code snippet
40656       if test -n "$ac_tool_prefix"; then
40657   for ac_prog in nm
40658   do
40659     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40660 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40662 $as_echo_n "checking for $ac_word... " >&6; }
40663 if ${ac_cv_prog_NM+:} false; then :
40664   $as_echo_n "(cached) " >&6
40665 else
40666   if test -n "$NM"; then
40667   ac_cv_prog_NM="$NM" # Let the user override the test.
40668 else
40669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40670 for as_dir in $PATH
40671 do
40672   IFS=$as_save_IFS
40673   test -z "$as_dir" && as_dir=.
40674     for ac_exec_ext in '' $ac_executable_extensions; do
40675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40676     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40678     break 2
40679   fi
40680 done
40681   done
40682 IFS=$as_save_IFS
40683 
40684 fi
40685 fi
40686 NM=$ac_cv_prog_NM
40687 if test -n "$NM"; then
40688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40689 $as_echo "$NM" >&6; }
40690 else
40691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40692 $as_echo "no" >&6; }
40693 fi
40694 
40695 
40696     test -n "$NM" && break
40697   done
40698 fi
40699 if test -z "$NM"; then
40700   ac_ct_NM=$NM
40701   for ac_prog in nm
40702 do
40703   # Extract the first word of "$ac_prog", so it can be a program name with args.
40704 set dummy $ac_prog; ac_word=$2
40705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40706 $as_echo_n "checking for $ac_word... " >&6; }
40707 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40708   $as_echo_n "(cached) " >&6
40709 else
40710   if test -n "$ac_ct_NM"; then
40711   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40712 else
40713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40714 for as_dir in $PATH
40715 do
40716   IFS=$as_save_IFS
40717   test -z "$as_dir" && as_dir=.
40718     for ac_exec_ext in '' $ac_executable_extensions; do
40719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40720     ac_cv_prog_ac_ct_NM="$ac_prog"
40721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40722     break 2
40723   fi
40724 done
40725   done
40726 IFS=$as_save_IFS
40727 
40728 fi
40729 fi
40730 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40731 if test -n "$ac_ct_NM"; then
40732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40733 $as_echo "$ac_ct_NM" >&6; }
40734 else
40735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40736 $as_echo "no" >&6; }
40737 fi
40738 
40739 
40740   test -n "$ac_ct_NM" && break
40741 done
40742 
40743   if test "x$ac_ct_NM" = x; then
40744     NM=""
40745   else
40746     case $cross_compiling:$ac_tool_warned in
40747 yes:)
40748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40750 ac_tool_warned=yes ;;
40751 esac
40752     NM=$ac_ct_NM
40753   fi
40754 fi
40755 
40756     else
40757       # If it succeeded, then it was overridden by the user. We will use it
40758       # for the tool.
40759 
40760       # First remove it from the list of overridden variables, so we can test
40761       # for unknown variables in the end.
40762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40763 
40764       # Check if we try to supply an empty value
40765       if test "x$NM" = x; then
40766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40767 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40769 $as_echo_n "checking for NM... " >&6; }
40770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40771 $as_echo "disabled" >&6; }
40772       else
40773         # Check if the provided tool contains a complete path.
40774         tool_specified="$NM"
40775         tool_basename="${tool_specified##*/}"
40776         if test "x$tool_basename" = "x$tool_specified"; then
40777           # A command without a complete path is provided, search $PATH.
40778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40779 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40780           # Extract the first word of "$tool_basename", so it can be a program name with args.
40781 set dummy $tool_basename; ac_word=$2
40782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40783 $as_echo_n "checking for $ac_word... " >&6; }
40784 if ${ac_cv_path_NM+:} false; then :
40785   $as_echo_n "(cached) " >&6
40786 else
40787   case $NM in
40788   [\\/]* | ?:[\\/]*)
40789   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40790   ;;
40791   *)
40792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40793 for as_dir in $PATH
40794 do
40795   IFS=$as_save_IFS
40796   test -z "$as_dir" && as_dir=.
40797     for ac_exec_ext in '' $ac_executable_extensions; do
40798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40799     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40801     break 2
40802   fi
40803 done
40804   done
40805 IFS=$as_save_IFS
40806 
40807   ;;
40808 esac
40809 fi
40810 NM=$ac_cv_path_NM
40811 if test -n "$NM"; then
40812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40813 $as_echo "$NM" >&6; }
40814 else
40815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40816 $as_echo "no" >&6; }
40817 fi
40818 
40819 
40820           if test "x$NM" = x; then
40821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40822           fi
40823         else
40824           # Otherwise we believe it is a complete path. Use it as it is.
40825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40826 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40828 $as_echo_n "checking for NM... " >&6; }
40829           if test ! -x "$tool_specified"; then
40830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40831 $as_echo "not found" >&6; }
40832             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40833           fi
40834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40835 $as_echo "$tool_specified" >&6; }
40836         fi
40837       fi
40838     fi
40839 
40840   fi
40841 
40842 
40843     fi
40844 
40845   # Only process if variable expands to non-empty
40846 
40847   if test "x$NM" != x; then
40848     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849 
40850   # First separate the path from the arguments. This will split at the first
40851   # space.
40852   complete="$NM"
40853   path="${complete%% *}"
40854   tmp="$complete EOL"
40855   arguments="${tmp#* }"
40856 
40857   # Input might be given as Windows format, start by converting to
40858   # unix format.
40859   new_path=`$CYGPATH -u "$path"`
40860 
40861   # Now try to locate executable using which
40862   new_path=`$WHICH "$new_path" 2> /dev/null`
40863   # bat and cmd files are not always considered executable in cygwin causing which
40864   # to not find them
40865   if test "x$new_path" = x \
40866       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40867       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40868     new_path=`$CYGPATH -u "$path"`
40869   fi
40870   if test "x$new_path" = x; then
40871     # Oops. Which didn't find the executable.
40872     # The splitting of arguments from the executable at a space might have been incorrect,
40873     # since paths with space are more likely in Windows. Give it another try with the whole
40874     # argument.
40875     path="$complete"
40876     arguments="EOL"
40877     new_path=`$CYGPATH -u "$path"`
40878     new_path=`$WHICH "$new_path" 2> /dev/null`
40879     # bat and cmd files are not always considered executable in cygwin causing which
40880     # to not find them
40881     if test "x$new_path" = x \
40882         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40883         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40884       new_path=`$CYGPATH -u "$path"`
40885     fi
40886     if test "x$new_path" = x; then
40887       # It's still not found. Now this is an unrecoverable error.
40888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40889 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40890       has_space=`$ECHO "$complete" | $GREP " "`
40891       if test "x$has_space" != x; then
40892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40894       fi
40895       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40896     fi
40897   fi
40898 
40899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40902   # "foo.exe" is OK but "foo" is an error.
40903   #
40904   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40905   # It is also a way to make sure we got the proper file name for the real test later on.
40906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40907   if test "x$test_shortpath" = x; then
40908     # Short path failed, file does not exist as specified.
40909     # Try adding .exe or .cmd
40910     if test -f "${new_path}.exe"; then
40911       input_to_shortpath="${new_path}.exe"
40912     elif test -f "${new_path}.cmd"; then
40913       input_to_shortpath="${new_path}.cmd"
40914     else
40915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40916 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40917       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40918 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40919       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40920     fi
40921   else
40922     input_to_shortpath="$new_path"
40923   fi
40924 
40925   # Call helper function which possibly converts this using DOS-style short mode.
40926   # If so, the updated path is stored in $new_path.
40927   new_path="$input_to_shortpath"
40928 
40929   input_path="$input_to_shortpath"
40930   # Check if we need to convert this using DOS-style short mode. If the path
40931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40932   # take no chances and rewrite it.
40933   # Note: m4 eats our [], so we need to use [ and ] instead.
40934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40935   if test "x$has_forbidden_chars" != x; then
40936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40940       # Going to short mode and back again did indeed matter. Since short mode is
40941       # case insensitive, let's make it lowercase to improve readability.
40942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40943       # Now convert it back to Unix-style (cygpath)
40944       input_path=`$CYGPATH -u "$shortmode_path"`
40945       new_path="$input_path"
40946     fi
40947   fi
40948 
40949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40950   if test "x$test_cygdrive_prefix" = x; then
40951     # As a simple fix, exclude /usr/bin since it's not a real path.
40952     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40954       # a path prefixed by /cygdrive for fixpath to work.
40955       new_path="$CYGWIN_ROOT_PATH$input_path"
40956     fi
40957   fi
40958 
40959   # remove trailing .exe if any
40960   new_path="${new_path/%.exe/}"
40961 
40962     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963 
40964   # First separate the path from the arguments. This will split at the first
40965   # space.
40966   complete="$NM"
40967   path="${complete%% *}"
40968   tmp="$complete EOL"
40969   arguments="${tmp#* }"
40970 
40971   # Input might be given as Windows format, start by converting to
40972   # unix format.
40973   new_path="$path"
40974 
40975   windows_path="$new_path"
40976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40977     unix_path=`$CYGPATH -u "$windows_path"`
40978     new_path="$unix_path"
40979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40981     new_path="$unix_path"
40982   fi
40983 
40984 
40985   # Now try to locate executable using which
40986   new_path=`$WHICH "$new_path" 2> /dev/null`
40987 
40988   if test "x$new_path" = x; then
40989     # Oops. Which didn't find the executable.
40990     # The splitting of arguments from the executable at a space might have been incorrect,
40991     # since paths with space are more likely in Windows. Give it another try with the whole
40992     # argument.
40993     path="$complete"
40994     arguments="EOL"
40995     new_path="$path"
40996 
40997   windows_path="$new_path"
40998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40999     unix_path=`$CYGPATH -u "$windows_path"`
41000     new_path="$unix_path"
41001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41003     new_path="$unix_path"
41004   fi
41005 
41006 
41007     new_path=`$WHICH "$new_path" 2> /dev/null`
41008     # bat and cmd files are not always considered executable in MSYS causing which
41009     # to not find them
41010     if test "x$new_path" = x \
41011         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41012         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41013       new_path="$path"
41014 
41015   windows_path="$new_path"
41016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41017     unix_path=`$CYGPATH -u "$windows_path"`
41018     new_path="$unix_path"
41019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41021     new_path="$unix_path"
41022   fi
41023 
41024     fi
41025 
41026     if test "x$new_path" = x; then
41027       # It's still not found. Now this is an unrecoverable error.
41028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41029 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41030       has_space=`$ECHO "$complete" | $GREP " "`
41031       if test "x$has_space" != x; then
41032         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41033 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41034       fi
41035       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41036     fi
41037   fi
41038 
41039   # Now new_path has a complete unix path to the binary
41040   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41041     # Keep paths in /bin as-is, but remove trailing .exe if any
41042     new_path="${new_path/%.exe/}"
41043     # Do not save /bin paths to all_fixpath_prefixes!
41044   else
41045     # Not in mixed or Windows style, start by that.
41046     new_path=`cmd //c echo $new_path`
41047 
41048   input_path="$new_path"
41049   # Check if we need to convert this using DOS-style short mode. If the path
41050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41051   # take no chances and rewrite it.
41052   # Note: m4 eats our [], so we need to use [ and ] instead.
41053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41054   if test "x$has_forbidden_chars" != x; then
41055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41057   fi
41058 
41059     # Output is in $new_path
41060 
41061   windows_path="$new_path"
41062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41063     unix_path=`$CYGPATH -u "$windows_path"`
41064     new_path="$unix_path"
41065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41067     new_path="$unix_path"
41068   fi
41069 
41070     # remove trailing .exe if any
41071     new_path="${new_path/%.exe/}"
41072 
41073     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41074     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41075   fi
41076 
41077     else
41078       # We're on a unix platform. Hooray! :)
41079       # First separate the path from the arguments. This will split at the first
41080       # space.
41081       complete="$NM"
41082       path="${complete%% *}"
41083       tmp="$complete EOL"
41084       arguments="${tmp#* }"
41085 
41086       # Cannot rely on the command "which" here since it doesn't always work.
41087       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41088       if test -z "$is_absolute_path"; then
41089         # Path to executable is not absolute. Find it.
41090         IFS_save="$IFS"
41091         IFS=:
41092         for p in $PATH; do
41093           if test -f "$p/$path" && test -x "$p/$path"; then
41094             new_path="$p/$path"
41095             break
41096           fi
41097         done
41098         IFS="$IFS_save"
41099       else
41100         # This is an absolute path, we can use it without further modifications.
41101         new_path="$path"
41102       fi
41103 
41104       if test "x$new_path" = x; then
41105         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41106 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41107         has_space=`$ECHO "$complete" | $GREP " "`
41108         if test "x$has_space" != x; then
41109           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41110 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41111         fi
41112         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41113       fi
41114     fi
41115 
41116     # Now join together the path and the arguments once again
41117     if test "x$arguments" != xEOL; then
41118       new_complete="$new_path ${arguments% *}"
41119     else
41120       new_complete="$new_path"
41121     fi
41122 
41123     if test "x$complete" != "x$new_complete"; then
41124       NM="$new_complete"
41125       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41126 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41127     fi
41128   fi
41129 
41130     GNM="$NM"
41131 
41132   fi
41133 
41134   # objcopy is used for moving debug symbols to separate files when
41135   # full debug symbols are enabled.
41136   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41137 
41138 
41139   # Publish this variable in the help.
41140 
41141 
41142   if [ -z "${OBJCOPY+x}" ]; then
41143     # The variable is not set by user, try to locate tool using the code snippet
41144     if test -n "$ac_tool_prefix"; then
41145   for ac_prog in gobjcopy objcopy
41146   do
41147     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41148 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41150 $as_echo_n "checking for $ac_word... " >&6; }
41151 if ${ac_cv_prog_OBJCOPY+:} false; then :
41152   $as_echo_n "(cached) " >&6
41153 else
41154   if test -n "$OBJCOPY"; then
41155   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41156 else
41157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41158 for as_dir in $PATH
41159 do
41160   IFS=$as_save_IFS
41161   test -z "$as_dir" && as_dir=.
41162     for ac_exec_ext in '' $ac_executable_extensions; do
41163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41164     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41166     break 2
41167   fi
41168 done
41169   done
41170 IFS=$as_save_IFS
41171 
41172 fi
41173 fi
41174 OBJCOPY=$ac_cv_prog_OBJCOPY
41175 if test -n "$OBJCOPY"; then
41176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41177 $as_echo "$OBJCOPY" >&6; }
41178 else
41179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41180 $as_echo "no" >&6; }
41181 fi
41182 
41183 
41184     test -n "$OBJCOPY" && break
41185   done
41186 fi
41187 if test -z "$OBJCOPY"; then
41188   ac_ct_OBJCOPY=$OBJCOPY
41189   for ac_prog in gobjcopy objcopy
41190 do
41191   # Extract the first word of "$ac_prog", so it can be a program name with args.
41192 set dummy $ac_prog; ac_word=$2
41193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41194 $as_echo_n "checking for $ac_word... " >&6; }
41195 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41196   $as_echo_n "(cached) " >&6
41197 else
41198   if test -n "$ac_ct_OBJCOPY"; then
41199   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41200 else
41201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41202 for as_dir in $PATH
41203 do
41204   IFS=$as_save_IFS
41205   test -z "$as_dir" && as_dir=.
41206     for ac_exec_ext in '' $ac_executable_extensions; do
41207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41208     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41210     break 2
41211   fi
41212 done
41213   done
41214 IFS=$as_save_IFS
41215 
41216 fi
41217 fi
41218 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41219 if test -n "$ac_ct_OBJCOPY"; then
41220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41221 $as_echo "$ac_ct_OBJCOPY" >&6; }
41222 else
41223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41224 $as_echo "no" >&6; }
41225 fi
41226 
41227 
41228   test -n "$ac_ct_OBJCOPY" && break
41229 done
41230 
41231   if test "x$ac_ct_OBJCOPY" = x; then
41232     OBJCOPY=""
41233   else
41234     case $cross_compiling:$ac_tool_warned in
41235 yes:)
41236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41237 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41238 ac_tool_warned=yes ;;
41239 esac
41240     OBJCOPY=$ac_ct_OBJCOPY
41241   fi
41242 fi
41243 
41244   else
41245     # The variable is set, but is it from the command line or the environment?
41246 
41247     # Try to remove the string !OBJCOPY! from our list.
41248     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41249     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41250       # If it failed, the variable was not from the command line. Ignore it,
41251       # but warn the user (except for BASH, which is always set by the calling BASH).
41252       if test "xOBJCOPY" != xBASH; then
41253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41254 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41255       fi
41256       # Try to locate tool using the code snippet
41257       if test -n "$ac_tool_prefix"; then
41258   for ac_prog in gobjcopy objcopy
41259   do
41260     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41261 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41263 $as_echo_n "checking for $ac_word... " >&6; }
41264 if ${ac_cv_prog_OBJCOPY+:} false; then :
41265   $as_echo_n "(cached) " >&6
41266 else
41267   if test -n "$OBJCOPY"; then
41268   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41269 else
41270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41271 for as_dir in $PATH
41272 do
41273   IFS=$as_save_IFS
41274   test -z "$as_dir" && as_dir=.
41275     for ac_exec_ext in '' $ac_executable_extensions; do
41276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41277     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41279     break 2
41280   fi
41281 done
41282   done
41283 IFS=$as_save_IFS
41284 
41285 fi
41286 fi
41287 OBJCOPY=$ac_cv_prog_OBJCOPY
41288 if test -n "$OBJCOPY"; then
41289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41290 $as_echo "$OBJCOPY" >&6; }
41291 else
41292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41293 $as_echo "no" >&6; }
41294 fi
41295 
41296 
41297     test -n "$OBJCOPY" && break
41298   done
41299 fi
41300 if test -z "$OBJCOPY"; then
41301   ac_ct_OBJCOPY=$OBJCOPY
41302   for ac_prog in gobjcopy objcopy
41303 do
41304   # Extract the first word of "$ac_prog", so it can be a program name with args.
41305 set dummy $ac_prog; ac_word=$2
41306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41307 $as_echo_n "checking for $ac_word... " >&6; }
41308 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41309   $as_echo_n "(cached) " >&6
41310 else
41311   if test -n "$ac_ct_OBJCOPY"; then
41312   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41313 else
41314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41315 for as_dir in $PATH
41316 do
41317   IFS=$as_save_IFS
41318   test -z "$as_dir" && as_dir=.
41319     for ac_exec_ext in '' $ac_executable_extensions; do
41320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41321     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41323     break 2
41324   fi
41325 done
41326   done
41327 IFS=$as_save_IFS
41328 
41329 fi
41330 fi
41331 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41332 if test -n "$ac_ct_OBJCOPY"; then
41333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41334 $as_echo "$ac_ct_OBJCOPY" >&6; }
41335 else
41336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41337 $as_echo "no" >&6; }
41338 fi
41339 
41340 
41341   test -n "$ac_ct_OBJCOPY" && break
41342 done
41343 
41344   if test "x$ac_ct_OBJCOPY" = x; then
41345     OBJCOPY=""
41346   else
41347     case $cross_compiling:$ac_tool_warned in
41348 yes:)
41349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41350 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41351 ac_tool_warned=yes ;;
41352 esac
41353     OBJCOPY=$ac_ct_OBJCOPY
41354   fi
41355 fi
41356 
41357     else
41358       # If it succeeded, then it was overridden by the user. We will use it
41359       # for the tool.
41360 
41361       # First remove it from the list of overridden variables, so we can test
41362       # for unknown variables in the end.
41363       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41364 
41365       # Check if we try to supply an empty value
41366       if test "x$OBJCOPY" = x; then
41367         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41368 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41369         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41370 $as_echo_n "checking for OBJCOPY... " >&6; }
41371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41372 $as_echo "disabled" >&6; }
41373       else
41374         # Check if the provided tool contains a complete path.
41375         tool_specified="$OBJCOPY"
41376         tool_basename="${tool_specified##*/}"
41377         if test "x$tool_basename" = "x$tool_specified"; then
41378           # A command without a complete path is provided, search $PATH.
41379           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41380 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41381           # Extract the first word of "$tool_basename", so it can be a program name with args.
41382 set dummy $tool_basename; ac_word=$2
41383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41384 $as_echo_n "checking for $ac_word... " >&6; }
41385 if ${ac_cv_path_OBJCOPY+:} false; then :
41386   $as_echo_n "(cached) " >&6
41387 else
41388   case $OBJCOPY in
41389   [\\/]* | ?:[\\/]*)
41390   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41391   ;;
41392   *)
41393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41394 for as_dir in $PATH
41395 do
41396   IFS=$as_save_IFS
41397   test -z "$as_dir" && as_dir=.
41398     for ac_exec_ext in '' $ac_executable_extensions; do
41399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41400     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41402     break 2
41403   fi
41404 done
41405   done
41406 IFS=$as_save_IFS
41407 
41408   ;;
41409 esac
41410 fi
41411 OBJCOPY=$ac_cv_path_OBJCOPY
41412 if test -n "$OBJCOPY"; then
41413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41414 $as_echo "$OBJCOPY" >&6; }
41415 else
41416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41417 $as_echo "no" >&6; }
41418 fi
41419 
41420 
41421           if test "x$OBJCOPY" = x; then
41422             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41423           fi
41424         else
41425           # Otherwise we believe it is a complete path. Use it as it is.
41426           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41427 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41428           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41429 $as_echo_n "checking for OBJCOPY... " >&6; }
41430           if test ! -x "$tool_specified"; then
41431             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41432 $as_echo "not found" >&6; }
41433             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41434           fi
41435           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41436 $as_echo "$tool_specified" >&6; }
41437         fi
41438       fi
41439     fi
41440 
41441   fi
41442 
41443 
41444     # Only call fixup if objcopy was found.
41445     if test -n "$OBJCOPY"; then
41446 
41447   # Only process if variable expands to non-empty
41448 
41449   if test "x$OBJCOPY" != x; then
41450     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41451 
41452   # First separate the path from the arguments. This will split at the first
41453   # space.
41454   complete="$OBJCOPY"
41455   path="${complete%% *}"
41456   tmp="$complete EOL"
41457   arguments="${tmp#* }"
41458 
41459   # Input might be given as Windows format, start by converting to
41460   # unix format.
41461   new_path=`$CYGPATH -u "$path"`
41462 
41463   # Now try to locate executable using which
41464   new_path=`$WHICH "$new_path" 2> /dev/null`
41465   # bat and cmd files are not always considered executable in cygwin causing which
41466   # to not find them
41467   if test "x$new_path" = x \
41468       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41469       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41470     new_path=`$CYGPATH -u "$path"`
41471   fi
41472   if test "x$new_path" = x; then
41473     # Oops. Which didn't find the executable.
41474     # The splitting of arguments from the executable at a space might have been incorrect,
41475     # since paths with space are more likely in Windows. Give it another try with the whole
41476     # argument.
41477     path="$complete"
41478     arguments="EOL"
41479     new_path=`$CYGPATH -u "$path"`
41480     new_path=`$WHICH "$new_path" 2> /dev/null`
41481     # bat and cmd files are not always considered executable in cygwin causing which
41482     # to not find them
41483     if test "x$new_path" = x \
41484         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41485         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41486       new_path=`$CYGPATH -u "$path"`
41487     fi
41488     if test "x$new_path" = x; then
41489       # It's still not found. Now this is an unrecoverable error.
41490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41491 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41492       has_space=`$ECHO "$complete" | $GREP " "`
41493       if test "x$has_space" != x; then
41494         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41495 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41496       fi
41497       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41498     fi
41499   fi
41500 
41501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41504   # "foo.exe" is OK but "foo" is an error.
41505   #
41506   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41507   # It is also a way to make sure we got the proper file name for the real test later on.
41508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41509   if test "x$test_shortpath" = x; then
41510     # Short path failed, file does not exist as specified.
41511     # Try adding .exe or .cmd
41512     if test -f "${new_path}.exe"; then
41513       input_to_shortpath="${new_path}.exe"
41514     elif test -f "${new_path}.cmd"; then
41515       input_to_shortpath="${new_path}.cmd"
41516     else
41517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41518 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41519       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41520 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41521       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41522     fi
41523   else
41524     input_to_shortpath="$new_path"
41525   fi
41526 
41527   # Call helper function which possibly converts this using DOS-style short mode.
41528   # If so, the updated path is stored in $new_path.
41529   new_path="$input_to_shortpath"
41530 
41531   input_path="$input_to_shortpath"
41532   # Check if we need to convert this using DOS-style short mode. If the path
41533   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41534   # take no chances and rewrite it.
41535   # Note: m4 eats our [], so we need to use [ and ] instead.
41536   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41537   if test "x$has_forbidden_chars" != x; then
41538     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41539     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41540     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41541     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41542       # Going to short mode and back again did indeed matter. Since short mode is
41543       # case insensitive, let's make it lowercase to improve readability.
41544       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41545       # Now convert it back to Unix-style (cygpath)
41546       input_path=`$CYGPATH -u "$shortmode_path"`
41547       new_path="$input_path"
41548     fi
41549   fi
41550 
41551   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41552   if test "x$test_cygdrive_prefix" = x; then
41553     # As a simple fix, exclude /usr/bin since it's not a real path.
41554     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41555       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41556       # a path prefixed by /cygdrive for fixpath to work.
41557       new_path="$CYGWIN_ROOT_PATH$input_path"
41558     fi
41559   fi
41560 
41561   # remove trailing .exe if any
41562   new_path="${new_path/%.exe/}"
41563 
41564     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41565 
41566   # First separate the path from the arguments. This will split at the first
41567   # space.
41568   complete="$OBJCOPY"
41569   path="${complete%% *}"
41570   tmp="$complete EOL"
41571   arguments="${tmp#* }"
41572 
41573   # Input might be given as Windows format, start by converting to
41574   # unix format.
41575   new_path="$path"
41576 
41577   windows_path="$new_path"
41578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41579     unix_path=`$CYGPATH -u "$windows_path"`
41580     new_path="$unix_path"
41581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41582     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41583     new_path="$unix_path"
41584   fi
41585 
41586 
41587   # Now try to locate executable using which
41588   new_path=`$WHICH "$new_path" 2> /dev/null`
41589 
41590   if test "x$new_path" = x; then
41591     # Oops. Which didn't find the executable.
41592     # The splitting of arguments from the executable at a space might have been incorrect,
41593     # since paths with space are more likely in Windows. Give it another try with the whole
41594     # argument.
41595     path="$complete"
41596     arguments="EOL"
41597     new_path="$path"
41598 
41599   windows_path="$new_path"
41600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41601     unix_path=`$CYGPATH -u "$windows_path"`
41602     new_path="$unix_path"
41603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41605     new_path="$unix_path"
41606   fi
41607 
41608 
41609     new_path=`$WHICH "$new_path" 2> /dev/null`
41610     # bat and cmd files are not always considered executable in MSYS causing which
41611     # to not find them
41612     if test "x$new_path" = x \
41613         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41614         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41615       new_path="$path"
41616 
41617   windows_path="$new_path"
41618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41619     unix_path=`$CYGPATH -u "$windows_path"`
41620     new_path="$unix_path"
41621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41623     new_path="$unix_path"
41624   fi
41625 
41626     fi
41627 
41628     if test "x$new_path" = x; then
41629       # It's still not found. Now this is an unrecoverable error.
41630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41631 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41632       has_space=`$ECHO "$complete" | $GREP " "`
41633       if test "x$has_space" != x; then
41634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41636       fi
41637       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41638     fi
41639   fi
41640 
41641   # Now new_path has a complete unix path to the binary
41642   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41643     # Keep paths in /bin as-is, but remove trailing .exe if any
41644     new_path="${new_path/%.exe/}"
41645     # Do not save /bin paths to all_fixpath_prefixes!
41646   else
41647     # Not in mixed or Windows style, start by that.
41648     new_path=`cmd //c echo $new_path`
41649 
41650   input_path="$new_path"
41651   # Check if we need to convert this using DOS-style short mode. If the path
41652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41653   # take no chances and rewrite it.
41654   # Note: m4 eats our [], so we need to use [ and ] instead.
41655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41656   if test "x$has_forbidden_chars" != x; then
41657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41659   fi
41660 
41661     # Output is in $new_path
41662 
41663   windows_path="$new_path"
41664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41665     unix_path=`$CYGPATH -u "$windows_path"`
41666     new_path="$unix_path"
41667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41669     new_path="$unix_path"
41670   fi
41671 
41672     # remove trailing .exe if any
41673     new_path="${new_path/%.exe/}"
41674 
41675     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41676     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41677   fi
41678 
41679     else
41680       # We're on a unix platform. Hooray! :)
41681       # First separate the path from the arguments. This will split at the first
41682       # space.
41683       complete="$OBJCOPY"
41684       path="${complete%% *}"
41685       tmp="$complete EOL"
41686       arguments="${tmp#* }"
41687 
41688       # Cannot rely on the command "which" here since it doesn't always work.
41689       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41690       if test -z "$is_absolute_path"; then
41691         # Path to executable is not absolute. Find it.
41692         IFS_save="$IFS"
41693         IFS=:
41694         for p in $PATH; do
41695           if test -f "$p/$path" && test -x "$p/$path"; then
41696             new_path="$p/$path"
41697             break
41698           fi
41699         done
41700         IFS="$IFS_save"
41701       else
41702         # This is an absolute path, we can use it without further modifications.
41703         new_path="$path"
41704       fi
41705 
41706       if test "x$new_path" = x; then
41707         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41708 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41709         has_space=`$ECHO "$complete" | $GREP " "`
41710         if test "x$has_space" != x; then
41711           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41712 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41713         fi
41714         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41715       fi
41716     fi
41717 
41718     # Now join together the path and the arguments once again
41719     if test "x$arguments" != xEOL; then
41720       new_complete="$new_path ${arguments% *}"
41721     else
41722       new_complete="$new_path"
41723     fi
41724 
41725     if test "x$complete" != "x$new_complete"; then
41726       OBJCOPY="$new_complete"
41727       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41728 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41729     fi
41730   fi
41731 
41732       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41733         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41734         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41735         # - version number is last blank separate word on first line
41736         # - version number formats that have been seen:
41737         #   - <major>.<minor>
41738         #   - <major>.<minor>.<micro>
41739         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41740         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41741          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41742               -e 's/.* //' \
41743               -e '/^[01]\./b bad' \
41744               -e '/^2\./{' \
41745               -e '  s/^2\.//' \
41746               -e '  /^[0-9]$/b bad' \
41747               -e '  /^[0-9]\./b bad' \
41748               -e '  /^1[0-9]$/b bad' \
41749               -e '  /^1[0-9]\./b bad' \
41750               -e '  /^20\./b bad' \
41751               -e '  /^21\.0$/b bad' \
41752               -e '  /^21\.0\./b bad' \
41753               -e '}' \
41754               -e ':good' \
41755               -e 's/.*/VALID_VERSION/p' \
41756               -e 'q' \
41757               -e ':bad' \
41758               -e 's/.*/BAD_VERSION/p' \
41759               -e 'q'`
41760         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41761           OBJCOPY=
41762           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
41763 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41764           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41765 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41766           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41767 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41768           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41769 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41770           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41771 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41772         fi
41773       fi
41774     fi
41775   fi
41776 
41777 
41778 
41779   # Publish this variable in the help.
41780 
41781 
41782   if [ -z "${OBJDUMP+x}" ]; then
41783     # The variable is not set by user, try to locate tool using the code snippet
41784     if test -n "$ac_tool_prefix"; then
41785   for ac_prog in gobjdump objdump
41786   do
41787     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41788 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41790 $as_echo_n "checking for $ac_word... " >&6; }
41791 if ${ac_cv_prog_OBJDUMP+:} false; then :
41792   $as_echo_n "(cached) " >&6
41793 else
41794   if test -n "$OBJDUMP"; then
41795   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41796 else
41797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41798 for as_dir in $PATH
41799 do
41800   IFS=$as_save_IFS
41801   test -z "$as_dir" && as_dir=.
41802     for ac_exec_ext in '' $ac_executable_extensions; do
41803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41804     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41806     break 2
41807   fi
41808 done
41809   done
41810 IFS=$as_save_IFS
41811 
41812 fi
41813 fi
41814 OBJDUMP=$ac_cv_prog_OBJDUMP
41815 if test -n "$OBJDUMP"; then
41816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41817 $as_echo "$OBJDUMP" >&6; }
41818 else
41819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41820 $as_echo "no" >&6; }
41821 fi
41822 
41823 
41824     test -n "$OBJDUMP" && break
41825   done
41826 fi
41827 if test -z "$OBJDUMP"; then
41828   ac_ct_OBJDUMP=$OBJDUMP
41829   for ac_prog in gobjdump objdump
41830 do
41831   # Extract the first word of "$ac_prog", so it can be a program name with args.
41832 set dummy $ac_prog; ac_word=$2
41833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41834 $as_echo_n "checking for $ac_word... " >&6; }
41835 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41836   $as_echo_n "(cached) " >&6
41837 else
41838   if test -n "$ac_ct_OBJDUMP"; then
41839   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41840 else
41841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41842 for as_dir in $PATH
41843 do
41844   IFS=$as_save_IFS
41845   test -z "$as_dir" && as_dir=.
41846     for ac_exec_ext in '' $ac_executable_extensions; do
41847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41848     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41850     break 2
41851   fi
41852 done
41853   done
41854 IFS=$as_save_IFS
41855 
41856 fi
41857 fi
41858 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41859 if test -n "$ac_ct_OBJDUMP"; then
41860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41861 $as_echo "$ac_ct_OBJDUMP" >&6; }
41862 else
41863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41864 $as_echo "no" >&6; }
41865 fi
41866 
41867 
41868   test -n "$ac_ct_OBJDUMP" && break
41869 done
41870 
41871   if test "x$ac_ct_OBJDUMP" = x; then
41872     OBJDUMP=""
41873   else
41874     case $cross_compiling:$ac_tool_warned in
41875 yes:)
41876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41877 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41878 ac_tool_warned=yes ;;
41879 esac
41880     OBJDUMP=$ac_ct_OBJDUMP
41881   fi
41882 fi
41883 
41884   else
41885     # The variable is set, but is it from the command line or the environment?
41886 
41887     # Try to remove the string !OBJDUMP! from our list.
41888     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41889     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41890       # If it failed, the variable was not from the command line. Ignore it,
41891       # but warn the user (except for BASH, which is always set by the calling BASH).
41892       if test "xOBJDUMP" != xBASH; then
41893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41894 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41895       fi
41896       # Try to locate tool using the code snippet
41897       if test -n "$ac_tool_prefix"; then
41898   for ac_prog in gobjdump objdump
41899   do
41900     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41901 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41903 $as_echo_n "checking for $ac_word... " >&6; }
41904 if ${ac_cv_prog_OBJDUMP+:} false; then :
41905   $as_echo_n "(cached) " >&6
41906 else
41907   if test -n "$OBJDUMP"; then
41908   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41909 else
41910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41911 for as_dir in $PATH
41912 do
41913   IFS=$as_save_IFS
41914   test -z "$as_dir" && as_dir=.
41915     for ac_exec_ext in '' $ac_executable_extensions; do
41916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41917     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41919     break 2
41920   fi
41921 done
41922   done
41923 IFS=$as_save_IFS
41924 
41925 fi
41926 fi
41927 OBJDUMP=$ac_cv_prog_OBJDUMP
41928 if test -n "$OBJDUMP"; then
41929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41930 $as_echo "$OBJDUMP" >&6; }
41931 else
41932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41933 $as_echo "no" >&6; }
41934 fi
41935 
41936 
41937     test -n "$OBJDUMP" && break
41938   done
41939 fi
41940 if test -z "$OBJDUMP"; then
41941   ac_ct_OBJDUMP=$OBJDUMP
41942   for ac_prog in gobjdump objdump
41943 do
41944   # Extract the first word of "$ac_prog", so it can be a program name with args.
41945 set dummy $ac_prog; ac_word=$2
41946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41947 $as_echo_n "checking for $ac_word... " >&6; }
41948 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41949   $as_echo_n "(cached) " >&6
41950 else
41951   if test -n "$ac_ct_OBJDUMP"; then
41952   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41953 else
41954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41955 for as_dir in $PATH
41956 do
41957   IFS=$as_save_IFS
41958   test -z "$as_dir" && as_dir=.
41959     for ac_exec_ext in '' $ac_executable_extensions; do
41960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41961     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41963     break 2
41964   fi
41965 done
41966   done
41967 IFS=$as_save_IFS
41968 
41969 fi
41970 fi
41971 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41972 if test -n "$ac_ct_OBJDUMP"; then
41973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41974 $as_echo "$ac_ct_OBJDUMP" >&6; }
41975 else
41976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41977 $as_echo "no" >&6; }
41978 fi
41979 
41980 
41981   test -n "$ac_ct_OBJDUMP" && break
41982 done
41983 
41984   if test "x$ac_ct_OBJDUMP" = x; then
41985     OBJDUMP=""
41986   else
41987     case $cross_compiling:$ac_tool_warned in
41988 yes:)
41989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41990 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41991 ac_tool_warned=yes ;;
41992 esac
41993     OBJDUMP=$ac_ct_OBJDUMP
41994   fi
41995 fi
41996 
41997     else
41998       # If it succeeded, then it was overridden by the user. We will use it
41999       # for the tool.
42000 
42001       # First remove it from the list of overridden variables, so we can test
42002       # for unknown variables in the end.
42003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42004 
42005       # Check if we try to supply an empty value
42006       if test "x$OBJDUMP" = x; then
42007         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42008 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42010 $as_echo_n "checking for OBJDUMP... " >&6; }
42011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42012 $as_echo "disabled" >&6; }
42013       else
42014         # Check if the provided tool contains a complete path.
42015         tool_specified="$OBJDUMP"
42016         tool_basename="${tool_specified##*/}"
42017         if test "x$tool_basename" = "x$tool_specified"; then
42018           # A command without a complete path is provided, search $PATH.
42019           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42020 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42021           # Extract the first word of "$tool_basename", so it can be a program name with args.
42022 set dummy $tool_basename; ac_word=$2
42023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42024 $as_echo_n "checking for $ac_word... " >&6; }
42025 if ${ac_cv_path_OBJDUMP+:} false; then :
42026   $as_echo_n "(cached) " >&6
42027 else
42028   case $OBJDUMP in
42029   [\\/]* | ?:[\\/]*)
42030   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42031   ;;
42032   *)
42033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42034 for as_dir in $PATH
42035 do
42036   IFS=$as_save_IFS
42037   test -z "$as_dir" && as_dir=.
42038     for ac_exec_ext in '' $ac_executable_extensions; do
42039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42040     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42042     break 2
42043   fi
42044 done
42045   done
42046 IFS=$as_save_IFS
42047 
42048   ;;
42049 esac
42050 fi
42051 OBJDUMP=$ac_cv_path_OBJDUMP
42052 if test -n "$OBJDUMP"; then
42053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42054 $as_echo "$OBJDUMP" >&6; }
42055 else
42056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42057 $as_echo "no" >&6; }
42058 fi
42059 
42060 
42061           if test "x$OBJDUMP" = x; then
42062             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42063           fi
42064         else
42065           # Otherwise we believe it is a complete path. Use it as it is.
42066           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42067 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42068           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42069 $as_echo_n "checking for OBJDUMP... " >&6; }
42070           if test ! -x "$tool_specified"; then
42071             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42072 $as_echo "not found" >&6; }
42073             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42074           fi
42075           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42076 $as_echo "$tool_specified" >&6; }
42077         fi
42078       fi
42079     fi
42080 
42081   fi
42082 
42083 
42084   if test "x$OBJDUMP" != x; then
42085     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42086     # bails if argument is missing.
42087 
42088   # Only process if variable expands to non-empty
42089 
42090   if test "x$OBJDUMP" != x; then
42091     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42092 
42093   # First separate the path from the arguments. This will split at the first
42094   # space.
42095   complete="$OBJDUMP"
42096   path="${complete%% *}"
42097   tmp="$complete EOL"
42098   arguments="${tmp#* }"
42099 
42100   # Input might be given as Windows format, start by converting to
42101   # unix format.
42102   new_path=`$CYGPATH -u "$path"`
42103 
42104   # Now try to locate executable using which
42105   new_path=`$WHICH "$new_path" 2> /dev/null`
42106   # bat and cmd files are not always considered executable in cygwin causing which
42107   # to not find them
42108   if test "x$new_path" = x \
42109       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42110       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42111     new_path=`$CYGPATH -u "$path"`
42112   fi
42113   if test "x$new_path" = x; then
42114     # Oops. Which didn't find the executable.
42115     # The splitting of arguments from the executable at a space might have been incorrect,
42116     # since paths with space are more likely in Windows. Give it another try with the whole
42117     # argument.
42118     path="$complete"
42119     arguments="EOL"
42120     new_path=`$CYGPATH -u "$path"`
42121     new_path=`$WHICH "$new_path" 2> /dev/null`
42122     # bat and cmd files are not always considered executable in cygwin causing which
42123     # to not find them
42124     if test "x$new_path" = x \
42125         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42126         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42127       new_path=`$CYGPATH -u "$path"`
42128     fi
42129     if test "x$new_path" = x; then
42130       # It's still not found. Now this is an unrecoverable error.
42131       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42132 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42133       has_space=`$ECHO "$complete" | $GREP " "`
42134       if test "x$has_space" != x; then
42135         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42136 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42137       fi
42138       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42139     fi
42140   fi
42141 
42142   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42143   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42144   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42145   # "foo.exe" is OK but "foo" is an error.
42146   #
42147   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42148   # It is also a way to make sure we got the proper file name for the real test later on.
42149   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42150   if test "x$test_shortpath" = x; then
42151     # Short path failed, file does not exist as specified.
42152     # Try adding .exe or .cmd
42153     if test -f "${new_path}.exe"; then
42154       input_to_shortpath="${new_path}.exe"
42155     elif test -f "${new_path}.cmd"; then
42156       input_to_shortpath="${new_path}.cmd"
42157     else
42158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42159 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42160       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42161 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42162       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42163     fi
42164   else
42165     input_to_shortpath="$new_path"
42166   fi
42167 
42168   # Call helper function which possibly converts this using DOS-style short mode.
42169   # If so, the updated path is stored in $new_path.
42170   new_path="$input_to_shortpath"
42171 
42172   input_path="$input_to_shortpath"
42173   # Check if we need to convert this using DOS-style short mode. If the path
42174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42175   # take no chances and rewrite it.
42176   # Note: m4 eats our [], so we need to use [ and ] instead.
42177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42178   if test "x$has_forbidden_chars" != x; then
42179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42183       # Going to short mode and back again did indeed matter. Since short mode is
42184       # case insensitive, let's make it lowercase to improve readability.
42185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42186       # Now convert it back to Unix-style (cygpath)
42187       input_path=`$CYGPATH -u "$shortmode_path"`
42188       new_path="$input_path"
42189     fi
42190   fi
42191 
42192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42193   if test "x$test_cygdrive_prefix" = x; then
42194     # As a simple fix, exclude /usr/bin since it's not a real path.
42195     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42197       # a path prefixed by /cygdrive for fixpath to work.
42198       new_path="$CYGWIN_ROOT_PATH$input_path"
42199     fi
42200   fi
42201 
42202   # remove trailing .exe if any
42203   new_path="${new_path/%.exe/}"
42204 
42205     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42206 
42207   # First separate the path from the arguments. This will split at the first
42208   # space.
42209   complete="$OBJDUMP"
42210   path="${complete%% *}"
42211   tmp="$complete EOL"
42212   arguments="${tmp#* }"
42213 
42214   # Input might be given as Windows format, start by converting to
42215   # unix format.
42216   new_path="$path"
42217 
42218   windows_path="$new_path"
42219   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42220     unix_path=`$CYGPATH -u "$windows_path"`
42221     new_path="$unix_path"
42222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42223     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42224     new_path="$unix_path"
42225   fi
42226 
42227 
42228   # Now try to locate executable using which
42229   new_path=`$WHICH "$new_path" 2> /dev/null`
42230 
42231   if test "x$new_path" = x; then
42232     # Oops. Which didn't find the executable.
42233     # The splitting of arguments from the executable at a space might have been incorrect,
42234     # since paths with space are more likely in Windows. Give it another try with the whole
42235     # argument.
42236     path="$complete"
42237     arguments="EOL"
42238     new_path="$path"
42239 
42240   windows_path="$new_path"
42241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42242     unix_path=`$CYGPATH -u "$windows_path"`
42243     new_path="$unix_path"
42244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42246     new_path="$unix_path"
42247   fi
42248 
42249 
42250     new_path=`$WHICH "$new_path" 2> /dev/null`
42251     # bat and cmd files are not always considered executable in MSYS causing which
42252     # to not find them
42253     if test "x$new_path" = x \
42254         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42255         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42256       new_path="$path"
42257 
42258   windows_path="$new_path"
42259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42260     unix_path=`$CYGPATH -u "$windows_path"`
42261     new_path="$unix_path"
42262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42264     new_path="$unix_path"
42265   fi
42266 
42267     fi
42268 
42269     if test "x$new_path" = x; then
42270       # It's still not found. Now this is an unrecoverable error.
42271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42272 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42273       has_space=`$ECHO "$complete" | $GREP " "`
42274       if test "x$has_space" != x; then
42275         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42277       fi
42278       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42279     fi
42280   fi
42281 
42282   # Now new_path has a complete unix path to the binary
42283   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42284     # Keep paths in /bin as-is, but remove trailing .exe if any
42285     new_path="${new_path/%.exe/}"
42286     # Do not save /bin paths to all_fixpath_prefixes!
42287   else
42288     # Not in mixed or Windows style, start by that.
42289     new_path=`cmd //c echo $new_path`
42290 
42291   input_path="$new_path"
42292   # Check if we need to convert this using DOS-style short mode. If the path
42293   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42294   # take no chances and rewrite it.
42295   # Note: m4 eats our [], so we need to use [ and ] instead.
42296   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42297   if test "x$has_forbidden_chars" != x; then
42298     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42299     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42300   fi
42301 
42302     # Output is in $new_path
42303 
42304   windows_path="$new_path"
42305   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42306     unix_path=`$CYGPATH -u "$windows_path"`
42307     new_path="$unix_path"
42308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42309     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42310     new_path="$unix_path"
42311   fi
42312 
42313     # remove trailing .exe if any
42314     new_path="${new_path/%.exe/}"
42315 
42316     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42317     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42318   fi
42319 
42320     else
42321       # We're on a unix platform. Hooray! :)
42322       # First separate the path from the arguments. This will split at the first
42323       # space.
42324       complete="$OBJDUMP"
42325       path="${complete%% *}"
42326       tmp="$complete EOL"
42327       arguments="${tmp#* }"
42328 
42329       # Cannot rely on the command "which" here since it doesn't always work.
42330       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42331       if test -z "$is_absolute_path"; then
42332         # Path to executable is not absolute. Find it.
42333         IFS_save="$IFS"
42334         IFS=:
42335         for p in $PATH; do
42336           if test -f "$p/$path" && test -x "$p/$path"; then
42337             new_path="$p/$path"
42338             break
42339           fi
42340         done
42341         IFS="$IFS_save"
42342       else
42343         # This is an absolute path, we can use it without further modifications.
42344         new_path="$path"
42345       fi
42346 
42347       if test "x$new_path" = x; then
42348         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42349 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42350         has_space=`$ECHO "$complete" | $GREP " "`
42351         if test "x$has_space" != x; then
42352           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42353 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42354         fi
42355         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42356       fi
42357     fi
42358 
42359     # Now join together the path and the arguments once again
42360     if test "x$arguments" != xEOL; then
42361       new_complete="$new_path ${arguments% *}"
42362     else
42363       new_complete="$new_path"
42364     fi
42365 
42366     if test "x$complete" != "x$new_complete"; then
42367       OBJDUMP="$new_complete"
42368       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42369 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42370     fi
42371   fi
42372 
42373   fi
42374 
42375 
42376   # Restore old path.
42377   PATH="$OLD_PATH"
42378 
42379   # Restore the flags to the user specified values.
42380   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42381   CFLAGS="$ORG_CFLAGS"
42382   CXXFLAGS="$ORG_CXXFLAGS"
42383 
42384 
42385 # Finally do some processing after the detection phase
42386 
42387   if test "x$COMPILE_TYPE" = "xcross"; then
42388     # Now we need to find a C/C++ compiler that can build executables for the
42389     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42390     # used once. Also, we need to do this without adding a tools dir to the
42391     # path, otherwise we might pick up cross-compilers which don't use standard
42392     # naming.
42393 
42394     OLDPATH="$PATH"
42395 
42396 
42397 # Check whether --with-build-devkit was given.
42398 if test "${with_build_devkit+set}" = set; then :
42399   withval=$with_build_devkit;
42400 fi
42401 
42402     if test "x$with_build_devkit" = "xyes"; then
42403       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42404     elif test -n "$with_build_devkit"; then
42405       if test ! -d "$with_build_devkit"; then
42406         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42407       else
42408 
42409   # Only process if variable expands to non-empty
42410 
42411   if test "x$with_build_devkit" != x; then
42412     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42413 
42414   # Input might be given as Windows format, start by converting to
42415   # unix format.
42416   path="$with_build_devkit"
42417   new_path=`$CYGPATH -u "$path"`
42418 
42419   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42420   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42421   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42422   # "foo.exe" is OK but "foo" is an error.
42423   #
42424   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42425   # It is also a way to make sure we got the proper file name for the real test later on.
42426   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42427   if test "x$test_shortpath" = x; then
42428     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42429 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42430     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42431   fi
42432 
42433   # Call helper function which possibly converts this using DOS-style short mode.
42434   # If so, the updated path is stored in $new_path.
42435 
42436   input_path="$new_path"
42437   # Check if we need to convert this using DOS-style short mode. If the path
42438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42439   # take no chances and rewrite it.
42440   # Note: m4 eats our [], so we need to use [ and ] instead.
42441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42442   if test "x$has_forbidden_chars" != x; then
42443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42444     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42445     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42446     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42447       # Going to short mode and back again did indeed matter. Since short mode is
42448       # case insensitive, let's make it lowercase to improve readability.
42449       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42450       # Now convert it back to Unix-style (cygpath)
42451       input_path=`$CYGPATH -u "$shortmode_path"`
42452       new_path="$input_path"
42453     fi
42454   fi
42455 
42456   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42457   if test "x$test_cygdrive_prefix" = x; then
42458     # As a simple fix, exclude /usr/bin since it's not a real path.
42459     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42460       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42461       # a path prefixed by /cygdrive for fixpath to work.
42462       new_path="$CYGWIN_ROOT_PATH$input_path"
42463     fi
42464   fi
42465 
42466 
42467   if test "x$path" != "x$new_path"; then
42468     with_build_devkit="$new_path"
42469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42470 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42471   fi
42472 
42473     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42474 
42475   path="$with_build_devkit"
42476   has_colon=`$ECHO $path | $GREP ^.:`
42477   new_path="$path"
42478   if test "x$has_colon" = x; then
42479     # Not in mixed or Windows style, start by that.
42480     new_path=`cmd //c echo $path`
42481   fi
42482 
42483 
42484   input_path="$new_path"
42485   # Check if we need to convert this using DOS-style short mode. If the path
42486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42487   # take no chances and rewrite it.
42488   # Note: m4 eats our [], so we need to use [ and ] instead.
42489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42490   if test "x$has_forbidden_chars" != x; then
42491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42493   fi
42494 
42495 
42496   windows_path="$new_path"
42497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42498     unix_path=`$CYGPATH -u "$windows_path"`
42499     new_path="$unix_path"
42500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42502     new_path="$unix_path"
42503   fi
42504 
42505   if test "x$path" != "x$new_path"; then
42506     with_build_devkit="$new_path"
42507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42508 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42509   fi
42510 
42511   # Save the first 10 bytes of this path to the storage, so fixpath can work.
42512   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42513 
42514     else
42515       # We're on a unix platform. Hooray! :)
42516       path="$with_build_devkit"
42517       has_space=`$ECHO "$path" | $GREP " "`
42518       if test "x$has_space" != x; then
42519         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42520 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42521         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42522       fi
42523 
42524       # Use eval to expand a potential ~
42525       eval path="$path"
42526       if test ! -f "$path" && test ! -d "$path"; then
42527         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42528       fi
42529 
42530       with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42531     fi
42532   fi
42533 
42534         BUILD_DEVKIT_ROOT="$with_build_devkit"
42535         # Check for a meta data info file in the root of the devkit
42536         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42537           # Process devkit.info so that existing devkit variables are not
42538           # modified by this
42539           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42540               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42541               -e "s/\$host/\$build/g" \
42542               $BUILD_DEVKIT_ROOT/devkit.info \
42543               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42544           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42545           # This potentially sets the following:
42546           # A descriptive name of the devkit
42547 
42548   if test "x$BUILD_DEVKIT_NAME" = x; then
42549     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42550   fi
42551 
42552           # Corresponds to --with-extra-path
42553 
42554   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42555     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42556   fi
42557 
42558           # Corresponds to --with-toolchain-path
42559 
42560   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42561     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42562   fi
42563 
42564           # Corresponds to --with-sysroot
42565 
42566   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42567     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42568   fi
42569 
42570           # Skip the Window specific parts
42571         fi
42572 
42573         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42574 $as_echo_n "checking for build platform devkit... " >&6; }
42575         if test "x$BUILD_DEVKIT_NAME" != x; then
42576           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42577 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42578         else
42579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42580 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42581         fi
42582 
42583         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42584 
42585   if test "x$BUILD_SYSROOT" != "x"; then
42586     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42587       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42588         # Solaris Studio does not have a concept of sysroot. Instead we must
42589         # make sure the default include and lib dirs are appended to each
42590         # compile and link command line.
42591         BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42592         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42593             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42594             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42595       fi
42596     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42597       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42598       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42599     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42600       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42601       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42602     fi
42603     # Propagate the sysroot args to hotspot
42604     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42605     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42606     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42607     # The global CFLAGS and LDFLAGS variables need these for configure to function
42608     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42609     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42610     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42611     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42612   fi
42613 
42614   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42615     # We also need -iframework<path>/System/Library/Frameworks
42616     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42617     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42618     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42619     # set this here so it doesn't have to be peppered throughout the forest
42620     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42621     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42622   fi
42623 
42624 
42625 
42626 
42627 
42628          # Fallback default of just /bin if DEVKIT_PATH is not defined
42629         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42630           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42631         fi
42632         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42633       fi
42634     fi
42635 
42636     # FIXME: we should list the discovered compilers as an exclude pattern!
42637     # If we do that, we can do this detection before POST_DETECTION, and still
42638     # find the build compilers in the tools dir, if needed.
42639 
42640 
42641 
42642   # Publish this variable in the help.
42643 
42644 
42645   if [ -z "${BUILD_CC+x}" ]; then
42646     # The variable is not set by user, try to locate tool using the code snippet
42647     for ac_prog in cl cc gcc
42648 do
42649   # Extract the first word of "$ac_prog", so it can be a program name with args.
42650 set dummy $ac_prog; ac_word=$2
42651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42652 $as_echo_n "checking for $ac_word... " >&6; }
42653 if ${ac_cv_path_BUILD_CC+:} false; then :
42654   $as_echo_n "(cached) " >&6
42655 else
42656   case $BUILD_CC in
42657   [\\/]* | ?:[\\/]*)
42658   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42659   ;;
42660   *)
42661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42662 for as_dir in $PATH
42663 do
42664   IFS=$as_save_IFS
42665   test -z "$as_dir" && as_dir=.
42666     for ac_exec_ext in '' $ac_executable_extensions; do
42667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42668     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42670     break 2
42671   fi
42672 done
42673   done
42674 IFS=$as_save_IFS
42675 
42676   ;;
42677 esac
42678 fi
42679 BUILD_CC=$ac_cv_path_BUILD_CC
42680 if test -n "$BUILD_CC"; then
42681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42682 $as_echo "$BUILD_CC" >&6; }
42683 else
42684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42685 $as_echo "no" >&6; }
42686 fi
42687 
42688 
42689   test -n "$BUILD_CC" && break
42690 done
42691 
42692   else
42693     # The variable is set, but is it from the command line or the environment?
42694 
42695     # Try to remove the string !BUILD_CC! from our list.
42696     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42697     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42698       # If it failed, the variable was not from the command line. Ignore it,
42699       # but warn the user (except for BASH, which is always set by the calling BASH).
42700       if test "xBUILD_CC" != xBASH; then
42701         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42702 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42703       fi
42704       # Try to locate tool using the code snippet
42705       for ac_prog in cl cc gcc
42706 do
42707   # Extract the first word of "$ac_prog", so it can be a program name with args.
42708 set dummy $ac_prog; ac_word=$2
42709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42710 $as_echo_n "checking for $ac_word... " >&6; }
42711 if ${ac_cv_path_BUILD_CC+:} false; then :
42712   $as_echo_n "(cached) " >&6
42713 else
42714   case $BUILD_CC in
42715   [\\/]* | ?:[\\/]*)
42716   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42717   ;;
42718   *)
42719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42720 for as_dir in $PATH
42721 do
42722   IFS=$as_save_IFS
42723   test -z "$as_dir" && as_dir=.
42724     for ac_exec_ext in '' $ac_executable_extensions; do
42725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42726     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42728     break 2
42729   fi
42730 done
42731   done
42732 IFS=$as_save_IFS
42733 
42734   ;;
42735 esac
42736 fi
42737 BUILD_CC=$ac_cv_path_BUILD_CC
42738 if test -n "$BUILD_CC"; then
42739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42740 $as_echo "$BUILD_CC" >&6; }
42741 else
42742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42743 $as_echo "no" >&6; }
42744 fi
42745 
42746 
42747   test -n "$BUILD_CC" && break
42748 done
42749 
42750     else
42751       # If it succeeded, then it was overridden by the user. We will use it
42752       # for the tool.
42753 
42754       # First remove it from the list of overridden variables, so we can test
42755       # for unknown variables in the end.
42756       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42757 
42758       # Check if we try to supply an empty value
42759       if test "x$BUILD_CC" = x; then
42760         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42761 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42763 $as_echo_n "checking for BUILD_CC... " >&6; }
42764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42765 $as_echo "disabled" >&6; }
42766       else
42767         # Check if the provided tool contains a complete path.
42768         tool_specified="$BUILD_CC"
42769         tool_basename="${tool_specified##*/}"
42770         if test "x$tool_basename" = "x$tool_specified"; then
42771           # A command without a complete path is provided, search $PATH.
42772           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42773 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42774           # Extract the first word of "$tool_basename", so it can be a program name with args.
42775 set dummy $tool_basename; ac_word=$2
42776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42777 $as_echo_n "checking for $ac_word... " >&6; }
42778 if ${ac_cv_path_BUILD_CC+:} false; then :
42779   $as_echo_n "(cached) " >&6
42780 else
42781   case $BUILD_CC in
42782   [\\/]* | ?:[\\/]*)
42783   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42784   ;;
42785   *)
42786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42787 for as_dir in $PATH
42788 do
42789   IFS=$as_save_IFS
42790   test -z "$as_dir" && as_dir=.
42791     for ac_exec_ext in '' $ac_executable_extensions; do
42792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42793     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42795     break 2
42796   fi
42797 done
42798   done
42799 IFS=$as_save_IFS
42800 
42801   ;;
42802 esac
42803 fi
42804 BUILD_CC=$ac_cv_path_BUILD_CC
42805 if test -n "$BUILD_CC"; then
42806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42807 $as_echo "$BUILD_CC" >&6; }
42808 else
42809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42810 $as_echo "no" >&6; }
42811 fi
42812 
42813 
42814           if test "x$BUILD_CC" = x; then
42815             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42816           fi
42817         else
42818           # Otherwise we believe it is a complete path. Use it as it is.
42819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42820 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42821           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42822 $as_echo_n "checking for BUILD_CC... " >&6; }
42823           if test ! -x "$tool_specified"; then
42824             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42825 $as_echo "not found" >&6; }
42826             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42827           fi
42828           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42829 $as_echo "$tool_specified" >&6; }
42830         fi
42831       fi
42832     fi
42833 
42834   fi
42835 
42836 
42837 
42838   if test "x$BUILD_CC" = x; then
42839     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42840   fi
42841 
42842 
42843 
42844   # Only process if variable expands to non-empty
42845 
42846   if test "x$BUILD_CC" != x; then
42847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42848 
42849   # First separate the path from the arguments. This will split at the first
42850   # space.
42851   complete="$BUILD_CC"
42852   path="${complete%% *}"
42853   tmp="$complete EOL"
42854   arguments="${tmp#* }"
42855 
42856   # Input might be given as Windows format, start by converting to
42857   # unix format.
42858   new_path=`$CYGPATH -u "$path"`
42859 
42860   # Now try to locate executable using which
42861   new_path=`$WHICH "$new_path" 2> /dev/null`
42862   # bat and cmd files are not always considered executable in cygwin causing which
42863   # to not find them
42864   if test "x$new_path" = x \
42865       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42866       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42867     new_path=`$CYGPATH -u "$path"`
42868   fi
42869   if test "x$new_path" = x; then
42870     # Oops. Which didn't find the executable.
42871     # The splitting of arguments from the executable at a space might have been incorrect,
42872     # since paths with space are more likely in Windows. Give it another try with the whole
42873     # argument.
42874     path="$complete"
42875     arguments="EOL"
42876     new_path=`$CYGPATH -u "$path"`
42877     new_path=`$WHICH "$new_path" 2> /dev/null`
42878     # bat and cmd files are not always considered executable in cygwin causing which
42879     # to not find them
42880     if test "x$new_path" = x \
42881         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42882         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42883       new_path=`$CYGPATH -u "$path"`
42884     fi
42885     if test "x$new_path" = x; then
42886       # It's still not found. Now this is an unrecoverable error.
42887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42888 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42889       has_space=`$ECHO "$complete" | $GREP " "`
42890       if test "x$has_space" != x; then
42891         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42892 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42893       fi
42894       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42895     fi
42896   fi
42897 
42898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42901   # "foo.exe" is OK but "foo" is an error.
42902   #
42903   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42904   # It is also a way to make sure we got the proper file name for the real test later on.
42905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42906   if test "x$test_shortpath" = x; then
42907     # Short path failed, file does not exist as specified.
42908     # Try adding .exe or .cmd
42909     if test -f "${new_path}.exe"; then
42910       input_to_shortpath="${new_path}.exe"
42911     elif test -f "${new_path}.cmd"; then
42912       input_to_shortpath="${new_path}.cmd"
42913     else
42914       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42915 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42916       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42917 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42918       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42919     fi
42920   else
42921     input_to_shortpath="$new_path"
42922   fi
42923 
42924   # Call helper function which possibly converts this using DOS-style short mode.
42925   # If so, the updated path is stored in $new_path.
42926   new_path="$input_to_shortpath"
42927 
42928   input_path="$input_to_shortpath"
42929   # Check if we need to convert this using DOS-style short mode. If the path
42930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42931   # take no chances and rewrite it.
42932   # Note: m4 eats our [], so we need to use [ and ] instead.
42933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42934   if test "x$has_forbidden_chars" != x; then
42935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42936     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42937     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42938     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42939       # Going to short mode and back again did indeed matter. Since short mode is
42940       # case insensitive, let's make it lowercase to improve readability.
42941       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42942       # Now convert it back to Unix-style (cygpath)
42943       input_path=`$CYGPATH -u "$shortmode_path"`
42944       new_path="$input_path"
42945     fi
42946   fi
42947 
42948   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42949   if test "x$test_cygdrive_prefix" = x; then
42950     # As a simple fix, exclude /usr/bin since it's not a real path.
42951     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42952       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42953       # a path prefixed by /cygdrive for fixpath to work.
42954       new_path="$CYGWIN_ROOT_PATH$input_path"
42955     fi
42956   fi
42957 
42958   # remove trailing .exe if any
42959   new_path="${new_path/%.exe/}"
42960 
42961     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42962 
42963   # First separate the path from the arguments. This will split at the first
42964   # space.
42965   complete="$BUILD_CC"
42966   path="${complete%% *}"
42967   tmp="$complete EOL"
42968   arguments="${tmp#* }"
42969 
42970   # Input might be given as Windows format, start by converting to
42971   # unix format.
42972   new_path="$path"
42973 
42974   windows_path="$new_path"
42975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42976     unix_path=`$CYGPATH -u "$windows_path"`
42977     new_path="$unix_path"
42978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42980     new_path="$unix_path"
42981   fi
42982 
42983 
42984   # Now try to locate executable using which
42985   new_path=`$WHICH "$new_path" 2> /dev/null`
42986 
42987   if test "x$new_path" = x; then
42988     # Oops. Which didn't find the executable.
42989     # The splitting of arguments from the executable at a space might have been incorrect,
42990     # since paths with space are more likely in Windows. Give it another try with the whole
42991     # argument.
42992     path="$complete"
42993     arguments="EOL"
42994     new_path="$path"
42995 
42996   windows_path="$new_path"
42997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42998     unix_path=`$CYGPATH -u "$windows_path"`
42999     new_path="$unix_path"
43000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43002     new_path="$unix_path"
43003   fi
43004 
43005 
43006     new_path=`$WHICH "$new_path" 2> /dev/null`
43007     # bat and cmd files are not always considered executable in MSYS causing which
43008     # to not find them
43009     if test "x$new_path" = x \
43010         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43011         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43012       new_path="$path"
43013 
43014   windows_path="$new_path"
43015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43016     unix_path=`$CYGPATH -u "$windows_path"`
43017     new_path="$unix_path"
43018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43020     new_path="$unix_path"
43021   fi
43022 
43023     fi
43024 
43025     if test "x$new_path" = x; then
43026       # It's still not found. Now this is an unrecoverable error.
43027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43028 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43029       has_space=`$ECHO "$complete" | $GREP " "`
43030       if test "x$has_space" != x; then
43031         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43032 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43033       fi
43034       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43035     fi
43036   fi
43037 
43038   # Now new_path has a complete unix path to the binary
43039   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43040     # Keep paths in /bin as-is, but remove trailing .exe if any
43041     new_path="${new_path/%.exe/}"
43042     # Do not save /bin paths to all_fixpath_prefixes!
43043   else
43044     # Not in mixed or Windows style, start by that.
43045     new_path=`cmd //c echo $new_path`
43046 
43047   input_path="$new_path"
43048   # Check if we need to convert this using DOS-style short mode. If the path
43049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43050   # take no chances and rewrite it.
43051   # Note: m4 eats our [], so we need to use [ and ] instead.
43052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43053   if test "x$has_forbidden_chars" != x; then
43054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43055     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43056   fi
43057 
43058     # Output is in $new_path
43059 
43060   windows_path="$new_path"
43061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43062     unix_path=`$CYGPATH -u "$windows_path"`
43063     new_path="$unix_path"
43064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43066     new_path="$unix_path"
43067   fi
43068 
43069     # remove trailing .exe if any
43070     new_path="${new_path/%.exe/}"
43071 
43072     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43073     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43074   fi
43075 
43076     else
43077       # We're on a unix platform. Hooray! :)
43078       # First separate the path from the arguments. This will split at the first
43079       # space.
43080       complete="$BUILD_CC"
43081       path="${complete%% *}"
43082       tmp="$complete EOL"
43083       arguments="${tmp#* }"
43084 
43085       # Cannot rely on the command "which" here since it doesn't always work.
43086       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43087       if test -z "$is_absolute_path"; then
43088         # Path to executable is not absolute. Find it.
43089         IFS_save="$IFS"
43090         IFS=:
43091         for p in $PATH; do
43092           if test -f "$p/$path" && test -x "$p/$path"; then
43093             new_path="$p/$path"
43094             break
43095           fi
43096         done
43097         IFS="$IFS_save"
43098       else
43099         # This is an absolute path, we can use it without further modifications.
43100         new_path="$path"
43101       fi
43102 
43103       if test "x$new_path" = x; then
43104         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43105 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43106         has_space=`$ECHO "$complete" | $GREP " "`
43107         if test "x$has_space" != x; then
43108           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43109 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43110         fi
43111         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43112       fi
43113     fi
43114 
43115     # Now join together the path and the arguments once again
43116     if test "x$arguments" != xEOL; then
43117       new_complete="$new_path ${arguments% *}"
43118     else
43119       new_complete="$new_path"
43120     fi
43121 
43122     if test "x$complete" != "x$new_complete"; then
43123       BUILD_CC="$new_complete"
43124       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43125 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43126     fi
43127   fi
43128 
43129 
43130 
43131 
43132   # Publish this variable in the help.
43133 
43134 
43135   if [ -z "${BUILD_CXX+x}" ]; then
43136     # The variable is not set by user, try to locate tool using the code snippet
43137     for ac_prog in cl CC g++
43138 do
43139   # Extract the first word of "$ac_prog", so it can be a program name with args.
43140 set dummy $ac_prog; ac_word=$2
43141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43142 $as_echo_n "checking for $ac_word... " >&6; }
43143 if ${ac_cv_path_BUILD_CXX+:} false; then :
43144   $as_echo_n "(cached) " >&6
43145 else
43146   case $BUILD_CXX in
43147   [\\/]* | ?:[\\/]*)
43148   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43149   ;;
43150   *)
43151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43152 for as_dir in $PATH
43153 do
43154   IFS=$as_save_IFS
43155   test -z "$as_dir" && as_dir=.
43156     for ac_exec_ext in '' $ac_executable_extensions; do
43157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43158     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43160     break 2
43161   fi
43162 done
43163   done
43164 IFS=$as_save_IFS
43165 
43166   ;;
43167 esac
43168 fi
43169 BUILD_CXX=$ac_cv_path_BUILD_CXX
43170 if test -n "$BUILD_CXX"; then
43171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43172 $as_echo "$BUILD_CXX" >&6; }
43173 else
43174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43175 $as_echo "no" >&6; }
43176 fi
43177 
43178 
43179   test -n "$BUILD_CXX" && break
43180 done
43181 
43182   else
43183     # The variable is set, but is it from the command line or the environment?
43184 
43185     # Try to remove the string !BUILD_CXX! from our list.
43186     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43187     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43188       # If it failed, the variable was not from the command line. Ignore it,
43189       # but warn the user (except for BASH, which is always set by the calling BASH).
43190       if test "xBUILD_CXX" != xBASH; then
43191         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43192 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43193       fi
43194       # Try to locate tool using the code snippet
43195       for ac_prog in cl CC g++
43196 do
43197   # Extract the first word of "$ac_prog", so it can be a program name with args.
43198 set dummy $ac_prog; ac_word=$2
43199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43200 $as_echo_n "checking for $ac_word... " >&6; }
43201 if ${ac_cv_path_BUILD_CXX+:} false; then :
43202   $as_echo_n "(cached) " >&6
43203 else
43204   case $BUILD_CXX in
43205   [\\/]* | ?:[\\/]*)
43206   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43207   ;;
43208   *)
43209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43210 for as_dir in $PATH
43211 do
43212   IFS=$as_save_IFS
43213   test -z "$as_dir" && as_dir=.
43214     for ac_exec_ext in '' $ac_executable_extensions; do
43215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43216     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43218     break 2
43219   fi
43220 done
43221   done
43222 IFS=$as_save_IFS
43223 
43224   ;;
43225 esac
43226 fi
43227 BUILD_CXX=$ac_cv_path_BUILD_CXX
43228 if test -n "$BUILD_CXX"; then
43229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43230 $as_echo "$BUILD_CXX" >&6; }
43231 else
43232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43233 $as_echo "no" >&6; }
43234 fi
43235 
43236 
43237   test -n "$BUILD_CXX" && break
43238 done
43239 
43240     else
43241       # If it succeeded, then it was overridden by the user. We will use it
43242       # for the tool.
43243 
43244       # First remove it from the list of overridden variables, so we can test
43245       # for unknown variables in the end.
43246       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43247 
43248       # Check if we try to supply an empty value
43249       if test "x$BUILD_CXX" = x; then
43250         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43251 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43253 $as_echo_n "checking for BUILD_CXX... " >&6; }
43254         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43255 $as_echo "disabled" >&6; }
43256       else
43257         # Check if the provided tool contains a complete path.
43258         tool_specified="$BUILD_CXX"
43259         tool_basename="${tool_specified##*/}"
43260         if test "x$tool_basename" = "x$tool_specified"; then
43261           # A command without a complete path is provided, search $PATH.
43262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43263 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43264           # Extract the first word of "$tool_basename", so it can be a program name with args.
43265 set dummy $tool_basename; ac_word=$2
43266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43267 $as_echo_n "checking for $ac_word... " >&6; }
43268 if ${ac_cv_path_BUILD_CXX+:} false; then :
43269   $as_echo_n "(cached) " >&6
43270 else
43271   case $BUILD_CXX in
43272   [\\/]* | ?:[\\/]*)
43273   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43274   ;;
43275   *)
43276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43277 for as_dir in $PATH
43278 do
43279   IFS=$as_save_IFS
43280   test -z "$as_dir" && as_dir=.
43281     for ac_exec_ext in '' $ac_executable_extensions; do
43282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43283     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43285     break 2
43286   fi
43287 done
43288   done
43289 IFS=$as_save_IFS
43290 
43291   ;;
43292 esac
43293 fi
43294 BUILD_CXX=$ac_cv_path_BUILD_CXX
43295 if test -n "$BUILD_CXX"; then
43296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43297 $as_echo "$BUILD_CXX" >&6; }
43298 else
43299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43300 $as_echo "no" >&6; }
43301 fi
43302 
43303 
43304           if test "x$BUILD_CXX" = x; then
43305             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43306           fi
43307         else
43308           # Otherwise we believe it is a complete path. Use it as it is.
43309           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43310 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43311           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43312 $as_echo_n "checking for BUILD_CXX... " >&6; }
43313           if test ! -x "$tool_specified"; then
43314             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43315 $as_echo "not found" >&6; }
43316             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43317           fi
43318           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43319 $as_echo "$tool_specified" >&6; }
43320         fi
43321       fi
43322     fi
43323 
43324   fi
43325 
43326 
43327 
43328   if test "x$BUILD_CXX" = x; then
43329     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43330   fi
43331 
43332 
43333 
43334   # Only process if variable expands to non-empty
43335 
43336   if test "x$BUILD_CXX" != x; then
43337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43338 
43339   # First separate the path from the arguments. This will split at the first
43340   # space.
43341   complete="$BUILD_CXX"
43342   path="${complete%% *}"
43343   tmp="$complete EOL"
43344   arguments="${tmp#* }"
43345 
43346   # Input might be given as Windows format, start by converting to
43347   # unix format.
43348   new_path=`$CYGPATH -u "$path"`
43349 
43350   # Now try to locate executable using which
43351   new_path=`$WHICH "$new_path" 2> /dev/null`
43352   # bat and cmd files are not always considered executable in cygwin causing which
43353   # to not find them
43354   if test "x$new_path" = x \
43355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43357     new_path=`$CYGPATH -u "$path"`
43358   fi
43359   if test "x$new_path" = x; then
43360     # Oops. Which didn't find the executable.
43361     # The splitting of arguments from the executable at a space might have been incorrect,
43362     # since paths with space are more likely in Windows. Give it another try with the whole
43363     # argument.
43364     path="$complete"
43365     arguments="EOL"
43366     new_path=`$CYGPATH -u "$path"`
43367     new_path=`$WHICH "$new_path" 2> /dev/null`
43368     # bat and cmd files are not always considered executable in cygwin causing which
43369     # to not find them
43370     if test "x$new_path" = x \
43371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43373       new_path=`$CYGPATH -u "$path"`
43374     fi
43375     if test "x$new_path" = x; then
43376       # It's still not found. Now this is an unrecoverable error.
43377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43378 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43379       has_space=`$ECHO "$complete" | $GREP " "`
43380       if test "x$has_space" != x; then
43381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43383       fi
43384       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43385     fi
43386   fi
43387 
43388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43391   # "foo.exe" is OK but "foo" is an error.
43392   #
43393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43394   # It is also a way to make sure we got the proper file name for the real test later on.
43395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43396   if test "x$test_shortpath" = x; then
43397     # Short path failed, file does not exist as specified.
43398     # Try adding .exe or .cmd
43399     if test -f "${new_path}.exe"; then
43400       input_to_shortpath="${new_path}.exe"
43401     elif test -f "${new_path}.cmd"; then
43402       input_to_shortpath="${new_path}.cmd"
43403     else
43404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43405 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43408       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43409     fi
43410   else
43411     input_to_shortpath="$new_path"
43412   fi
43413 
43414   # Call helper function which possibly converts this using DOS-style short mode.
43415   # If so, the updated path is stored in $new_path.
43416   new_path="$input_to_shortpath"
43417 
43418   input_path="$input_to_shortpath"
43419   # Check if we need to convert this using DOS-style short mode. If the path
43420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43421   # take no chances and rewrite it.
43422   # Note: m4 eats our [], so we need to use [ and ] instead.
43423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43424   if test "x$has_forbidden_chars" != x; then
43425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43429       # Going to short mode and back again did indeed matter. Since short mode is
43430       # case insensitive, let's make it lowercase to improve readability.
43431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43432       # Now convert it back to Unix-style (cygpath)
43433       input_path=`$CYGPATH -u "$shortmode_path"`
43434       new_path="$input_path"
43435     fi
43436   fi
43437 
43438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43439   if test "x$test_cygdrive_prefix" = x; then
43440     # As a simple fix, exclude /usr/bin since it's not a real path.
43441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43443       # a path prefixed by /cygdrive for fixpath to work.
43444       new_path="$CYGWIN_ROOT_PATH$input_path"
43445     fi
43446   fi
43447 
43448   # remove trailing .exe if any
43449   new_path="${new_path/%.exe/}"
43450 
43451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43452 
43453   # First separate the path from the arguments. This will split at the first
43454   # space.
43455   complete="$BUILD_CXX"
43456   path="${complete%% *}"
43457   tmp="$complete EOL"
43458   arguments="${tmp#* }"
43459 
43460   # Input might be given as Windows format, start by converting to
43461   # unix format.
43462   new_path="$path"
43463 
43464   windows_path="$new_path"
43465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43466     unix_path=`$CYGPATH -u "$windows_path"`
43467     new_path="$unix_path"
43468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43470     new_path="$unix_path"
43471   fi
43472 
43473 
43474   # Now try to locate executable using which
43475   new_path=`$WHICH "$new_path" 2> /dev/null`
43476 
43477   if test "x$new_path" = x; then
43478     # Oops. Which didn't find the executable.
43479     # The splitting of arguments from the executable at a space might have been incorrect,
43480     # since paths with space are more likely in Windows. Give it another try with the whole
43481     # argument.
43482     path="$complete"
43483     arguments="EOL"
43484     new_path="$path"
43485 
43486   windows_path="$new_path"
43487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43488     unix_path=`$CYGPATH -u "$windows_path"`
43489     new_path="$unix_path"
43490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43492     new_path="$unix_path"
43493   fi
43494 
43495 
43496     new_path=`$WHICH "$new_path" 2> /dev/null`
43497     # bat and cmd files are not always considered executable in MSYS causing which
43498     # to not find them
43499     if test "x$new_path" = x \
43500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43502       new_path="$path"
43503 
43504   windows_path="$new_path"
43505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43506     unix_path=`$CYGPATH -u "$windows_path"`
43507     new_path="$unix_path"
43508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43510     new_path="$unix_path"
43511   fi
43512 
43513     fi
43514 
43515     if test "x$new_path" = x; then
43516       # It's still not found. Now this is an unrecoverable error.
43517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43518 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43519       has_space=`$ECHO "$complete" | $GREP " "`
43520       if test "x$has_space" != x; then
43521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43523       fi
43524       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43525     fi
43526   fi
43527 
43528   # Now new_path has a complete unix path to the binary
43529   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43530     # Keep paths in /bin as-is, but remove trailing .exe if any
43531     new_path="${new_path/%.exe/}"
43532     # Do not save /bin paths to all_fixpath_prefixes!
43533   else
43534     # Not in mixed or Windows style, start by that.
43535     new_path=`cmd //c echo $new_path`
43536 
43537   input_path="$new_path"
43538   # Check if we need to convert this using DOS-style short mode. If the path
43539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43540   # take no chances and rewrite it.
43541   # Note: m4 eats our [], so we need to use [ and ] instead.
43542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43543   if test "x$has_forbidden_chars" != x; then
43544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43546   fi
43547 
43548     # Output is in $new_path
43549 
43550   windows_path="$new_path"
43551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43552     unix_path=`$CYGPATH -u "$windows_path"`
43553     new_path="$unix_path"
43554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43556     new_path="$unix_path"
43557   fi
43558 
43559     # remove trailing .exe if any
43560     new_path="${new_path/%.exe/}"
43561 
43562     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43563     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43564   fi
43565 
43566     else
43567       # We're on a unix platform. Hooray! :)
43568       # First separate the path from the arguments. This will split at the first
43569       # space.
43570       complete="$BUILD_CXX"
43571       path="${complete%% *}"
43572       tmp="$complete EOL"
43573       arguments="${tmp#* }"
43574 
43575       # Cannot rely on the command "which" here since it doesn't always work.
43576       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43577       if test -z "$is_absolute_path"; then
43578         # Path to executable is not absolute. Find it.
43579         IFS_save="$IFS"
43580         IFS=:
43581         for p in $PATH; do
43582           if test -f "$p/$path" && test -x "$p/$path"; then
43583             new_path="$p/$path"
43584             break
43585           fi
43586         done
43587         IFS="$IFS_save"
43588       else
43589         # This is an absolute path, we can use it without further modifications.
43590         new_path="$path"
43591       fi
43592 
43593       if test "x$new_path" = x; then
43594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43595 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43596         has_space=`$ECHO "$complete" | $GREP " "`
43597         if test "x$has_space" != x; then
43598           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43599 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43600         fi
43601         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43602       fi
43603     fi
43604 
43605     # Now join together the path and the arguments once again
43606     if test "x$arguments" != xEOL; then
43607       new_complete="$new_path ${arguments% *}"
43608     else
43609       new_complete="$new_path"
43610     fi
43611 
43612     if test "x$complete" != "x$new_complete"; then
43613       BUILD_CXX="$new_complete"
43614       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43615 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43616     fi
43617   fi
43618 
43619 
43620 
43621   # Publish this variable in the help.
43622 
43623 
43624   if [ -z "${BUILD_NM+x}" ]; then
43625     # The variable is not set by user, try to locate tool using the code snippet
43626     for ac_prog in nm gcc-nm
43627 do
43628   # Extract the first word of "$ac_prog", so it can be a program name with args.
43629 set dummy $ac_prog; ac_word=$2
43630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43631 $as_echo_n "checking for $ac_word... " >&6; }
43632 if ${ac_cv_path_BUILD_NM+:} false; then :
43633   $as_echo_n "(cached) " >&6
43634 else
43635   case $BUILD_NM in
43636   [\\/]* | ?:[\\/]*)
43637   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43638   ;;
43639   *)
43640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43641 for as_dir in $PATH
43642 do
43643   IFS=$as_save_IFS
43644   test -z "$as_dir" && as_dir=.
43645     for ac_exec_ext in '' $ac_executable_extensions; do
43646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43647     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43649     break 2
43650   fi
43651 done
43652   done
43653 IFS=$as_save_IFS
43654 
43655   ;;
43656 esac
43657 fi
43658 BUILD_NM=$ac_cv_path_BUILD_NM
43659 if test -n "$BUILD_NM"; then
43660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43661 $as_echo "$BUILD_NM" >&6; }
43662 else
43663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43664 $as_echo "no" >&6; }
43665 fi
43666 
43667 
43668   test -n "$BUILD_NM" && break
43669 done
43670 
43671   else
43672     # The variable is set, but is it from the command line or the environment?
43673 
43674     # Try to remove the string !BUILD_NM! from our list.
43675     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43676     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43677       # If it failed, the variable was not from the command line. Ignore it,
43678       # but warn the user (except for BASH, which is always set by the calling BASH).
43679       if test "xBUILD_NM" != xBASH; then
43680         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43681 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43682       fi
43683       # Try to locate tool using the code snippet
43684       for ac_prog in nm gcc-nm
43685 do
43686   # Extract the first word of "$ac_prog", so it can be a program name with args.
43687 set dummy $ac_prog; ac_word=$2
43688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43689 $as_echo_n "checking for $ac_word... " >&6; }
43690 if ${ac_cv_path_BUILD_NM+:} false; then :
43691   $as_echo_n "(cached) " >&6
43692 else
43693   case $BUILD_NM in
43694   [\\/]* | ?:[\\/]*)
43695   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43696   ;;
43697   *)
43698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43699 for as_dir in $PATH
43700 do
43701   IFS=$as_save_IFS
43702   test -z "$as_dir" && as_dir=.
43703     for ac_exec_ext in '' $ac_executable_extensions; do
43704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43705     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43707     break 2
43708   fi
43709 done
43710   done
43711 IFS=$as_save_IFS
43712 
43713   ;;
43714 esac
43715 fi
43716 BUILD_NM=$ac_cv_path_BUILD_NM
43717 if test -n "$BUILD_NM"; then
43718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43719 $as_echo "$BUILD_NM" >&6; }
43720 else
43721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43722 $as_echo "no" >&6; }
43723 fi
43724 
43725 
43726   test -n "$BUILD_NM" && break
43727 done
43728 
43729     else
43730       # If it succeeded, then it was overridden by the user. We will use it
43731       # for the tool.
43732 
43733       # First remove it from the list of overridden variables, so we can test
43734       # for unknown variables in the end.
43735       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43736 
43737       # Check if we try to supply an empty value
43738       if test "x$BUILD_NM" = x; then
43739         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43740 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43741         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43742 $as_echo_n "checking for BUILD_NM... " >&6; }
43743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43744 $as_echo "disabled" >&6; }
43745       else
43746         # Check if the provided tool contains a complete path.
43747         tool_specified="$BUILD_NM"
43748         tool_basename="${tool_specified##*/}"
43749         if test "x$tool_basename" = "x$tool_specified"; then
43750           # A command without a complete path is provided, search $PATH.
43751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43752 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43753           # Extract the first word of "$tool_basename", so it can be a program name with args.
43754 set dummy $tool_basename; ac_word=$2
43755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43756 $as_echo_n "checking for $ac_word... " >&6; }
43757 if ${ac_cv_path_BUILD_NM+:} false; then :
43758   $as_echo_n "(cached) " >&6
43759 else
43760   case $BUILD_NM in
43761   [\\/]* | ?:[\\/]*)
43762   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43763   ;;
43764   *)
43765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43766 for as_dir in $PATH
43767 do
43768   IFS=$as_save_IFS
43769   test -z "$as_dir" && as_dir=.
43770     for ac_exec_ext in '' $ac_executable_extensions; do
43771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43772     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43774     break 2
43775   fi
43776 done
43777   done
43778 IFS=$as_save_IFS
43779 
43780   ;;
43781 esac
43782 fi
43783 BUILD_NM=$ac_cv_path_BUILD_NM
43784 if test -n "$BUILD_NM"; then
43785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43786 $as_echo "$BUILD_NM" >&6; }
43787 else
43788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43789 $as_echo "no" >&6; }
43790 fi
43791 
43792 
43793           if test "x$BUILD_NM" = x; then
43794             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43795           fi
43796         else
43797           # Otherwise we believe it is a complete path. Use it as it is.
43798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43799 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43800           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43801 $as_echo_n "checking for BUILD_NM... " >&6; }
43802           if test ! -x "$tool_specified"; then
43803             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43804 $as_echo "not found" >&6; }
43805             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43806           fi
43807           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43808 $as_echo "$tool_specified" >&6; }
43809         fi
43810       fi
43811     fi
43812 
43813   fi
43814 
43815 
43816 
43817   # Only process if variable expands to non-empty
43818 
43819   if test "x$BUILD_NM" != x; then
43820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43821 
43822   # First separate the path from the arguments. This will split at the first
43823   # space.
43824   complete="$BUILD_NM"
43825   path="${complete%% *}"
43826   tmp="$complete EOL"
43827   arguments="${tmp#* }"
43828 
43829   # Input might be given as Windows format, start by converting to
43830   # unix format.
43831   new_path=`$CYGPATH -u "$path"`
43832 
43833   # Now try to locate executable using which
43834   new_path=`$WHICH "$new_path" 2> /dev/null`
43835   # bat and cmd files are not always considered executable in cygwin causing which
43836   # to not find them
43837   if test "x$new_path" = x \
43838       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43839       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43840     new_path=`$CYGPATH -u "$path"`
43841   fi
43842   if test "x$new_path" = x; then
43843     # Oops. Which didn't find the executable.
43844     # The splitting of arguments from the executable at a space might have been incorrect,
43845     # since paths with space are more likely in Windows. Give it another try with the whole
43846     # argument.
43847     path="$complete"
43848     arguments="EOL"
43849     new_path=`$CYGPATH -u "$path"`
43850     new_path=`$WHICH "$new_path" 2> /dev/null`
43851     # bat and cmd files are not always considered executable in cygwin causing which
43852     # to not find them
43853     if test "x$new_path" = x \
43854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43856       new_path=`$CYGPATH -u "$path"`
43857     fi
43858     if test "x$new_path" = x; then
43859       # It's still not found. Now this is an unrecoverable error.
43860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43861 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43862       has_space=`$ECHO "$complete" | $GREP " "`
43863       if test "x$has_space" != x; then
43864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43866       fi
43867       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43868     fi
43869   fi
43870 
43871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43874   # "foo.exe" is OK but "foo" is an error.
43875   #
43876   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43877   # It is also a way to make sure we got the proper file name for the real test later on.
43878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43879   if test "x$test_shortpath" = x; then
43880     # Short path failed, file does not exist as specified.
43881     # Try adding .exe or .cmd
43882     if test -f "${new_path}.exe"; then
43883       input_to_shortpath="${new_path}.exe"
43884     elif test -f "${new_path}.cmd"; then
43885       input_to_shortpath="${new_path}.cmd"
43886     else
43887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43888 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43889       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43890 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43891       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43892     fi
43893   else
43894     input_to_shortpath="$new_path"
43895   fi
43896 
43897   # Call helper function which possibly converts this using DOS-style short mode.
43898   # If so, the updated path is stored in $new_path.
43899   new_path="$input_to_shortpath"
43900 
43901   input_path="$input_to_shortpath"
43902   # Check if we need to convert this using DOS-style short mode. If the path
43903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43904   # take no chances and rewrite it.
43905   # Note: m4 eats our [], so we need to use [ and ] instead.
43906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43907   if test "x$has_forbidden_chars" != x; then
43908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43912       # Going to short mode and back again did indeed matter. Since short mode is
43913       # case insensitive, let's make it lowercase to improve readability.
43914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43915       # Now convert it back to Unix-style (cygpath)
43916       input_path=`$CYGPATH -u "$shortmode_path"`
43917       new_path="$input_path"
43918     fi
43919   fi
43920 
43921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43922   if test "x$test_cygdrive_prefix" = x; then
43923     # As a simple fix, exclude /usr/bin since it's not a real path.
43924     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43926       # a path prefixed by /cygdrive for fixpath to work.
43927       new_path="$CYGWIN_ROOT_PATH$input_path"
43928     fi
43929   fi
43930 
43931   # remove trailing .exe if any
43932   new_path="${new_path/%.exe/}"
43933 
43934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43935 
43936   # First separate the path from the arguments. This will split at the first
43937   # space.
43938   complete="$BUILD_NM"
43939   path="${complete%% *}"
43940   tmp="$complete EOL"
43941   arguments="${tmp#* }"
43942 
43943   # Input might be given as Windows format, start by converting to
43944   # unix format.
43945   new_path="$path"
43946 
43947   windows_path="$new_path"
43948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43949     unix_path=`$CYGPATH -u "$windows_path"`
43950     new_path="$unix_path"
43951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43953     new_path="$unix_path"
43954   fi
43955 
43956 
43957   # Now try to locate executable using which
43958   new_path=`$WHICH "$new_path" 2> /dev/null`
43959 
43960   if test "x$new_path" = x; then
43961     # Oops. Which didn't find the executable.
43962     # The splitting of arguments from the executable at a space might have been incorrect,
43963     # since paths with space are more likely in Windows. Give it another try with the whole
43964     # argument.
43965     path="$complete"
43966     arguments="EOL"
43967     new_path="$path"
43968 
43969   windows_path="$new_path"
43970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43971     unix_path=`$CYGPATH -u "$windows_path"`
43972     new_path="$unix_path"
43973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43975     new_path="$unix_path"
43976   fi
43977 
43978 
43979     new_path=`$WHICH "$new_path" 2> /dev/null`
43980     # bat and cmd files are not always considered executable in MSYS causing which
43981     # to not find them
43982     if test "x$new_path" = x \
43983         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43984         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43985       new_path="$path"
43986 
43987   windows_path="$new_path"
43988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43989     unix_path=`$CYGPATH -u "$windows_path"`
43990     new_path="$unix_path"
43991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43993     new_path="$unix_path"
43994   fi
43995 
43996     fi
43997 
43998     if test "x$new_path" = x; then
43999       # It's still not found. Now this is an unrecoverable error.
44000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44001 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44002       has_space=`$ECHO "$complete" | $GREP " "`
44003       if test "x$has_space" != x; then
44004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44006       fi
44007       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44008     fi
44009   fi
44010 
44011   # Now new_path has a complete unix path to the binary
44012   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44013     # Keep paths in /bin as-is, but remove trailing .exe if any
44014     new_path="${new_path/%.exe/}"
44015     # Do not save /bin paths to all_fixpath_prefixes!
44016   else
44017     # Not in mixed or Windows style, start by that.
44018     new_path=`cmd //c echo $new_path`
44019 
44020   input_path="$new_path"
44021   # Check if we need to convert this using DOS-style short mode. If the path
44022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44023   # take no chances and rewrite it.
44024   # Note: m4 eats our [], so we need to use [ and ] instead.
44025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44026   if test "x$has_forbidden_chars" != x; then
44027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44029   fi
44030 
44031     # Output is in $new_path
44032 
44033   windows_path="$new_path"
44034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44035     unix_path=`$CYGPATH -u "$windows_path"`
44036     new_path="$unix_path"
44037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44039     new_path="$unix_path"
44040   fi
44041 
44042     # remove trailing .exe if any
44043     new_path="${new_path/%.exe/}"
44044 
44045     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44046     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44047   fi
44048 
44049     else
44050       # We're on a unix platform. Hooray! :)
44051       # First separate the path from the arguments. This will split at the first
44052       # space.
44053       complete="$BUILD_NM"
44054       path="${complete%% *}"
44055       tmp="$complete EOL"
44056       arguments="${tmp#* }"
44057 
44058       # Cannot rely on the command "which" here since it doesn't always work.
44059       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44060       if test -z "$is_absolute_path"; then
44061         # Path to executable is not absolute. Find it.
44062         IFS_save="$IFS"
44063         IFS=:
44064         for p in $PATH; do
44065           if test -f "$p/$path" && test -x "$p/$path"; then
44066             new_path="$p/$path"
44067             break
44068           fi
44069         done
44070         IFS="$IFS_save"
44071       else
44072         # This is an absolute path, we can use it without further modifications.
44073         new_path="$path"
44074       fi
44075 
44076       if test "x$new_path" = x; then
44077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44078 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44079         has_space=`$ECHO "$complete" | $GREP " "`
44080         if test "x$has_space" != x; then
44081           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44082 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44083         fi
44084         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44085       fi
44086     fi
44087 
44088     # Now join together the path and the arguments once again
44089     if test "x$arguments" != xEOL; then
44090       new_complete="$new_path ${arguments% *}"
44091     else
44092       new_complete="$new_path"
44093     fi
44094 
44095     if test "x$complete" != "x$new_complete"; then
44096       BUILD_NM="$new_complete"
44097       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44098 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44099     fi
44100   fi
44101 
44102 
44103 
44104   # Publish this variable in the help.
44105 
44106 
44107   if [ -z "${BUILD_AR+x}" ]; then
44108     # The variable is not set by user, try to locate tool using the code snippet
44109     for ac_prog in ar gcc-ar
44110 do
44111   # Extract the first word of "$ac_prog", so it can be a program name with args.
44112 set dummy $ac_prog; ac_word=$2
44113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44114 $as_echo_n "checking for $ac_word... " >&6; }
44115 if ${ac_cv_path_BUILD_AR+:} false; then :
44116   $as_echo_n "(cached) " >&6
44117 else
44118   case $BUILD_AR in
44119   [\\/]* | ?:[\\/]*)
44120   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44121   ;;
44122   *)
44123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44124 for as_dir in $PATH
44125 do
44126   IFS=$as_save_IFS
44127   test -z "$as_dir" && as_dir=.
44128     for ac_exec_ext in '' $ac_executable_extensions; do
44129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44130     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44132     break 2
44133   fi
44134 done
44135   done
44136 IFS=$as_save_IFS
44137 
44138   ;;
44139 esac
44140 fi
44141 BUILD_AR=$ac_cv_path_BUILD_AR
44142 if test -n "$BUILD_AR"; then
44143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44144 $as_echo "$BUILD_AR" >&6; }
44145 else
44146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44147 $as_echo "no" >&6; }
44148 fi
44149 
44150 
44151   test -n "$BUILD_AR" && break
44152 done
44153 
44154   else
44155     # The variable is set, but is it from the command line or the environment?
44156 
44157     # Try to remove the string !BUILD_AR! from our list.
44158     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44159     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44160       # If it failed, the variable was not from the command line. Ignore it,
44161       # but warn the user (except for BASH, which is always set by the calling BASH).
44162       if test "xBUILD_AR" != xBASH; then
44163         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44164 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44165       fi
44166       # Try to locate tool using the code snippet
44167       for ac_prog in ar gcc-ar
44168 do
44169   # Extract the first word of "$ac_prog", so it can be a program name with args.
44170 set dummy $ac_prog; ac_word=$2
44171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44172 $as_echo_n "checking for $ac_word... " >&6; }
44173 if ${ac_cv_path_BUILD_AR+:} false; then :
44174   $as_echo_n "(cached) " >&6
44175 else
44176   case $BUILD_AR in
44177   [\\/]* | ?:[\\/]*)
44178   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44179   ;;
44180   *)
44181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44182 for as_dir in $PATH
44183 do
44184   IFS=$as_save_IFS
44185   test -z "$as_dir" && as_dir=.
44186     for ac_exec_ext in '' $ac_executable_extensions; do
44187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44188     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44190     break 2
44191   fi
44192 done
44193   done
44194 IFS=$as_save_IFS
44195 
44196   ;;
44197 esac
44198 fi
44199 BUILD_AR=$ac_cv_path_BUILD_AR
44200 if test -n "$BUILD_AR"; then
44201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44202 $as_echo "$BUILD_AR" >&6; }
44203 else
44204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44205 $as_echo "no" >&6; }
44206 fi
44207 
44208 
44209   test -n "$BUILD_AR" && break
44210 done
44211 
44212     else
44213       # If it succeeded, then it was overridden by the user. We will use it
44214       # for the tool.
44215 
44216       # First remove it from the list of overridden variables, so we can test
44217       # for unknown variables in the end.
44218       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44219 
44220       # Check if we try to supply an empty value
44221       if test "x$BUILD_AR" = x; then
44222         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44223 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44225 $as_echo_n "checking for BUILD_AR... " >&6; }
44226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44227 $as_echo "disabled" >&6; }
44228       else
44229         # Check if the provided tool contains a complete path.
44230         tool_specified="$BUILD_AR"
44231         tool_basename="${tool_specified##*/}"
44232         if test "x$tool_basename" = "x$tool_specified"; then
44233           # A command without a complete path is provided, search $PATH.
44234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44235 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44236           # Extract the first word of "$tool_basename", so it can be a program name with args.
44237 set dummy $tool_basename; ac_word=$2
44238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44239 $as_echo_n "checking for $ac_word... " >&6; }
44240 if ${ac_cv_path_BUILD_AR+:} false; then :
44241   $as_echo_n "(cached) " >&6
44242 else
44243   case $BUILD_AR in
44244   [\\/]* | ?:[\\/]*)
44245   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44246   ;;
44247   *)
44248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44249 for as_dir in $PATH
44250 do
44251   IFS=$as_save_IFS
44252   test -z "$as_dir" && as_dir=.
44253     for ac_exec_ext in '' $ac_executable_extensions; do
44254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44255     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44257     break 2
44258   fi
44259 done
44260   done
44261 IFS=$as_save_IFS
44262 
44263   ;;
44264 esac
44265 fi
44266 BUILD_AR=$ac_cv_path_BUILD_AR
44267 if test -n "$BUILD_AR"; then
44268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44269 $as_echo "$BUILD_AR" >&6; }
44270 else
44271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44272 $as_echo "no" >&6; }
44273 fi
44274 
44275 
44276           if test "x$BUILD_AR" = x; then
44277             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44278           fi
44279         else
44280           # Otherwise we believe it is a complete path. Use it as it is.
44281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44282 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44283           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44284 $as_echo_n "checking for BUILD_AR... " >&6; }
44285           if test ! -x "$tool_specified"; then
44286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44287 $as_echo "not found" >&6; }
44288             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44289           fi
44290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44291 $as_echo "$tool_specified" >&6; }
44292         fi
44293       fi
44294     fi
44295 
44296   fi
44297 
44298 
44299 
44300   # Only process if variable expands to non-empty
44301 
44302   if test "x$BUILD_AR" != x; then
44303     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44304 
44305   # First separate the path from the arguments. This will split at the first
44306   # space.
44307   complete="$BUILD_AR"
44308   path="${complete%% *}"
44309   tmp="$complete EOL"
44310   arguments="${tmp#* }"
44311 
44312   # Input might be given as Windows format, start by converting to
44313   # unix format.
44314   new_path=`$CYGPATH -u "$path"`
44315 
44316   # Now try to locate executable using which
44317   new_path=`$WHICH "$new_path" 2> /dev/null`
44318   # bat and cmd files are not always considered executable in cygwin causing which
44319   # to not find them
44320   if test "x$new_path" = x \
44321       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44322       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44323     new_path=`$CYGPATH -u "$path"`
44324   fi
44325   if test "x$new_path" = x; then
44326     # Oops. Which didn't find the executable.
44327     # The splitting of arguments from the executable at a space might have been incorrect,
44328     # since paths with space are more likely in Windows. Give it another try with the whole
44329     # argument.
44330     path="$complete"
44331     arguments="EOL"
44332     new_path=`$CYGPATH -u "$path"`
44333     new_path=`$WHICH "$new_path" 2> /dev/null`
44334     # bat and cmd files are not always considered executable in cygwin causing which
44335     # to not find them
44336     if test "x$new_path" = x \
44337         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44338         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44339       new_path=`$CYGPATH -u "$path"`
44340     fi
44341     if test "x$new_path" = x; then
44342       # It's still not found. Now this is an unrecoverable error.
44343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44344 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44345       has_space=`$ECHO "$complete" | $GREP " "`
44346       if test "x$has_space" != x; then
44347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44349       fi
44350       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44351     fi
44352   fi
44353 
44354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44357   # "foo.exe" is OK but "foo" is an error.
44358   #
44359   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44360   # It is also a way to make sure we got the proper file name for the real test later on.
44361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44362   if test "x$test_shortpath" = x; then
44363     # Short path failed, file does not exist as specified.
44364     # Try adding .exe or .cmd
44365     if test -f "${new_path}.exe"; then
44366       input_to_shortpath="${new_path}.exe"
44367     elif test -f "${new_path}.cmd"; then
44368       input_to_shortpath="${new_path}.cmd"
44369     else
44370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44371 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44372       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44373 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44374       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44375     fi
44376   else
44377     input_to_shortpath="$new_path"
44378   fi
44379 
44380   # Call helper function which possibly converts this using DOS-style short mode.
44381   # If so, the updated path is stored in $new_path.
44382   new_path="$input_to_shortpath"
44383 
44384   input_path="$input_to_shortpath"
44385   # Check if we need to convert this using DOS-style short mode. If the path
44386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387   # take no chances and rewrite it.
44388   # Note: m4 eats our [], so we need to use [ and ] instead.
44389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44390   if test "x$has_forbidden_chars" != x; then
44391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44395       # Going to short mode and back again did indeed matter. Since short mode is
44396       # case insensitive, let's make it lowercase to improve readability.
44397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44398       # Now convert it back to Unix-style (cygpath)
44399       input_path=`$CYGPATH -u "$shortmode_path"`
44400       new_path="$input_path"
44401     fi
44402   fi
44403 
44404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44405   if test "x$test_cygdrive_prefix" = x; then
44406     # As a simple fix, exclude /usr/bin since it's not a real path.
44407     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44409       # a path prefixed by /cygdrive for fixpath to work.
44410       new_path="$CYGWIN_ROOT_PATH$input_path"
44411     fi
44412   fi
44413 
44414   # remove trailing .exe if any
44415   new_path="${new_path/%.exe/}"
44416 
44417     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44418 
44419   # First separate the path from the arguments. This will split at the first
44420   # space.
44421   complete="$BUILD_AR"
44422   path="${complete%% *}"
44423   tmp="$complete EOL"
44424   arguments="${tmp#* }"
44425 
44426   # Input might be given as Windows format, start by converting to
44427   # unix format.
44428   new_path="$path"
44429 
44430   windows_path="$new_path"
44431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44432     unix_path=`$CYGPATH -u "$windows_path"`
44433     new_path="$unix_path"
44434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44436     new_path="$unix_path"
44437   fi
44438 
44439 
44440   # Now try to locate executable using which
44441   new_path=`$WHICH "$new_path" 2> /dev/null`
44442 
44443   if test "x$new_path" = x; then
44444     # Oops. Which didn't find the executable.
44445     # The splitting of arguments from the executable at a space might have been incorrect,
44446     # since paths with space are more likely in Windows. Give it another try with the whole
44447     # argument.
44448     path="$complete"
44449     arguments="EOL"
44450     new_path="$path"
44451 
44452   windows_path="$new_path"
44453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44454     unix_path=`$CYGPATH -u "$windows_path"`
44455     new_path="$unix_path"
44456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44458     new_path="$unix_path"
44459   fi
44460 
44461 
44462     new_path=`$WHICH "$new_path" 2> /dev/null`
44463     # bat and cmd files are not always considered executable in MSYS causing which
44464     # to not find them
44465     if test "x$new_path" = x \
44466         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44467         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44468       new_path="$path"
44469 
44470   windows_path="$new_path"
44471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44472     unix_path=`$CYGPATH -u "$windows_path"`
44473     new_path="$unix_path"
44474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44476     new_path="$unix_path"
44477   fi
44478 
44479     fi
44480 
44481     if test "x$new_path" = x; then
44482       # It's still not found. Now this is an unrecoverable error.
44483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44484 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44485       has_space=`$ECHO "$complete" | $GREP " "`
44486       if test "x$has_space" != x; then
44487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44489       fi
44490       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44491     fi
44492   fi
44493 
44494   # Now new_path has a complete unix path to the binary
44495   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44496     # Keep paths in /bin as-is, but remove trailing .exe if any
44497     new_path="${new_path/%.exe/}"
44498     # Do not save /bin paths to all_fixpath_prefixes!
44499   else
44500     # Not in mixed or Windows style, start by that.
44501     new_path=`cmd //c echo $new_path`
44502 
44503   input_path="$new_path"
44504   # Check if we need to convert this using DOS-style short mode. If the path
44505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44506   # take no chances and rewrite it.
44507   # Note: m4 eats our [], so we need to use [ and ] instead.
44508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44509   if test "x$has_forbidden_chars" != x; then
44510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44512   fi
44513 
44514     # Output is in $new_path
44515 
44516   windows_path="$new_path"
44517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44518     unix_path=`$CYGPATH -u "$windows_path"`
44519     new_path="$unix_path"
44520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44522     new_path="$unix_path"
44523   fi
44524 
44525     # remove trailing .exe if any
44526     new_path="${new_path/%.exe/}"
44527 
44528     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44529     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44530   fi
44531 
44532     else
44533       # We're on a unix platform. Hooray! :)
44534       # First separate the path from the arguments. This will split at the first
44535       # space.
44536       complete="$BUILD_AR"
44537       path="${complete%% *}"
44538       tmp="$complete EOL"
44539       arguments="${tmp#* }"
44540 
44541       # Cannot rely on the command "which" here since it doesn't always work.
44542       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44543       if test -z "$is_absolute_path"; then
44544         # Path to executable is not absolute. Find it.
44545         IFS_save="$IFS"
44546         IFS=:
44547         for p in $PATH; do
44548           if test -f "$p/$path" && test -x "$p/$path"; then
44549             new_path="$p/$path"
44550             break
44551           fi
44552         done
44553         IFS="$IFS_save"
44554       else
44555         # This is an absolute path, we can use it without further modifications.
44556         new_path="$path"
44557       fi
44558 
44559       if test "x$new_path" = x; then
44560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44561 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44562         has_space=`$ECHO "$complete" | $GREP " "`
44563         if test "x$has_space" != x; then
44564           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44566         fi
44567         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44568       fi
44569     fi
44570 
44571     # Now join together the path and the arguments once again
44572     if test "x$arguments" != xEOL; then
44573       new_complete="$new_path ${arguments% *}"
44574     else
44575       new_complete="$new_path"
44576     fi
44577 
44578     if test "x$complete" != "x$new_complete"; then
44579       BUILD_AR="$new_complete"
44580       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44581 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44582     fi
44583   fi
44584 
44585     # Assume the C compiler is the assembler
44586     BUILD_AS="$BUILD_CC -c"
44587     # Just like for the target compiler, use the compiler as linker
44588     BUILD_LD="$BUILD_CC"
44589 
44590     PATH="$OLDPATH"
44591   else
44592     # If we are not cross compiling, use the normal target compilers for
44593     # building the build platform executables.
44594     BUILD_CC="$CC"
44595     BUILD_CXX="$CXX"
44596     BUILD_LD="$LD"
44597     BUILD_NM="$NM"
44598     BUILD_AS="$AS"
44599     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44600     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44601     BUILD_AR="$AR"
44602   fi
44603 
44604 
44605 
44606 
44607 
44608 
44609 
44610 
44611 
44612 
44613 
44614   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44615     # For hotspot, we need these in Windows mixed path,
44616     # so rewrite them all. Need added .exe suffix.
44617     HOTSPOT_CXX="$CXX.exe"
44618     HOTSPOT_LD="$LD.exe"
44619     HOTSPOT_MT="$MT.exe"
44620     HOTSPOT_RC="$RC.exe"
44621 
44622   unix_path="$HOTSPOT_CXX"
44623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44624     windows_path=`$CYGPATH -m "$unix_path"`
44625     HOTSPOT_CXX="$windows_path"
44626   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44627     windows_path=`cmd //c echo $unix_path`
44628     HOTSPOT_CXX="$windows_path"
44629   fi
44630 
44631 
44632   unix_path="$HOTSPOT_LD"
44633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44634     windows_path=`$CYGPATH -m "$unix_path"`
44635     HOTSPOT_LD="$windows_path"
44636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44637     windows_path=`cmd //c echo $unix_path`
44638     HOTSPOT_LD="$windows_path"
44639   fi
44640 
44641 
44642   unix_path="$HOTSPOT_MT"
44643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44644     windows_path=`$CYGPATH -m "$unix_path"`
44645     HOTSPOT_MT="$windows_path"
44646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44647     windows_path=`cmd //c echo $unix_path`
44648     HOTSPOT_MT="$windows_path"
44649   fi
44650 
44651 
44652   unix_path="$HOTSPOT_RC"
44653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44654     windows_path=`$CYGPATH -m "$unix_path"`
44655     HOTSPOT_RC="$windows_path"
44656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44657     windows_path=`cmd //c echo $unix_path`
44658     HOTSPOT_RC="$windows_path"
44659   fi
44660 
44661 
44662 
44663   else
44664     HOTSPOT_CXX="$CXX"
44665     HOTSPOT_LD="$LD"
44666   fi
44667 
44668 
44669 
44670   if test  "x$TOOLCHAIN_TYPE" = xclang; then
44671     USE_CLANG=true
44672   fi
44673 
44674 
44675 
44676 
44677 
44678   # The package path is used only on macosx?
44679   # FIXME: clean this up, and/or move it elsewhere.
44680   PACKAGE_PATH=/opt/local
44681 
44682 
44683   # Check for extra potential brokenness.
44684   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44685     # On Windows, double-check that we got the right compiler.
44686     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44687     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44688     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44689       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44690         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
44691       fi
44692     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44693       if test "x$COMPILER_CPU_TEST" != "xx64"; then
44694         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44695       fi
44696     fi
44697   fi
44698 
44699   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44700     # If this is a --hash-style=gnu system, use --hash-style=both, why?
44701     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44702     # This is later checked when setting flags.
44703 
44704     # "-Og" suppported for GCC 4.8 and later
44705     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44706 
44707   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44708 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44709   supports=yes
44710 
44711   saved_cflags="$CFLAGS"
44712   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44713   ac_ext=c
44714 ac_cpp='$CPP $CPPFLAGS'
44715 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44716 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44717 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44718 
44719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44720 /* end confdefs.h.  */
44721 int i;
44722 _ACEOF
44723 if ac_fn_c_try_compile "$LINENO"; then :
44724 
44725 else
44726   supports=no
44727 fi
44728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44729   ac_ext=cpp
44730 ac_cpp='$CXXCPP $CPPFLAGS'
44731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44734 
44735   CFLAGS="$saved_cflags"
44736 
44737   saved_cxxflags="$CXXFLAGS"
44738   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44739   ac_ext=cpp
44740 ac_cpp='$CXXCPP $CPPFLAGS'
44741 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44742 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44743 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44744 
44745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44746 /* end confdefs.h.  */
44747 int i;
44748 _ACEOF
44749 if ac_fn_cxx_try_compile "$LINENO"; then :
44750 
44751 else
44752   supports=no
44753 fi
44754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44755   ac_ext=cpp
44756 ac_cpp='$CXXCPP $CPPFLAGS'
44757 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44758 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44759 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44760 
44761   CXXFLAGS="$saved_cxxflags"
44762 
44763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44764 $as_echo "$supports" >&6; }
44765   if test "x$supports" = "xyes" ; then
44766     HAS_CFLAG_OPTIMIZE_DEBUG=true
44767   else
44768     HAS_CFLAG_OPTIMIZE_DEBUG=false
44769   fi
44770 
44771 
44772     # "-z relro" supported in GNU binutils 2.17 and later
44773     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
44774 
44775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44776 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44777   supports=yes
44778 
44779   saved_ldflags="$LDFLAGS"
44780   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44781   ac_ext=c
44782 ac_cpp='$CPP $CPPFLAGS'
44783 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44784 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44785 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44786 
44787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44788 /* end confdefs.h.  */
44789 
44790 int
44791 main ()
44792 {
44793 
44794   ;
44795   return 0;
44796 }
44797 _ACEOF
44798 if ac_fn_c_try_link "$LINENO"; then :
44799 
44800 else
44801   supports=no
44802 fi
44803 rm -f core conftest.err conftest.$ac_objext \
44804     conftest$ac_exeext conftest.$ac_ext
44805   ac_ext=cpp
44806 ac_cpp='$CXXCPP $CPPFLAGS'
44807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44810 
44811   LDFLAGS="$saved_ldflags"
44812 
44813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44814 $as_echo "$supports" >&6; }
44815   if test "x$supports" = "xyes" ; then
44816     HAS_LINKER_RELRO=true
44817   else
44818     HAS_LINKER_RELRO=false
44819   fi
44820 
44821 
44822     # "-z now" supported in GNU binutils 2.11 and later
44823     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
44824 
44825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44826 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44827   supports=yes
44828 
44829   saved_ldflags="$LDFLAGS"
44830   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44831   ac_ext=c
44832 ac_cpp='$CPP $CPPFLAGS'
44833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44836 
44837   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44838 /* end confdefs.h.  */
44839 
44840 int
44841 main ()
44842 {
44843 
44844   ;
44845   return 0;
44846 }
44847 _ACEOF
44848 if ac_fn_c_try_link "$LINENO"; then :
44849 
44850 else
44851   supports=no
44852 fi
44853 rm -f core conftest.err conftest.$ac_objext \
44854     conftest$ac_exeext conftest.$ac_ext
44855   ac_ext=cpp
44856 ac_cpp='$CXXCPP $CPPFLAGS'
44857 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44858 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44859 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44860 
44861   LDFLAGS="$saved_ldflags"
44862 
44863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44864 $as_echo "$supports" >&6; }
44865   if test "x$supports" = "xyes" ; then
44866     HAS_LINKER_NOW=true
44867   else
44868     HAS_LINKER_NOW=false
44869   fi
44870 
44871   fi
44872 
44873   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44874   # in executable.'
44875   USING_BROKEN_SUSE_LD=no
44876   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44878 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44879     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44880     $ECHO "int main() { }" > main.c
44881     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
44882       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44883 $as_echo "no" >&6; }
44884       USING_BROKEN_SUSE_LD=no
44885     else
44886       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44887 $as_echo "yes" >&6; }
44888       USING_BROKEN_SUSE_LD=yes
44889     fi
44890     rm -rf version-script.map main.c a.out
44891   fi
44892 
44893 
44894 
44895 # Setup the JTReg Regression Test Harness.
44896 
44897 
44898 # Check whether --with-jtreg was given.
44899 if test "${with_jtreg+set}" = set; then :
44900   withval=$with_jtreg;
44901 else
44902   with_jtreg=no
44903 fi
44904 
44905 
44906   if test "x$with_jtreg" = xno; then
44907     # jtreg disabled
44908     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44909 $as_echo_n "checking for jtreg... " >&6; }
44910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44911 $as_echo "no" >&6; }
44912   else
44913     if test "x$with_jtreg" != xyes; then
44914       # with path specified.
44915       JT_HOME="$with_jtreg"
44916     fi
44917 
44918     if test "x$JT_HOME" != x; then
44919       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44920 $as_echo_n "checking for jtreg... " >&6; }
44921 
44922       # use JT_HOME enviroment var.
44923 
44924   # Only process if variable expands to non-empty
44925 
44926   if test "x$JT_HOME" != x; then
44927     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44928 
44929   # Input might be given as Windows format, start by converting to
44930   # unix format.
44931   path="$JT_HOME"
44932   new_path=`$CYGPATH -u "$path"`
44933 
44934   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44935   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44936   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44937   # "foo.exe" is OK but "foo" is an error.
44938   #
44939   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44940   # It is also a way to make sure we got the proper file name for the real test later on.
44941   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44942   if test "x$test_shortpath" = x; then
44943     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44944 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44945     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44946   fi
44947 
44948   # Call helper function which possibly converts this using DOS-style short mode.
44949   # If so, the updated path is stored in $new_path.
44950 
44951   input_path="$new_path"
44952   # Check if we need to convert this using DOS-style short mode. If the path
44953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44954   # take no chances and rewrite it.
44955   # Note: m4 eats our [], so we need to use [ and ] instead.
44956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44957   if test "x$has_forbidden_chars" != x; then
44958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44959     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44960     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44961     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44962       # Going to short mode and back again did indeed matter. Since short mode is
44963       # case insensitive, let's make it lowercase to improve readability.
44964       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44965       # Now convert it back to Unix-style (cygpath)
44966       input_path=`$CYGPATH -u "$shortmode_path"`
44967       new_path="$input_path"
44968     fi
44969   fi
44970 
44971   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44972   if test "x$test_cygdrive_prefix" = x; then
44973     # As a simple fix, exclude /usr/bin since it's not a real path.
44974     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44975       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44976       # a path prefixed by /cygdrive for fixpath to work.
44977       new_path="$CYGWIN_ROOT_PATH$input_path"
44978     fi
44979   fi
44980 
44981 
44982   if test "x$path" != "x$new_path"; then
44983     JT_HOME="$new_path"
44984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44985 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44986   fi
44987 
44988     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44989 
44990   path="$JT_HOME"
44991   has_colon=`$ECHO $path | $GREP ^.:`
44992   new_path="$path"
44993   if test "x$has_colon" = x; then
44994     # Not in mixed or Windows style, start by that.
44995     new_path=`cmd //c echo $path`
44996   fi
44997 
44998 
44999   input_path="$new_path"
45000   # Check if we need to convert this using DOS-style short mode. If the path
45001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45002   # take no chances and rewrite it.
45003   # Note: m4 eats our [], so we need to use [ and ] instead.
45004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45005   if test "x$has_forbidden_chars" != x; then
45006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45008   fi
45009 
45010 
45011   windows_path="$new_path"
45012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45013     unix_path=`$CYGPATH -u "$windows_path"`
45014     new_path="$unix_path"
45015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45017     new_path="$unix_path"
45018   fi
45019 
45020   if test "x$path" != "x$new_path"; then
45021     JT_HOME="$new_path"
45022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45023 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45024   fi
45025 
45026   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45027   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45028 
45029     else
45030       # We're on a unix platform. Hooray! :)
45031       path="$JT_HOME"
45032       has_space=`$ECHO "$path" | $GREP " "`
45033       if test "x$has_space" != x; then
45034         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45035 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45036         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45037       fi
45038 
45039       # Use eval to expand a potential ~
45040       eval path="$path"
45041       if test ! -f "$path" && test ! -d "$path"; then
45042         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45043       fi
45044 
45045       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45046     fi
45047   fi
45048 
45049 
45050       # jtreg win32 script works for everybody
45051       JTREGEXE="$JT_HOME/bin/jtreg"
45052 
45053       if test ! -f "$JTREGEXE"; then
45054         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45055       fi
45056 
45057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45058 $as_echo "$JTREGEXE" >&6; }
45059     else
45060       # try to find jtreg on path
45061 
45062 
45063 
45064   # Publish this variable in the help.
45065 
45066 
45067   if [ -z "${JTREGEXE+x}" ]; then
45068     # The variable is not set by user, try to locate tool using the code snippet
45069     for ac_prog in jtreg
45070 do
45071   # Extract the first word of "$ac_prog", so it can be a program name with args.
45072 set dummy $ac_prog; ac_word=$2
45073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45074 $as_echo_n "checking for $ac_word... " >&6; }
45075 if ${ac_cv_path_JTREGEXE+:} false; then :
45076   $as_echo_n "(cached) " >&6
45077 else
45078   case $JTREGEXE in
45079   [\\/]* | ?:[\\/]*)
45080   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45081   ;;
45082   *)
45083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45084 for as_dir in $PATH
45085 do
45086   IFS=$as_save_IFS
45087   test -z "$as_dir" && as_dir=.
45088     for ac_exec_ext in '' $ac_executable_extensions; do
45089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45090     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45092     break 2
45093   fi
45094 done
45095   done
45096 IFS=$as_save_IFS
45097 
45098   ;;
45099 esac
45100 fi
45101 JTREGEXE=$ac_cv_path_JTREGEXE
45102 if test -n "$JTREGEXE"; then
45103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45104 $as_echo "$JTREGEXE" >&6; }
45105 else
45106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45107 $as_echo "no" >&6; }
45108 fi
45109 
45110 
45111   test -n "$JTREGEXE" && break
45112 done
45113 
45114   else
45115     # The variable is set, but is it from the command line or the environment?
45116 
45117     # Try to remove the string !JTREGEXE! from our list.
45118     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45119     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45120       # If it failed, the variable was not from the command line. Ignore it,
45121       # but warn the user (except for BASH, which is always set by the calling BASH).
45122       if test "xJTREGEXE" != xBASH; then
45123         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45124 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45125       fi
45126       # Try to locate tool using the code snippet
45127       for ac_prog in jtreg
45128 do
45129   # Extract the first word of "$ac_prog", so it can be a program name with args.
45130 set dummy $ac_prog; ac_word=$2
45131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45132 $as_echo_n "checking for $ac_word... " >&6; }
45133 if ${ac_cv_path_JTREGEXE+:} false; then :
45134   $as_echo_n "(cached) " >&6
45135 else
45136   case $JTREGEXE in
45137   [\\/]* | ?:[\\/]*)
45138   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45139   ;;
45140   *)
45141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45142 for as_dir in $PATH
45143 do
45144   IFS=$as_save_IFS
45145   test -z "$as_dir" && as_dir=.
45146     for ac_exec_ext in '' $ac_executable_extensions; do
45147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45148     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45150     break 2
45151   fi
45152 done
45153   done
45154 IFS=$as_save_IFS
45155 
45156   ;;
45157 esac
45158 fi
45159 JTREGEXE=$ac_cv_path_JTREGEXE
45160 if test -n "$JTREGEXE"; then
45161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45162 $as_echo "$JTREGEXE" >&6; }
45163 else
45164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45165 $as_echo "no" >&6; }
45166 fi
45167 
45168 
45169   test -n "$JTREGEXE" && break
45170 done
45171 
45172     else
45173       # If it succeeded, then it was overridden by the user. We will use it
45174       # for the tool.
45175 
45176       # First remove it from the list of overridden variables, so we can test
45177       # for unknown variables in the end.
45178       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45179 
45180       # Check if we try to supply an empty value
45181       if test "x$JTREGEXE" = x; then
45182         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45183 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45185 $as_echo_n "checking for JTREGEXE... " >&6; }
45186         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45187 $as_echo "disabled" >&6; }
45188       else
45189         # Check if the provided tool contains a complete path.
45190         tool_specified="$JTREGEXE"
45191         tool_basename="${tool_specified##*/}"
45192         if test "x$tool_basename" = "x$tool_specified"; then
45193           # A command without a complete path is provided, search $PATH.
45194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45195 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45196           # Extract the first word of "$tool_basename", so it can be a program name with args.
45197 set dummy $tool_basename; ac_word=$2
45198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45199 $as_echo_n "checking for $ac_word... " >&6; }
45200 if ${ac_cv_path_JTREGEXE+:} false; then :
45201   $as_echo_n "(cached) " >&6
45202 else
45203   case $JTREGEXE in
45204   [\\/]* | ?:[\\/]*)
45205   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45206   ;;
45207   *)
45208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45209 for as_dir in $PATH
45210 do
45211   IFS=$as_save_IFS
45212   test -z "$as_dir" && as_dir=.
45213     for ac_exec_ext in '' $ac_executable_extensions; do
45214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45215     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45217     break 2
45218   fi
45219 done
45220   done
45221 IFS=$as_save_IFS
45222 
45223   ;;
45224 esac
45225 fi
45226 JTREGEXE=$ac_cv_path_JTREGEXE
45227 if test -n "$JTREGEXE"; then
45228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45229 $as_echo "$JTREGEXE" >&6; }
45230 else
45231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45232 $as_echo "no" >&6; }
45233 fi
45234 
45235 
45236           if test "x$JTREGEXE" = x; then
45237             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45238           fi
45239         else
45240           # Otherwise we believe it is a complete path. Use it as it is.
45241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45242 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45243           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45244 $as_echo_n "checking for JTREGEXE... " >&6; }
45245           if test ! -x "$tool_specified"; then
45246             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45247 $as_echo "not found" >&6; }
45248             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45249           fi
45250           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45251 $as_echo "$tool_specified" >&6; }
45252         fi
45253       fi
45254     fi
45255 
45256   fi
45257 
45258 
45259 
45260   if test "x$JTREGEXE" = x; then
45261     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45262   fi
45263 
45264 
45265       JT_HOME="`$DIRNAME $JTREGEXE`"
45266     fi
45267   fi
45268 
45269 
45270 
45271 
45272 
45273 
45274   # Option used to tell the compiler whether to create 32- or 64-bit executables
45275   if test "x$TOOLCHAIN_TYPE" = xxlc; then
45276     COMPILER_TARGET_BITS_FLAG="-q"
45277   else
45278     COMPILER_TARGET_BITS_FLAG="-m"
45279   fi
45280 
45281 
45282   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45283   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45284     ARFLAGS="-r"
45285   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45286     ARFLAGS="-X64"
45287   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45288     # lib.exe is used as AR to create static libraries.
45289     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45290   else
45291     ARFLAGS=""
45292   fi
45293 
45294 
45295   ## Setup strip.
45296   # FIXME: should this really be per platform, or should it be per toolchain type?
45297   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45298   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45299   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45300     STRIPFLAGS="-g"
45301   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45302     STRIPFLAGS="-x"
45303   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45304     STRIPFLAGS="-S"
45305   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45306     STRIPFLAGS="-X32_64"
45307   fi
45308 
45309 
45310 
45311   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45312     CC_OUT_OPTION=-Fo
45313     EXE_OUT_OPTION=-out:
45314     LD_OUT_OPTION=-out:
45315     AR_OUT_OPTION=-out:
45316   else
45317     # The option used to specify the target .o,.a or .so file.
45318     # When compiling, how to specify the to be created object file.
45319     CC_OUT_OPTION='-o$(SPACE)'
45320     # When linking, how to specify the to be created executable.
45321     EXE_OUT_OPTION='-o$(SPACE)'
45322     # When linking, how to specify the to be created dynamically linkable library.
45323     LD_OUT_OPTION='-o$(SPACE)'
45324     # When archiving, how to specify the to be create static archive for object files.
45325     AR_OUT_OPTION='rcs$(SPACE)'
45326   fi
45327 
45328 
45329 
45330 
45331 
45332   # On Windows, we need to set RC flags.
45333   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45334     RC_FLAGS="-nologo -l0x409"
45335     if test "x$VARIANT" = xOPT; then
45336       RC_FLAGS="$RC_FLAGS -DNDEBUG"
45337     fi
45338 
45339     # The version variables used to create RC_FLAGS may be overridden
45340     # in a custom configure script, or possibly the command line.
45341     # Let those variables be expanded at make time in spec.gmk.
45342     # The \$ are escaped to the shell, and the $(...) variables
45343     # are evaluated by make.
45344     RC_FLAGS="$RC_FLAGS \
45345         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
45346         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45347         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45348         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
45349         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45350         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
45351         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
45352   fi
45353 
45354 
45355   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45356     # silence copyright notice and other headers.
45357     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45358   fi
45359 
45360 
45361 # FIXME: Currently we must test this after toolchain but before flags. Fix!
45362 
45363 # Now we can test some aspects on the target using configure macros.
45364 
45365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45366 $as_echo_n "checking for ANSI C header files... " >&6; }
45367 if ${ac_cv_header_stdc+:} false; then :
45368   $as_echo_n "(cached) " >&6
45369 else
45370   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45371 /* end confdefs.h.  */
45372 #include <stdlib.h>
45373 #include <stdarg.h>
45374 #include <string.h>
45375 #include <float.h>
45376 
45377 int
45378 main ()
45379 {
45380 
45381   ;
45382   return 0;
45383 }
45384 _ACEOF
45385 if ac_fn_cxx_try_compile "$LINENO"; then :
45386   ac_cv_header_stdc=yes
45387 else
45388   ac_cv_header_stdc=no
45389 fi
45390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45391 
45392 if test $ac_cv_header_stdc = yes; then
45393   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45395 /* end confdefs.h.  */
45396 #include <string.h>
45397 
45398 _ACEOF
45399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45400   $EGREP "memchr" >/dev/null 2>&1; then :
45401 
45402 else
45403   ac_cv_header_stdc=no
45404 fi
45405 rm -f conftest*
45406 
45407 fi
45408 
45409 if test $ac_cv_header_stdc = yes; then
45410   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45412 /* end confdefs.h.  */
45413 #include <stdlib.h>
45414 
45415 _ACEOF
45416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45417   $EGREP "free" >/dev/null 2>&1; then :
45418 
45419 else
45420   ac_cv_header_stdc=no
45421 fi
45422 rm -f conftest*
45423 
45424 fi
45425 
45426 if test $ac_cv_header_stdc = yes; then
45427   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45428   if test "$cross_compiling" = yes; then :
45429   :
45430 else
45431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45432 /* end confdefs.h.  */
45433 #include <ctype.h>
45434 #include <stdlib.h>
45435 #if ((' ' & 0x0FF) == 0x020)
45436 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45437 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45438 #else
45439 # define ISLOWER(c) \
45440                    (('a' <= (c) && (c) <= 'i') \
45441                      || ('j' <= (c) && (c) <= 'r') \
45442                      || ('s' <= (c) && (c) <= 'z'))
45443 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45444 #endif
45445 
45446 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45447 int
45448 main ()
45449 {
45450   int i;
45451   for (i = 0; i < 256; i++)
45452     if (XOR (islower (i), ISLOWER (i))
45453         || toupper (i) != TOUPPER (i))
45454       return 2;
45455   return 0;
45456 }
45457 _ACEOF
45458 if ac_fn_cxx_try_run "$LINENO"; then :
45459 
45460 else
45461   ac_cv_header_stdc=no
45462 fi
45463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45464   conftest.$ac_objext conftest.beam conftest.$ac_ext
45465 fi
45466 
45467 fi
45468 fi
45469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45470 $as_echo "$ac_cv_header_stdc" >&6; }
45471 if test $ac_cv_header_stdc = yes; then
45472 
45473 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
45474 
45475 fi
45476 
45477 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
45478 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45479                   inttypes.h stdint.h unistd.h
45480 do :
45481   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45482 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45483 "
45484 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45485   cat >>confdefs.h <<_ACEOF
45486 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45487 _ACEOF
45488 
45489 fi
45490 
45491 done
45492 
45493 
45494 
45495   ###############################################################################
45496   #
45497   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45498   # (The JVM can use 32 or 64 bit Java pointers but that decision
45499   # is made at runtime.)
45500   #
45501 
45502   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45503     # Always specify -m flag on Solaris
45504     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45505 
45506   # When we add flags to the "official" CFLAGS etc, we need to
45507   # keep track of these additions in ADDED_CFLAGS etc. These
45508   # will later be checked to make sure only controlled additions
45509   # have been made to CFLAGS etc.
45510   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45511   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45512   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45513 
45514   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45515   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45516   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45517 
45518   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45519   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45520   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45521 
45522   elif test "x$COMPILE_TYPE" = xreduced; then
45523     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45524       # Specify -m if running reduced on unix platforms
45525 
45526   # When we add flags to the "official" CFLAGS etc, we need to
45527   # keep track of these additions in ADDED_CFLAGS etc. These
45528   # will later be checked to make sure only controlled additions
45529   # have been made to CFLAGS etc.
45530   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45531   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45532   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45533 
45534   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45535   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45536   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45537 
45538   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45539   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45540   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45541 
45542     fi
45543   fi
45544 
45545   # Make compilation sanity check
45546   for ac_header in stdio.h
45547 do :
45548   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45549 if test "x$ac_cv_header_stdio_h" = xyes; then :
45550   cat >>confdefs.h <<_ACEOF
45551 #define HAVE_STDIO_H 1
45552 _ACEOF
45553 
45554 else
45555 
45556     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45557 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45558     if test "x$COMPILE_TYPE" = xreduced; then
45559 
45560   # Print a helpful message on how to acquire the necessary build dependency.
45561   # reduced is the help tag: freetype, cups, alsa etc
45562   MISSING_DEPENDENCY=reduced
45563 
45564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45565     cygwin_help $MISSING_DEPENDENCY
45566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45567     msys_help $MISSING_DEPENDENCY
45568   else
45569     PKGHANDLER_COMMAND=
45570 
45571     case $PKGHANDLER in
45572       apt-get)
45573         apt_help     $MISSING_DEPENDENCY ;;
45574       yum)
45575         yum_help     $MISSING_DEPENDENCY ;;
45576       port)
45577         port_help    $MISSING_DEPENDENCY ;;
45578       pkgutil)
45579         pkgutil_help $MISSING_DEPENDENCY ;;
45580       pkgadd)
45581         pkgadd_help  $MISSING_DEPENDENCY ;;
45582     esac
45583 
45584     if test "x$PKGHANDLER_COMMAND" != x; then
45585       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45586     fi
45587   fi
45588 
45589       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45590 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45591     elif test "x$COMPILE_TYPE" = xcross; then
45592       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45593 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45594     fi
45595     as_fn_error $? "Cannot continue." "$LINENO" 5
45596 
45597 fi
45598 
45599 done
45600 
45601 
45602   # The cast to long int works around a bug in the HP C Compiler
45603 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45604 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45605 # This bug is HP SR number 8606223364.
45606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45607 $as_echo_n "checking size of int *... " >&6; }
45608 if ${ac_cv_sizeof_int_p+:} false; then :
45609   $as_echo_n "(cached) " >&6
45610 else
45611   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45612 
45613 else
45614   if test "$ac_cv_type_int_p" = yes; then
45615      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45616 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45617 as_fn_error 77 "cannot compute sizeof (int *)
45618 See \`config.log' for more details" "$LINENO" 5; }
45619    else
45620      ac_cv_sizeof_int_p=0
45621    fi
45622 fi
45623 
45624 fi
45625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45626 $as_echo "$ac_cv_sizeof_int_p" >&6; }
45627 
45628 
45629 
45630 cat >>confdefs.h <<_ACEOF
45631 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
45632 _ACEOF
45633 
45634 
45635 
45636   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45637   if test "x$ac_cv_sizeof_int_p" = x; then
45638     # The test failed, lets stick to the assumed value.
45639     { $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
45640 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45641   else
45642     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45643 
45644     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45645       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45646       # Let's try to implicitely set the compilers target architecture and retry the test
45647       { $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
45648 $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;}
45649       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45650 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45651 
45652   # When we add flags to the "official" CFLAGS etc, we need to
45653   # keep track of these additions in ADDED_CFLAGS etc. These
45654   # will later be checked to make sure only controlled additions
45655   # have been made to CFLAGS etc.
45656   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45657   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45658   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45659 
45660   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45661   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45662   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45663 
45664   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45665   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45666   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45667 
45668 
45669       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45670       unset ac_cv_sizeof_int_p
45671       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45672       cat >>confdefs.h <<_ACEOF
45673 #undef SIZEOF_INT_P
45674 _ACEOF
45675 
45676       # The cast to long int works around a bug in the HP C Compiler
45677 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45678 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45679 # This bug is HP SR number 8606223364.
45680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45681 $as_echo_n "checking size of int *... " >&6; }
45682 if ${ac_cv_sizeof_int_p+:} false; then :
45683   $as_echo_n "(cached) " >&6
45684 else
45685   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45686 
45687 else
45688   if test "$ac_cv_type_int_p" = yes; then
45689      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45690 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45691 as_fn_error 77 "cannot compute sizeof (int *)
45692 See \`config.log' for more details" "$LINENO" 5; }
45693    else
45694      ac_cv_sizeof_int_p=0
45695    fi
45696 fi
45697 
45698 fi
45699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45700 $as_echo "$ac_cv_sizeof_int_p" >&6; }
45701 
45702 
45703 
45704 cat >>confdefs.h <<_ACEOF
45705 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
45706 _ACEOF
45707 
45708 
45709 
45710       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45711 
45712       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45713         { $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
45714 $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;}
45715         if test "x$COMPILE_TYPE" = xreduced; then
45716 
45717   # Print a helpful message on how to acquire the necessary build dependency.
45718   # reduced is the help tag: freetype, cups, alsa etc
45719   MISSING_DEPENDENCY=reduced
45720 
45721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45722     cygwin_help $MISSING_DEPENDENCY
45723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45724     msys_help $MISSING_DEPENDENCY
45725   else
45726     PKGHANDLER_COMMAND=
45727 
45728     case $PKGHANDLER in
45729       apt-get)
45730         apt_help     $MISSING_DEPENDENCY ;;
45731       yum)
45732         yum_help     $MISSING_DEPENDENCY ;;
45733       port)
45734         port_help    $MISSING_DEPENDENCY ;;
45735       pkgutil)
45736         pkgutil_help $MISSING_DEPENDENCY ;;
45737       pkgadd)
45738         pkgadd_help  $MISSING_DEPENDENCY ;;
45739     esac
45740 
45741     if test "x$PKGHANDLER_COMMAND" != x; then
45742       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45743     fi
45744   fi
45745 
45746           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45747 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45748         elif test "x$COMPILE_TYPE" = xcross; then
45749           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45750 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45751         fi
45752         as_fn_error $? "Cannot continue." "$LINENO" 5
45753       fi
45754     fi
45755   fi
45756 
45757   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45758 $as_echo_n "checking for target address size... " >&6; }
45759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45760 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45761 
45762 
45763   ###############################################################################
45764   #
45765   # Is the target little of big endian?
45766   #
45767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45768 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45769 if ${ac_cv_c_bigendian+:} false; then :
45770   $as_echo_n "(cached) " >&6
45771 else
45772   ac_cv_c_bigendian=unknown
45773     # See if we're dealing with a universal compiler.
45774     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45775 /* end confdefs.h.  */
45776 #ifndef __APPLE_CC__
45777                not a universal capable compiler
45778              #endif
45779              typedef int dummy;
45780 
45781 _ACEOF
45782 if ac_fn_cxx_try_compile "$LINENO"; then :
45783 
45784         # Check for potential -arch flags.  It is not universal unless
45785         # there are at least two -arch flags with different values.
45786         ac_arch=
45787         ac_prev=
45788         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45789          if test -n "$ac_prev"; then
45790            case $ac_word in
45791              i?86 | x86_64 | ppc | ppc64)
45792                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45793                  ac_arch=$ac_word
45794                else
45795                  ac_cv_c_bigendian=universal
45796                  break
45797                fi
45798                ;;
45799            esac
45800            ac_prev=
45801          elif test "x$ac_word" = "x-arch"; then
45802            ac_prev=arch
45803          fi
45804        done
45805 fi
45806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45807     if test $ac_cv_c_bigendian = unknown; then
45808       # See if sys/param.h defines the BYTE_ORDER macro.
45809       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45810 /* end confdefs.h.  */
45811 #include <sys/types.h>
45812              #include <sys/param.h>
45813 
45814 int
45815 main ()
45816 {
45817 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45818                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45819                      && LITTLE_ENDIAN)
45820               bogus endian macros
45821              #endif
45822 
45823   ;
45824   return 0;
45825 }
45826 _ACEOF
45827 if ac_fn_cxx_try_compile "$LINENO"; then :
45828   # It does; now see whether it defined to BIG_ENDIAN or not.
45829          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45830 /* end confdefs.h.  */
45831 #include <sys/types.h>
45832                 #include <sys/param.h>
45833 
45834 int
45835 main ()
45836 {
45837 #if BYTE_ORDER != BIG_ENDIAN
45838                  not big endian
45839                 #endif
45840 
45841   ;
45842   return 0;
45843 }
45844 _ACEOF
45845 if ac_fn_cxx_try_compile "$LINENO"; then :
45846   ac_cv_c_bigendian=yes
45847 else
45848   ac_cv_c_bigendian=no
45849 fi
45850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45851 fi
45852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45853     fi
45854     if test $ac_cv_c_bigendian = unknown; then
45855       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45856       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45857 /* end confdefs.h.  */
45858 #include <limits.h>
45859 
45860 int
45861 main ()
45862 {
45863 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45864               bogus endian macros
45865              #endif
45866 
45867   ;
45868   return 0;
45869 }
45870 _ACEOF
45871 if ac_fn_cxx_try_compile "$LINENO"; then :
45872   # It does; now see whether it defined to _BIG_ENDIAN or not.
45873          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45874 /* end confdefs.h.  */
45875 #include <limits.h>
45876 
45877 int
45878 main ()
45879 {
45880 #ifndef _BIG_ENDIAN
45881                  not big endian
45882                 #endif
45883 
45884   ;
45885   return 0;
45886 }
45887 _ACEOF
45888 if ac_fn_cxx_try_compile "$LINENO"; then :
45889   ac_cv_c_bigendian=yes
45890 else
45891   ac_cv_c_bigendian=no
45892 fi
45893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45894 fi
45895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45896     fi
45897     if test $ac_cv_c_bigendian = unknown; then
45898       # Compile a test program.
45899       if test "$cross_compiling" = yes; then :
45900   # Try to guess by grepping values from an object file.
45901          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45902 /* end confdefs.h.  */
45903 short int ascii_mm[] =
45904                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45905                 short int ascii_ii[] =
45906                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45907                 int use_ascii (int i) {
45908                   return ascii_mm[i] + ascii_ii[i];
45909                 }
45910                 short int ebcdic_ii[] =
45911                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45912                 short int ebcdic_mm[] =
45913                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45914                 int use_ebcdic (int i) {
45915                   return ebcdic_mm[i] + ebcdic_ii[i];
45916                 }
45917                 extern int foo;
45918 
45919 int
45920 main ()
45921 {
45922 return use_ascii (foo) == use_ebcdic (foo);
45923   ;
45924   return 0;
45925 }
45926 _ACEOF
45927 if ac_fn_cxx_try_compile "$LINENO"; then :
45928   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45929               ac_cv_c_bigendian=yes
45930             fi
45931             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45932               if test "$ac_cv_c_bigendian" = unknown; then
45933                 ac_cv_c_bigendian=no
45934               else
45935                 # finding both strings is unlikely to happen, but who knows?
45936                 ac_cv_c_bigendian=unknown
45937               fi
45938             fi
45939 fi
45940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45941 else
45942   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45943 /* end confdefs.h.  */
45944 $ac_includes_default
45945 int
45946 main ()
45947 {
45948 
45949              /* Are we little or big endian?  From Harbison&Steele.  */
45950              union
45951              {
45952                long int l;
45953                char c[sizeof (long int)];
45954              } u;
45955              u.l = 1;
45956              return u.c[sizeof (long int) - 1] == 1;
45957 
45958   ;
45959   return 0;
45960 }
45961 _ACEOF
45962 if ac_fn_cxx_try_run "$LINENO"; then :
45963   ac_cv_c_bigendian=no
45964 else
45965   ac_cv_c_bigendian=yes
45966 fi
45967 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45968   conftest.$ac_objext conftest.beam conftest.$ac_ext
45969 fi
45970 
45971     fi
45972 fi
45973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45974 $as_echo "$ac_cv_c_bigendian" >&6; }
45975  case $ac_cv_c_bigendian in #(
45976    yes)
45977      ENDIAN="big";; #(
45978    no)
45979      ENDIAN="little" ;; #(
45980    universal)
45981      ENDIAN="universal_endianness"
45982      ;; #(
45983    *)
45984      ENDIAN="unknown" ;;
45985  esac
45986 
45987 
45988   if test "x$ENDIAN" = xuniversal_endianness; then
45989     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45990   fi
45991   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45992     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
45993   fi
45994 
45995 
45996 # Configure flags for the tools
45997 
45998   ###############################################################################
45999   #
46000   # How to compile shared libraries.
46001   #
46002 
46003   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46004     PICFLAG="-fPIC"
46005     C_FLAG_REORDER=''
46006     CXX_FLAG_REORDER=''
46007 
46008     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46009       # Linking is different on MacOSX
46010       if test "x$STATIC_BUILD" = xtrue; then
46011         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46012       else
46013         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46014       fi
46015       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46016       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46017       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46018       SET_SHARED_LIBRARY_MAPFILE=''
46019     else
46020       # Default works for linux, might work on other platforms as well.
46021       SHARED_LIBRARY_FLAGS='-shared'
46022       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46023       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46024       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46025       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46026     fi
46027   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46028     PICFLAG=''
46029     C_FLAG_REORDER=''
46030     CXX_FLAG_REORDER=''
46031 
46032     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46033       # Linking is different on MacOSX
46034       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46035       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46036       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46037       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46038       SET_SHARED_LIBRARY_MAPFILE=''
46039     else
46040       # Default works for linux, might work on other platforms as well.
46041       SHARED_LIBRARY_FLAGS='-shared'
46042       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46043       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46044       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46045       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46046     fi
46047   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46048     PICFLAG="-KPIC"
46049     C_FLAG_REORDER='-xF'
46050     CXX_FLAG_REORDER='-xF'
46051     SHARED_LIBRARY_FLAGS="-G"
46052     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46053     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46054     SET_SHARED_LIBRARY_NAME=''
46055     SET_SHARED_LIBRARY_MAPFILE='-M$1'
46056   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46057     PICFLAG="-qpic=large"
46058     C_FLAG_REORDER=''
46059     CXX_FLAG_REORDER=''
46060     SHARED_LIBRARY_FLAGS="-qmkshrobj"
46061     SET_EXECUTABLE_ORIGIN=""
46062     SET_SHARED_LIBRARY_ORIGIN=''
46063     SET_SHARED_LIBRARY_NAME=''
46064     SET_SHARED_LIBRARY_MAPFILE=''
46065   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46066     PICFLAG=""
46067     C_FLAG_REORDER=''
46068     CXX_FLAG_REORDER=''
46069     SHARED_LIBRARY_FLAGS="-LD"
46070     SET_EXECUTABLE_ORIGIN=''
46071     SET_SHARED_LIBRARY_ORIGIN=''
46072     SET_SHARED_LIBRARY_NAME=''
46073     SET_SHARED_LIBRARY_MAPFILE=''
46074   fi
46075 
46076 
46077 
46078 
46079 
46080 
46081 
46082 
46083   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46084     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46085     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46086     CFLAGS_JDKLIB_EXTRA='-xstrconst'
46087   fi
46088   # The (cross) compiler is now configured, we can now test capabilities
46089   # of the target platform.
46090 
46091 
46092 
46093   ###############################################################################
46094   #
46095   # Setup the opt flags for different compilers
46096   # and different operating systems.
46097   #
46098 
46099   # FIXME: this was indirectly the old default, but just inherited.
46100   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46101   #   C_FLAG_DEPS="-MMD -MF"
46102   # fi
46103 
46104   # Generate make dependency files
46105   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46106     C_FLAG_DEPS="-MMD -MF"
46107   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46108     C_FLAG_DEPS="-MMD -MF"
46109   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46110     C_FLAG_DEPS="-xMMD -xMF"
46111   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46112     C_FLAG_DEPS="-qmakedep=gcc -MF"
46113   fi
46114   CXX_FLAG_DEPS="$C_FLAG_DEPS"
46115 
46116 
46117 
46118   # Debug symbols
46119   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46120     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46121       # reduce from default "-g2" option to save space
46122       CFLAGS_DEBUG_SYMBOLS="-g1"
46123       CXXFLAGS_DEBUG_SYMBOLS="-g1"
46124     else
46125       CFLAGS_DEBUG_SYMBOLS="-g"
46126       CXXFLAGS_DEBUG_SYMBOLS="-g"
46127     fi
46128   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46129     CFLAGS_DEBUG_SYMBOLS="-g"
46130     CXXFLAGS_DEBUG_SYMBOLS="-g"
46131   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46132     CFLAGS_DEBUG_SYMBOLS="-g -xs"
46133     # FIXME: likely a bug, this disables debug symbols rather than enables them
46134     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46135   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46136     CFLAGS_DEBUG_SYMBOLS="-g"
46137     CXXFLAGS_DEBUG_SYMBOLS="-g"
46138   fi
46139 
46140 
46141 
46142   # bounds, memory and behavior checking options
46143   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46144     case $DEBUG_LEVEL in
46145     release )
46146       # no adjustment
46147       ;;
46148     fastdebug )
46149       # no adjustment
46150       ;;
46151     slowdebug )
46152       # Add runtime stack smashing and undefined behavior checks.
46153       # Not all versions of gcc support -fstack-protector
46154       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46155 
46156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46157 $as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46158   supports=yes
46159 
46160   saved_cflags="$CFLAGS"
46161   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46162   ac_ext=c
46163 ac_cpp='$CPP $CPPFLAGS'
46164 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46165 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46167 
46168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46169 /* end confdefs.h.  */
46170 int i;
46171 _ACEOF
46172 if ac_fn_c_try_compile "$LINENO"; then :
46173 
46174 else
46175   supports=no
46176 fi
46177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46178   ac_ext=cpp
46179 ac_cpp='$CXXCPP $CPPFLAGS'
46180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46183 
46184   CFLAGS="$saved_cflags"
46185 
46186   saved_cxxflags="$CXXFLAGS"
46187   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46188   ac_ext=cpp
46189 ac_cpp='$CXXCPP $CPPFLAGS'
46190 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46191 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46192 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46193 
46194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46195 /* end confdefs.h.  */
46196 int i;
46197 _ACEOF
46198 if ac_fn_cxx_try_compile "$LINENO"; then :
46199 
46200 else
46201   supports=no
46202 fi
46203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46204   ac_ext=cpp
46205 ac_cpp='$CXXCPP $CPPFLAGS'
46206 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46207 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46208 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46209 
46210   CXXFLAGS="$saved_cxxflags"
46211 
46212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46213 $as_echo "$supports" >&6; }
46214   if test "x$supports" = "xyes" ; then
46215     :
46216   else
46217     STACK_PROTECTOR_CFLAG=""
46218   fi
46219 
46220 
46221       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46222       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46223       ;;
46224     esac
46225   fi
46226 
46227   # Optimization levels
46228   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46229     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46230 
46231     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46232       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46233       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46234       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46235       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46236       C_O_FLAG_DEBUG="-xregs=no%frameptr"
46237       C_O_FLAG_NONE="-xregs=no%frameptr"
46238       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46239       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46240       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46241       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46242       CXX_O_FLAG_NONE="-xregs=no%frameptr"
46243       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46244         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46245         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46246       fi
46247     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46248       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46249       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46250       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46251       C_O_FLAG_DEBUG=""
46252       C_O_FLAG_NONE=""
46253       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46254       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46255       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46256       C_O_FLAG_DEBUG=""
46257       CXX_O_FLAG_NONE=""
46258     fi
46259   else
46260     # The remaining toolchains share opt flags between CC and CXX;
46261     # setup for C and duplicate afterwards.
46262     if test "x$TOOLCHAIN_TYPE" = xgcc; then
46263       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46264         # On MacOSX we optimize for size, something
46265         # we should do for all platforms?
46266         C_O_FLAG_HIGHEST="-Os"
46267         C_O_FLAG_HI="-Os"
46268         C_O_FLAG_NORM="-Os"
46269       else
46270         C_O_FLAG_HIGHEST="-O3"
46271         C_O_FLAG_HI="-O3"
46272         C_O_FLAG_NORM="-O2"
46273       fi
46274       C_O_FLAG_DEBUG="-O0"
46275       C_O_FLAG_NONE="-O0"
46276     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46277       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46278         # On MacOSX we optimize for size, something
46279         # we should do for all platforms?
46280         C_O_FLAG_HIGHEST="-Os"
46281         C_O_FLAG_HI="-Os"
46282         C_O_FLAG_NORM="-Os"
46283       else
46284         C_O_FLAG_HIGHEST="-O3"
46285         C_O_FLAG_HI="-O3"
46286         C_O_FLAG_NORM="-O2"
46287       fi
46288       C_O_FLAG_DEBUG="-O0"
46289       C_O_FLAG_NONE="-O0"
46290     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46291       C_O_FLAG_HIGHEST="-O3"
46292       C_O_FLAG_HI="-O3 -qstrict"
46293       C_O_FLAG_NORM="-O2"
46294       C_O_FLAG_DEBUG="-qnoopt"
46295       C_O_FLAG_NONE="-qnoop"
46296     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46297       C_O_FLAG_HIGHEST="-O2"
46298       C_O_FLAG_HI="-O1"
46299       C_O_FLAG_NORM="-O1"
46300       C_O_FLAG_DEBUG="-Od"
46301       C_O_FLAG_NONE="-Od"
46302     fi
46303     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46304     CXX_O_FLAG_HI="$C_O_FLAG_HI"
46305     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46306     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46307     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46308   fi
46309 
46310   # Adjust optimization flags according to debug level.
46311   case $DEBUG_LEVEL in
46312     release )
46313       # no adjustment
46314       ;;
46315     fastdebug )
46316       # Not quite so much optimization
46317       C_O_FLAG_HI="$C_O_FLAG_NORM"
46318       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46319       ;;
46320     slowdebug )
46321       # Disable optimization
46322       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46323       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46324       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46325       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46326       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46327       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46328       ;;
46329   esac
46330 
46331 
46332 
46333 
46334 
46335 
46336 
46337 
46338 
46339 
46340 
46341 
46342 
46343   # Special extras...
46344   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46345     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46346       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46347       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46348     fi
46349     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46350     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46351   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46352     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46353     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46354   fi
46355 
46356   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46357   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46358   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46359 
46360   ###############################################################################
46361   #
46362   # Now setup the CFLAGS and LDFLAGS for the JDK build.
46363   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46364   #
46365 
46366   # Setup compiler/platform specific flags into
46367   #    CFLAGS_JDK    - C Compiler flags
46368   #    CXXFLAGS_JDK  - C++ Compiler flags
46369   #    COMMON_CCXXFLAGS_JDK - common to C and C++
46370   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46371     if test "x$OPENJDK_TARGET_CPU" = xx86; then
46372       # Force compatibility with i586 on 32 bit intel platforms.
46373       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46374     fi
46375     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46376         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46377     case $OPENJDK_TARGET_CPU_ARCH in
46378       arm )
46379         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46380         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46381         ;;
46382       ppc )
46383         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46384         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46385         ;;
46386       * )
46387         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46388         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46389         ;;
46390     esac
46391   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46392     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46393     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46394       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46395     fi
46396 
46397     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46398     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46399   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46400     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46401     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46402   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46403     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46404         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46405         -DWIN32_LEAN_AND_MEAN \
46406         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46407         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46408         -DWIN32 -DIAL"
46409     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46410       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46411     else
46412       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46413     fi
46414     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46415     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46416     # studio.
46417     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46418       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46419           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46420     fi
46421   fi
46422 
46423   ###############################################################################
46424 
46425   # Adjust flags according to debug level.
46426   case $DEBUG_LEVEL in
46427     fastdebug | slowdebug )
46428       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46429       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46430       JAVAC_FLAGS="$JAVAC_FLAGS -g"
46431       ;;
46432     release )
46433       ;;
46434     * )
46435       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46436       ;;
46437   esac
46438 
46439   # Setup LP64
46440   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46441 
46442   # Set some common defines. These works for all compilers, but assume
46443   # -D is universally accepted.
46444 
46445   # Setup endianness
46446   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46447     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46448     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46449     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46450     #   Note: -Dmacro         is the same as    #define macro 1
46451     #         -Dmacro=        is the same as    #define macro
46452     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46453       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46454     else
46455       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46456     fi
46457   else
46458     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46459     # are defined in the system?
46460     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46461       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46462     else
46463       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46464     fi
46465   fi
46466 
46467   # Setup target OS define. Use OS target name but in upper case.
46468   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46469   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46470 
46471   # Setup target CPU
46472   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46473 
46474   # Setup debug/release defines
46475   if test "x$DEBUG_LEVEL" = xrelease; then
46476     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46477     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46478       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46479     fi
46480   else
46481     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46482   fi
46483 
46484   # Setup release name
46485   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
46486 
46487 
46488   # Set some additional per-OS defines.
46489   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46490     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46491   elif test "x$OPENJDK_TARGET_OS" = xaix; then
46492     # FIXME: PPC64 should not be here.
46493     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46494   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46495     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46496   fi
46497 
46498   # Additional macosx handling
46499   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46500     # Setting these parameters makes it an error to link to macosx APIs that are
46501     # newer than the given OS version and makes the linked binaries compatible
46502     # even if built on a newer version of the OS.
46503     # The expected format is X.Y.Z
46504     MACOSX_VERSION_MIN=10.7.0
46505 
46506 
46507     # The macro takes the version with no dots, ex: 1070
46508     # Let the flags variables get resolved in make for easier override on make
46509     # command line.
46510     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46511     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46512   fi
46513 
46514   # Setup some hard coded includes
46515   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46516       -I${JDK_TOPDIR}/src/java.base/share/native/include \
46517       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46518       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46519       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46520       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46521 
46522   # The shared libraries are compiled using the picflag.
46523   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46524   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46525 
46526   # Executable flags
46527   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46528   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46529 
46530 
46531 
46532 
46533 
46534 
46535   # Flags for compiling test libraries
46536   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46537   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46538 
46539   # Flags for compiling test executables
46540   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46541   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46542 
46543 
46544 
46545 
46546 
46547 
46548   # Setup LDFLAGS et al.
46549   #
46550 
46551   # Now this is odd. The JDK native libraries have to link against libjvm.so
46552   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46553   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46554   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46555   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46556   # libraries will link to whatever is in memory. Yuck.
46557   #
46558   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46559   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46560     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46561     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46562       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46563     fi
46564     # TODO: make -debug optional "--disable-full-debug-symbols"
46565     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46566   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46567     # If this is a --hash-style=gnu system, use --hash-style=both, why?
46568     # We have previously set HAS_GNU_HASH if this is the case
46569     if test -n "$HAS_GNU_HASH"; then
46570       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46571     fi
46572     if test "x$OPENJDK_TARGET_OS" = xlinux; then
46573       # And since we now know that the linker is gnu, then add -z defs, to forbid
46574       # undefined symbols in object files.
46575       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46576       case $DEBUG_LEVEL in
46577         release )
46578           # tell linker to optimize libraries.
46579           # Should this be supplied to the OSS linker as well?
46580           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46581           ;;
46582         slowdebug )
46583           if test "x$HAS_LINKER_NOW" = "xtrue"; then
46584             # do relocations at load
46585             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46586             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46587           fi
46588           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46589             # mark relocations read only
46590             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46591             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46592           fi
46593           ;;
46594         fastdebug )
46595           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46596             # mark relocations read only
46597             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46598             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46599           fi
46600           ;;
46601         * )
46602           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46603           ;;
46604         esac
46605     fi
46606   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46607     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
46608     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46609   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46610     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46611   fi
46612 
46613   # Customize LDFLAGS for executables
46614 
46615   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46616 
46617   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46618     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46619       LDFLAGS_STACK_SIZE=1048576
46620     else
46621       LDFLAGS_STACK_SIZE=327680
46622     fi
46623     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46624   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46625     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
46626   fi
46627 
46628   # Customize LDFLAGS for libs
46629   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46630 
46631   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46632     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46633     JDKLIB_LIBS=""
46634   else
46635     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
46636         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46637 
46638     # On some platforms (mac) the linker warns about non existing -L dirs.
46639     # Add server first if available. Linking aginst client does not always produce the same results.
46640     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46641     # Default to server for other variants.
46642     if test "x$JVM_VARIANT_SERVER" = xtrue; then
46643       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46644     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46645       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46646     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46647       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46648     else
46649       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46650     fi
46651 
46652     JDKLIB_LIBS="-ljava -ljvm"
46653     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46654       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46655     fi
46656   fi
46657 
46658 
46659 
46660 
46661 
46662 
46663 
46664   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46665   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46666 
46667 
46668 
46669 
46670 
46671   # Some Zero and Shark settings.
46672   # ZERO_ARCHFLAG tells the compiler which mode to build for
46673   case "${OPENJDK_TARGET_CPU}" in
46674     s390)
46675       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46676       ;;
46677     *)
46678       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46679   esac
46680 
46681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46682 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46683   supports=yes
46684 
46685   saved_cflags="$CFLAGS"
46686   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46687   ac_ext=c
46688 ac_cpp='$CPP $CPPFLAGS'
46689 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46690 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46691 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46692 
46693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46694 /* end confdefs.h.  */
46695 int i;
46696 _ACEOF
46697 if ac_fn_c_try_compile "$LINENO"; then :
46698 
46699 else
46700   supports=no
46701 fi
46702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46703   ac_ext=cpp
46704 ac_cpp='$CXXCPP $CPPFLAGS'
46705 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46706 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46707 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46708 
46709   CFLAGS="$saved_cflags"
46710 
46711   saved_cxxflags="$CXXFLAGS"
46712   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46713   ac_ext=cpp
46714 ac_cpp='$CXXCPP $CPPFLAGS'
46715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46718 
46719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46720 /* end confdefs.h.  */
46721 int i;
46722 _ACEOF
46723 if ac_fn_cxx_try_compile "$LINENO"; then :
46724 
46725 else
46726   supports=no
46727 fi
46728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46729   ac_ext=cpp
46730 ac_cpp='$CXXCPP $CPPFLAGS'
46731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46734 
46735   CXXFLAGS="$saved_cxxflags"
46736 
46737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46738 $as_echo "$supports" >&6; }
46739   if test "x$supports" = "xyes" ; then
46740     :
46741   else
46742     ZERO_ARCHFLAG=""
46743   fi
46744 
46745 
46746 
46747   # Check that the compiler supports -mX (or -qX on AIX) flags
46748   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46749 
46750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46751 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46752   supports=yes
46753 
46754   saved_cflags="$CFLAGS"
46755   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46756   ac_ext=c
46757 ac_cpp='$CPP $CPPFLAGS'
46758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46761 
46762   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46763 /* end confdefs.h.  */
46764 int i;
46765 _ACEOF
46766 if ac_fn_c_try_compile "$LINENO"; then :
46767 
46768 else
46769   supports=no
46770 fi
46771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46772   ac_ext=cpp
46773 ac_cpp='$CXXCPP $CPPFLAGS'
46774 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46775 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46776 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46777 
46778   CFLAGS="$saved_cflags"
46779 
46780   saved_cxxflags="$CXXFLAGS"
46781   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46782   ac_ext=cpp
46783 ac_cpp='$CXXCPP $CPPFLAGS'
46784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46785 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46786 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46787 
46788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46789 /* end confdefs.h.  */
46790 int i;
46791 _ACEOF
46792 if ac_fn_cxx_try_compile "$LINENO"; then :
46793 
46794 else
46795   supports=no
46796 fi
46797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46798   ac_ext=cpp
46799 ac_cpp='$CXXCPP $CPPFLAGS'
46800 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46801 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46802 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46803 
46804   CXXFLAGS="$saved_cxxflags"
46805 
46806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46807 $as_echo "$supports" >&6; }
46808   if test "x$supports" = "xyes" ; then
46809     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46810   else
46811     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46812   fi
46813 
46814 
46815 
46816   # Check whether --enable-warnings-as-errors was given.
46817 if test "${enable_warnings_as_errors+set}" = set; then :
46818   enableval=$enable_warnings_as_errors;
46819 fi
46820 
46821 
46822   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
46823 $as_echo_n "checking if native warnings are errors... " >&6; }
46824   if test "x$enable_warnings_as_errors" = "xyes"; then
46825     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
46826 $as_echo "yes (explicitely set)" >&6; }
46827     WARNINGS_AS_ERRORS=true
46828   elif test "x$enable_warnings_as_errors" = "xno"; then
46829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46830 $as_echo "no" >&6; }
46831     WARNINGS_AS_ERRORS=false
46832   elif test "x$enable_warnings_as_errors" = "x"; then
46833     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
46834 $as_echo "yes (default)" >&6; }
46835     WARNINGS_AS_ERRORS=true
46836   else
46837     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
46838   fi
46839 
46840   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
46841     # Set legacy hotspot variable
46842     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
46843   else
46844     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
46845   fi
46846 
46847 
46848 
46849 
46850   case "${TOOLCHAIN_TYPE}" in
46851     microsoft)
46852       DISABLE_WARNING_PREFIX="-wd"
46853       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
46854       ;;
46855     solstudio)
46856       DISABLE_WARNING_PREFIX="-erroff="
46857       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
46858       ;;
46859     gcc)
46860       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
46861 
46862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46863 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46864   supports=yes
46865 
46866   saved_cflags="$CFLAGS"
46867   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46868   ac_ext=c
46869 ac_cpp='$CPP $CPPFLAGS'
46870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46871 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46872 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46873 
46874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46875 /* end confdefs.h.  */
46876 int i;
46877 _ACEOF
46878 if ac_fn_c_try_compile "$LINENO"; then :
46879 
46880 else
46881   supports=no
46882 fi
46883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46884   ac_ext=cpp
46885 ac_cpp='$CXXCPP $CPPFLAGS'
46886 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46887 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46888 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46889 
46890   CFLAGS="$saved_cflags"
46891 
46892   saved_cxxflags="$CXXFLAGS"
46893   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46894   ac_ext=cpp
46895 ac_cpp='$CXXCPP $CPPFLAGS'
46896 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46897 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46898 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46899 
46900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46901 /* end confdefs.h.  */
46902 int i;
46903 _ACEOF
46904 if ac_fn_cxx_try_compile "$LINENO"; then :
46905 
46906 else
46907   supports=no
46908 fi
46909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46910   ac_ext=cpp
46911 ac_cpp='$CXXCPP $CPPFLAGS'
46912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46915 
46916   CXXFLAGS="$saved_cxxflags"
46917 
46918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46919 $as_echo "$supports" >&6; }
46920   if test "x$supports" = "xyes" ; then
46921     GCC_CAN_DISABLE_WARNINGS=true
46922   else
46923     GCC_CAN_DISABLE_WARNINGS=false
46924 
46925   fi
46926 
46927       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46928         DISABLE_WARNING_PREFIX="-Wno-"
46929       else
46930         DISABLE_WARNING_PREFIX=
46931       fi
46932       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
46933       # Repeate the check for the BUILD_CC
46934       CC_OLD="$CC"
46935       CC="$BUILD_CC"
46936 
46937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46938 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46939   supports=yes
46940 
46941   saved_cflags="$CFLAGS"
46942   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46943   ac_ext=c
46944 ac_cpp='$CPP $CPPFLAGS'
46945 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46946 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46948 
46949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46950 /* end confdefs.h.  */
46951 int i;
46952 _ACEOF
46953 if ac_fn_c_try_compile "$LINENO"; then :
46954 
46955 else
46956   supports=no
46957 fi
46958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46959   ac_ext=cpp
46960 ac_cpp='$CXXCPP $CPPFLAGS'
46961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46964 
46965   CFLAGS="$saved_cflags"
46966 
46967   saved_cxxflags="$CXXFLAGS"
46968   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46969   ac_ext=cpp
46970 ac_cpp='$CXXCPP $CPPFLAGS'
46971 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46972 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46973 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46974 
46975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46976 /* end confdefs.h.  */
46977 int i;
46978 _ACEOF
46979 if ac_fn_cxx_try_compile "$LINENO"; then :
46980 
46981 else
46982   supports=no
46983 fi
46984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46985   ac_ext=cpp
46986 ac_cpp='$CXXCPP $CPPFLAGS'
46987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46990 
46991   CXXFLAGS="$saved_cxxflags"
46992 
46993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46994 $as_echo "$supports" >&6; }
46995   if test "x$supports" = "xyes" ; then
46996     BUILD_CC_CAN_DISABLE_WARNINGS=true
46997   else
46998     BUILD_CC_CAN_DISABLE_WARNINGS=false
46999 
47000   fi
47001 
47002       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47003         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47004       else
47005         BUILD_CC_DISABLE_WARNING_PREFIX=
47006       fi
47007       CC="$CC_OLD"
47008       ;;
47009     clang)
47010       DISABLE_WARNING_PREFIX="-Wno-"
47011       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47012       ;;
47013   esac
47014 
47015 
47016 
47017 
47018 # Setup debug symbols (need objcopy from the toolchain for that)
47019 
47020   #
47021   # NATIVE_DEBUG_SYMBOLS
47022   #
47023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47024 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
47025 
47026 # Check whether --with-native-debug-symbols was given.
47027 if test "${with_native_debug_symbols+set}" = set; then :
47028   withval=$with_native_debug_symbols;
47029 else
47030   with_native_debug_symbols="zipped"
47031 fi
47032 
47033   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47035 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47036 
47037   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47038 
47039     if test "x$OBJCOPY" = x; then
47040       # explicit enabling of enable-debug-symbols and can't find objcopy
47041       # this is an error
47042       as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47043     fi
47044 
47045     ENABLE_DEBUG_SYMBOLS=true
47046     ZIP_DEBUGINFO_FILES=true
47047     DEBUG_BINARIES=true
47048     STRIP_POLICY=min_strip
47049   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47050     ENABLE_DEBUG_SYMBOLS=false
47051     ZIP_DEBUGINFO_FILES=false
47052     DEBUG_BINARIES=false
47053     STRIP_POLICY=min_strip
47054   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47055     ENABLE_DEBUG_SYMBOLS=false  # -g option only
47056     ZIP_DEBUGINFO_FILES=false
47057     DEBUG_BINARIES=true
47058     STRIP_POLICY=no_strip
47059     STRIP=""
47060   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47061 
47062     if test "x$OBJCOPY" = x; then
47063       # explicit enabling of enable-debug-symbols and can't find objcopy
47064       # this is an error
47065       as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47066     fi
47067 
47068     ENABLE_DEBUG_SYMBOLS=true
47069     ZIP_DEBUGINFO_FILES=false
47070     DEBUG_BINARIES=true
47071     STRIP_POLICY=min_strip
47072   else
47073     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47074   fi
47075 
47076   #
47077   # JAVA_DEBUG_SYMBOLS
47078   #
47079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols in class files" >&5
47080 $as_echo_n "checking if we should generate debug symbols in class files... " >&6; }
47081   # Check whether --enable-java-debug-symbols was given.
47082 if test "${enable_java_debug_symbols+set}" = set; then :
47083   enableval=$enable_java_debug_symbols; enable_java_debug_symbols="${enableval}"
47084 else
47085   enable_java_debug_symbols="no"
47086 fi
47087 
47088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_java_debug_symbols}" >&5
47089 $as_echo "${enable_java_debug_symbols}" >&6; }
47090 
47091   if test "x${enable_java_debug_symbols}" = "xyes"; then
47092     JAVA_DEBUG_SYMBOLS=true
47093     JAVAC_FLAGS="$JAVAC_FLAGS -g"
47094   else
47095     JAVA_DEBUG_SYMBOLS=false
47096   fi
47097 
47098   # --enable-debug-symbols is deprecated.
47099   # Please use --with-debug-symbols=[internal,external,zipped] .
47100 
47101   # Check whether --enable-debug-symbols was given.
47102 if test "${enable_debug_symbols+set}" = set; then :
47103   enableval=$enable_debug_symbols;
47104 fi
47105 
47106   if test "x$enable_debug_symbols" != x; then
47107     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47108 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47109   fi
47110 
47111 
47112   # --enable-zip-debug-info is deprecated.
47113   # Please use --with-debug-symbols=zipped .
47114 
47115   # Check whether --enable-zip-debug-info was given.
47116 if test "${enable_zip_debug_info+set}" = set; then :
47117   enableval=$enable_zip_debug_info;
47118 fi
47119 
47120   if test "x$enable_zip_debug_info" != x; then
47121     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47122 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47123   fi
47124 
47125 
47126 
47127 
47128 
47129 
47130 
47131 
47132 
47133 
47134   # Check whether --enable-native-coverage was given.
47135 if test "${enable_native_coverage+set}" = set; then :
47136   enableval=$enable_native_coverage;
47137 fi
47138 
47139   GCOV_ENABLED="false"
47140   if test "x$enable_native_coverage" = "xyes"; then
47141     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47142       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47143 $as_echo_n "checking if native coverage is enabled... " >&6; }
47144       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47145 $as_echo "yes" >&6; }
47146       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47147       GCOV_LDFLAGS="-fprofile-arcs"
47148       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47149       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47150       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47151       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47152       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47153       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47154       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47155       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47156       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47157       GCOV_ENABLED="true"
47158     else
47159       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47160     fi
47161   elif test "x$enable_native_coverage" = "xno"; then
47162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47163 $as_echo_n "checking if native coverage is enabled... " >&6; }
47164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47165 $as_echo "no" >&6; }
47166   elif test "x$enable_native_coverage" != "x"; then
47167     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47168   fi
47169 
47170 
47171 
47172 
47173 ###############################################################################
47174 #
47175 # Check dependencies for external and internal libraries.
47176 #
47177 ###############################################################################
47178 
47179 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47180 
47181   # When using cygwin or msys, we need a wrapper binary that renames
47182   # /cygdrive/c/ arguments into c:/ arguments and peeks into
47183   # @files and rewrites these too! This wrapper binary is
47184   # called fixpath.
47185   FIXPATH=
47186   if test "x$OPENJDK_BUILD_OS" = xwindows; then
47187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47188 $as_echo_n "checking if fixpath can be created... " >&6; }
47189     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47190     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47191     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47192     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47193       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47194       FIXPATH="$FIXPATH_BIN -c"
47195     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47196       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47197       # @ was chosen as separator to minimize risk of other tools messing around with it
47198       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47199           | tr ' ' '\n' | grep '^/./' | sort | uniq`
47200       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47201       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47202     fi
47203     FIXPATH_SRC_W="$FIXPATH_SRC"
47204     FIXPATH_BIN_W="$FIXPATH_BIN"
47205 
47206   unix_path="$FIXPATH_SRC_W"
47207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47208     windows_path=`$CYGPATH -m "$unix_path"`
47209     FIXPATH_SRC_W="$windows_path"
47210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47211     windows_path=`cmd //c echo $unix_path`
47212     FIXPATH_SRC_W="$windows_path"
47213   fi
47214 
47215 
47216   unix_path="$FIXPATH_BIN_W"
47217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47218     windows_path=`$CYGPATH -m "$unix_path"`
47219     FIXPATH_BIN_W="$windows_path"
47220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47221     windows_path=`cmd //c echo $unix_path`
47222     FIXPATH_BIN_W="$windows_path"
47223   fi
47224 
47225     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47226     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47227     cd $FIXPATH_DIR
47228     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47229     cd $CURDIR
47230 
47231     if test ! -x $FIXPATH_BIN; then
47232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47233 $as_echo "no" >&6; }
47234       cat $FIXPATH_DIR/fixpath1.log
47235       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47236     fi
47237     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47238 $as_echo "yes" >&6; }
47239     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47240 $as_echo_n "checking if fixpath.exe works... " >&6; }
47241     cd $FIXPATH_DIR
47242     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47243         > $FIXPATH_DIR/fixpath2.log 2>&1
47244     cd $CURDIR
47245     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47247 $as_echo "no" >&6; }
47248       cat $FIXPATH_DIR/fixpath2.log
47249       as_fn_error $? "fixpath did not work!" "$LINENO" 5
47250     fi
47251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47252 $as_echo "yes" >&6; }
47253 
47254     FIXPATH_DETACH_FLAG="--detach"
47255   fi
47256 
47257 
47258 
47259 
47260 
47261 
47262   # Check if X11 is needed
47263   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47264     # No X11 support on windows or macosx
47265     NEEDS_LIB_X11=false
47266   else
47267     if test "x$SUPPORT_HEADFUL" = xno; then
47268       # No X11 support if building headless-only
47269       NEEDS_LIB_X11=false
47270     else
47271       # All other instances need X11
47272       NEEDS_LIB_X11=true
47273     fi
47274   fi
47275 
47276   # Check if cups is needed
47277   if test "x$OPENJDK_TARGET_OS" = xwindows; then
47278     # Windows have a separate print system
47279     NEEDS_LIB_CUPS=false
47280   else
47281     NEEDS_LIB_CUPS=true
47282   fi
47283 
47284   # Check if freetype is needed
47285   if test "x$OPENJDK" = "xtrue"; then
47286     NEEDS_LIB_FREETYPE=true
47287   else
47288     NEEDS_LIB_FREETYPE=false
47289   fi
47290 
47291   # Check if alsa is needed
47292   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47293     NEEDS_LIB_ALSA=true
47294   else
47295     NEEDS_LIB_ALSA=false
47296   fi
47297 
47298   # Check if ffi is needed
47299   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47300     NEEDS_LIB_FFI=true
47301   else
47302     NEEDS_LIB_FFI=false
47303   fi
47304 
47305 
47306   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47307   # dynamic build is configured on command line.
47308 
47309 # Check whether --with-stdc++lib was given.
47310 if test "${with_stdc__lib+set}" = set; then :
47311   withval=$with_stdc__lib;
47312         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47313                 && test "x$with_stdc__lib" != xdefault; then
47314           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47315         fi
47316 
47317 else
47318   with_stdc__lib=default
47319 
47320 fi
47321 
47322 
47323   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47324     # Test if -lstdc++ works.
47325     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47326 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47327     ac_ext=cpp
47328 ac_cpp='$CXXCPP $CPPFLAGS'
47329 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47330 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47331 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47332 
47333     OLD_CXXFLAGS="$CXXFLAGS"
47334     CXXFLAGS="$CXXFLAGS -lstdc++"
47335     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47336 /* end confdefs.h.  */
47337 
47338 int
47339 main ()
47340 {
47341 return 0;
47342   ;
47343   return 0;
47344 }
47345 _ACEOF
47346 if ac_fn_cxx_try_link "$LINENO"; then :
47347   has_dynamic_libstdcxx=yes
47348 else
47349   has_dynamic_libstdcxx=no
47350 fi
47351 rm -f core conftest.err conftest.$ac_objext \
47352     conftest$ac_exeext conftest.$ac_ext
47353     CXXFLAGS="$OLD_CXXFLAGS"
47354     ac_ext=cpp
47355 ac_cpp='$CXXCPP $CPPFLAGS'
47356 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47357 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47358 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47359 
47360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47361 $as_echo "$has_dynamic_libstdcxx" >&6; }
47362 
47363     # Test if stdc++ can be linked statically.
47364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47365 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47366     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47367     ac_ext=cpp
47368 ac_cpp='$CXXCPP $CPPFLAGS'
47369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47372 
47373     OLD_LIBS="$LIBS"
47374     OLD_CXX="$CXX"
47375     LIBS="$STATIC_STDCXX_FLAGS"
47376     CXX="$CC"
47377     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47378 /* end confdefs.h.  */
47379 
47380 int
47381 main ()
47382 {
47383 return 0;
47384   ;
47385   return 0;
47386 }
47387 _ACEOF
47388 if ac_fn_cxx_try_link "$LINENO"; then :
47389   has_static_libstdcxx=yes
47390 else
47391   has_static_libstdcxx=no
47392 fi
47393 rm -f core conftest.err conftest.$ac_objext \
47394     conftest$ac_exeext conftest.$ac_ext
47395     LIBS="$OLD_LIBS"
47396     CXX="$OLD_CXX"
47397     ac_ext=cpp
47398 ac_cpp='$CXXCPP $CPPFLAGS'
47399 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47400 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47401 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47402 
47403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47404 $as_echo "$has_static_libstdcxx" >&6; }
47405 
47406     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47407       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47408     fi
47409 
47410     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47411       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47412     fi
47413 
47414     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47415       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47416     fi
47417 
47418     # If dynamic was requested, it's available since it would fail above otherwise.
47419     # If dynamic wasn't requested, go with static unless it isn't available.
47420     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47421 $as_echo_n "checking how to link with libstdc++... " >&6; }
47422     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47423       LIBCXX="$LIBCXX -lstdc++"
47424       LDCXX="$CXX"
47425       STATIC_CXX_SETTING="STATIC_CXX=false"
47426       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47427 $as_echo "dynamic" >&6; }
47428     else
47429       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47430       LDCXX="$CC"
47431       STATIC_CXX_SETTING="STATIC_CXX=true"
47432       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47433 $as_echo "static" >&6; }
47434     fi
47435   fi
47436 
47437 
47438   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47439   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47440     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47441   fi
47442 
47443   # TODO better (platform agnostic) test
47444   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47445     LIBCXX="-lstdc++"
47446   fi
47447 
47448 
47449   # Setup Windows runtime dlls
47450   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47451 
47452 
47453 # Check whether --with-msvcr-dll was given.
47454 if test "${with_msvcr_dll+set}" = set; then :
47455   withval=$with_msvcr_dll;
47456 fi
47457 
47458 
47459   if test "x$with_msvcr_dll" != x; then
47460     # If given explicitely by user, do not probe. If not present, fail directly.
47461 
47462   DLL_NAME="$MSVCR_NAME"
47463   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47464   METHOD="--with-msvcr-dll"
47465   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47466     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47467 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47468 
47469     # Need to check if the found msvcr is correct architecture
47470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47471 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47472     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47473     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47474       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47475       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47476       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47477         CORRECT_MSVCR_ARCH="PE32 executable"
47478       else
47479         CORRECT_MSVCR_ARCH="PE32+ executable"
47480       fi
47481     else
47482       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47483         CORRECT_MSVCR_ARCH=386
47484       else
47485         CORRECT_MSVCR_ARCH=x86-64
47486       fi
47487     fi
47488     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47490 $as_echo "ok" >&6; }
47491       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47492 
47493   # Only process if variable expands to non-empty
47494 
47495   if test "x$MSVC_DLL" != x; then
47496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47497 
47498   # Input might be given as Windows format, start by converting to
47499   # unix format.
47500   path="$MSVC_DLL"
47501   new_path=`$CYGPATH -u "$path"`
47502 
47503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47506   # "foo.exe" is OK but "foo" is an error.
47507   #
47508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47509   # It is also a way to make sure we got the proper file name for the real test later on.
47510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47511   if test "x$test_shortpath" = x; then
47512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47513 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47514     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47515   fi
47516 
47517   # Call helper function which possibly converts this using DOS-style short mode.
47518   # If so, the updated path is stored in $new_path.
47519 
47520   input_path="$new_path"
47521   # Check if we need to convert this using DOS-style short mode. If the path
47522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47523   # take no chances and rewrite it.
47524   # Note: m4 eats our [], so we need to use [ and ] instead.
47525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47526   if test "x$has_forbidden_chars" != x; then
47527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47531       # Going to short mode and back again did indeed matter. Since short mode is
47532       # case insensitive, let's make it lowercase to improve readability.
47533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47534       # Now convert it back to Unix-style (cygpath)
47535       input_path=`$CYGPATH -u "$shortmode_path"`
47536       new_path="$input_path"
47537     fi
47538   fi
47539 
47540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47541   if test "x$test_cygdrive_prefix" = x; then
47542     # As a simple fix, exclude /usr/bin since it's not a real path.
47543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47545       # a path prefixed by /cygdrive for fixpath to work.
47546       new_path="$CYGWIN_ROOT_PATH$input_path"
47547     fi
47548   fi
47549 
47550 
47551   if test "x$path" != "x$new_path"; then
47552     MSVC_DLL="$new_path"
47553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47554 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47555   fi
47556 
47557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47558 
47559   path="$MSVC_DLL"
47560   has_colon=`$ECHO $path | $GREP ^.:`
47561   new_path="$path"
47562   if test "x$has_colon" = x; then
47563     # Not in mixed or Windows style, start by that.
47564     new_path=`cmd //c echo $path`
47565   fi
47566 
47567 
47568   input_path="$new_path"
47569   # Check if we need to convert this using DOS-style short mode. If the path
47570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47571   # take no chances and rewrite it.
47572   # Note: m4 eats our [], so we need to use [ and ] instead.
47573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47574   if test "x$has_forbidden_chars" != x; then
47575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47577   fi
47578 
47579 
47580   windows_path="$new_path"
47581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47582     unix_path=`$CYGPATH -u "$windows_path"`
47583     new_path="$unix_path"
47584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47586     new_path="$unix_path"
47587   fi
47588 
47589   if test "x$path" != "x$new_path"; then
47590     MSVC_DLL="$new_path"
47591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47592 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47593   fi
47594 
47595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47597 
47598     else
47599       # We're on a unix platform. Hooray! :)
47600       path="$MSVC_DLL"
47601       has_space=`$ECHO "$path" | $GREP " "`
47602       if test "x$has_space" != x; then
47603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47604 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47605         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47606       fi
47607 
47608       # Use eval to expand a potential ~
47609       eval path="$path"
47610       if test ! -f "$path" && test ! -d "$path"; then
47611         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47612       fi
47613 
47614       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47615     fi
47616   fi
47617 
47618       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47619 $as_echo_n "checking for $DLL_NAME... " >&6; }
47620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47621 $as_echo "$MSVC_DLL" >&6; }
47622     else
47623       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47624 $as_echo "incorrect, ignoring" >&6; }
47625       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47626 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47627     fi
47628   fi
47629 
47630     if test "x$MSVC_DLL" = x; then
47631       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47632     fi
47633     MSVCR_DLL="$MSVC_DLL"
47634   elif test "x$DEVKIT_MSVCR_DLL" != x; then
47635 
47636   DLL_NAME="$MSVCR_NAME"
47637   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47638   METHOD="devkit"
47639   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47640     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47641 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47642 
47643     # Need to check if the found msvcr is correct architecture
47644     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47645 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47646     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47647     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47648       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47649       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47650       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47651         CORRECT_MSVCR_ARCH="PE32 executable"
47652       else
47653         CORRECT_MSVCR_ARCH="PE32+ executable"
47654       fi
47655     else
47656       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47657         CORRECT_MSVCR_ARCH=386
47658       else
47659         CORRECT_MSVCR_ARCH=x86-64
47660       fi
47661     fi
47662     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47663       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47664 $as_echo "ok" >&6; }
47665       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47666 
47667   # Only process if variable expands to non-empty
47668 
47669   if test "x$MSVC_DLL" != x; then
47670     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47671 
47672   # Input might be given as Windows format, start by converting to
47673   # unix format.
47674   path="$MSVC_DLL"
47675   new_path=`$CYGPATH -u "$path"`
47676 
47677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47680   # "foo.exe" is OK but "foo" is an error.
47681   #
47682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47683   # It is also a way to make sure we got the proper file name for the real test later on.
47684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47685   if test "x$test_shortpath" = x; then
47686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47687 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47688     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47689   fi
47690 
47691   # Call helper function which possibly converts this using DOS-style short mode.
47692   # If so, the updated path is stored in $new_path.
47693 
47694   input_path="$new_path"
47695   # Check if we need to convert this using DOS-style short mode. If the path
47696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47697   # take no chances and rewrite it.
47698   # Note: m4 eats our [], so we need to use [ and ] instead.
47699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47700   if test "x$has_forbidden_chars" != x; then
47701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47705       # Going to short mode and back again did indeed matter. Since short mode is
47706       # case insensitive, let's make it lowercase to improve readability.
47707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47708       # Now convert it back to Unix-style (cygpath)
47709       input_path=`$CYGPATH -u "$shortmode_path"`
47710       new_path="$input_path"
47711     fi
47712   fi
47713 
47714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47715   if test "x$test_cygdrive_prefix" = x; then
47716     # As a simple fix, exclude /usr/bin since it's not a real path.
47717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47719       # a path prefixed by /cygdrive for fixpath to work.
47720       new_path="$CYGWIN_ROOT_PATH$input_path"
47721     fi
47722   fi
47723 
47724 
47725   if test "x$path" != "x$new_path"; then
47726     MSVC_DLL="$new_path"
47727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47728 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47729   fi
47730 
47731     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47732 
47733   path="$MSVC_DLL"
47734   has_colon=`$ECHO $path | $GREP ^.:`
47735   new_path="$path"
47736   if test "x$has_colon" = x; then
47737     # Not in mixed or Windows style, start by that.
47738     new_path=`cmd //c echo $path`
47739   fi
47740 
47741 
47742   input_path="$new_path"
47743   # Check if we need to convert this using DOS-style short mode. If the path
47744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47745   # take no chances and rewrite it.
47746   # Note: m4 eats our [], so we need to use [ and ] instead.
47747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47748   if test "x$has_forbidden_chars" != x; then
47749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47751   fi
47752 
47753 
47754   windows_path="$new_path"
47755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47756     unix_path=`$CYGPATH -u "$windows_path"`
47757     new_path="$unix_path"
47758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47760     new_path="$unix_path"
47761   fi
47762 
47763   if test "x$path" != "x$new_path"; then
47764     MSVC_DLL="$new_path"
47765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47766 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47767   fi
47768 
47769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47771 
47772     else
47773       # We're on a unix platform. Hooray! :)
47774       path="$MSVC_DLL"
47775       has_space=`$ECHO "$path" | $GREP " "`
47776       if test "x$has_space" != x; then
47777         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47778 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47779         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47780       fi
47781 
47782       # Use eval to expand a potential ~
47783       eval path="$path"
47784       if test ! -f "$path" && test ! -d "$path"; then
47785         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47786       fi
47787 
47788       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47789     fi
47790   fi
47791 
47792       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47793 $as_echo_n "checking for $DLL_NAME... " >&6; }
47794       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47795 $as_echo "$MSVC_DLL" >&6; }
47796     else
47797       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47798 $as_echo "incorrect, ignoring" >&6; }
47799       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47800 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47801     fi
47802   fi
47803 
47804     if test "x$MSVC_DLL" = x; then
47805       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
47806     fi
47807     MSVCR_DLL="$MSVC_DLL"
47808   else
47809 
47810   DLL_NAME="${MSVCR_NAME}"
47811   MSVC_DLL=
47812 
47813   if test "x$MSVC_DLL" = x; then
47814     # Probe: Using well-known location from Visual Studio 10.0
47815     if test "x$VCINSTALLDIR" != x; then
47816       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47817 
47818   windows_path="$CYGWIN_VC_INSTALL_DIR"
47819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47820     unix_path=`$CYGPATH -u "$windows_path"`
47821     CYGWIN_VC_INSTALL_DIR="$unix_path"
47822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47824     CYGWIN_VC_INSTALL_DIR="$unix_path"
47825   fi
47826 
47827       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47828         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47829       else
47830         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47831       fi
47832       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47833 
47834   DLL_NAME="$DLL_NAME"
47835   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47836   METHOD="well-known location in VCINSTALLDIR"
47837   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47838     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47839 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47840 
47841     # Need to check if the found msvcr is correct architecture
47842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47843 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47844     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47846       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47847       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47848       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47849         CORRECT_MSVCR_ARCH="PE32 executable"
47850       else
47851         CORRECT_MSVCR_ARCH="PE32+ executable"
47852       fi
47853     else
47854       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47855         CORRECT_MSVCR_ARCH=386
47856       else
47857         CORRECT_MSVCR_ARCH=x86-64
47858       fi
47859     fi
47860     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47861       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47862 $as_echo "ok" >&6; }
47863       MSVC_DLL="$POSSIBLE_MSVC_DLL"
47864 
47865   # Only process if variable expands to non-empty
47866 
47867   if test "x$MSVC_DLL" != x; then
47868     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47869 
47870   # Input might be given as Windows format, start by converting to
47871   # unix format.
47872   path="$MSVC_DLL"
47873   new_path=`$CYGPATH -u "$path"`
47874 
47875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47878   # "foo.exe" is OK but "foo" is an error.
47879   #
47880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47881   # It is also a way to make sure we got the proper file name for the real test later on.
47882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47883   if test "x$test_shortpath" = x; then
47884     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47885 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47886     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47887   fi
47888 
47889   # Call helper function which possibly converts this using DOS-style short mode.
47890   # If so, the updated path is stored in $new_path.
47891 
47892   input_path="$new_path"
47893   # Check if we need to convert this using DOS-style short mode. If the path
47894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47895   # take no chances and rewrite it.
47896   # Note: m4 eats our [], so we need to use [ and ] instead.
47897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47898   if test "x$has_forbidden_chars" != x; then
47899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47900     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47901     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47902     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47903       # Going to short mode and back again did indeed matter. Since short mode is
47904       # case insensitive, let's make it lowercase to improve readability.
47905       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47906       # Now convert it back to Unix-style (cygpath)
47907       input_path=`$CYGPATH -u "$shortmode_path"`
47908       new_path="$input_path"
47909     fi
47910   fi
47911 
47912   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47913   if test "x$test_cygdrive_prefix" = x; then
47914     # As a simple fix, exclude /usr/bin since it's not a real path.
47915     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47916       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47917       # a path prefixed by /cygdrive for fixpath to work.
47918       new_path="$CYGWIN_ROOT_PATH$input_path"
47919     fi
47920   fi
47921 
47922 
47923   if test "x$path" != "x$new_path"; then
47924     MSVC_DLL="$new_path"
47925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47926 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47927   fi
47928 
47929     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47930 
47931   path="$MSVC_DLL"
47932   has_colon=`$ECHO $path | $GREP ^.:`
47933   new_path="$path"
47934   if test "x$has_colon" = x; then
47935     # Not in mixed or Windows style, start by that.
47936     new_path=`cmd //c echo $path`
47937   fi
47938 
47939 
47940   input_path="$new_path"
47941   # Check if we need to convert this using DOS-style short mode. If the path
47942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47943   # take no chances and rewrite it.
47944   # Note: m4 eats our [], so we need to use [ and ] instead.
47945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47946   if test "x$has_forbidden_chars" != x; then
47947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47949   fi
47950 
47951 
47952   windows_path="$new_path"
47953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47954     unix_path=`$CYGPATH -u "$windows_path"`
47955     new_path="$unix_path"
47956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47958     new_path="$unix_path"
47959   fi
47960 
47961   if test "x$path" != "x$new_path"; then
47962     MSVC_DLL="$new_path"
47963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47964 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47965   fi
47966 
47967   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47968   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47969 
47970     else
47971       # We're on a unix platform. Hooray! :)
47972       path="$MSVC_DLL"
47973       has_space=`$ECHO "$path" | $GREP " "`
47974       if test "x$has_space" != x; then
47975         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47976 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47977         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47978       fi
47979 
47980       # Use eval to expand a potential ~
47981       eval path="$path"
47982       if test ! -f "$path" && test ! -d "$path"; then
47983         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47984       fi
47985 
47986       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47987     fi
47988   fi
47989 
47990       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47991 $as_echo_n "checking for $DLL_NAME... " >&6; }
47992       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47993 $as_echo "$MSVC_DLL" >&6; }
47994     else
47995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47996 $as_echo "incorrect, ignoring" >&6; }
47997       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47998 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47999     fi
48000   fi
48001 
48002     fi
48003   fi
48004 
48005   if test "x$MSVC_DLL" = x; then
48006     # Probe: Check in the Boot JDK directory.
48007     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48008 
48009   DLL_NAME="$DLL_NAME"
48010   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48011   METHOD="well-known location in Boot JDK"
48012   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48013     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48014 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48015 
48016     # Need to check if the found msvcr is correct architecture
48017     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48018 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48019     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48020     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48021       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48022       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48023       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48024         CORRECT_MSVCR_ARCH="PE32 executable"
48025       else
48026         CORRECT_MSVCR_ARCH="PE32+ executable"
48027       fi
48028     else
48029       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48030         CORRECT_MSVCR_ARCH=386
48031       else
48032         CORRECT_MSVCR_ARCH=x86-64
48033       fi
48034     fi
48035     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48037 $as_echo "ok" >&6; }
48038       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48039 
48040   # Only process if variable expands to non-empty
48041 
48042   if test "x$MSVC_DLL" != x; then
48043     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48044 
48045   # Input might be given as Windows format, start by converting to
48046   # unix format.
48047   path="$MSVC_DLL"
48048   new_path=`$CYGPATH -u "$path"`
48049 
48050   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48051   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48052   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48053   # "foo.exe" is OK but "foo" is an error.
48054   #
48055   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48056   # It is also a way to make sure we got the proper file name for the real test later on.
48057   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48058   if test "x$test_shortpath" = x; then
48059     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48060 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48061     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48062   fi
48063 
48064   # Call helper function which possibly converts this using DOS-style short mode.
48065   # If so, the updated path is stored in $new_path.
48066 
48067   input_path="$new_path"
48068   # Check if we need to convert this using DOS-style short mode. If the path
48069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48070   # take no chances and rewrite it.
48071   # Note: m4 eats our [], so we need to use [ and ] instead.
48072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48073   if test "x$has_forbidden_chars" != x; then
48074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48075     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48076     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48077     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48078       # Going to short mode and back again did indeed matter. Since short mode is
48079       # case insensitive, let's make it lowercase to improve readability.
48080       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48081       # Now convert it back to Unix-style (cygpath)
48082       input_path=`$CYGPATH -u "$shortmode_path"`
48083       new_path="$input_path"
48084     fi
48085   fi
48086 
48087   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48088   if test "x$test_cygdrive_prefix" = x; then
48089     # As a simple fix, exclude /usr/bin since it's not a real path.
48090     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48091       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48092       # a path prefixed by /cygdrive for fixpath to work.
48093       new_path="$CYGWIN_ROOT_PATH$input_path"
48094     fi
48095   fi
48096 
48097 
48098   if test "x$path" != "x$new_path"; then
48099     MSVC_DLL="$new_path"
48100     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48101 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48102   fi
48103 
48104     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48105 
48106   path="$MSVC_DLL"
48107   has_colon=`$ECHO $path | $GREP ^.:`
48108   new_path="$path"
48109   if test "x$has_colon" = x; then
48110     # Not in mixed or Windows style, start by that.
48111     new_path=`cmd //c echo $path`
48112   fi
48113 
48114 
48115   input_path="$new_path"
48116   # Check if we need to convert this using DOS-style short mode. If the path
48117   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48118   # take no chances and rewrite it.
48119   # Note: m4 eats our [], so we need to use [ and ] instead.
48120   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48121   if test "x$has_forbidden_chars" != x; then
48122     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48123     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48124   fi
48125 
48126 
48127   windows_path="$new_path"
48128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48129     unix_path=`$CYGPATH -u "$windows_path"`
48130     new_path="$unix_path"
48131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48133     new_path="$unix_path"
48134   fi
48135 
48136   if test "x$path" != "x$new_path"; then
48137     MSVC_DLL="$new_path"
48138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48139 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48140   fi
48141 
48142   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48143   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48144 
48145     else
48146       # We're on a unix platform. Hooray! :)
48147       path="$MSVC_DLL"
48148       has_space=`$ECHO "$path" | $GREP " "`
48149       if test "x$has_space" != x; then
48150         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48151 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48152         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48153       fi
48154 
48155       # Use eval to expand a potential ~
48156       eval path="$path"
48157       if test ! -f "$path" && test ! -d "$path"; then
48158         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48159       fi
48160 
48161       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48162     fi
48163   fi
48164 
48165       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48166 $as_echo_n "checking for $DLL_NAME... " >&6; }
48167       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48168 $as_echo "$MSVC_DLL" >&6; }
48169     else
48170       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48171 $as_echo "incorrect, ignoring" >&6; }
48172       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48173 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48174     fi
48175   fi
48176 
48177   fi
48178 
48179   if test "x$MSVC_DLL" = x; then
48180     # Probe: Look in the Windows system32 directory
48181     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48182 
48183   windows_path="$CYGWIN_SYSTEMROOT"
48184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48185     unix_path=`$CYGPATH -u "$windows_path"`
48186     CYGWIN_SYSTEMROOT="$unix_path"
48187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48188     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48189     CYGWIN_SYSTEMROOT="$unix_path"
48190   fi
48191 
48192     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48193 
48194   DLL_NAME="$DLL_NAME"
48195   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48196   METHOD="well-known location in SYSTEMROOT"
48197   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48198     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48199 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48200 
48201     # Need to check if the found msvcr is correct architecture
48202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48203 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48204     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48205     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48206       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48207       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48208       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48209         CORRECT_MSVCR_ARCH="PE32 executable"
48210       else
48211         CORRECT_MSVCR_ARCH="PE32+ executable"
48212       fi
48213     else
48214       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48215         CORRECT_MSVCR_ARCH=386
48216       else
48217         CORRECT_MSVCR_ARCH=x86-64
48218       fi
48219     fi
48220     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48221       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48222 $as_echo "ok" >&6; }
48223       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48224 
48225   # Only process if variable expands to non-empty
48226 
48227   if test "x$MSVC_DLL" != x; then
48228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48229 
48230   # Input might be given as Windows format, start by converting to
48231   # unix format.
48232   path="$MSVC_DLL"
48233   new_path=`$CYGPATH -u "$path"`
48234 
48235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48238   # "foo.exe" is OK but "foo" is an error.
48239   #
48240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48241   # It is also a way to make sure we got the proper file name for the real test later on.
48242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48243   if test "x$test_shortpath" = x; then
48244     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48245 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48246     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48247   fi
48248 
48249   # Call helper function which possibly converts this using DOS-style short mode.
48250   # If so, the updated path is stored in $new_path.
48251 
48252   input_path="$new_path"
48253   # Check if we need to convert this using DOS-style short mode. If the path
48254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48255   # take no chances and rewrite it.
48256   # Note: m4 eats our [], so we need to use [ and ] instead.
48257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48258   if test "x$has_forbidden_chars" != x; then
48259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48263       # Going to short mode and back again did indeed matter. Since short mode is
48264       # case insensitive, let's make it lowercase to improve readability.
48265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48266       # Now convert it back to Unix-style (cygpath)
48267       input_path=`$CYGPATH -u "$shortmode_path"`
48268       new_path="$input_path"
48269     fi
48270   fi
48271 
48272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48273   if test "x$test_cygdrive_prefix" = x; then
48274     # As a simple fix, exclude /usr/bin since it's not a real path.
48275     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48277       # a path prefixed by /cygdrive for fixpath to work.
48278       new_path="$CYGWIN_ROOT_PATH$input_path"
48279     fi
48280   fi
48281 
48282 
48283   if test "x$path" != "x$new_path"; then
48284     MSVC_DLL="$new_path"
48285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48286 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48287   fi
48288 
48289     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48290 
48291   path="$MSVC_DLL"
48292   has_colon=`$ECHO $path | $GREP ^.:`
48293   new_path="$path"
48294   if test "x$has_colon" = x; then
48295     # Not in mixed or Windows style, start by that.
48296     new_path=`cmd //c echo $path`
48297   fi
48298 
48299 
48300   input_path="$new_path"
48301   # Check if we need to convert this using DOS-style short mode. If the path
48302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48303   # take no chances and rewrite it.
48304   # Note: m4 eats our [], so we need to use [ and ] instead.
48305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48306   if test "x$has_forbidden_chars" != x; then
48307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48308     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48309   fi
48310 
48311 
48312   windows_path="$new_path"
48313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48314     unix_path=`$CYGPATH -u "$windows_path"`
48315     new_path="$unix_path"
48316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48318     new_path="$unix_path"
48319   fi
48320 
48321   if test "x$path" != "x$new_path"; then
48322     MSVC_DLL="$new_path"
48323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48324 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48325   fi
48326 
48327   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48328   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48329 
48330     else
48331       # We're on a unix platform. Hooray! :)
48332       path="$MSVC_DLL"
48333       has_space=`$ECHO "$path" | $GREP " "`
48334       if test "x$has_space" != x; then
48335         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48336 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48337         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48338       fi
48339 
48340       # Use eval to expand a potential ~
48341       eval path="$path"
48342       if test ! -f "$path" && test ! -d "$path"; then
48343         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48344       fi
48345 
48346       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48347     fi
48348   fi
48349 
48350       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48351 $as_echo_n "checking for $DLL_NAME... " >&6; }
48352       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48353 $as_echo "$MSVC_DLL" >&6; }
48354     else
48355       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48356 $as_echo "incorrect, ignoring" >&6; }
48357       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48358 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48359     fi
48360   fi
48361 
48362   fi
48363 
48364   if test "x$MSVC_DLL" = x; then
48365     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48366     if test "x$VS100COMNTOOLS" != x; then
48367       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48368 
48369   windows_path="$CYGWIN_VS_TOOLS_DIR"
48370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48371     unix_path=`$CYGPATH -u "$windows_path"`
48372     CYGWIN_VS_TOOLS_DIR="$unix_path"
48373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48375     CYGWIN_VS_TOOLS_DIR="$unix_path"
48376   fi
48377 
48378       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48379         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48380             | $GREP -i /x64/ | $HEAD --lines 1`
48381       else
48382         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48383             | $GREP -i /x86/ | $HEAD --lines 1`
48384       fi
48385 
48386   DLL_NAME="$DLL_NAME"
48387   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48388   METHOD="search of VS100COMNTOOLS"
48389   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48390     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48391 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48392 
48393     # Need to check if the found msvcr is correct architecture
48394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48395 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48396     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48397     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48398       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48399       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48400       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48401         CORRECT_MSVCR_ARCH="PE32 executable"
48402       else
48403         CORRECT_MSVCR_ARCH="PE32+ executable"
48404       fi
48405     else
48406       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48407         CORRECT_MSVCR_ARCH=386
48408       else
48409         CORRECT_MSVCR_ARCH=x86-64
48410       fi
48411     fi
48412     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48413       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48414 $as_echo "ok" >&6; }
48415       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48416 
48417   # Only process if variable expands to non-empty
48418 
48419   if test "x$MSVC_DLL" != x; then
48420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48421 
48422   # Input might be given as Windows format, start by converting to
48423   # unix format.
48424   path="$MSVC_DLL"
48425   new_path=`$CYGPATH -u "$path"`
48426 
48427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48430   # "foo.exe" is OK but "foo" is an error.
48431   #
48432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48433   # It is also a way to make sure we got the proper file name for the real test later on.
48434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48435   if test "x$test_shortpath" = x; then
48436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48437 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48438     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48439   fi
48440 
48441   # Call helper function which possibly converts this using DOS-style short mode.
48442   # If so, the updated path is stored in $new_path.
48443 
48444   input_path="$new_path"
48445   # Check if we need to convert this using DOS-style short mode. If the path
48446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48447   # take no chances and rewrite it.
48448   # Note: m4 eats our [], so we need to use [ and ] instead.
48449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48450   if test "x$has_forbidden_chars" != x; then
48451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48455       # Going to short mode and back again did indeed matter. Since short mode is
48456       # case insensitive, let's make it lowercase to improve readability.
48457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48458       # Now convert it back to Unix-style (cygpath)
48459       input_path=`$CYGPATH -u "$shortmode_path"`
48460       new_path="$input_path"
48461     fi
48462   fi
48463 
48464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48465   if test "x$test_cygdrive_prefix" = x; then
48466     # As a simple fix, exclude /usr/bin since it's not a real path.
48467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48469       # a path prefixed by /cygdrive for fixpath to work.
48470       new_path="$CYGWIN_ROOT_PATH$input_path"
48471     fi
48472   fi
48473 
48474 
48475   if test "x$path" != "x$new_path"; then
48476     MSVC_DLL="$new_path"
48477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48478 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48479   fi
48480 
48481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48482 
48483   path="$MSVC_DLL"
48484   has_colon=`$ECHO $path | $GREP ^.:`
48485   new_path="$path"
48486   if test "x$has_colon" = x; then
48487     # Not in mixed or Windows style, start by that.
48488     new_path=`cmd //c echo $path`
48489   fi
48490 
48491 
48492   input_path="$new_path"
48493   # Check if we need to convert this using DOS-style short mode. If the path
48494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48495   # take no chances and rewrite it.
48496   # Note: m4 eats our [], so we need to use [ and ] instead.
48497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48498   if test "x$has_forbidden_chars" != x; then
48499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48501   fi
48502 
48503 
48504   windows_path="$new_path"
48505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48506     unix_path=`$CYGPATH -u "$windows_path"`
48507     new_path="$unix_path"
48508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48510     new_path="$unix_path"
48511   fi
48512 
48513   if test "x$path" != "x$new_path"; then
48514     MSVC_DLL="$new_path"
48515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48516 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48517   fi
48518 
48519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48521 
48522     else
48523       # We're on a unix platform. Hooray! :)
48524       path="$MSVC_DLL"
48525       has_space=`$ECHO "$path" | $GREP " "`
48526       if test "x$has_space" != x; then
48527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48528 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48529         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48530       fi
48531 
48532       # Use eval to expand a potential ~
48533       eval path="$path"
48534       if test ! -f "$path" && test ! -d "$path"; then
48535         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48536       fi
48537 
48538       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48539     fi
48540   fi
48541 
48542       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48543 $as_echo_n "checking for $DLL_NAME... " >&6; }
48544       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48545 $as_echo "$MSVC_DLL" >&6; }
48546     else
48547       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48548 $as_echo "incorrect, ignoring" >&6; }
48549       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48550 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48551     fi
48552   fi
48553 
48554     fi
48555   fi
48556 
48557   if test "x$MSVC_DLL" = x; then
48558     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48559     # (This was the original behaviour; kept since it might turn something up)
48560     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48561       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48562         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48563             | $GREP x64 | $HEAD --lines 1`
48564       else
48565         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48566             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48567         if test "x$POSSIBLE_MSVC_DLL" = x; then
48568           # We're grasping at straws now...
48569           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48570               | $HEAD --lines 1`
48571         fi
48572       fi
48573 
48574 
48575   DLL_NAME="$DLL_NAME"
48576   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48577   METHOD="search of VCINSTALLDIR"
48578   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48579     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48580 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48581 
48582     # Need to check if the found msvcr is correct architecture
48583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48584 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48585     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48586     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48587       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48588       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48589       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48590         CORRECT_MSVCR_ARCH="PE32 executable"
48591       else
48592         CORRECT_MSVCR_ARCH="PE32+ executable"
48593       fi
48594     else
48595       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48596         CORRECT_MSVCR_ARCH=386
48597       else
48598         CORRECT_MSVCR_ARCH=x86-64
48599       fi
48600     fi
48601     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48602       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48603 $as_echo "ok" >&6; }
48604       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48605 
48606   # Only process if variable expands to non-empty
48607 
48608   if test "x$MSVC_DLL" != x; then
48609     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48610 
48611   # Input might be given as Windows format, start by converting to
48612   # unix format.
48613   path="$MSVC_DLL"
48614   new_path=`$CYGPATH -u "$path"`
48615 
48616   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48617   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48618   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48619   # "foo.exe" is OK but "foo" is an error.
48620   #
48621   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48622   # It is also a way to make sure we got the proper file name for the real test later on.
48623   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48624   if test "x$test_shortpath" = x; then
48625     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48626 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48627     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48628   fi
48629 
48630   # Call helper function which possibly converts this using DOS-style short mode.
48631   # If so, the updated path is stored in $new_path.
48632 
48633   input_path="$new_path"
48634   # Check if we need to convert this using DOS-style short mode. If the path
48635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48636   # take no chances and rewrite it.
48637   # Note: m4 eats our [], so we need to use [ and ] instead.
48638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48639   if test "x$has_forbidden_chars" != x; then
48640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48641     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48642     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48643     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48644       # Going to short mode and back again did indeed matter. Since short mode is
48645       # case insensitive, let's make it lowercase to improve readability.
48646       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48647       # Now convert it back to Unix-style (cygpath)
48648       input_path=`$CYGPATH -u "$shortmode_path"`
48649       new_path="$input_path"
48650     fi
48651   fi
48652 
48653   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48654   if test "x$test_cygdrive_prefix" = x; then
48655     # As a simple fix, exclude /usr/bin since it's not a real path.
48656     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48657       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48658       # a path prefixed by /cygdrive for fixpath to work.
48659       new_path="$CYGWIN_ROOT_PATH$input_path"
48660     fi
48661   fi
48662 
48663 
48664   if test "x$path" != "x$new_path"; then
48665     MSVC_DLL="$new_path"
48666     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48667 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48668   fi
48669 
48670     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48671 
48672   path="$MSVC_DLL"
48673   has_colon=`$ECHO $path | $GREP ^.:`
48674   new_path="$path"
48675   if test "x$has_colon" = x; then
48676     # Not in mixed or Windows style, start by that.
48677     new_path=`cmd //c echo $path`
48678   fi
48679 
48680 
48681   input_path="$new_path"
48682   # Check if we need to convert this using DOS-style short mode. If the path
48683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48684   # take no chances and rewrite it.
48685   # Note: m4 eats our [], so we need to use [ and ] instead.
48686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48687   if test "x$has_forbidden_chars" != x; then
48688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48689     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48690   fi
48691 
48692 
48693   windows_path="$new_path"
48694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48695     unix_path=`$CYGPATH -u "$windows_path"`
48696     new_path="$unix_path"
48697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48699     new_path="$unix_path"
48700   fi
48701 
48702   if test "x$path" != "x$new_path"; then
48703     MSVC_DLL="$new_path"
48704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48705 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48706   fi
48707 
48708   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48709   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48710 
48711     else
48712       # We're on a unix platform. Hooray! :)
48713       path="$MSVC_DLL"
48714       has_space=`$ECHO "$path" | $GREP " "`
48715       if test "x$has_space" != x; then
48716         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48717 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48718         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48719       fi
48720 
48721       # Use eval to expand a potential ~
48722       eval path="$path"
48723       if test ! -f "$path" && test ! -d "$path"; then
48724         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48725       fi
48726 
48727       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48728     fi
48729   fi
48730 
48731       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48732 $as_echo_n "checking for $DLL_NAME... " >&6; }
48733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48734 $as_echo "$MSVC_DLL" >&6; }
48735     else
48736       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48737 $as_echo "incorrect, ignoring" >&6; }
48738       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48739 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48740     fi
48741   fi
48742 
48743     fi
48744   fi
48745 
48746   if test "x$MSVC_DLL" = x; then
48747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48748 $as_echo_n "checking for $DLL_NAME... " >&6; }
48749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48750 $as_echo "no" >&6; }
48751     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48752   fi
48753 
48754     MSVCR_DLL="$MSVC_DLL"
48755   fi
48756 
48757 
48758 
48759 # Check whether --with-msvcp-dll was given.
48760 if test "${with_msvcp_dll+set}" = set; then :
48761   withval=$with_msvcp_dll;
48762 fi
48763 
48764 
48765   if test "x$MSVCP_NAME" != "x"; then
48766     if test "x$with_msvcp_dll" != x; then
48767       # If given explicitely by user, do not probe. If not present, fail directly.
48768 
48769   DLL_NAME="$MSVCP_NAME"
48770   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
48771   METHOD="--with-msvcp-dll"
48772   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48773     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48774 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48775 
48776     # Need to check if the found msvcr is correct architecture
48777     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48778 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48779     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48781       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48782       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48783       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48784         CORRECT_MSVCR_ARCH="PE32 executable"
48785       else
48786         CORRECT_MSVCR_ARCH="PE32+ executable"
48787       fi
48788     else
48789       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48790         CORRECT_MSVCR_ARCH=386
48791       else
48792         CORRECT_MSVCR_ARCH=x86-64
48793       fi
48794     fi
48795     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48796       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48797 $as_echo "ok" >&6; }
48798       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48799 
48800   # Only process if variable expands to non-empty
48801 
48802   if test "x$MSVC_DLL" != x; then
48803     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48804 
48805   # Input might be given as Windows format, start by converting to
48806   # unix format.
48807   path="$MSVC_DLL"
48808   new_path=`$CYGPATH -u "$path"`
48809 
48810   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48811   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48812   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48813   # "foo.exe" is OK but "foo" is an error.
48814   #
48815   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48816   # It is also a way to make sure we got the proper file name for the real test later on.
48817   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48818   if test "x$test_shortpath" = x; then
48819     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48820 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48821     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48822   fi
48823 
48824   # Call helper function which possibly converts this using DOS-style short mode.
48825   # If so, the updated path is stored in $new_path.
48826 
48827   input_path="$new_path"
48828   # Check if we need to convert this using DOS-style short mode. If the path
48829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48830   # take no chances and rewrite it.
48831   # Note: m4 eats our [], so we need to use [ and ] instead.
48832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48833   if test "x$has_forbidden_chars" != x; then
48834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48835     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48836     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48837     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48838       # Going to short mode and back again did indeed matter. Since short mode is
48839       # case insensitive, let's make it lowercase to improve readability.
48840       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48841       # Now convert it back to Unix-style (cygpath)
48842       input_path=`$CYGPATH -u "$shortmode_path"`
48843       new_path="$input_path"
48844     fi
48845   fi
48846 
48847   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48848   if test "x$test_cygdrive_prefix" = x; then
48849     # As a simple fix, exclude /usr/bin since it's not a real path.
48850     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48851       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48852       # a path prefixed by /cygdrive for fixpath to work.
48853       new_path="$CYGWIN_ROOT_PATH$input_path"
48854     fi
48855   fi
48856 
48857 
48858   if test "x$path" != "x$new_path"; then
48859     MSVC_DLL="$new_path"
48860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48861 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48862   fi
48863 
48864     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48865 
48866   path="$MSVC_DLL"
48867   has_colon=`$ECHO $path | $GREP ^.:`
48868   new_path="$path"
48869   if test "x$has_colon" = x; then
48870     # Not in mixed or Windows style, start by that.
48871     new_path=`cmd //c echo $path`
48872   fi
48873 
48874 
48875   input_path="$new_path"
48876   # Check if we need to convert this using DOS-style short mode. If the path
48877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48878   # take no chances and rewrite it.
48879   # Note: m4 eats our [], so we need to use [ and ] instead.
48880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48881   if test "x$has_forbidden_chars" != x; then
48882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48883     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48884   fi
48885 
48886 
48887   windows_path="$new_path"
48888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48889     unix_path=`$CYGPATH -u "$windows_path"`
48890     new_path="$unix_path"
48891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48893     new_path="$unix_path"
48894   fi
48895 
48896   if test "x$path" != "x$new_path"; then
48897     MSVC_DLL="$new_path"
48898     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48899 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48900   fi
48901 
48902   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48903   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48904 
48905     else
48906       # We're on a unix platform. Hooray! :)
48907       path="$MSVC_DLL"
48908       has_space=`$ECHO "$path" | $GREP " "`
48909       if test "x$has_space" != x; then
48910         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48911 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48912         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48913       fi
48914 
48915       # Use eval to expand a potential ~
48916       eval path="$path"
48917       if test ! -f "$path" && test ! -d "$path"; then
48918         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48919       fi
48920 
48921       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48922     fi
48923   fi
48924 
48925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48926 $as_echo_n "checking for $DLL_NAME... " >&6; }
48927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48928 $as_echo "$MSVC_DLL" >&6; }
48929     else
48930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48931 $as_echo "incorrect, ignoring" >&6; }
48932       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48933 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48934     fi
48935   fi
48936 
48937       if test "x$MSVC_DLL" = x; then
48938         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
48939       fi
48940       MSVCP_DLL="$MSVC_DLL"
48941     elif test "x$DEVKIT_MSVCP_DLL" != x; then
48942 
48943   DLL_NAME="$MSVCP_NAME"
48944   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
48945   METHOD="devkit"
48946   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48947     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48948 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48949 
48950     # Need to check if the found msvcr is correct architecture
48951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48952 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48953     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48954     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48955       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48956       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48957       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48958         CORRECT_MSVCR_ARCH="PE32 executable"
48959       else
48960         CORRECT_MSVCR_ARCH="PE32+ executable"
48961       fi
48962     else
48963       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48964         CORRECT_MSVCR_ARCH=386
48965       else
48966         CORRECT_MSVCR_ARCH=x86-64
48967       fi
48968     fi
48969     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48971 $as_echo "ok" >&6; }
48972       MSVC_DLL="$POSSIBLE_MSVC_DLL"
48973 
48974   # Only process if variable expands to non-empty
48975 
48976   if test "x$MSVC_DLL" != x; then
48977     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48978 
48979   # Input might be given as Windows format, start by converting to
48980   # unix format.
48981   path="$MSVC_DLL"
48982   new_path=`$CYGPATH -u "$path"`
48983 
48984   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48985   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48986   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48987   # "foo.exe" is OK but "foo" is an error.
48988   #
48989   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48990   # It is also a way to make sure we got the proper file name for the real test later on.
48991   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48992   if test "x$test_shortpath" = x; then
48993     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48994 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48995     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48996   fi
48997 
48998   # Call helper function which possibly converts this using DOS-style short mode.
48999   # If so, the updated path is stored in $new_path.
49000 
49001   input_path="$new_path"
49002   # Check if we need to convert this using DOS-style short mode. If the path
49003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49004   # take no chances and rewrite it.
49005   # Note: m4 eats our [], so we need to use [ and ] instead.
49006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49007   if test "x$has_forbidden_chars" != x; then
49008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49009     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49010     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49011     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49012       # Going to short mode and back again did indeed matter. Since short mode is
49013       # case insensitive, let's make it lowercase to improve readability.
49014       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49015       # Now convert it back to Unix-style (cygpath)
49016       input_path=`$CYGPATH -u "$shortmode_path"`
49017       new_path="$input_path"
49018     fi
49019   fi
49020 
49021   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49022   if test "x$test_cygdrive_prefix" = x; then
49023     # As a simple fix, exclude /usr/bin since it's not a real path.
49024     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49025       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49026       # a path prefixed by /cygdrive for fixpath to work.
49027       new_path="$CYGWIN_ROOT_PATH$input_path"
49028     fi
49029   fi
49030 
49031 
49032   if test "x$path" != "x$new_path"; then
49033     MSVC_DLL="$new_path"
49034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49035 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49036   fi
49037 
49038     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49039 
49040   path="$MSVC_DLL"
49041   has_colon=`$ECHO $path | $GREP ^.:`
49042   new_path="$path"
49043   if test "x$has_colon" = x; then
49044     # Not in mixed or Windows style, start by that.
49045     new_path=`cmd //c echo $path`
49046   fi
49047 
49048 
49049   input_path="$new_path"
49050   # Check if we need to convert this using DOS-style short mode. If the path
49051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49052   # take no chances and rewrite it.
49053   # Note: m4 eats our [], so we need to use [ and ] instead.
49054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49055   if test "x$has_forbidden_chars" != x; then
49056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49057     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49058   fi
49059 
49060 
49061   windows_path="$new_path"
49062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49063     unix_path=`$CYGPATH -u "$windows_path"`
49064     new_path="$unix_path"
49065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49067     new_path="$unix_path"
49068   fi
49069 
49070   if test "x$path" != "x$new_path"; then
49071     MSVC_DLL="$new_path"
49072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49073 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49074   fi
49075 
49076   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49077   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49078 
49079     else
49080       # We're on a unix platform. Hooray! :)
49081       path="$MSVC_DLL"
49082       has_space=`$ECHO "$path" | $GREP " "`
49083       if test "x$has_space" != x; then
49084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49085 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49086         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49087       fi
49088 
49089       # Use eval to expand a potential ~
49090       eval path="$path"
49091       if test ! -f "$path" && test ! -d "$path"; then
49092         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49093       fi
49094 
49095       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49096     fi
49097   fi
49098 
49099       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49100 $as_echo_n "checking for $DLL_NAME... " >&6; }
49101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49102 $as_echo "$MSVC_DLL" >&6; }
49103     else
49104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49105 $as_echo "incorrect, ignoring" >&6; }
49106       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49107 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49108     fi
49109   fi
49110 
49111       if test "x$MSVC_DLL" = x; then
49112         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49113       fi
49114       MSVCP_DLL="$MSVC_DLL"
49115     else
49116 
49117   DLL_NAME="${MSVCP_NAME}"
49118   MSVC_DLL=
49119 
49120   if test "x$MSVC_DLL" = x; then
49121     # Probe: Using well-known location from Visual Studio 10.0
49122     if test "x$VCINSTALLDIR" != x; then
49123       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49124 
49125   windows_path="$CYGWIN_VC_INSTALL_DIR"
49126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49127     unix_path=`$CYGPATH -u "$windows_path"`
49128     CYGWIN_VC_INSTALL_DIR="$unix_path"
49129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49131     CYGWIN_VC_INSTALL_DIR="$unix_path"
49132   fi
49133 
49134       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49135         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49136       else
49137         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49138       fi
49139       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49140 
49141   DLL_NAME="$DLL_NAME"
49142   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49143   METHOD="well-known location in VCINSTALLDIR"
49144   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49145     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49146 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49147 
49148     # Need to check if the found msvcr is correct architecture
49149     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49150 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49151     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49152     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49153       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49154       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49155       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49156         CORRECT_MSVCR_ARCH="PE32 executable"
49157       else
49158         CORRECT_MSVCR_ARCH="PE32+ executable"
49159       fi
49160     else
49161       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49162         CORRECT_MSVCR_ARCH=386
49163       else
49164         CORRECT_MSVCR_ARCH=x86-64
49165       fi
49166     fi
49167     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49168       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49169 $as_echo "ok" >&6; }
49170       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49171 
49172   # Only process if variable expands to non-empty
49173 
49174   if test "x$MSVC_DLL" != x; then
49175     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49176 
49177   # Input might be given as Windows format, start by converting to
49178   # unix format.
49179   path="$MSVC_DLL"
49180   new_path=`$CYGPATH -u "$path"`
49181 
49182   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49183   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49184   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49185   # "foo.exe" is OK but "foo" is an error.
49186   #
49187   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49188   # It is also a way to make sure we got the proper file name for the real test later on.
49189   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49190   if test "x$test_shortpath" = x; then
49191     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49192 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49193     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49194   fi
49195 
49196   # Call helper function which possibly converts this using DOS-style short mode.
49197   # If so, the updated path is stored in $new_path.
49198 
49199   input_path="$new_path"
49200   # Check if we need to convert this using DOS-style short mode. If the path
49201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49202   # take no chances and rewrite it.
49203   # Note: m4 eats our [], so we need to use [ and ] instead.
49204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49205   if test "x$has_forbidden_chars" != x; then
49206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49210       # Going to short mode and back again did indeed matter. Since short mode is
49211       # case insensitive, let's make it lowercase to improve readability.
49212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49213       # Now convert it back to Unix-style (cygpath)
49214       input_path=`$CYGPATH -u "$shortmode_path"`
49215       new_path="$input_path"
49216     fi
49217   fi
49218 
49219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49220   if test "x$test_cygdrive_prefix" = x; then
49221     # As a simple fix, exclude /usr/bin since it's not a real path.
49222     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49224       # a path prefixed by /cygdrive for fixpath to work.
49225       new_path="$CYGWIN_ROOT_PATH$input_path"
49226     fi
49227   fi
49228 
49229 
49230   if test "x$path" != "x$new_path"; then
49231     MSVC_DLL="$new_path"
49232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49233 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49234   fi
49235 
49236     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49237 
49238   path="$MSVC_DLL"
49239   has_colon=`$ECHO $path | $GREP ^.:`
49240   new_path="$path"
49241   if test "x$has_colon" = x; then
49242     # Not in mixed or Windows style, start by that.
49243     new_path=`cmd //c echo $path`
49244   fi
49245 
49246 
49247   input_path="$new_path"
49248   # Check if we need to convert this using DOS-style short mode. If the path
49249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49250   # take no chances and rewrite it.
49251   # Note: m4 eats our [], so we need to use [ and ] instead.
49252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49253   if test "x$has_forbidden_chars" != x; then
49254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49255     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49256   fi
49257 
49258 
49259   windows_path="$new_path"
49260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49261     unix_path=`$CYGPATH -u "$windows_path"`
49262     new_path="$unix_path"
49263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49265     new_path="$unix_path"
49266   fi
49267 
49268   if test "x$path" != "x$new_path"; then
49269     MSVC_DLL="$new_path"
49270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49271 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49272   fi
49273 
49274   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49275   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49276 
49277     else
49278       # We're on a unix platform. Hooray! :)
49279       path="$MSVC_DLL"
49280       has_space=`$ECHO "$path" | $GREP " "`
49281       if test "x$has_space" != x; then
49282         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49283 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49284         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49285       fi
49286 
49287       # Use eval to expand a potential ~
49288       eval path="$path"
49289       if test ! -f "$path" && test ! -d "$path"; then
49290         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49291       fi
49292 
49293       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49294     fi
49295   fi
49296 
49297       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49298 $as_echo_n "checking for $DLL_NAME... " >&6; }
49299       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49300 $as_echo "$MSVC_DLL" >&6; }
49301     else
49302       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49303 $as_echo "incorrect, ignoring" >&6; }
49304       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49305 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49306     fi
49307   fi
49308 
49309     fi
49310   fi
49311 
49312   if test "x$MSVC_DLL" = x; then
49313     # Probe: Check in the Boot JDK directory.
49314     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49315 
49316   DLL_NAME="$DLL_NAME"
49317   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49318   METHOD="well-known location in Boot JDK"
49319   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49320     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49321 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49322 
49323     # Need to check if the found msvcr is correct architecture
49324     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49325 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49326     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49327     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49328       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49329       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49330       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49331         CORRECT_MSVCR_ARCH="PE32 executable"
49332       else
49333         CORRECT_MSVCR_ARCH="PE32+ executable"
49334       fi
49335     else
49336       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49337         CORRECT_MSVCR_ARCH=386
49338       else
49339         CORRECT_MSVCR_ARCH=x86-64
49340       fi
49341     fi
49342     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49343       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49344 $as_echo "ok" >&6; }
49345       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49346 
49347   # Only process if variable expands to non-empty
49348 
49349   if test "x$MSVC_DLL" != x; then
49350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49351 
49352   # Input might be given as Windows format, start by converting to
49353   # unix format.
49354   path="$MSVC_DLL"
49355   new_path=`$CYGPATH -u "$path"`
49356 
49357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49360   # "foo.exe" is OK but "foo" is an error.
49361   #
49362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49363   # It is also a way to make sure we got the proper file name for the real test later on.
49364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49365   if test "x$test_shortpath" = x; then
49366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49367 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49368     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49369   fi
49370 
49371   # Call helper function which possibly converts this using DOS-style short mode.
49372   # If so, the updated path is stored in $new_path.
49373 
49374   input_path="$new_path"
49375   # Check if we need to convert this using DOS-style short mode. If the path
49376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49377   # take no chances and rewrite it.
49378   # Note: m4 eats our [], so we need to use [ and ] instead.
49379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49380   if test "x$has_forbidden_chars" != x; then
49381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49385       # Going to short mode and back again did indeed matter. Since short mode is
49386       # case insensitive, let's make it lowercase to improve readability.
49387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49388       # Now convert it back to Unix-style (cygpath)
49389       input_path=`$CYGPATH -u "$shortmode_path"`
49390       new_path="$input_path"
49391     fi
49392   fi
49393 
49394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49395   if test "x$test_cygdrive_prefix" = x; then
49396     # As a simple fix, exclude /usr/bin since it's not a real path.
49397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49399       # a path prefixed by /cygdrive for fixpath to work.
49400       new_path="$CYGWIN_ROOT_PATH$input_path"
49401     fi
49402   fi
49403 
49404 
49405   if test "x$path" != "x$new_path"; then
49406     MSVC_DLL="$new_path"
49407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49408 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49409   fi
49410 
49411     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49412 
49413   path="$MSVC_DLL"
49414   has_colon=`$ECHO $path | $GREP ^.:`
49415   new_path="$path"
49416   if test "x$has_colon" = x; then
49417     # Not in mixed or Windows style, start by that.
49418     new_path=`cmd //c echo $path`
49419   fi
49420 
49421 
49422   input_path="$new_path"
49423   # Check if we need to convert this using DOS-style short mode. If the path
49424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49425   # take no chances and rewrite it.
49426   # Note: m4 eats our [], so we need to use [ and ] instead.
49427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49428   if test "x$has_forbidden_chars" != x; then
49429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49431   fi
49432 
49433 
49434   windows_path="$new_path"
49435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49436     unix_path=`$CYGPATH -u "$windows_path"`
49437     new_path="$unix_path"
49438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49440     new_path="$unix_path"
49441   fi
49442 
49443   if test "x$path" != "x$new_path"; then
49444     MSVC_DLL="$new_path"
49445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49446 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49447   fi
49448 
49449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49451 
49452     else
49453       # We're on a unix platform. Hooray! :)
49454       path="$MSVC_DLL"
49455       has_space=`$ECHO "$path" | $GREP " "`
49456       if test "x$has_space" != x; then
49457         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49458 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49459         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49460       fi
49461 
49462       # Use eval to expand a potential ~
49463       eval path="$path"
49464       if test ! -f "$path" && test ! -d "$path"; then
49465         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49466       fi
49467 
49468       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49469     fi
49470   fi
49471 
49472       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49473 $as_echo_n "checking for $DLL_NAME... " >&6; }
49474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49475 $as_echo "$MSVC_DLL" >&6; }
49476     else
49477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49478 $as_echo "incorrect, ignoring" >&6; }
49479       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49480 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49481     fi
49482   fi
49483 
49484   fi
49485 
49486   if test "x$MSVC_DLL" = x; then
49487     # Probe: Look in the Windows system32 directory
49488     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49489 
49490   windows_path="$CYGWIN_SYSTEMROOT"
49491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49492     unix_path=`$CYGPATH -u "$windows_path"`
49493     CYGWIN_SYSTEMROOT="$unix_path"
49494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49496     CYGWIN_SYSTEMROOT="$unix_path"
49497   fi
49498 
49499     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49500 
49501   DLL_NAME="$DLL_NAME"
49502   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49503   METHOD="well-known location in SYSTEMROOT"
49504   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49505     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49506 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49507 
49508     # Need to check if the found msvcr is correct architecture
49509     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49510 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49511     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49513       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49514       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49515       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49516         CORRECT_MSVCR_ARCH="PE32 executable"
49517       else
49518         CORRECT_MSVCR_ARCH="PE32+ executable"
49519       fi
49520     else
49521       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49522         CORRECT_MSVCR_ARCH=386
49523       else
49524         CORRECT_MSVCR_ARCH=x86-64
49525       fi
49526     fi
49527     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49528       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49529 $as_echo "ok" >&6; }
49530       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49531 
49532   # Only process if variable expands to non-empty
49533 
49534   if test "x$MSVC_DLL" != x; then
49535     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49536 
49537   # Input might be given as Windows format, start by converting to
49538   # unix format.
49539   path="$MSVC_DLL"
49540   new_path=`$CYGPATH -u "$path"`
49541 
49542   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49543   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49544   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49545   # "foo.exe" is OK but "foo" is an error.
49546   #
49547   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49548   # It is also a way to make sure we got the proper file name for the real test later on.
49549   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49550   if test "x$test_shortpath" = x; then
49551     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49552 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49553     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49554   fi
49555 
49556   # Call helper function which possibly converts this using DOS-style short mode.
49557   # If so, the updated path is stored in $new_path.
49558 
49559   input_path="$new_path"
49560   # Check if we need to convert this using DOS-style short mode. If the path
49561   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49562   # take no chances and rewrite it.
49563   # Note: m4 eats our [], so we need to use [ and ] instead.
49564   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49565   if test "x$has_forbidden_chars" != x; then
49566     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49567     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49568     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49569     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49570       # Going to short mode and back again did indeed matter. Since short mode is
49571       # case insensitive, let's make it lowercase to improve readability.
49572       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49573       # Now convert it back to Unix-style (cygpath)
49574       input_path=`$CYGPATH -u "$shortmode_path"`
49575       new_path="$input_path"
49576     fi
49577   fi
49578 
49579   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49580   if test "x$test_cygdrive_prefix" = x; then
49581     # As a simple fix, exclude /usr/bin since it's not a real path.
49582     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49583       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49584       # a path prefixed by /cygdrive for fixpath to work.
49585       new_path="$CYGWIN_ROOT_PATH$input_path"
49586     fi
49587   fi
49588 
49589 
49590   if test "x$path" != "x$new_path"; then
49591     MSVC_DLL="$new_path"
49592     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49593 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49594   fi
49595 
49596     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49597 
49598   path="$MSVC_DLL"
49599   has_colon=`$ECHO $path | $GREP ^.:`
49600   new_path="$path"
49601   if test "x$has_colon" = x; then
49602     # Not in mixed or Windows style, start by that.
49603     new_path=`cmd //c echo $path`
49604   fi
49605 
49606 
49607   input_path="$new_path"
49608   # Check if we need to convert this using DOS-style short mode. If the path
49609   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49610   # take no chances and rewrite it.
49611   # Note: m4 eats our [], so we need to use [ and ] instead.
49612   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49613   if test "x$has_forbidden_chars" != x; then
49614     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49615     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49616   fi
49617 
49618 
49619   windows_path="$new_path"
49620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49621     unix_path=`$CYGPATH -u "$windows_path"`
49622     new_path="$unix_path"
49623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49625     new_path="$unix_path"
49626   fi
49627 
49628   if test "x$path" != "x$new_path"; then
49629     MSVC_DLL="$new_path"
49630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49631 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49632   fi
49633 
49634   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49635   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49636 
49637     else
49638       # We're on a unix platform. Hooray! :)
49639       path="$MSVC_DLL"
49640       has_space=`$ECHO "$path" | $GREP " "`
49641       if test "x$has_space" != x; then
49642         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49643 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49644         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49645       fi
49646 
49647       # Use eval to expand a potential ~
49648       eval path="$path"
49649       if test ! -f "$path" && test ! -d "$path"; then
49650         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49651       fi
49652 
49653       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49654     fi
49655   fi
49656 
49657       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49658 $as_echo_n "checking for $DLL_NAME... " >&6; }
49659       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49660 $as_echo "$MSVC_DLL" >&6; }
49661     else
49662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49663 $as_echo "incorrect, ignoring" >&6; }
49664       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49665 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49666     fi
49667   fi
49668 
49669   fi
49670 
49671   if test "x$MSVC_DLL" = x; then
49672     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49673     if test "x$VS100COMNTOOLS" != x; then
49674       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49675 
49676   windows_path="$CYGWIN_VS_TOOLS_DIR"
49677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49678     unix_path=`$CYGPATH -u "$windows_path"`
49679     CYGWIN_VS_TOOLS_DIR="$unix_path"
49680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49682     CYGWIN_VS_TOOLS_DIR="$unix_path"
49683   fi
49684 
49685       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49686         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49687             | $GREP -i /x64/ | $HEAD --lines 1`
49688       else
49689         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49690             | $GREP -i /x86/ | $HEAD --lines 1`
49691       fi
49692 
49693   DLL_NAME="$DLL_NAME"
49694   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49695   METHOD="search of VS100COMNTOOLS"
49696   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49697     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49698 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49699 
49700     # Need to check if the found msvcr is correct architecture
49701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49702 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49703     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49704     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49705       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49706       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49707       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49708         CORRECT_MSVCR_ARCH="PE32 executable"
49709       else
49710         CORRECT_MSVCR_ARCH="PE32+ executable"
49711       fi
49712     else
49713       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49714         CORRECT_MSVCR_ARCH=386
49715       else
49716         CORRECT_MSVCR_ARCH=x86-64
49717       fi
49718     fi
49719     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49721 $as_echo "ok" >&6; }
49722       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49723 
49724   # Only process if variable expands to non-empty
49725 
49726   if test "x$MSVC_DLL" != x; then
49727     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49728 
49729   # Input might be given as Windows format, start by converting to
49730   # unix format.
49731   path="$MSVC_DLL"
49732   new_path=`$CYGPATH -u "$path"`
49733 
49734   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49735   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49736   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49737   # "foo.exe" is OK but "foo" is an error.
49738   #
49739   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49740   # It is also a way to make sure we got the proper file name for the real test later on.
49741   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49742   if test "x$test_shortpath" = x; then
49743     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49744 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49745     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49746   fi
49747 
49748   # Call helper function which possibly converts this using DOS-style short mode.
49749   # If so, the updated path is stored in $new_path.
49750 
49751   input_path="$new_path"
49752   # Check if we need to convert this using DOS-style short mode. If the path
49753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49754   # take no chances and rewrite it.
49755   # Note: m4 eats our [], so we need to use [ and ] instead.
49756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49757   if test "x$has_forbidden_chars" != x; then
49758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49762       # Going to short mode and back again did indeed matter. Since short mode is
49763       # case insensitive, let's make it lowercase to improve readability.
49764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49765       # Now convert it back to Unix-style (cygpath)
49766       input_path=`$CYGPATH -u "$shortmode_path"`
49767       new_path="$input_path"
49768     fi
49769   fi
49770 
49771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49772   if test "x$test_cygdrive_prefix" = x; then
49773     # As a simple fix, exclude /usr/bin since it's not a real path.
49774     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49776       # a path prefixed by /cygdrive for fixpath to work.
49777       new_path="$CYGWIN_ROOT_PATH$input_path"
49778     fi
49779   fi
49780 
49781 
49782   if test "x$path" != "x$new_path"; then
49783     MSVC_DLL="$new_path"
49784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49785 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49786   fi
49787 
49788     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49789 
49790   path="$MSVC_DLL"
49791   has_colon=`$ECHO $path | $GREP ^.:`
49792   new_path="$path"
49793   if test "x$has_colon" = x; then
49794     # Not in mixed or Windows style, start by that.
49795     new_path=`cmd //c echo $path`
49796   fi
49797 
49798 
49799   input_path="$new_path"
49800   # Check if we need to convert this using DOS-style short mode. If the path
49801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49802   # take no chances and rewrite it.
49803   # Note: m4 eats our [], so we need to use [ and ] instead.
49804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49805   if test "x$has_forbidden_chars" != x; then
49806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49807     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49808   fi
49809 
49810 
49811   windows_path="$new_path"
49812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49813     unix_path=`$CYGPATH -u "$windows_path"`
49814     new_path="$unix_path"
49815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49817     new_path="$unix_path"
49818   fi
49819 
49820   if test "x$path" != "x$new_path"; then
49821     MSVC_DLL="$new_path"
49822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49823 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49824   fi
49825 
49826   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49827   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49828 
49829     else
49830       # We're on a unix platform. Hooray! :)
49831       path="$MSVC_DLL"
49832       has_space=`$ECHO "$path" | $GREP " "`
49833       if test "x$has_space" != x; then
49834         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49835 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49836         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49837       fi
49838 
49839       # Use eval to expand a potential ~
49840       eval path="$path"
49841       if test ! -f "$path" && test ! -d "$path"; then
49842         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49843       fi
49844 
49845       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49846     fi
49847   fi
49848 
49849       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49850 $as_echo_n "checking for $DLL_NAME... " >&6; }
49851       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49852 $as_echo "$MSVC_DLL" >&6; }
49853     else
49854       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49855 $as_echo "incorrect, ignoring" >&6; }
49856       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49857 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49858     fi
49859   fi
49860 
49861     fi
49862   fi
49863 
49864   if test "x$MSVC_DLL" = x; then
49865     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49866     # (This was the original behaviour; kept since it might turn something up)
49867     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49868       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49869         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49870             | $GREP x64 | $HEAD --lines 1`
49871       else
49872         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49873             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49874         if test "x$POSSIBLE_MSVC_DLL" = x; then
49875           # We're grasping at straws now...
49876           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49877               | $HEAD --lines 1`
49878         fi
49879       fi
49880 
49881 
49882   DLL_NAME="$DLL_NAME"
49883   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49884   METHOD="search of VCINSTALLDIR"
49885   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49886     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49887 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49888 
49889     # Need to check if the found msvcr is correct architecture
49890     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49891 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49892     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49894       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49895       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49896       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49897         CORRECT_MSVCR_ARCH="PE32 executable"
49898       else
49899         CORRECT_MSVCR_ARCH="PE32+ executable"
49900       fi
49901     else
49902       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49903         CORRECT_MSVCR_ARCH=386
49904       else
49905         CORRECT_MSVCR_ARCH=x86-64
49906       fi
49907     fi
49908     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49909       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49910 $as_echo "ok" >&6; }
49911       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49912 
49913   # Only process if variable expands to non-empty
49914 
49915   if test "x$MSVC_DLL" != x; then
49916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49917 
49918   # Input might be given as Windows format, start by converting to
49919   # unix format.
49920   path="$MSVC_DLL"
49921   new_path=`$CYGPATH -u "$path"`
49922 
49923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49926   # "foo.exe" is OK but "foo" is an error.
49927   #
49928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49929   # It is also a way to make sure we got the proper file name for the real test later on.
49930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49931   if test "x$test_shortpath" = x; then
49932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49933 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49934     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49935   fi
49936 
49937   # Call helper function which possibly converts this using DOS-style short mode.
49938   # If so, the updated path is stored in $new_path.
49939 
49940   input_path="$new_path"
49941   # Check if we need to convert this using DOS-style short mode. If the path
49942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49943   # take no chances and rewrite it.
49944   # Note: m4 eats our [], so we need to use [ and ] instead.
49945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49946   if test "x$has_forbidden_chars" != x; then
49947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49951       # Going to short mode and back again did indeed matter. Since short mode is
49952       # case insensitive, let's make it lowercase to improve readability.
49953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49954       # Now convert it back to Unix-style (cygpath)
49955       input_path=`$CYGPATH -u "$shortmode_path"`
49956       new_path="$input_path"
49957     fi
49958   fi
49959 
49960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49961   if test "x$test_cygdrive_prefix" = x; then
49962     # As a simple fix, exclude /usr/bin since it's not a real path.
49963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49965       # a path prefixed by /cygdrive for fixpath to work.
49966       new_path="$CYGWIN_ROOT_PATH$input_path"
49967     fi
49968   fi
49969 
49970 
49971   if test "x$path" != "x$new_path"; then
49972     MSVC_DLL="$new_path"
49973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49974 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49975   fi
49976 
49977     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49978 
49979   path="$MSVC_DLL"
49980   has_colon=`$ECHO $path | $GREP ^.:`
49981   new_path="$path"
49982   if test "x$has_colon" = x; then
49983     # Not in mixed or Windows style, start by that.
49984     new_path=`cmd //c echo $path`
49985   fi
49986 
49987 
49988   input_path="$new_path"
49989   # Check if we need to convert this using DOS-style short mode. If the path
49990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49991   # take no chances and rewrite it.
49992   # Note: m4 eats our [], so we need to use [ and ] instead.
49993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49994   if test "x$has_forbidden_chars" != x; then
49995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49997   fi
49998 
49999 
50000   windows_path="$new_path"
50001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50002     unix_path=`$CYGPATH -u "$windows_path"`
50003     new_path="$unix_path"
50004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50006     new_path="$unix_path"
50007   fi
50008 
50009   if test "x$path" != "x$new_path"; then
50010     MSVC_DLL="$new_path"
50011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50012 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50013   fi
50014 
50015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50017 
50018     else
50019       # We're on a unix platform. Hooray! :)
50020       path="$MSVC_DLL"
50021       has_space=`$ECHO "$path" | $GREP " "`
50022       if test "x$has_space" != x; then
50023         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50024 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50025         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50026       fi
50027 
50028       # Use eval to expand a potential ~
50029       eval path="$path"
50030       if test ! -f "$path" && test ! -d "$path"; then
50031         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50032       fi
50033 
50034       MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50035     fi
50036   fi
50037 
50038       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50039 $as_echo_n "checking for $DLL_NAME... " >&6; }
50040       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50041 $as_echo "$MSVC_DLL" >&6; }
50042     else
50043       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50044 $as_echo "incorrect, ignoring" >&6; }
50045       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50046 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50047     fi
50048   fi
50049 
50050     fi
50051   fi
50052 
50053   if test "x$MSVC_DLL" = x; then
50054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50055 $as_echo_n "checking for $DLL_NAME... " >&6; }
50056     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50057 $as_echo "no" >&6; }
50058     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50059   fi
50060 
50061       MSVCP_DLL="$MSVC_DLL"
50062     fi
50063 
50064   fi
50065 
50066   fi
50067 
50068 
50069   if test "x$NEEDS_LIB_X11" = xfalse; then
50070     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50071       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50072 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50073     fi
50074     X_CFLAGS=
50075     X_LIBS=
50076   else
50077 
50078     if test "x${with_x}" = xno; then
50079       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50080     fi
50081 
50082     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50083       # The user has specified a X11 base directory. Use it for includes and
50084       # libraries, unless explicitely overridden.
50085       if test "x$x_includes" = xNONE; then
50086         x_includes="${with_x}/include"
50087       fi
50088       if test "x$x_libraries" = xNONE; then
50089         x_libraries="${with_x}/lib"
50090       fi
50091     else
50092       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50093       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50094       # --x-libraries for the sysroot, if that seems to be correct.
50095       if test "x$SYSROOT" != "x"; then
50096         if test "x$x_includes" = xNONE; then
50097           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50098             x_includes="$SYSROOT/usr/X11R6/include"
50099           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50100             x_includes="$SYSROOT/usr/include"
50101           fi
50102         fi
50103         if test "x$x_libraries" = xNONE; then
50104           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50105             x_libraries="$SYSROOT/usr/X11R6/lib"
50106           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50107             x_libraries="$SYSROOT/usr/lib64"
50108           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50109             x_libraries="$SYSROOT/usr/lib"
50110           fi
50111         fi
50112       fi
50113     fi
50114 
50115     # Now let autoconf do it's magic
50116     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50117 $as_echo_n "checking for X... " >&6; }
50118 
50119 
50120 # Check whether --with-x was given.
50121 if test "${with_x+set}" = set; then :
50122   withval=$with_x;
50123 fi
50124 
50125 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50126 if test "x$with_x" = xno; then
50127   # The user explicitly disabled X.
50128   have_x=disabled
50129 else
50130   case $x_includes,$x_libraries in #(
50131     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50132     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50133   $as_echo_n "(cached) " >&6
50134 else
50135   # One or both of the vars are not set, and there is no cached value.
50136 ac_x_includes=no ac_x_libraries=no
50137 rm -f -r conftest.dir
50138 if mkdir conftest.dir; then
50139   cd conftest.dir
50140   cat >Imakefile <<'_ACEOF'
50141 incroot:
50142         @echo incroot='${INCROOT}'
50143 usrlibdir:
50144         @echo usrlibdir='${USRLIBDIR}'
50145 libdir:
50146         @echo libdir='${LIBDIR}'
50147 _ACEOF
50148   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50149     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50150     for ac_var in incroot usrlibdir libdir; do
50151       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50152     done
50153     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50154     for ac_extension in a so sl dylib la dll; do
50155       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50156          test -f "$ac_im_libdir/libX11.$ac_extension"; then
50157         ac_im_usrlibdir=$ac_im_libdir; break
50158       fi
50159     done
50160     # Screen out bogus values from the imake configuration.  They are
50161     # bogus both because they are the default anyway, and because
50162     # using them would break gcc on systems where it needs fixed includes.
50163     case $ac_im_incroot in
50164         /usr/include) ac_x_includes= ;;
50165         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50166     esac
50167     case $ac_im_usrlibdir in
50168         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
50169         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50170     esac
50171   fi
50172   cd ..
50173   rm -f -r conftest.dir
50174 fi
50175 
50176 # Standard set of common directories for X headers.
50177 # Check X11 before X11Rn because it is often a symlink to the current release.
50178 ac_x_header_dirs='
50179 /usr/X11/include
50180 /usr/X11R7/include
50181 /usr/X11R6/include
50182 /usr/X11R5/include
50183 /usr/X11R4/include
50184 
50185 /usr/include/X11
50186 /usr/include/X11R7
50187 /usr/include/X11R6
50188 /usr/include/X11R5
50189 /usr/include/X11R4
50190 
50191 /usr/local/X11/include
50192 /usr/local/X11R7/include
50193 /usr/local/X11R6/include
50194 /usr/local/X11R5/include
50195 /usr/local/X11R4/include
50196 
50197 /usr/local/include/X11
50198 /usr/local/include/X11R7
50199 /usr/local/include/X11R6
50200 /usr/local/include/X11R5
50201 /usr/local/include/X11R4
50202 
50203 /usr/X386/include
50204 /usr/x386/include
50205 /usr/XFree86/include/X11
50206 
50207 /usr/include
50208 /usr/local/include
50209 /usr/unsupported/include
50210 /usr/athena/include
50211 /usr/local/x11r5/include
50212 /usr/lpp/Xamples/include
50213 
50214 /usr/openwin/include
50215 /usr/openwin/share/include'
50216 
50217 if test "$ac_x_includes" = no; then
50218   # Guess where to find include files, by looking for Xlib.h.
50219   # First, try using that file with no special directory specified.
50220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50221 /* end confdefs.h.  */
50222 #include <X11/Xlib.h>
50223 _ACEOF
50224 if ac_fn_cxx_try_cpp "$LINENO"; then :
50225   # We can compile using X headers with no special include directory.
50226 ac_x_includes=
50227 else
50228   for ac_dir in $ac_x_header_dirs; do
50229   if test -r "$ac_dir/X11/Xlib.h"; then
50230     ac_x_includes=$ac_dir
50231     break
50232   fi
50233 done
50234 fi
50235 rm -f conftest.err conftest.i conftest.$ac_ext
50236 fi # $ac_x_includes = no
50237 
50238 if test "$ac_x_libraries" = no; then
50239   # Check for the libraries.
50240   # See if we find them without any special options.
50241   # Don't add to $LIBS permanently.
50242   ac_save_LIBS=$LIBS
50243   LIBS="-lX11 $LIBS"
50244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50245 /* end confdefs.h.  */
50246 #include <X11/Xlib.h>
50247 int
50248 main ()
50249 {
50250 XrmInitialize ()
50251   ;
50252   return 0;
50253 }
50254 _ACEOF
50255 if ac_fn_cxx_try_link "$LINENO"; then :
50256   LIBS=$ac_save_LIBS
50257 # We can link X programs with no special library path.
50258 ac_x_libraries=
50259 else
50260   LIBS=$ac_save_LIBS
50261 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50262 do
50263   # Don't even attempt the hair of trying to link an X program!
50264   for ac_extension in a so sl dylib la dll; do
50265     if test -r "$ac_dir/libX11.$ac_extension"; then
50266       ac_x_libraries=$ac_dir
50267       break 2
50268     fi
50269   done
50270 done
50271 fi
50272 rm -f core conftest.err conftest.$ac_objext \
50273     conftest$ac_exeext conftest.$ac_ext
50274 fi # $ac_x_libraries = no
50275 
50276 case $ac_x_includes,$ac_x_libraries in #(
50277   no,* | *,no | *\'*)
50278     # Didn't find X, or a directory has "'" in its name.
50279     ac_cv_have_x="have_x=no";; #(
50280   *)
50281     # Record where we found X for the cache.
50282     ac_cv_have_x="have_x=yes\
50283         ac_x_includes='$ac_x_includes'\
50284         ac_x_libraries='$ac_x_libraries'"
50285 esac
50286 fi
50287 ;; #(
50288     *) have_x=yes;;
50289   esac
50290   eval "$ac_cv_have_x"
50291 fi # $with_x != no
50292 
50293 if test "$have_x" != yes; then
50294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50295 $as_echo "$have_x" >&6; }
50296   no_x=yes
50297 else
50298   # If each of the values was on the command line, it overrides each guess.
50299   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50300   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50301   # Update the cache value to reflect the command line values.
50302   ac_cv_have_x="have_x=yes\
50303         ac_x_includes='$x_includes'\
50304         ac_x_libraries='$x_libraries'"
50305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50306 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50307 fi
50308 
50309     if test "$no_x" = yes; then
50310   # Not all programs may use this symbol, but it does not hurt to define it.
50311 
50312 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50313 
50314   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50315 else
50316   if test -n "$x_includes"; then
50317     X_CFLAGS="$X_CFLAGS -I$x_includes"
50318   fi
50319 
50320   # It would also be nice to do this for all -L options, not just this one.
50321   if test -n "$x_libraries"; then
50322     X_LIBS="$X_LIBS -L$x_libraries"
50323     # For Solaris; some versions of Sun CC require a space after -R and
50324     # others require no space.  Words are not sufficient . . . .
50325     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50326 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
50327     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50328     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50329     ac_cxx_werror_flag=yes
50330     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50331 /* end confdefs.h.  */
50332 
50333 int
50334 main ()
50335 {
50336 
50337   ;
50338   return 0;
50339 }
50340 _ACEOF
50341 if ac_fn_cxx_try_link "$LINENO"; then :
50342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50343 $as_echo "no" >&6; }
50344        X_LIBS="$X_LIBS -R$x_libraries"
50345 else
50346   LIBS="$ac_xsave_LIBS -R $x_libraries"
50347        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50348 /* end confdefs.h.  */
50349 
50350 int
50351 main ()
50352 {
50353 
50354   ;
50355   return 0;
50356 }
50357 _ACEOF
50358 if ac_fn_cxx_try_link "$LINENO"; then :
50359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50360 $as_echo "yes" >&6; }
50361           X_LIBS="$X_LIBS -R $x_libraries"
50362 else
50363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50364 $as_echo "neither works" >&6; }
50365 fi
50366 rm -f core conftest.err conftest.$ac_objext \
50367     conftest$ac_exeext conftest.$ac_ext
50368 fi
50369 rm -f core conftest.err conftest.$ac_objext \
50370     conftest$ac_exeext conftest.$ac_ext
50371     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50372     LIBS=$ac_xsave_LIBS
50373   fi
50374 
50375   # Check for system-dependent libraries X programs must link with.
50376   # Do this before checking for the system-independent R6 libraries
50377   # (-lICE), since we may need -lsocket or whatever for X linking.
50378 
50379   if test "$ISC" = yes; then
50380     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50381   else
50382     # Martyn Johnson says this is needed for Ultrix, if the X
50383     # libraries were built with DECnet support.  And Karl Berry says
50384     # the Alpha needs dnet_stub (dnet does not exist).
50385     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50386     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50387 /* end confdefs.h.  */
50388 
50389 /* Override any GCC internal prototype to avoid an error.
50390    Use char because int might match the return type of a GCC
50391    builtin and then its argument prototype would still apply.  */
50392 #ifdef __cplusplus
50393 extern "C"
50394 #endif
50395 char XOpenDisplay ();
50396 int
50397 main ()
50398 {
50399 return XOpenDisplay ();
50400   ;
50401   return 0;
50402 }
50403 _ACEOF
50404 if ac_fn_cxx_try_link "$LINENO"; then :
50405 
50406 else
50407   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50408 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50409 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50410   $as_echo_n "(cached) " >&6
50411 else
50412   ac_check_lib_save_LIBS=$LIBS
50413 LIBS="-ldnet  $LIBS"
50414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50415 /* end confdefs.h.  */
50416 
50417 /* Override any GCC internal prototype to avoid an error.
50418    Use char because int might match the return type of a GCC
50419    builtin and then its argument prototype would still apply.  */
50420 #ifdef __cplusplus
50421 extern "C"
50422 #endif
50423 char dnet_ntoa ();
50424 int
50425 main ()
50426 {
50427 return dnet_ntoa ();
50428   ;
50429   return 0;
50430 }
50431 _ACEOF
50432 if ac_fn_cxx_try_link "$LINENO"; then :
50433   ac_cv_lib_dnet_dnet_ntoa=yes
50434 else
50435   ac_cv_lib_dnet_dnet_ntoa=no
50436 fi
50437 rm -f core conftest.err conftest.$ac_objext \
50438     conftest$ac_exeext conftest.$ac_ext
50439 LIBS=$ac_check_lib_save_LIBS
50440 fi
50441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50442 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50443 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50444   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50445 fi
50446 
50447     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50448       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50449 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50450 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50451   $as_echo_n "(cached) " >&6
50452 else
50453   ac_check_lib_save_LIBS=$LIBS
50454 LIBS="-ldnet_stub  $LIBS"
50455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50456 /* end confdefs.h.  */
50457 
50458 /* Override any GCC internal prototype to avoid an error.
50459    Use char because int might match the return type of a GCC
50460    builtin and then its argument prototype would still apply.  */
50461 #ifdef __cplusplus
50462 extern "C"
50463 #endif
50464 char dnet_ntoa ();
50465 int
50466 main ()
50467 {
50468 return dnet_ntoa ();
50469   ;
50470   return 0;
50471 }
50472 _ACEOF
50473 if ac_fn_cxx_try_link "$LINENO"; then :
50474   ac_cv_lib_dnet_stub_dnet_ntoa=yes
50475 else
50476   ac_cv_lib_dnet_stub_dnet_ntoa=no
50477 fi
50478 rm -f core conftest.err conftest.$ac_objext \
50479     conftest$ac_exeext conftest.$ac_ext
50480 LIBS=$ac_check_lib_save_LIBS
50481 fi
50482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50483 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50484 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50485   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50486 fi
50487 
50488     fi
50489 fi
50490 rm -f core conftest.err conftest.$ac_objext \
50491     conftest$ac_exeext conftest.$ac_ext
50492     LIBS="$ac_xsave_LIBS"
50493 
50494     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50495     # to get the SysV transport functions.
50496     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50497     # needs -lnsl.
50498     # The nsl library prevents programs from opening the X display
50499     # on Irix 5.2, according to T.E. Dickey.
50500     # The functions gethostbyname, getservbyname, and inet_addr are
50501     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50502     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50503 if test "x$ac_cv_func_gethostbyname" = xyes; then :
50504 
50505 fi
50506 
50507     if test $ac_cv_func_gethostbyname = no; then
50508       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50509 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50510 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50511   $as_echo_n "(cached) " >&6
50512 else
50513   ac_check_lib_save_LIBS=$LIBS
50514 LIBS="-lnsl  $LIBS"
50515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50516 /* end confdefs.h.  */
50517 
50518 /* Override any GCC internal prototype to avoid an error.
50519    Use char because int might match the return type of a GCC
50520    builtin and then its argument prototype would still apply.  */
50521 #ifdef __cplusplus
50522 extern "C"
50523 #endif
50524 char gethostbyname ();
50525 int
50526 main ()
50527 {
50528 return gethostbyname ();
50529   ;
50530   return 0;
50531 }
50532 _ACEOF
50533 if ac_fn_cxx_try_link "$LINENO"; then :
50534   ac_cv_lib_nsl_gethostbyname=yes
50535 else
50536   ac_cv_lib_nsl_gethostbyname=no
50537 fi
50538 rm -f core conftest.err conftest.$ac_objext \
50539     conftest$ac_exeext conftest.$ac_ext
50540 LIBS=$ac_check_lib_save_LIBS
50541 fi
50542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50543 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50544 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50545   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50546 fi
50547 
50548       if test $ac_cv_lib_nsl_gethostbyname = no; then
50549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50550 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50551 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50552   $as_echo_n "(cached) " >&6
50553 else
50554   ac_check_lib_save_LIBS=$LIBS
50555 LIBS="-lbsd  $LIBS"
50556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50557 /* end confdefs.h.  */
50558 
50559 /* Override any GCC internal prototype to avoid an error.
50560    Use char because int might match the return type of a GCC
50561    builtin and then its argument prototype would still apply.  */
50562 #ifdef __cplusplus
50563 extern "C"
50564 #endif
50565 char gethostbyname ();
50566 int
50567 main ()
50568 {
50569 return gethostbyname ();
50570   ;
50571   return 0;
50572 }
50573 _ACEOF
50574 if ac_fn_cxx_try_link "$LINENO"; then :
50575   ac_cv_lib_bsd_gethostbyname=yes
50576 else
50577   ac_cv_lib_bsd_gethostbyname=no
50578 fi
50579 rm -f core conftest.err conftest.$ac_objext \
50580     conftest$ac_exeext conftest.$ac_ext
50581 LIBS=$ac_check_lib_save_LIBS
50582 fi
50583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50584 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50585 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50586   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50587 fi
50588 
50589       fi
50590     fi
50591 
50592     # lieder@skyler.mavd.honeywell.com says without -lsocket,
50593     # socket/setsockopt and other routines are undefined under SCO ODT
50594     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50595     # on later versions), says Simon Leinen: it contains gethostby*
50596     # variants that don't use the name server (or something).  -lsocket
50597     # must be given before -lnsl if both are needed.  We assume that
50598     # if connect needs -lnsl, so does gethostbyname.
50599     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50600 if test "x$ac_cv_func_connect" = xyes; then :
50601 
50602 fi
50603 
50604     if test $ac_cv_func_connect = no; then
50605       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50606 $as_echo_n "checking for connect in -lsocket... " >&6; }
50607 if ${ac_cv_lib_socket_connect+:} false; then :
50608   $as_echo_n "(cached) " >&6
50609 else
50610   ac_check_lib_save_LIBS=$LIBS
50611 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50613 /* end confdefs.h.  */
50614 
50615 /* Override any GCC internal prototype to avoid an error.
50616    Use char because int might match the return type of a GCC
50617    builtin and then its argument prototype would still apply.  */
50618 #ifdef __cplusplus
50619 extern "C"
50620 #endif
50621 char connect ();
50622 int
50623 main ()
50624 {
50625 return connect ();
50626   ;
50627   return 0;
50628 }
50629 _ACEOF
50630 if ac_fn_cxx_try_link "$LINENO"; then :
50631   ac_cv_lib_socket_connect=yes
50632 else
50633   ac_cv_lib_socket_connect=no
50634 fi
50635 rm -f core conftest.err conftest.$ac_objext \
50636     conftest$ac_exeext conftest.$ac_ext
50637 LIBS=$ac_check_lib_save_LIBS
50638 fi
50639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
50640 $as_echo "$ac_cv_lib_socket_connect" >&6; }
50641 if test "x$ac_cv_lib_socket_connect" = xyes; then :
50642   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
50643 fi
50644 
50645     fi
50646 
50647     # Guillermo Gomez says -lposix is necessary on A/UX.
50648     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
50649 if test "x$ac_cv_func_remove" = xyes; then :
50650 
50651 fi
50652 
50653     if test $ac_cv_func_remove = no; then
50654       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
50655 $as_echo_n "checking for remove in -lposix... " >&6; }
50656 if ${ac_cv_lib_posix_remove+:} false; then :
50657   $as_echo_n "(cached) " >&6
50658 else
50659   ac_check_lib_save_LIBS=$LIBS
50660 LIBS="-lposix  $LIBS"
50661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50662 /* end confdefs.h.  */
50663 
50664 /* Override any GCC internal prototype to avoid an error.
50665    Use char because int might match the return type of a GCC
50666    builtin and then its argument prototype would still apply.  */
50667 #ifdef __cplusplus
50668 extern "C"
50669 #endif
50670 char remove ();
50671 int
50672 main ()
50673 {
50674 return remove ();
50675   ;
50676   return 0;
50677 }
50678 _ACEOF
50679 if ac_fn_cxx_try_link "$LINENO"; then :
50680   ac_cv_lib_posix_remove=yes
50681 else
50682   ac_cv_lib_posix_remove=no
50683 fi
50684 rm -f core conftest.err conftest.$ac_objext \
50685     conftest$ac_exeext conftest.$ac_ext
50686 LIBS=$ac_check_lib_save_LIBS
50687 fi
50688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
50689 $as_echo "$ac_cv_lib_posix_remove" >&6; }
50690 if test "x$ac_cv_lib_posix_remove" = xyes; then :
50691   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
50692 fi
50693 
50694     fi
50695 
50696     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
50697     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
50698 if test "x$ac_cv_func_shmat" = xyes; then :
50699 
50700 fi
50701 
50702     if test $ac_cv_func_shmat = no; then
50703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
50704 $as_echo_n "checking for shmat in -lipc... " >&6; }
50705 if ${ac_cv_lib_ipc_shmat+:} false; then :
50706   $as_echo_n "(cached) " >&6
50707 else
50708   ac_check_lib_save_LIBS=$LIBS
50709 LIBS="-lipc  $LIBS"
50710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50711 /* end confdefs.h.  */
50712 
50713 /* Override any GCC internal prototype to avoid an error.
50714    Use char because int might match the return type of a GCC
50715    builtin and then its argument prototype would still apply.  */
50716 #ifdef __cplusplus
50717 extern "C"
50718 #endif
50719 char shmat ();
50720 int
50721 main ()
50722 {
50723 return shmat ();
50724   ;
50725   return 0;
50726 }
50727 _ACEOF
50728 if ac_fn_cxx_try_link "$LINENO"; then :
50729   ac_cv_lib_ipc_shmat=yes
50730 else
50731   ac_cv_lib_ipc_shmat=no
50732 fi
50733 rm -f core conftest.err conftest.$ac_objext \
50734     conftest$ac_exeext conftest.$ac_ext
50735 LIBS=$ac_check_lib_save_LIBS
50736 fi
50737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
50738 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
50739 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
50740   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
50741 fi
50742 
50743     fi
50744   fi
50745 
50746   # Check for libraries that X11R6 Xt/Xaw programs need.
50747   ac_save_LDFLAGS=$LDFLAGS
50748   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
50749   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
50750   # check for ICE first), but we must link in the order -lSM -lICE or
50751   # we get undefined symbols.  So assume we have SM if we have ICE.
50752   # These have to be linked with before -lX11, unlike the other
50753   # libraries we check for below, so use a different variable.
50754   # John Interrante, Karl Berry
50755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
50756 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
50757 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
50758   $as_echo_n "(cached) " >&6
50759 else
50760   ac_check_lib_save_LIBS=$LIBS
50761 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
50762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50763 /* end confdefs.h.  */
50764 
50765 /* Override any GCC internal prototype to avoid an error.
50766    Use char because int might match the return type of a GCC
50767    builtin and then its argument prototype would still apply.  */
50768 #ifdef __cplusplus
50769 extern "C"
50770 #endif
50771 char IceConnectionNumber ();
50772 int
50773 main ()
50774 {
50775 return IceConnectionNumber ();
50776   ;
50777   return 0;
50778 }
50779 _ACEOF
50780 if ac_fn_cxx_try_link "$LINENO"; then :
50781   ac_cv_lib_ICE_IceConnectionNumber=yes
50782 else
50783   ac_cv_lib_ICE_IceConnectionNumber=no
50784 fi
50785 rm -f core conftest.err conftest.$ac_objext \
50786     conftest$ac_exeext conftest.$ac_ext
50787 LIBS=$ac_check_lib_save_LIBS
50788 fi
50789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
50790 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
50791 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
50792   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
50793 fi
50794 
50795   LDFLAGS=$ac_save_LDFLAGS
50796 
50797 fi
50798 
50799 
50800     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
50801     # this doesn't make sense so we remove it.
50802     if test "x$COMPILE_TYPE" = xcross; then
50803       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
50804     fi
50805 
50806     if test "x$no_x" = xyes; then
50807 
50808   # Print a helpful message on how to acquire the necessary build dependency.
50809   # x11 is the help tag: freetype, cups, alsa etc
50810   MISSING_DEPENDENCY=x11
50811 
50812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50813     cygwin_help $MISSING_DEPENDENCY
50814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50815     msys_help $MISSING_DEPENDENCY
50816   else
50817     PKGHANDLER_COMMAND=
50818 
50819     case $PKGHANDLER in
50820       apt-get)
50821         apt_help     $MISSING_DEPENDENCY ;;
50822       yum)
50823         yum_help     $MISSING_DEPENDENCY ;;
50824       port)
50825         port_help    $MISSING_DEPENDENCY ;;
50826       pkgutil)
50827         pkgutil_help $MISSING_DEPENDENCY ;;
50828       pkgadd)
50829         pkgadd_help  $MISSING_DEPENDENCY ;;
50830     esac
50831 
50832     if test "x$PKGHANDLER_COMMAND" != x; then
50833       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50834     fi
50835   fi
50836 
50837       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
50838     fi
50839 
50840     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50841       OPENWIN_HOME="/usr/openwin"
50842       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
50843       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50844           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
50845           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50846           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
50847     fi
50848 
50849     ac_ext=c
50850 ac_cpp='$CPP $CPPFLAGS'
50851 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50852 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50853 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50854 
50855     OLD_CFLAGS="$CFLAGS"
50856     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
50857 
50858     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
50859     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
50860 do :
50861   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50862 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
50863           # include <X11/Xlib.h>
50864           # include <X11/Xutil.h>
50865 
50866 
50867 "
50868 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50869   cat >>confdefs.h <<_ACEOF
50870 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50871 _ACEOF
50872  X11_HEADERS_OK=yes
50873 else
50874   X11_HEADERS_OK=no; break
50875 fi
50876 
50877 done
50878 
50879 
50880     if test "x$X11_HEADERS_OK" = xno; then
50881 
50882   # Print a helpful message on how to acquire the necessary build dependency.
50883   # x11 is the help tag: freetype, cups, alsa etc
50884   MISSING_DEPENDENCY=x11
50885 
50886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50887     cygwin_help $MISSING_DEPENDENCY
50888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50889     msys_help $MISSING_DEPENDENCY
50890   else
50891     PKGHANDLER_COMMAND=
50892 
50893     case $PKGHANDLER in
50894       apt-get)
50895         apt_help     $MISSING_DEPENDENCY ;;
50896       yum)
50897         yum_help     $MISSING_DEPENDENCY ;;
50898       port)
50899         port_help    $MISSING_DEPENDENCY ;;
50900       pkgutil)
50901         pkgutil_help $MISSING_DEPENDENCY ;;
50902       pkgadd)
50903         pkgadd_help  $MISSING_DEPENDENCY ;;
50904     esac
50905 
50906     if test "x$PKGHANDLER_COMMAND" != x; then
50907       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50908     fi
50909   fi
50910 
50911       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
50912     fi
50913 
50914     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
50915     # defined in libawt_xawt.
50916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
50917 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
50918     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50919 /* end confdefs.h.  */
50920 #include <X11/extensions/Xrender.h>
50921 int
50922 main ()
50923 {
50924 XLinearGradient x;
50925   ;
50926   return 0;
50927 }
50928 _ACEOF
50929 if ac_fn_c_try_compile "$LINENO"; then :
50930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50931 $as_echo "yes" >&6; }
50932 else
50933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50934 $as_echo "no" >&6; }
50935          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
50936 fi
50937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50938 
50939     CFLAGS="$OLD_CFLAGS"
50940     ac_ext=cpp
50941 ac_cpp='$CXXCPP $CPPFLAGS'
50942 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50943 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50944 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50945 
50946   fi # NEEDS_LIB_X11
50947 
50948 
50949 
50950 
50951 
50952 
50953 # Check whether --with-cups was given.
50954 if test "${with_cups+set}" = set; then :
50955   withval=$with_cups;
50956 fi
50957 
50958 
50959 # Check whether --with-cups-include was given.
50960 if test "${with_cups_include+set}" = set; then :
50961   withval=$with_cups_include;
50962 fi
50963 
50964 
50965   if test "x$NEEDS_LIB_CUPS" = xfalse; then
50966     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
50967         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
50968       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
50969 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
50970     fi
50971     CUPS_CFLAGS=
50972   else
50973     CUPS_FOUND=no
50974 
50975     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
50976       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
50977     fi
50978 
50979     if test "x${with_cups}" != x; then
50980       CUPS_CFLAGS="-I${with_cups}/include"
50981       CUPS_FOUND=yes
50982     fi
50983     if test "x${with_cups_include}" != x; then
50984       CUPS_CFLAGS="-I${with_cups_include}"
50985       CUPS_FOUND=yes
50986     fi
50987     if test "x$CUPS_FOUND" = xno; then
50988       # Are the cups headers installed in the default /usr/include location?
50989       for ac_header in cups/cups.h cups/ppd.h
50990 do :
50991   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50992 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50993 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50994   cat >>confdefs.h <<_ACEOF
50995 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50996 _ACEOF
50997 
50998           CUPS_FOUND=yes
50999           CUPS_CFLAGS=
51000           DEFAULT_CUPS=yes
51001 
51002 fi
51003 
51004 done
51005 
51006     fi
51007     if test "x$CUPS_FOUND" = xno; then
51008       # Getting nervous now? Lets poke around for standard Solaris third-party
51009       # package installation locations.
51010       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51011 $as_echo_n "checking for cups headers... " >&6; }
51012       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51013         # An SFW package seems to be installed!
51014         CUPS_FOUND=yes
51015         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51016       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51017         # A CSW package seems to be installed!
51018         CUPS_FOUND=yes
51019         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51020       fi
51021       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51022 $as_echo "$CUPS_FOUND" >&6; }
51023     fi
51024     if test "x$CUPS_FOUND" = xno; then
51025 
51026   # Print a helpful message on how to acquire the necessary build dependency.
51027   # cups is the help tag: freetype, cups, alsa etc
51028   MISSING_DEPENDENCY=cups
51029 
51030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51031     cygwin_help $MISSING_DEPENDENCY
51032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51033     msys_help $MISSING_DEPENDENCY
51034   else
51035     PKGHANDLER_COMMAND=
51036 
51037     case $PKGHANDLER in
51038       apt-get)
51039         apt_help     $MISSING_DEPENDENCY ;;
51040       yum)
51041         yum_help     $MISSING_DEPENDENCY ;;
51042       port)
51043         port_help    $MISSING_DEPENDENCY ;;
51044       pkgutil)
51045         pkgutil_help $MISSING_DEPENDENCY ;;
51046       pkgadd)
51047         pkgadd_help  $MISSING_DEPENDENCY ;;
51048     esac
51049 
51050     if test "x$PKGHANDLER_COMMAND" != x; then
51051       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51052     fi
51053   fi
51054 
51055       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51056     fi
51057   fi
51058 
51059 
51060 
51061 
51062 
51063 # Check whether --with-freetype was given.
51064 if test "${with_freetype+set}" = set; then :
51065   withval=$with_freetype;
51066 fi
51067 
51068 
51069 # Check whether --with-freetype-include was given.
51070 if test "${with_freetype_include+set}" = set; then :
51071   withval=$with_freetype_include;
51072 fi
51073 
51074 
51075 # Check whether --with-freetype-lib was given.
51076 if test "${with_freetype_lib+set}" = set; then :
51077   withval=$with_freetype_lib;
51078 fi
51079 
51080 
51081 # Check whether --with-freetype-src was given.
51082 if test "${with_freetype_src+set}" = set; then :
51083   withval=$with_freetype_src;
51084 fi
51085 
51086   # Check whether --enable-freetype-bundling was given.
51087 if test "${enable_freetype_bundling+set}" = set; then :
51088   enableval=$enable_freetype_bundling;
51089 fi
51090 
51091 
51092   # Need to specify explicitly since it needs to be overridden on some versions of macosx
51093   FREETYPE_BASE_NAME=freetype
51094   FREETYPE_CFLAGS=
51095   FREETYPE_LIBS=
51096   FREETYPE_BUNDLE_LIB_PATH=
51097 
51098   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51099     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51100         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51101         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51102         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51103       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51104 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51105     fi
51106     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51107       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51108 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51109     fi
51110   else
51111     # freetype is needed to build; go get it!
51112 
51113     BUNDLE_FREETYPE="$enable_freetype_bundling"
51114 
51115     if  test "x$with_freetype_src" != x; then
51116       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51117         # Try to build freetype if --with-freetype-src was given on Windows
51118 
51119   FREETYPE_SRC_PATH="$with_freetype_src"
51120   BUILD_FREETYPE=yes
51121 
51122   # Check if the freetype sources are acessible..
51123   if ! test -d $FREETYPE_SRC_PATH; then
51124     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
51125 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51126     BUILD_FREETYPE=no
51127   fi
51128   # ..and contain a vc2010 project file
51129   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51130   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51131     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
51132 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51133     BUILD_FREETYPE=no
51134   fi
51135   # Now check if configure found a version of 'msbuild.exe'
51136   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51137     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
51138 $as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
51139     BUILD_FREETYPE=no
51140   fi
51141 
51142   # Ready to go..
51143   if test "x$BUILD_FREETYPE" = xyes; then
51144     # msbuild requires trailing slashes for output directories
51145     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51146     freetype_lib_path_unix="$freetype_lib_path"
51147     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51148 
51149   unix_path="$vcxproj_path"
51150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51151     windows_path=`$CYGPATH -m "$unix_path"`
51152     vcxproj_path="$windows_path"
51153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51154     windows_path=`cmd //c echo $unix_path`
51155     vcxproj_path="$windows_path"
51156   fi
51157 
51158 
51159   unix_path="$freetype_lib_path"
51160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51161     windows_path=`$CYGPATH -m "$unix_path"`
51162     freetype_lib_path="$windows_path"
51163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51164     windows_path=`cmd //c echo $unix_path`
51165     freetype_lib_path="$windows_path"
51166   fi
51167 
51168 
51169   unix_path="$freetype_obj_path"
51170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51171     windows_path=`$CYGPATH -m "$unix_path"`
51172     freetype_obj_path="$windows_path"
51173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51174     windows_path=`cmd //c echo $unix_path`
51175     freetype_obj_path="$windows_path"
51176   fi
51177 
51178     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51179       freetype_platform=x64
51180     else
51181       freetype_platform=win32
51182     fi
51183 
51184     # The original freetype project file is for VS 2010 (i.e. 'v100'),
51185     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51186     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51187     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51188     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51189 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51190 
51191     # First we try to build the freetype.dll
51192     $ECHO -e "@echo off\n"\
51193         "$MSBUILD $vcxproj_path "\
51194         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51195         "/p:Configuration=\"Release Multithreaded\" "\
51196         "/p:Platform=$freetype_platform "\
51197         "/p:ConfigurationType=DynamicLibrary "\
51198         "/p:TargetName=freetype "\
51199         "/p:OutDir=\"$freetype_lib_path\" "\
51200         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51201     cmd /c freetype.bat
51202 
51203     if test -s "$freetype_lib_path_unix/freetype.dll"; then
51204       # If that succeeds we also build freetype.lib
51205       $ECHO -e "@echo off\n"\
51206           "$MSBUILD $vcxproj_path "\
51207           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51208           "/p:Configuration=\"Release Multithreaded\" "\
51209           "/p:Platform=$freetype_platform "\
51210           "/p:ConfigurationType=StaticLibrary "\
51211           "/p:TargetName=freetype "\
51212           "/p:OutDir=\"$freetype_lib_path\" "\
51213           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51214       cmd /c freetype.bat
51215 
51216       if test -s "$freetype_lib_path_unix/freetype.lib"; then
51217         # Once we build both, lib and dll, set freetype lib and include path appropriately
51218         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51219         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51220         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51221 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51222       else
51223         BUILD_FREETYPE=no
51224       fi
51225     else
51226       BUILD_FREETYPE=no
51227     fi
51228   fi
51229 
51230         if test "x$BUILD_FREETYPE" = xyes; then
51231           # Okay, we built it. Check that it works.
51232 
51233   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51234   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51235   METHOD="--with-freetype-src"
51236 
51237   # Let's start with an optimistic view of the world :-)
51238   FOUND_FREETYPE=yes
51239 
51240   # First look for the canonical freetype main include file ft2build.h.
51241   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51242     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51243     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51244     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51245       # Fail.
51246       FOUND_FREETYPE=no
51247     fi
51248   fi
51249 
51250   if test "x$FOUND_FREETYPE" = xyes; then
51251     # Include file found, let's continue the sanity check.
51252     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51253 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51254 
51255     # Reset to default value
51256     FREETYPE_BASE_NAME=freetype
51257     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51258     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51259       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51260           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51261         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51262         # for the .6 version explicitly.
51263         FREETYPE_BASE_NAME=freetype.6
51264         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51265         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51266 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51267       else
51268         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51269 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51270         FOUND_FREETYPE=no
51271       fi
51272     else
51273       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51274         # On Windows, we will need both .lib and .dll file.
51275         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51276           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51277 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51278           FOUND_FREETYPE=no
51279         fi
51280       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51281           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51282         # Found lib in isa dir, use that instead.
51283         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51284         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51285 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51286       fi
51287     fi
51288   fi
51289 
51290   if test "x$FOUND_FREETYPE" = xyes; then
51291 
51292   # Only process if variable expands to non-empty
51293 
51294   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51295     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51296 
51297   # Input might be given as Windows format, start by converting to
51298   # unix format.
51299   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51300   new_path=`$CYGPATH -u "$path"`
51301 
51302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51305   # "foo.exe" is OK but "foo" is an error.
51306   #
51307   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51308   # It is also a way to make sure we got the proper file name for the real test later on.
51309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51310   if test "x$test_shortpath" = x; then
51311     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51312 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51313     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51314   fi
51315 
51316   # Call helper function which possibly converts this using DOS-style short mode.
51317   # If so, the updated path is stored in $new_path.
51318 
51319   input_path="$new_path"
51320   # Check if we need to convert this using DOS-style short mode. If the path
51321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51322   # take no chances and rewrite it.
51323   # Note: m4 eats our [], so we need to use [ and ] instead.
51324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51325   if test "x$has_forbidden_chars" != x; then
51326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51330       # Going to short mode and back again did indeed matter. Since short mode is
51331       # case insensitive, let's make it lowercase to improve readability.
51332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51333       # Now convert it back to Unix-style (cygpath)
51334       input_path=`$CYGPATH -u "$shortmode_path"`
51335       new_path="$input_path"
51336     fi
51337   fi
51338 
51339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51340   if test "x$test_cygdrive_prefix" = x; then
51341     # As a simple fix, exclude /usr/bin since it's not a real path.
51342     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51344       # a path prefixed by /cygdrive for fixpath to work.
51345       new_path="$CYGWIN_ROOT_PATH$input_path"
51346     fi
51347   fi
51348 
51349 
51350   if test "x$path" != "x$new_path"; then
51351     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51352     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51353 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51354   fi
51355 
51356     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51357 
51358   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51359   has_colon=`$ECHO $path | $GREP ^.:`
51360   new_path="$path"
51361   if test "x$has_colon" = x; then
51362     # Not in mixed or Windows style, start by that.
51363     new_path=`cmd //c echo $path`
51364   fi
51365 
51366 
51367   input_path="$new_path"
51368   # Check if we need to convert this using DOS-style short mode. If the path
51369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51370   # take no chances and rewrite it.
51371   # Note: m4 eats our [], so we need to use [ and ] instead.
51372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51373   if test "x$has_forbidden_chars" != x; then
51374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51376   fi
51377 
51378 
51379   windows_path="$new_path"
51380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51381     unix_path=`$CYGPATH -u "$windows_path"`
51382     new_path="$unix_path"
51383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51385     new_path="$unix_path"
51386   fi
51387 
51388   if test "x$path" != "x$new_path"; then
51389     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51391 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51392   fi
51393 
51394   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51395   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51396 
51397     else
51398       # We're on a unix platform. Hooray! :)
51399       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51400       has_space=`$ECHO "$path" | $GREP " "`
51401       if test "x$has_space" != x; then
51402         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51403 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51404         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51405       fi
51406 
51407       # Use eval to expand a potential ~
51408       eval path="$path"
51409       if test ! -f "$path" && test ! -d "$path"; then
51410         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51411       fi
51412 
51413       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51414     fi
51415   fi
51416 
51417 
51418   # Only process if variable expands to non-empty
51419 
51420   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51421     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51422 
51423   # Input might be given as Windows format, start by converting to
51424   # unix format.
51425   path="$POTENTIAL_FREETYPE_LIB_PATH"
51426   new_path=`$CYGPATH -u "$path"`
51427 
51428   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51429   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51430   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51431   # "foo.exe" is OK but "foo" is an error.
51432   #
51433   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51434   # It is also a way to make sure we got the proper file name for the real test later on.
51435   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51436   if test "x$test_shortpath" = x; then
51437     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51438 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51439     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51440   fi
51441 
51442   # Call helper function which possibly converts this using DOS-style short mode.
51443   # If so, the updated path is stored in $new_path.
51444 
51445   input_path="$new_path"
51446   # Check if we need to convert this using DOS-style short mode. If the path
51447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51448   # take no chances and rewrite it.
51449   # Note: m4 eats our [], so we need to use [ and ] instead.
51450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51451   if test "x$has_forbidden_chars" != x; then
51452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51456       # Going to short mode and back again did indeed matter. Since short mode is
51457       # case insensitive, let's make it lowercase to improve readability.
51458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51459       # Now convert it back to Unix-style (cygpath)
51460       input_path=`$CYGPATH -u "$shortmode_path"`
51461       new_path="$input_path"
51462     fi
51463   fi
51464 
51465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51466   if test "x$test_cygdrive_prefix" = x; then
51467     # As a simple fix, exclude /usr/bin since it's not a real path.
51468     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51470       # a path prefixed by /cygdrive for fixpath to work.
51471       new_path="$CYGWIN_ROOT_PATH$input_path"
51472     fi
51473   fi
51474 
51475 
51476   if test "x$path" != "x$new_path"; then
51477     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51479 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51480   fi
51481 
51482     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51483 
51484   path="$POTENTIAL_FREETYPE_LIB_PATH"
51485   has_colon=`$ECHO $path | $GREP ^.:`
51486   new_path="$path"
51487   if test "x$has_colon" = x; then
51488     # Not in mixed or Windows style, start by that.
51489     new_path=`cmd //c echo $path`
51490   fi
51491 
51492 
51493   input_path="$new_path"
51494   # Check if we need to convert this using DOS-style short mode. If the path
51495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51496   # take no chances and rewrite it.
51497   # Note: m4 eats our [], so we need to use [ and ] instead.
51498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51499   if test "x$has_forbidden_chars" != x; then
51500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51501     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51502   fi
51503 
51504 
51505   windows_path="$new_path"
51506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51507     unix_path=`$CYGPATH -u "$windows_path"`
51508     new_path="$unix_path"
51509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51511     new_path="$unix_path"
51512   fi
51513 
51514   if test "x$path" != "x$new_path"; then
51515     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51517 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51518   fi
51519 
51520   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51521   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51522 
51523     else
51524       # We're on a unix platform. Hooray! :)
51525       path="$POTENTIAL_FREETYPE_LIB_PATH"
51526       has_space=`$ECHO "$path" | $GREP " "`
51527       if test "x$has_space" != x; then
51528         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51529 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51530         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51531       fi
51532 
51533       # Use eval to expand a potential ~
51534       eval path="$path"
51535       if test ! -f "$path" && test ! -d "$path"; then
51536         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51537       fi
51538 
51539       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51540     fi
51541   fi
51542 
51543 
51544     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51546 $as_echo_n "checking for freetype includes... " >&6; }
51547     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51548 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51549     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51550     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51551 $as_echo_n "checking for freetype libraries... " >&6; }
51552     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51553 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51554   fi
51555 
51556           if test "x$FOUND_FREETYPE" != xyes; then
51557             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51558           fi
51559         else
51560           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51561 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51562           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51563         fi
51564       else
51565         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51566 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51567       fi
51568     fi
51569 
51570     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51571       # User has specified settings
51572 
51573       if test "x$BUNDLE_FREETYPE" = x; then
51574         # If not specified, default is to bundle freetype
51575         BUNDLE_FREETYPE=yes
51576       fi
51577 
51578       if test "x$with_freetype" != x; then
51579         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51580         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51581       fi
51582 
51583       # Allow --with-freetype-lib and --with-freetype-include to override
51584       if test "x$with_freetype_include" != x; then
51585         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51586       fi
51587       if test "x$with_freetype_lib" != x; then
51588         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51589       fi
51590 
51591       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51592         # Okay, we got it. Check that it works.
51593 
51594   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51595   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51596   METHOD="--with-freetype"
51597 
51598   # Let's start with an optimistic view of the world :-)
51599   FOUND_FREETYPE=yes
51600 
51601   # First look for the canonical freetype main include file ft2build.h.
51602   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51603     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51604     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51605     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51606       # Fail.
51607       FOUND_FREETYPE=no
51608     fi
51609   fi
51610 
51611   if test "x$FOUND_FREETYPE" = xyes; then
51612     # Include file found, let's continue the sanity check.
51613     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51614 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51615 
51616     # Reset to default value
51617     FREETYPE_BASE_NAME=freetype
51618     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51619     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51620       if test "x$OPENJDK_TARGET_OS" = xmacosx \
51621           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51622         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51623         # for the .6 version explicitly.
51624         FREETYPE_BASE_NAME=freetype.6
51625         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51626         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51627 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51628       else
51629         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51630 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51631         FOUND_FREETYPE=no
51632       fi
51633     else
51634       if test "x$OPENJDK_TARGET_OS" = xwindows; then
51635         # On Windows, we will need both .lib and .dll file.
51636         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51637           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51638 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51639           FOUND_FREETYPE=no
51640         fi
51641       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51642           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51643         # Found lib in isa dir, use that instead.
51644         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51645         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51646 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51647       fi
51648     fi
51649   fi
51650 
51651   if test "x$FOUND_FREETYPE" = xyes; then
51652 
51653   # Only process if variable expands to non-empty
51654 
51655   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51656     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51657 
51658   # Input might be given as Windows format, start by converting to
51659   # unix format.
51660   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51661   new_path=`$CYGPATH -u "$path"`
51662 
51663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51666   # "foo.exe" is OK but "foo" is an error.
51667   #
51668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51669   # It is also a way to make sure we got the proper file name for the real test later on.
51670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51671   if test "x$test_shortpath" = x; then
51672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51673 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51674     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51675   fi
51676 
51677   # Call helper function which possibly converts this using DOS-style short mode.
51678   # If so, the updated path is stored in $new_path.
51679 
51680   input_path="$new_path"
51681   # Check if we need to convert this using DOS-style short mode. If the path
51682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51683   # take no chances and rewrite it.
51684   # Note: m4 eats our [], so we need to use [ and ] instead.
51685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51686   if test "x$has_forbidden_chars" != x; then
51687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51691       # Going to short mode and back again did indeed matter. Since short mode is
51692       # case insensitive, let's make it lowercase to improve readability.
51693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51694       # Now convert it back to Unix-style (cygpath)
51695       input_path=`$CYGPATH -u "$shortmode_path"`
51696       new_path="$input_path"
51697     fi
51698   fi
51699 
51700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51701   if test "x$test_cygdrive_prefix" = x; then
51702     # As a simple fix, exclude /usr/bin since it's not a real path.
51703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51705       # a path prefixed by /cygdrive for fixpath to work.
51706       new_path="$CYGWIN_ROOT_PATH$input_path"
51707     fi
51708   fi
51709 
51710 
51711   if test "x$path" != "x$new_path"; then
51712     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51714 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51715   fi
51716 
51717     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51718 
51719   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51720   has_colon=`$ECHO $path | $GREP ^.:`
51721   new_path="$path"
51722   if test "x$has_colon" = x; then
51723     # Not in mixed or Windows style, start by that.
51724     new_path=`cmd //c echo $path`
51725   fi
51726 
51727 
51728   input_path="$new_path"
51729   # Check if we need to convert this using DOS-style short mode. If the path
51730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51731   # take no chances and rewrite it.
51732   # Note: m4 eats our [], so we need to use [ and ] instead.
51733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51734   if test "x$has_forbidden_chars" != x; then
51735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51737   fi
51738 
51739 
51740   windows_path="$new_path"
51741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51742     unix_path=`$CYGPATH -u "$windows_path"`
51743     new_path="$unix_path"
51744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51746     new_path="$unix_path"
51747   fi
51748 
51749   if test "x$path" != "x$new_path"; then
51750     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51752 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51753   fi
51754 
51755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51757 
51758     else
51759       # We're on a unix platform. Hooray! :)
51760       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51761       has_space=`$ECHO "$path" | $GREP " "`
51762       if test "x$has_space" != x; then
51763         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51764 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51765         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51766       fi
51767 
51768       # Use eval to expand a potential ~
51769       eval path="$path"
51770       if test ! -f "$path" && test ! -d "$path"; then
51771         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51772       fi
51773 
51774       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51775     fi
51776   fi
51777 
51778 
51779   # Only process if variable expands to non-empty
51780 
51781   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51783 
51784   # Input might be given as Windows format, start by converting to
51785   # unix format.
51786   path="$POTENTIAL_FREETYPE_LIB_PATH"
51787   new_path=`$CYGPATH -u "$path"`
51788 
51789   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51790   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51791   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51792   # "foo.exe" is OK but "foo" is an error.
51793   #
51794   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51795   # It is also a way to make sure we got the proper file name for the real test later on.
51796   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51797   if test "x$test_shortpath" = x; then
51798     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51799 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51800     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51801   fi
51802 
51803   # Call helper function which possibly converts this using DOS-style short mode.
51804   # If so, the updated path is stored in $new_path.
51805 
51806   input_path="$new_path"
51807   # Check if we need to convert this using DOS-style short mode. If the path
51808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51809   # take no chances and rewrite it.
51810   # Note: m4 eats our [], so we need to use [ and ] instead.
51811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51812   if test "x$has_forbidden_chars" != x; then
51813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51817       # Going to short mode and back again did indeed matter. Since short mode is
51818       # case insensitive, let's make it lowercase to improve readability.
51819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51820       # Now convert it back to Unix-style (cygpath)
51821       input_path=`$CYGPATH -u "$shortmode_path"`
51822       new_path="$input_path"
51823     fi
51824   fi
51825 
51826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51827   if test "x$test_cygdrive_prefix" = x; then
51828     # As a simple fix, exclude /usr/bin since it's not a real path.
51829     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51831       # a path prefixed by /cygdrive for fixpath to work.
51832       new_path="$CYGWIN_ROOT_PATH$input_path"
51833     fi
51834   fi
51835 
51836 
51837   if test "x$path" != "x$new_path"; then
51838     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51839     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51840 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51841   fi
51842 
51843     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51844 
51845   path="$POTENTIAL_FREETYPE_LIB_PATH"
51846   has_colon=`$ECHO $path | $GREP ^.:`
51847   new_path="$path"
51848   if test "x$has_colon" = x; then
51849     # Not in mixed or Windows style, start by that.
51850     new_path=`cmd //c echo $path`
51851   fi
51852 
51853 
51854   input_path="$new_path"
51855   # Check if we need to convert this using DOS-style short mode. If the path
51856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51857   # take no chances and rewrite it.
51858   # Note: m4 eats our [], so we need to use [ and ] instead.
51859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51860   if test "x$has_forbidden_chars" != x; then
51861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51863   fi
51864 
51865 
51866   windows_path="$new_path"
51867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51868     unix_path=`$CYGPATH -u "$windows_path"`
51869     new_path="$unix_path"
51870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51872     new_path="$unix_path"
51873   fi
51874 
51875   if test "x$path" != "x$new_path"; then
51876     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51877     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51878 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51879   fi
51880 
51881   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51882   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51883 
51884     else
51885       # We're on a unix platform. Hooray! :)
51886       path="$POTENTIAL_FREETYPE_LIB_PATH"
51887       has_space=`$ECHO "$path" | $GREP " "`
51888       if test "x$has_space" != x; then
51889         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51890 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51891         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51892       fi
51893 
51894       # Use eval to expand a potential ~
51895       eval path="$path"
51896       if test ! -f "$path" && test ! -d "$path"; then
51897         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51898       fi
51899 
51900       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51901     fi
51902   fi
51903 
51904 
51905     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51907 $as_echo_n "checking for freetype includes... " >&6; }
51908     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51909 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51910     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51912 $as_echo_n "checking for freetype libraries... " >&6; }
51913     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51914 $as_echo "$FREETYPE_LIB_PATH" >&6; }
51915   fi
51916 
51917         if test "x$FOUND_FREETYPE" != xyes; then
51918           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
51919         fi
51920       else
51921         # User specified only one of lib or include. This is an error.
51922         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
51923           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
51924 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
51925           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51926         else
51927           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
51928 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
51929           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51930         fi
51931       fi
51932     else
51933       # User did not specify settings, but we need freetype. Try to locate it.
51934 
51935       if test "x$BUNDLE_FREETYPE" = x; then
51936         # If not specified, default is to bundle freetype only on windows
51937         if test "x$OPENJDK_TARGET_OS" = xwindows; then
51938           BUNDLE_FREETYPE=yes
51939         else
51940           BUNDLE_FREETYPE=no
51941         fi
51942       fi
51943 
51944       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
51945       if test "x$SYSROOT" = x; then
51946         if test "x$FOUND_FREETYPE" != xyes; then
51947           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
51948           if test "x$PKG_CONFIG" != x; then
51949 
51950 pkg_failed=no
51951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
51952 $as_echo_n "checking for FREETYPE... " >&6; }
51953 
51954 if test -n "$FREETYPE_CFLAGS"; then
51955     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
51956  elif test -n "$PKG_CONFIG"; then
51957     if test -n "$PKG_CONFIG" && \
51958     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51959   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51960   ac_status=$?
51961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51962   test $ac_status = 0; }; then
51963   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
51964 else
51965   pkg_failed=yes
51966 fi
51967  else
51968     pkg_failed=untried
51969 fi
51970 if test -n "$FREETYPE_LIBS"; then
51971     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
51972  elif test -n "$PKG_CONFIG"; then
51973     if test -n "$PKG_CONFIG" && \
51974     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51975   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51976   ac_status=$?
51977   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51978   test $ac_status = 0; }; then
51979   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
51980 else
51981   pkg_failed=yes
51982 fi
51983  else
51984     pkg_failed=untried
51985 fi
51986 
51987 
51988 
51989 if test $pkg_failed = yes; then
51990 
51991 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51992         _pkg_short_errors_supported=yes
51993 else
51994         _pkg_short_errors_supported=no
51995 fi
51996         if test $_pkg_short_errors_supported = yes; then
51997                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
51998         else
51999                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52000         fi
52001         # Put the nasty error message in config.log where it belongs
52002         echo "$FREETYPE_PKG_ERRORS" >&5
52003 
52004         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52005 $as_echo "no" >&6; }
52006                 FOUND_FREETYPE=no
52007 elif test $pkg_failed = untried; then
52008         FOUND_FREETYPE=no
52009 else
52010         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52011         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52013 $as_echo "yes" >&6; }
52014         FOUND_FREETYPE=yes
52015 fi
52016             if test "x$FOUND_FREETYPE" = xyes; then
52017               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52018               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52019               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52020               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52021                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52022               fi
52023               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52024               if test "x$BUNDLE_FREETYPE" = xyes; then
52025                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52026 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52027                 FOUND_FREETYPE=no
52028               else
52029                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52030 $as_echo_n "checking for freetype... " >&6; }
52031                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52032 $as_echo "yes (using pkg-config)" >&6; }
52033               fi
52034             fi
52035           fi
52036         fi
52037       fi
52038 
52039       if test "x$FOUND_FREETYPE" != xyes; then
52040         # Check in well-known locations
52041         if test "x$OPENJDK_TARGET_OS" = xwindows; then
52042           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52043 
52044   windows_path="$FREETYPE_BASE_DIR"
52045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52046     unix_path=`$CYGPATH -u "$windows_path"`
52047     FREETYPE_BASE_DIR="$unix_path"
52048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52050     FREETYPE_BASE_DIR="$unix_path"
52051   fi
52052 
52053 
52054   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52055   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52056   METHOD="well-known location"
52057 
52058   # Let's start with an optimistic view of the world :-)
52059   FOUND_FREETYPE=yes
52060 
52061   # First look for the canonical freetype main include file ft2build.h.
52062   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52063     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52064     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52065     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52066       # Fail.
52067       FOUND_FREETYPE=no
52068     fi
52069   fi
52070 
52071   if test "x$FOUND_FREETYPE" = xyes; then
52072     # Include file found, let's continue the sanity check.
52073     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52074 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52075 
52076     # Reset to default value
52077     FREETYPE_BASE_NAME=freetype
52078     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52079     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52080       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52081           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52082         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52083         # for the .6 version explicitly.
52084         FREETYPE_BASE_NAME=freetype.6
52085         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52086         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52087 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52088       else
52089         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52090 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52091         FOUND_FREETYPE=no
52092       fi
52093     else
52094       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52095         # On Windows, we will need both .lib and .dll file.
52096         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52097           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52098 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52099           FOUND_FREETYPE=no
52100         fi
52101       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52102           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52103         # Found lib in isa dir, use that instead.
52104         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52105         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52106 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52107       fi
52108     fi
52109   fi
52110 
52111   if test "x$FOUND_FREETYPE" = xyes; then
52112 
52113   # Only process if variable expands to non-empty
52114 
52115   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52117 
52118   # Input might be given as Windows format, start by converting to
52119   # unix format.
52120   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52121   new_path=`$CYGPATH -u "$path"`
52122 
52123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52126   # "foo.exe" is OK but "foo" is an error.
52127   #
52128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52129   # It is also a way to make sure we got the proper file name for the real test later on.
52130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52131   if test "x$test_shortpath" = x; then
52132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52133 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52134     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52135   fi
52136 
52137   # Call helper function which possibly converts this using DOS-style short mode.
52138   # If so, the updated path is stored in $new_path.
52139 
52140   input_path="$new_path"
52141   # Check if we need to convert this using DOS-style short mode. If the path
52142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52143   # take no chances and rewrite it.
52144   # Note: m4 eats our [], so we need to use [ and ] instead.
52145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52146   if test "x$has_forbidden_chars" != x; then
52147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52151       # Going to short mode and back again did indeed matter. Since short mode is
52152       # case insensitive, let's make it lowercase to improve readability.
52153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52154       # Now convert it back to Unix-style (cygpath)
52155       input_path=`$CYGPATH -u "$shortmode_path"`
52156       new_path="$input_path"
52157     fi
52158   fi
52159 
52160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52161   if test "x$test_cygdrive_prefix" = x; then
52162     # As a simple fix, exclude /usr/bin since it's not a real path.
52163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52165       # a path prefixed by /cygdrive for fixpath to work.
52166       new_path="$CYGWIN_ROOT_PATH$input_path"
52167     fi
52168   fi
52169 
52170 
52171   if test "x$path" != "x$new_path"; then
52172     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52174 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52175   fi
52176 
52177     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52178 
52179   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52180   has_colon=`$ECHO $path | $GREP ^.:`
52181   new_path="$path"
52182   if test "x$has_colon" = x; then
52183     # Not in mixed or Windows style, start by that.
52184     new_path=`cmd //c echo $path`
52185   fi
52186 
52187 
52188   input_path="$new_path"
52189   # Check if we need to convert this using DOS-style short mode. If the path
52190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52191   # take no chances and rewrite it.
52192   # Note: m4 eats our [], so we need to use [ and ] instead.
52193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52194   if test "x$has_forbidden_chars" != x; then
52195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52197   fi
52198 
52199 
52200   windows_path="$new_path"
52201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52202     unix_path=`$CYGPATH -u "$windows_path"`
52203     new_path="$unix_path"
52204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52206     new_path="$unix_path"
52207   fi
52208 
52209   if test "x$path" != "x$new_path"; then
52210     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52212 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52213   fi
52214 
52215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52217 
52218     else
52219       # We're on a unix platform. Hooray! :)
52220       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52221       has_space=`$ECHO "$path" | $GREP " "`
52222       if test "x$has_space" != x; then
52223         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52224 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52225         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52226       fi
52227 
52228       # Use eval to expand a potential ~
52229       eval path="$path"
52230       if test ! -f "$path" && test ! -d "$path"; then
52231         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52232       fi
52233 
52234       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52235     fi
52236   fi
52237 
52238 
52239   # Only process if variable expands to non-empty
52240 
52241   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52242     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52243 
52244   # Input might be given as Windows format, start by converting to
52245   # unix format.
52246   path="$POTENTIAL_FREETYPE_LIB_PATH"
52247   new_path=`$CYGPATH -u "$path"`
52248 
52249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52252   # "foo.exe" is OK but "foo" is an error.
52253   #
52254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52255   # It is also a way to make sure we got the proper file name for the real test later on.
52256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52257   if test "x$test_shortpath" = x; then
52258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52259 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52260     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52261   fi
52262 
52263   # Call helper function which possibly converts this using DOS-style short mode.
52264   # If so, the updated path is stored in $new_path.
52265 
52266   input_path="$new_path"
52267   # Check if we need to convert this using DOS-style short mode. If the path
52268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52269   # take no chances and rewrite it.
52270   # Note: m4 eats our [], so we need to use [ and ] instead.
52271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52272   if test "x$has_forbidden_chars" != x; then
52273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52277       # Going to short mode and back again did indeed matter. Since short mode is
52278       # case insensitive, let's make it lowercase to improve readability.
52279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52280       # Now convert it back to Unix-style (cygpath)
52281       input_path=`$CYGPATH -u "$shortmode_path"`
52282       new_path="$input_path"
52283     fi
52284   fi
52285 
52286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52287   if test "x$test_cygdrive_prefix" = x; then
52288     # As a simple fix, exclude /usr/bin since it's not a real path.
52289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52291       # a path prefixed by /cygdrive for fixpath to work.
52292       new_path="$CYGWIN_ROOT_PATH$input_path"
52293     fi
52294   fi
52295 
52296 
52297   if test "x$path" != "x$new_path"; then
52298     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52300 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52301   fi
52302 
52303     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52304 
52305   path="$POTENTIAL_FREETYPE_LIB_PATH"
52306   has_colon=`$ECHO $path | $GREP ^.:`
52307   new_path="$path"
52308   if test "x$has_colon" = x; then
52309     # Not in mixed or Windows style, start by that.
52310     new_path=`cmd //c echo $path`
52311   fi
52312 
52313 
52314   input_path="$new_path"
52315   # Check if we need to convert this using DOS-style short mode. If the path
52316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52317   # take no chances and rewrite it.
52318   # Note: m4 eats our [], so we need to use [ and ] instead.
52319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52320   if test "x$has_forbidden_chars" != x; then
52321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52323   fi
52324 
52325 
52326   windows_path="$new_path"
52327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52328     unix_path=`$CYGPATH -u "$windows_path"`
52329     new_path="$unix_path"
52330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52332     new_path="$unix_path"
52333   fi
52334 
52335   if test "x$path" != "x$new_path"; then
52336     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52338 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52339   fi
52340 
52341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52343 
52344     else
52345       # We're on a unix platform. Hooray! :)
52346       path="$POTENTIAL_FREETYPE_LIB_PATH"
52347       has_space=`$ECHO "$path" | $GREP " "`
52348       if test "x$has_space" != x; then
52349         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52350 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52351         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52352       fi
52353 
52354       # Use eval to expand a potential ~
52355       eval path="$path"
52356       if test ! -f "$path" && test ! -d "$path"; then
52357         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52358       fi
52359 
52360       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52361     fi
52362   fi
52363 
52364 
52365     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52367 $as_echo_n "checking for freetype includes... " >&6; }
52368     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52369 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52370     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52372 $as_echo_n "checking for freetype libraries... " >&6; }
52373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52374 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52375   fi
52376 
52377           if test "x$FOUND_FREETYPE" != xyes; then
52378             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52379 
52380   windows_path="$FREETYPE_BASE_DIR"
52381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52382     unix_path=`$CYGPATH -u "$windows_path"`
52383     FREETYPE_BASE_DIR="$unix_path"
52384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52386     FREETYPE_BASE_DIR="$unix_path"
52387   fi
52388 
52389 
52390   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52391   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52392   METHOD="well-known location"
52393 
52394   # Let's start with an optimistic view of the world :-)
52395   FOUND_FREETYPE=yes
52396 
52397   # First look for the canonical freetype main include file ft2build.h.
52398   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52399     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52400     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52401     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52402       # Fail.
52403       FOUND_FREETYPE=no
52404     fi
52405   fi
52406 
52407   if test "x$FOUND_FREETYPE" = xyes; then
52408     # Include file found, let's continue the sanity check.
52409     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52410 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52411 
52412     # Reset to default value
52413     FREETYPE_BASE_NAME=freetype
52414     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52415     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52416       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52417           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52418         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52419         # for the .6 version explicitly.
52420         FREETYPE_BASE_NAME=freetype.6
52421         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52422         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52423 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52424       else
52425         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52426 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52427         FOUND_FREETYPE=no
52428       fi
52429     else
52430       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52431         # On Windows, we will need both .lib and .dll file.
52432         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52433           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52434 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52435           FOUND_FREETYPE=no
52436         fi
52437       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52438           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52439         # Found lib in isa dir, use that instead.
52440         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52441         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52442 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52443       fi
52444     fi
52445   fi
52446 
52447   if test "x$FOUND_FREETYPE" = xyes; then
52448 
52449   # Only process if variable expands to non-empty
52450 
52451   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52452     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52453 
52454   # Input might be given as Windows format, start by converting to
52455   # unix format.
52456   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52457   new_path=`$CYGPATH -u "$path"`
52458 
52459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52462   # "foo.exe" is OK but "foo" is an error.
52463   #
52464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52465   # It is also a way to make sure we got the proper file name for the real test later on.
52466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52467   if test "x$test_shortpath" = x; then
52468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52469 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52470     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52471   fi
52472 
52473   # Call helper function which possibly converts this using DOS-style short mode.
52474   # If so, the updated path is stored in $new_path.
52475 
52476   input_path="$new_path"
52477   # Check if we need to convert this using DOS-style short mode. If the path
52478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52479   # take no chances and rewrite it.
52480   # Note: m4 eats our [], so we need to use [ and ] instead.
52481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52482   if test "x$has_forbidden_chars" != x; then
52483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52487       # Going to short mode and back again did indeed matter. Since short mode is
52488       # case insensitive, let's make it lowercase to improve readability.
52489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52490       # Now convert it back to Unix-style (cygpath)
52491       input_path=`$CYGPATH -u "$shortmode_path"`
52492       new_path="$input_path"
52493     fi
52494   fi
52495 
52496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52497   if test "x$test_cygdrive_prefix" = x; then
52498     # As a simple fix, exclude /usr/bin since it's not a real path.
52499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52501       # a path prefixed by /cygdrive for fixpath to work.
52502       new_path="$CYGWIN_ROOT_PATH$input_path"
52503     fi
52504   fi
52505 
52506 
52507   if test "x$path" != "x$new_path"; then
52508     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52510 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52511   fi
52512 
52513     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52514 
52515   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52516   has_colon=`$ECHO $path | $GREP ^.:`
52517   new_path="$path"
52518   if test "x$has_colon" = x; then
52519     # Not in mixed or Windows style, start by that.
52520     new_path=`cmd //c echo $path`
52521   fi
52522 
52523 
52524   input_path="$new_path"
52525   # Check if we need to convert this using DOS-style short mode. If the path
52526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52527   # take no chances and rewrite it.
52528   # Note: m4 eats our [], so we need to use [ and ] instead.
52529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52530   if test "x$has_forbidden_chars" != x; then
52531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52533   fi
52534 
52535 
52536   windows_path="$new_path"
52537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52538     unix_path=`$CYGPATH -u "$windows_path"`
52539     new_path="$unix_path"
52540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52542     new_path="$unix_path"
52543   fi
52544 
52545   if test "x$path" != "x$new_path"; then
52546     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52548 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52549   fi
52550 
52551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52553 
52554     else
52555       # We're on a unix platform. Hooray! :)
52556       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52557       has_space=`$ECHO "$path" | $GREP " "`
52558       if test "x$has_space" != x; then
52559         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52560 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52561         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52562       fi
52563 
52564       # Use eval to expand a potential ~
52565       eval path="$path"
52566       if test ! -f "$path" && test ! -d "$path"; then
52567         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52568       fi
52569 
52570       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52571     fi
52572   fi
52573 
52574 
52575   # Only process if variable expands to non-empty
52576 
52577   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52579 
52580   # Input might be given as Windows format, start by converting to
52581   # unix format.
52582   path="$POTENTIAL_FREETYPE_LIB_PATH"
52583   new_path=`$CYGPATH -u "$path"`
52584 
52585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52588   # "foo.exe" is OK but "foo" is an error.
52589   #
52590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52591   # It is also a way to make sure we got the proper file name for the real test later on.
52592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52593   if test "x$test_shortpath" = x; then
52594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52595 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52596     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52597   fi
52598 
52599   # Call helper function which possibly converts this using DOS-style short mode.
52600   # If so, the updated path is stored in $new_path.
52601 
52602   input_path="$new_path"
52603   # Check if we need to convert this using DOS-style short mode. If the path
52604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52605   # take no chances and rewrite it.
52606   # Note: m4 eats our [], so we need to use [ and ] instead.
52607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52608   if test "x$has_forbidden_chars" != x; then
52609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52613       # Going to short mode and back again did indeed matter. Since short mode is
52614       # case insensitive, let's make it lowercase to improve readability.
52615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52616       # Now convert it back to Unix-style (cygpath)
52617       input_path=`$CYGPATH -u "$shortmode_path"`
52618       new_path="$input_path"
52619     fi
52620   fi
52621 
52622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52623   if test "x$test_cygdrive_prefix" = x; then
52624     # As a simple fix, exclude /usr/bin since it's not a real path.
52625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52627       # a path prefixed by /cygdrive for fixpath to work.
52628       new_path="$CYGWIN_ROOT_PATH$input_path"
52629     fi
52630   fi
52631 
52632 
52633   if test "x$path" != "x$new_path"; then
52634     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52636 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52637   fi
52638 
52639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52640 
52641   path="$POTENTIAL_FREETYPE_LIB_PATH"
52642   has_colon=`$ECHO $path | $GREP ^.:`
52643   new_path="$path"
52644   if test "x$has_colon" = x; then
52645     # Not in mixed or Windows style, start by that.
52646     new_path=`cmd //c echo $path`
52647   fi
52648 
52649 
52650   input_path="$new_path"
52651   # Check if we need to convert this using DOS-style short mode. If the path
52652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52653   # take no chances and rewrite it.
52654   # Note: m4 eats our [], so we need to use [ and ] instead.
52655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52656   if test "x$has_forbidden_chars" != x; then
52657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52659   fi
52660 
52661 
52662   windows_path="$new_path"
52663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52664     unix_path=`$CYGPATH -u "$windows_path"`
52665     new_path="$unix_path"
52666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52668     new_path="$unix_path"
52669   fi
52670 
52671   if test "x$path" != "x$new_path"; then
52672     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52674 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52675   fi
52676 
52677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52679 
52680     else
52681       # We're on a unix platform. Hooray! :)
52682       path="$POTENTIAL_FREETYPE_LIB_PATH"
52683       has_space=`$ECHO "$path" | $GREP " "`
52684       if test "x$has_space" != x; then
52685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52686 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52688       fi
52689 
52690       # Use eval to expand a potential ~
52691       eval path="$path"
52692       if test ! -f "$path" && test ! -d "$path"; then
52693         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52694       fi
52695 
52696       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52697     fi
52698   fi
52699 
52700 
52701     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52703 $as_echo_n "checking for freetype includes... " >&6; }
52704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52705 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52706     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52708 $as_echo_n "checking for freetype libraries... " >&6; }
52709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52710 $as_echo "$FREETYPE_LIB_PATH" >&6; }
52711   fi
52712 
52713           fi
52714         else
52715           FREETYPE_BASE_DIR="$SYSROOT/usr"
52716 
52717   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52718   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52719   METHOD="well-known location"
52720 
52721   # Let's start with an optimistic view of the world :-)
52722   FOUND_FREETYPE=yes
52723 
52724   # First look for the canonical freetype main include file ft2build.h.
52725   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52726     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52727     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52728     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52729       # Fail.
52730       FOUND_FREETYPE=no
52731     fi
52732   fi
52733 
52734   if test "x$FOUND_FREETYPE" = xyes; then
52735     # Include file found, let's continue the sanity check.
52736     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52737 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52738 
52739     # Reset to default value
52740     FREETYPE_BASE_NAME=freetype
52741     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52742     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52743       if test "x$OPENJDK_TARGET_OS" = xmacosx \
52744           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52745         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52746         # for the .6 version explicitly.
52747         FREETYPE_BASE_NAME=freetype.6
52748         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52749         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52750 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52751       else
52752         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52753 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52754         FOUND_FREETYPE=no
52755       fi
52756     else
52757       if test "x$OPENJDK_TARGET_OS" = xwindows; then
52758         # On Windows, we will need both .lib and .dll file.
52759         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52760           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52761 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52762           FOUND_FREETYPE=no
52763         fi
52764       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52765           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52766         # Found lib in isa dir, use that instead.
52767         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52768         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52769 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52770       fi
52771     fi
52772   fi
52773 
52774   if test "x$FOUND_FREETYPE" = xyes; then
52775 
52776   # Only process if variable expands to non-empty
52777 
52778   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52779     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52780 
52781   # Input might be given as Windows format, start by converting to
52782   # unix format.
52783   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52784   new_path=`$CYGPATH -u "$path"`
52785 
52786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52789   # "foo.exe" is OK but "foo" is an error.
52790   #
52791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52792   # It is also a way to make sure we got the proper file name for the real test later on.
52793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52794   if test "x$test_shortpath" = x; then
52795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52796 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52797     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52798   fi
52799 
52800   # Call helper function which possibly converts this using DOS-style short mode.
52801   # If so, the updated path is stored in $new_path.
52802 
52803   input_path="$new_path"
52804   # Check if we need to convert this using DOS-style short mode. If the path
52805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52806   # take no chances and rewrite it.
52807   # Note: m4 eats our [], so we need to use [ and ] instead.
52808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52809   if test "x$has_forbidden_chars" != x; then
52810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52814       # Going to short mode and back again did indeed matter. Since short mode is
52815       # case insensitive, let's make it lowercase to improve readability.
52816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52817       # Now convert it back to Unix-style (cygpath)
52818       input_path=`$CYGPATH -u "$shortmode_path"`
52819       new_path="$input_path"
52820     fi
52821   fi
52822 
52823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52824   if test "x$test_cygdrive_prefix" = x; then
52825     # As a simple fix, exclude /usr/bin since it's not a real path.
52826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52828       # a path prefixed by /cygdrive for fixpath to work.
52829       new_path="$CYGWIN_ROOT_PATH$input_path"
52830     fi
52831   fi
52832 
52833 
52834   if test "x$path" != "x$new_path"; then
52835     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52837 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52838   fi
52839 
52840     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52841 
52842   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52843   has_colon=`$ECHO $path | $GREP ^.:`
52844   new_path="$path"
52845   if test "x$has_colon" = x; then
52846     # Not in mixed or Windows style, start by that.
52847     new_path=`cmd //c echo $path`
52848   fi
52849 
52850 
52851   input_path="$new_path"
52852   # Check if we need to convert this using DOS-style short mode. If the path
52853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52854   # take no chances and rewrite it.
52855   # Note: m4 eats our [], so we need to use [ and ] instead.
52856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52857   if test "x$has_forbidden_chars" != x; then
52858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52860   fi
52861 
52862 
52863   windows_path="$new_path"
52864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52865     unix_path=`$CYGPATH -u "$windows_path"`
52866     new_path="$unix_path"
52867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52869     new_path="$unix_path"
52870   fi
52871 
52872   if test "x$path" != "x$new_path"; then
52873     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52875 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52876   fi
52877 
52878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52880 
52881     else
52882       # We're on a unix platform. Hooray! :)
52883       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52884       has_space=`$ECHO "$path" | $GREP " "`
52885       if test "x$has_space" != x; then
52886         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52887 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52888         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52889       fi
52890 
52891       # Use eval to expand a potential ~
52892       eval path="$path"
52893       if test ! -f "$path" && test ! -d "$path"; then
52894         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52895       fi
52896 
52897       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52898     fi
52899   fi
52900 
52901 
52902   # Only process if variable expands to non-empty
52903 
52904   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52905     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52906 
52907   # Input might be given as Windows format, start by converting to
52908   # unix format.
52909   path="$POTENTIAL_FREETYPE_LIB_PATH"
52910   new_path=`$CYGPATH -u "$path"`
52911 
52912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52915   # "foo.exe" is OK but "foo" is an error.
52916   #
52917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52918   # It is also a way to make sure we got the proper file name for the real test later on.
52919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52920   if test "x$test_shortpath" = x; then
52921     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52922 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52923     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52924   fi
52925 
52926   # Call helper function which possibly converts this using DOS-style short mode.
52927   # If so, the updated path is stored in $new_path.
52928 
52929   input_path="$new_path"
52930   # Check if we need to convert this using DOS-style short mode. If the path
52931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52932   # take no chances and rewrite it.
52933   # Note: m4 eats our [], so we need to use [ and ] instead.
52934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52935   if test "x$has_forbidden_chars" != x; then
52936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52940       # Going to short mode and back again did indeed matter. Since short mode is
52941       # case insensitive, let's make it lowercase to improve readability.
52942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52943       # Now convert it back to Unix-style (cygpath)
52944       input_path=`$CYGPATH -u "$shortmode_path"`
52945       new_path="$input_path"
52946     fi
52947   fi
52948 
52949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52950   if test "x$test_cygdrive_prefix" = x; then
52951     # As a simple fix, exclude /usr/bin since it's not a real path.
52952     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52954       # a path prefixed by /cygdrive for fixpath to work.
52955       new_path="$CYGWIN_ROOT_PATH$input_path"
52956     fi
52957   fi
52958 
52959 
52960   if test "x$path" != "x$new_path"; then
52961     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52963 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52964   fi
52965 
52966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52967 
52968   path="$POTENTIAL_FREETYPE_LIB_PATH"
52969   has_colon=`$ECHO $path | $GREP ^.:`
52970   new_path="$path"
52971   if test "x$has_colon" = x; then
52972     # Not in mixed or Windows style, start by that.
52973     new_path=`cmd //c echo $path`
52974   fi
52975 
52976 
52977   input_path="$new_path"
52978   # Check if we need to convert this using DOS-style short mode. If the path
52979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52980   # take no chances and rewrite it.
52981   # Note: m4 eats our [], so we need to use [ and ] instead.
52982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52983   if test "x$has_forbidden_chars" != x; then
52984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52985     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52986   fi
52987 
52988 
52989   windows_path="$new_path"
52990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52991     unix_path=`$CYGPATH -u "$windows_path"`
52992     new_path="$unix_path"
52993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52995     new_path="$unix_path"
52996   fi
52997 
52998   if test "x$path" != "x$new_path"; then
52999     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53001 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53002   fi
53003 
53004   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53005   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53006 
53007     else
53008       # We're on a unix platform. Hooray! :)
53009       path="$POTENTIAL_FREETYPE_LIB_PATH"
53010       has_space=`$ECHO "$path" | $GREP " "`
53011       if test "x$has_space" != x; then
53012         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53013 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53014         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53015       fi
53016 
53017       # Use eval to expand a potential ~
53018       eval path="$path"
53019       if test ! -f "$path" && test ! -d "$path"; then
53020         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53021       fi
53022 
53023       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53024     fi
53025   fi
53026 
53027 
53028     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53030 $as_echo_n "checking for freetype includes... " >&6; }
53031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53032 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53033     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53035 $as_echo_n "checking for freetype libraries... " >&6; }
53036     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53037 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53038   fi
53039 
53040 
53041           if test "x$FOUND_FREETYPE" != xyes; then
53042             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53043 
53044   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53045   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53046   METHOD="well-known location"
53047 
53048   # Let's start with an optimistic view of the world :-)
53049   FOUND_FREETYPE=yes
53050 
53051   # First look for the canonical freetype main include file ft2build.h.
53052   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53053     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53054     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53055     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53056       # Fail.
53057       FOUND_FREETYPE=no
53058     fi
53059   fi
53060 
53061   if test "x$FOUND_FREETYPE" = xyes; then
53062     # Include file found, let's continue the sanity check.
53063     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53064 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53065 
53066     # Reset to default value
53067     FREETYPE_BASE_NAME=freetype
53068     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53069     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53070       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53071           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53072         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53073         # for the .6 version explicitly.
53074         FREETYPE_BASE_NAME=freetype.6
53075         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53076         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53077 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53078       else
53079         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53080 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53081         FOUND_FREETYPE=no
53082       fi
53083     else
53084       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53085         # On Windows, we will need both .lib and .dll file.
53086         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53087           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53088 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53089           FOUND_FREETYPE=no
53090         fi
53091       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53092           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53093         # Found lib in isa dir, use that instead.
53094         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53095         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53096 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53097       fi
53098     fi
53099   fi
53100 
53101   if test "x$FOUND_FREETYPE" = xyes; then
53102 
53103   # Only process if variable expands to non-empty
53104 
53105   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53106     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53107 
53108   # Input might be given as Windows format, start by converting to
53109   # unix format.
53110   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53111   new_path=`$CYGPATH -u "$path"`
53112 
53113   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53114   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53115   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53116   # "foo.exe" is OK but "foo" is an error.
53117   #
53118   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53119   # It is also a way to make sure we got the proper file name for the real test later on.
53120   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53121   if test "x$test_shortpath" = x; then
53122     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53123 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53124     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53125   fi
53126 
53127   # Call helper function which possibly converts this using DOS-style short mode.
53128   # If so, the updated path is stored in $new_path.
53129 
53130   input_path="$new_path"
53131   # Check if we need to convert this using DOS-style short mode. If the path
53132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53133   # take no chances and rewrite it.
53134   # Note: m4 eats our [], so we need to use [ and ] instead.
53135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53136   if test "x$has_forbidden_chars" != x; then
53137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53138     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53139     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53140     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53141       # Going to short mode and back again did indeed matter. Since short mode is
53142       # case insensitive, let's make it lowercase to improve readability.
53143       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53144       # Now convert it back to Unix-style (cygpath)
53145       input_path=`$CYGPATH -u "$shortmode_path"`
53146       new_path="$input_path"
53147     fi
53148   fi
53149 
53150   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53151   if test "x$test_cygdrive_prefix" = x; then
53152     # As a simple fix, exclude /usr/bin since it's not a real path.
53153     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53154       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53155       # a path prefixed by /cygdrive for fixpath to work.
53156       new_path="$CYGWIN_ROOT_PATH$input_path"
53157     fi
53158   fi
53159 
53160 
53161   if test "x$path" != "x$new_path"; then
53162     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53163     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53164 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53165   fi
53166 
53167     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53168 
53169   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53170   has_colon=`$ECHO $path | $GREP ^.:`
53171   new_path="$path"
53172   if test "x$has_colon" = x; then
53173     # Not in mixed or Windows style, start by that.
53174     new_path=`cmd //c echo $path`
53175   fi
53176 
53177 
53178   input_path="$new_path"
53179   # Check if we need to convert this using DOS-style short mode. If the path
53180   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53181   # take no chances and rewrite it.
53182   # Note: m4 eats our [], so we need to use [ and ] instead.
53183   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53184   if test "x$has_forbidden_chars" != x; then
53185     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53186     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53187   fi
53188 
53189 
53190   windows_path="$new_path"
53191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53192     unix_path=`$CYGPATH -u "$windows_path"`
53193     new_path="$unix_path"
53194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53196     new_path="$unix_path"
53197   fi
53198 
53199   if test "x$path" != "x$new_path"; then
53200     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53201     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53202 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53203   fi
53204 
53205   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53206   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53207 
53208     else
53209       # We're on a unix platform. Hooray! :)
53210       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53211       has_space=`$ECHO "$path" | $GREP " "`
53212       if test "x$has_space" != x; then
53213         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53214 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53215         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53216       fi
53217 
53218       # Use eval to expand a potential ~
53219       eval path="$path"
53220       if test ! -f "$path" && test ! -d "$path"; then
53221         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53222       fi
53223 
53224       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53225     fi
53226   fi
53227 
53228 
53229   # Only process if variable expands to non-empty
53230 
53231   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53232     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53233 
53234   # Input might be given as Windows format, start by converting to
53235   # unix format.
53236   path="$POTENTIAL_FREETYPE_LIB_PATH"
53237   new_path=`$CYGPATH -u "$path"`
53238 
53239   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53240   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53241   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53242   # "foo.exe" is OK but "foo" is an error.
53243   #
53244   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53245   # It is also a way to make sure we got the proper file name for the real test later on.
53246   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53247   if test "x$test_shortpath" = x; then
53248     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53249 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53250     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53251   fi
53252 
53253   # Call helper function which possibly converts this using DOS-style short mode.
53254   # If so, the updated path is stored in $new_path.
53255 
53256   input_path="$new_path"
53257   # Check if we need to convert this using DOS-style short mode. If the path
53258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53259   # take no chances and rewrite it.
53260   # Note: m4 eats our [], so we need to use [ and ] instead.
53261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53262   if test "x$has_forbidden_chars" != x; then
53263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53264     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53265     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53266     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53267       # Going to short mode and back again did indeed matter. Since short mode is
53268       # case insensitive, let's make it lowercase to improve readability.
53269       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53270       # Now convert it back to Unix-style (cygpath)
53271       input_path=`$CYGPATH -u "$shortmode_path"`
53272       new_path="$input_path"
53273     fi
53274   fi
53275 
53276   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53277   if test "x$test_cygdrive_prefix" = x; then
53278     # As a simple fix, exclude /usr/bin since it's not a real path.
53279     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53280       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53281       # a path prefixed by /cygdrive for fixpath to work.
53282       new_path="$CYGWIN_ROOT_PATH$input_path"
53283     fi
53284   fi
53285 
53286 
53287   if test "x$path" != "x$new_path"; then
53288     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53289     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53290 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53291   fi
53292 
53293     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53294 
53295   path="$POTENTIAL_FREETYPE_LIB_PATH"
53296   has_colon=`$ECHO $path | $GREP ^.:`
53297   new_path="$path"
53298   if test "x$has_colon" = x; then
53299     # Not in mixed or Windows style, start by that.
53300     new_path=`cmd //c echo $path`
53301   fi
53302 
53303 
53304   input_path="$new_path"
53305   # Check if we need to convert this using DOS-style short mode. If the path
53306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53307   # take no chances and rewrite it.
53308   # Note: m4 eats our [], so we need to use [ and ] instead.
53309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53310   if test "x$has_forbidden_chars" != x; then
53311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53313   fi
53314 
53315 
53316   windows_path="$new_path"
53317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53318     unix_path=`$CYGPATH -u "$windows_path"`
53319     new_path="$unix_path"
53320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53322     new_path="$unix_path"
53323   fi
53324 
53325   if test "x$path" != "x$new_path"; then
53326     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53328 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53329   fi
53330 
53331   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53332   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53333 
53334     else
53335       # We're on a unix platform. Hooray! :)
53336       path="$POTENTIAL_FREETYPE_LIB_PATH"
53337       has_space=`$ECHO "$path" | $GREP " "`
53338       if test "x$has_space" != x; then
53339         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53340 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53341         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53342       fi
53343 
53344       # Use eval to expand a potential ~
53345       eval path="$path"
53346       if test ! -f "$path" && test ! -d "$path"; then
53347         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53348       fi
53349 
53350       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53351     fi
53352   fi
53353 
53354 
53355     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53356     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53357 $as_echo_n "checking for freetype includes... " >&6; }
53358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53359 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53360     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53361     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53362 $as_echo_n "checking for freetype libraries... " >&6; }
53363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53364 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53365   fi
53366 
53367           fi
53368 
53369           if test "x$FOUND_FREETYPE" != xyes; then
53370             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53371 
53372   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53373   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53374   METHOD="well-known location"
53375 
53376   # Let's start with an optimistic view of the world :-)
53377   FOUND_FREETYPE=yes
53378 
53379   # First look for the canonical freetype main include file ft2build.h.
53380   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53381     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53382     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53383     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53384       # Fail.
53385       FOUND_FREETYPE=no
53386     fi
53387   fi
53388 
53389   if test "x$FOUND_FREETYPE" = xyes; then
53390     # Include file found, let's continue the sanity check.
53391     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53392 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53393 
53394     # Reset to default value
53395     FREETYPE_BASE_NAME=freetype
53396     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53397     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53398       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53399           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53400         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53401         # for the .6 version explicitly.
53402         FREETYPE_BASE_NAME=freetype.6
53403         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53404         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53405 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53406       else
53407         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53408 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53409         FOUND_FREETYPE=no
53410       fi
53411     else
53412       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53413         # On Windows, we will need both .lib and .dll file.
53414         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53415           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53416 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53417           FOUND_FREETYPE=no
53418         fi
53419       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53420           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53421         # Found lib in isa dir, use that instead.
53422         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53423         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53424 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53425       fi
53426     fi
53427   fi
53428 
53429   if test "x$FOUND_FREETYPE" = xyes; then
53430 
53431   # Only process if variable expands to non-empty
53432 
53433   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53434     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53435 
53436   # Input might be given as Windows format, start by converting to
53437   # unix format.
53438   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53439   new_path=`$CYGPATH -u "$path"`
53440 
53441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53444   # "foo.exe" is OK but "foo" is an error.
53445   #
53446   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53447   # It is also a way to make sure we got the proper file name for the real test later on.
53448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53449   if test "x$test_shortpath" = x; then
53450     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53451 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53452     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53453   fi
53454 
53455   # Call helper function which possibly converts this using DOS-style short mode.
53456   # If so, the updated path is stored in $new_path.
53457 
53458   input_path="$new_path"
53459   # Check if we need to convert this using DOS-style short mode. If the path
53460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53461   # take no chances and rewrite it.
53462   # Note: m4 eats our [], so we need to use [ and ] instead.
53463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53464   if test "x$has_forbidden_chars" != x; then
53465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53466     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53467     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53468     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53469       # Going to short mode and back again did indeed matter. Since short mode is
53470       # case insensitive, let's make it lowercase to improve readability.
53471       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53472       # Now convert it back to Unix-style (cygpath)
53473       input_path=`$CYGPATH -u "$shortmode_path"`
53474       new_path="$input_path"
53475     fi
53476   fi
53477 
53478   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53479   if test "x$test_cygdrive_prefix" = x; then
53480     # As a simple fix, exclude /usr/bin since it's not a real path.
53481     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53482       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53483       # a path prefixed by /cygdrive for fixpath to work.
53484       new_path="$CYGWIN_ROOT_PATH$input_path"
53485     fi
53486   fi
53487 
53488 
53489   if test "x$path" != "x$new_path"; then
53490     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53491     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53492 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53493   fi
53494 
53495     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53496 
53497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53498   has_colon=`$ECHO $path | $GREP ^.:`
53499   new_path="$path"
53500   if test "x$has_colon" = x; then
53501     # Not in mixed or Windows style, start by that.
53502     new_path=`cmd //c echo $path`
53503   fi
53504 
53505 
53506   input_path="$new_path"
53507   # Check if we need to convert this using DOS-style short mode. If the path
53508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53509   # take no chances and rewrite it.
53510   # Note: m4 eats our [], so we need to use [ and ] instead.
53511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53512   if test "x$has_forbidden_chars" != x; then
53513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53515   fi
53516 
53517 
53518   windows_path="$new_path"
53519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53520     unix_path=`$CYGPATH -u "$windows_path"`
53521     new_path="$unix_path"
53522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53524     new_path="$unix_path"
53525   fi
53526 
53527   if test "x$path" != "x$new_path"; then
53528     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53531   fi
53532 
53533   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53534   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53535 
53536     else
53537       # We're on a unix platform. Hooray! :)
53538       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53539       has_space=`$ECHO "$path" | $GREP " "`
53540       if test "x$has_space" != x; then
53541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53542 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53543         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53544       fi
53545 
53546       # Use eval to expand a potential ~
53547       eval path="$path"
53548       if test ! -f "$path" && test ! -d "$path"; then
53549         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53550       fi
53551 
53552       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53553     fi
53554   fi
53555 
53556 
53557   # Only process if variable expands to non-empty
53558 
53559   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53560     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53561 
53562   # Input might be given as Windows format, start by converting to
53563   # unix format.
53564   path="$POTENTIAL_FREETYPE_LIB_PATH"
53565   new_path=`$CYGPATH -u "$path"`
53566 
53567   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53568   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53569   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53570   # "foo.exe" is OK but "foo" is an error.
53571   #
53572   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53573   # It is also a way to make sure we got the proper file name for the real test later on.
53574   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53575   if test "x$test_shortpath" = x; then
53576     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53577 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53578     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53579   fi
53580 
53581   # Call helper function which possibly converts this using DOS-style short mode.
53582   # If so, the updated path is stored in $new_path.
53583 
53584   input_path="$new_path"
53585   # Check if we need to convert this using DOS-style short mode. If the path
53586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53587   # take no chances and rewrite it.
53588   # Note: m4 eats our [], so we need to use [ and ] instead.
53589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53590   if test "x$has_forbidden_chars" != x; then
53591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53595       # Going to short mode and back again did indeed matter. Since short mode is
53596       # case insensitive, let's make it lowercase to improve readability.
53597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53598       # Now convert it back to Unix-style (cygpath)
53599       input_path=`$CYGPATH -u "$shortmode_path"`
53600       new_path="$input_path"
53601     fi
53602   fi
53603 
53604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53605   if test "x$test_cygdrive_prefix" = x; then
53606     # As a simple fix, exclude /usr/bin since it's not a real path.
53607     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53609       # a path prefixed by /cygdrive for fixpath to work.
53610       new_path="$CYGWIN_ROOT_PATH$input_path"
53611     fi
53612   fi
53613 
53614 
53615   if test "x$path" != "x$new_path"; then
53616     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53617     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53618 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53619   fi
53620 
53621     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53622 
53623   path="$POTENTIAL_FREETYPE_LIB_PATH"
53624   has_colon=`$ECHO $path | $GREP ^.:`
53625   new_path="$path"
53626   if test "x$has_colon" = x; then
53627     # Not in mixed or Windows style, start by that.
53628     new_path=`cmd //c echo $path`
53629   fi
53630 
53631 
53632   input_path="$new_path"
53633   # Check if we need to convert this using DOS-style short mode. If the path
53634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53635   # take no chances and rewrite it.
53636   # Note: m4 eats our [], so we need to use [ and ] instead.
53637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53638   if test "x$has_forbidden_chars" != x; then
53639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53640     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53641   fi
53642 
53643 
53644   windows_path="$new_path"
53645   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53646     unix_path=`$CYGPATH -u "$windows_path"`
53647     new_path="$unix_path"
53648   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53649     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53650     new_path="$unix_path"
53651   fi
53652 
53653   if test "x$path" != "x$new_path"; then
53654     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53655     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53656 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53657   fi
53658 
53659   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53660   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53661 
53662     else
53663       # We're on a unix platform. Hooray! :)
53664       path="$POTENTIAL_FREETYPE_LIB_PATH"
53665       has_space=`$ECHO "$path" | $GREP " "`
53666       if test "x$has_space" != x; then
53667         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53668 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53669         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53670       fi
53671 
53672       # Use eval to expand a potential ~
53673       eval path="$path"
53674       if test ! -f "$path" && test ! -d "$path"; then
53675         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53676       fi
53677 
53678       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53679     fi
53680   fi
53681 
53682 
53683     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53684     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53685 $as_echo_n "checking for freetype includes... " >&6; }
53686     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53687 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53688     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53689     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53690 $as_echo_n "checking for freetype libraries... " >&6; }
53691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53692 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53693   fi
53694 
53695           fi
53696 
53697           if test "x$FOUND_FREETYPE" != xyes; then
53698             FREETYPE_BASE_DIR="$SYSROOT/usr"
53699             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53700 
53701   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53702   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
53703   METHOD="well-known location"
53704 
53705   # Let's start with an optimistic view of the world :-)
53706   FOUND_FREETYPE=yes
53707 
53708   # First look for the canonical freetype main include file ft2build.h.
53709   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53710     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53711     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53712     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53713       # Fail.
53714       FOUND_FREETYPE=no
53715     fi
53716   fi
53717 
53718   if test "x$FOUND_FREETYPE" = xyes; then
53719     # Include file found, let's continue the sanity check.
53720     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53721 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53722 
53723     # Reset to default value
53724     FREETYPE_BASE_NAME=freetype
53725     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53726     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53727       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53728           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53729         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53730         # for the .6 version explicitly.
53731         FREETYPE_BASE_NAME=freetype.6
53732         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53733         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53734 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53735       else
53736         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53737 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53738         FOUND_FREETYPE=no
53739       fi
53740     else
53741       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53742         # On Windows, we will need both .lib and .dll file.
53743         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53744           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53745 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53746           FOUND_FREETYPE=no
53747         fi
53748       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53749           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53750         # Found lib in isa dir, use that instead.
53751         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53752         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53753 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53754       fi
53755     fi
53756   fi
53757 
53758   if test "x$FOUND_FREETYPE" = xyes; then
53759 
53760   # Only process if variable expands to non-empty
53761 
53762   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53763     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53764 
53765   # Input might be given as Windows format, start by converting to
53766   # unix format.
53767   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53768   new_path=`$CYGPATH -u "$path"`
53769 
53770   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53771   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53772   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53773   # "foo.exe" is OK but "foo" is an error.
53774   #
53775   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53776   # It is also a way to make sure we got the proper file name for the real test later on.
53777   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53778   if test "x$test_shortpath" = x; then
53779     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53780 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53781     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53782   fi
53783 
53784   # Call helper function which possibly converts this using DOS-style short mode.
53785   # If so, the updated path is stored in $new_path.
53786 
53787   input_path="$new_path"
53788   # Check if we need to convert this using DOS-style short mode. If the path
53789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53790   # take no chances and rewrite it.
53791   # Note: m4 eats our [], so we need to use [ and ] instead.
53792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53793   if test "x$has_forbidden_chars" != x; then
53794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53798       # Going to short mode and back again did indeed matter. Since short mode is
53799       # case insensitive, let's make it lowercase to improve readability.
53800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53801       # Now convert it back to Unix-style (cygpath)
53802       input_path=`$CYGPATH -u "$shortmode_path"`
53803       new_path="$input_path"
53804     fi
53805   fi
53806 
53807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53808   if test "x$test_cygdrive_prefix" = x; then
53809     # As a simple fix, exclude /usr/bin since it's not a real path.
53810     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53812       # a path prefixed by /cygdrive for fixpath to work.
53813       new_path="$CYGWIN_ROOT_PATH$input_path"
53814     fi
53815   fi
53816 
53817 
53818   if test "x$path" != "x$new_path"; then
53819     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53821 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53822   fi
53823 
53824     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53825 
53826   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53827   has_colon=`$ECHO $path | $GREP ^.:`
53828   new_path="$path"
53829   if test "x$has_colon" = x; then
53830     # Not in mixed or Windows style, start by that.
53831     new_path=`cmd //c echo $path`
53832   fi
53833 
53834 
53835   input_path="$new_path"
53836   # Check if we need to convert this using DOS-style short mode. If the path
53837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53838   # take no chances and rewrite it.
53839   # Note: m4 eats our [], so we need to use [ and ] instead.
53840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53841   if test "x$has_forbidden_chars" != x; then
53842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53843     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53844   fi
53845 
53846 
53847   windows_path="$new_path"
53848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53849     unix_path=`$CYGPATH -u "$windows_path"`
53850     new_path="$unix_path"
53851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53853     new_path="$unix_path"
53854   fi
53855 
53856   if test "x$path" != "x$new_path"; then
53857     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53859 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53860   fi
53861 
53862   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53863   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53864 
53865     else
53866       # We're on a unix platform. Hooray! :)
53867       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53868       has_space=`$ECHO "$path" | $GREP " "`
53869       if test "x$has_space" != x; then
53870         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53871 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53872         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53873       fi
53874 
53875       # Use eval to expand a potential ~
53876       eval path="$path"
53877       if test ! -f "$path" && test ! -d "$path"; then
53878         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53879       fi
53880 
53881       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53882     fi
53883   fi
53884 
53885 
53886   # Only process if variable expands to non-empty
53887 
53888   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53890 
53891   # Input might be given as Windows format, start by converting to
53892   # unix format.
53893   path="$POTENTIAL_FREETYPE_LIB_PATH"
53894   new_path=`$CYGPATH -u "$path"`
53895 
53896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53899   # "foo.exe" is OK but "foo" is an error.
53900   #
53901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53902   # It is also a way to make sure we got the proper file name for the real test later on.
53903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53904   if test "x$test_shortpath" = x; then
53905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53906 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53907     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53908   fi
53909 
53910   # Call helper function which possibly converts this using DOS-style short mode.
53911   # If so, the updated path is stored in $new_path.
53912 
53913   input_path="$new_path"
53914   # Check if we need to convert this using DOS-style short mode. If the path
53915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53916   # take no chances and rewrite it.
53917   # Note: m4 eats our [], so we need to use [ and ] instead.
53918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53919   if test "x$has_forbidden_chars" != x; then
53920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53924       # Going to short mode and back again did indeed matter. Since short mode is
53925       # case insensitive, let's make it lowercase to improve readability.
53926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53927       # Now convert it back to Unix-style (cygpath)
53928       input_path=`$CYGPATH -u "$shortmode_path"`
53929       new_path="$input_path"
53930     fi
53931   fi
53932 
53933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53934   if test "x$test_cygdrive_prefix" = x; then
53935     # As a simple fix, exclude /usr/bin since it's not a real path.
53936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53938       # a path prefixed by /cygdrive for fixpath to work.
53939       new_path="$CYGWIN_ROOT_PATH$input_path"
53940     fi
53941   fi
53942 
53943 
53944   if test "x$path" != "x$new_path"; then
53945     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53947 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53948   fi
53949 
53950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53951 
53952   path="$POTENTIAL_FREETYPE_LIB_PATH"
53953   has_colon=`$ECHO $path | $GREP ^.:`
53954   new_path="$path"
53955   if test "x$has_colon" = x; then
53956     # Not in mixed or Windows style, start by that.
53957     new_path=`cmd //c echo $path`
53958   fi
53959 
53960 
53961   input_path="$new_path"
53962   # Check if we need to convert this using DOS-style short mode. If the path
53963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53964   # take no chances and rewrite it.
53965   # Note: m4 eats our [], so we need to use [ and ] instead.
53966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53967   if test "x$has_forbidden_chars" != x; then
53968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53970   fi
53971 
53972 
53973   windows_path="$new_path"
53974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53975     unix_path=`$CYGPATH -u "$windows_path"`
53976     new_path="$unix_path"
53977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53979     new_path="$unix_path"
53980   fi
53981 
53982   if test "x$path" != "x$new_path"; then
53983     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53985 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53986   fi
53987 
53988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53990 
53991     else
53992       # We're on a unix platform. Hooray! :)
53993       path="$POTENTIAL_FREETYPE_LIB_PATH"
53994       has_space=`$ECHO "$path" | $GREP " "`
53995       if test "x$has_space" != x; then
53996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53997 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53998         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53999       fi
54000 
54001       # Use eval to expand a potential ~
54002       eval path="$path"
54003       if test ! -f "$path" && test ! -d "$path"; then
54004         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54005       fi
54006 
54007       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54008     fi
54009   fi
54010 
54011 
54012     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54013     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54014 $as_echo_n "checking for freetype includes... " >&6; }
54015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54016 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54017     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54019 $as_echo_n "checking for freetype libraries... " >&6; }
54020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54021 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54022   fi
54023 
54024             else
54025 
54026   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54027   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54028   METHOD="well-known location"
54029 
54030   # Let's start with an optimistic view of the world :-)
54031   FOUND_FREETYPE=yes
54032 
54033   # First look for the canonical freetype main include file ft2build.h.
54034   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54035     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54036     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54037     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54038       # Fail.
54039       FOUND_FREETYPE=no
54040     fi
54041   fi
54042 
54043   if test "x$FOUND_FREETYPE" = xyes; then
54044     # Include file found, let's continue the sanity check.
54045     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54046 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54047 
54048     # Reset to default value
54049     FREETYPE_BASE_NAME=freetype
54050     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54051     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54052       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54053           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54054         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54055         # for the .6 version explicitly.
54056         FREETYPE_BASE_NAME=freetype.6
54057         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54058         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54059 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54060       else
54061         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54062 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54063         FOUND_FREETYPE=no
54064       fi
54065     else
54066       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54067         # On Windows, we will need both .lib and .dll file.
54068         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54069           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54070 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54071           FOUND_FREETYPE=no
54072         fi
54073       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54074           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54075         # Found lib in isa dir, use that instead.
54076         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54077         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54078 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54079       fi
54080     fi
54081   fi
54082 
54083   if test "x$FOUND_FREETYPE" = xyes; then
54084 
54085   # Only process if variable expands to non-empty
54086 
54087   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54089 
54090   # Input might be given as Windows format, start by converting to
54091   # unix format.
54092   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54093   new_path=`$CYGPATH -u "$path"`
54094 
54095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54098   # "foo.exe" is OK but "foo" is an error.
54099   #
54100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54101   # It is also a way to make sure we got the proper file name for the real test later on.
54102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54103   if test "x$test_shortpath" = x; then
54104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54105 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54106     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54107   fi
54108 
54109   # Call helper function which possibly converts this using DOS-style short mode.
54110   # If so, the updated path is stored in $new_path.
54111 
54112   input_path="$new_path"
54113   # Check if we need to convert this using DOS-style short mode. If the path
54114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54115   # take no chances and rewrite it.
54116   # Note: m4 eats our [], so we need to use [ and ] instead.
54117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54118   if test "x$has_forbidden_chars" != x; then
54119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54123       # Going to short mode and back again did indeed matter. Since short mode is
54124       # case insensitive, let's make it lowercase to improve readability.
54125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54126       # Now convert it back to Unix-style (cygpath)
54127       input_path=`$CYGPATH -u "$shortmode_path"`
54128       new_path="$input_path"
54129     fi
54130   fi
54131 
54132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54133   if test "x$test_cygdrive_prefix" = x; then
54134     # As a simple fix, exclude /usr/bin since it's not a real path.
54135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54137       # a path prefixed by /cygdrive for fixpath to work.
54138       new_path="$CYGWIN_ROOT_PATH$input_path"
54139     fi
54140   fi
54141 
54142 
54143   if test "x$path" != "x$new_path"; then
54144     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54146 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54147   fi
54148 
54149     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54150 
54151   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54152   has_colon=`$ECHO $path | $GREP ^.:`
54153   new_path="$path"
54154   if test "x$has_colon" = x; then
54155     # Not in mixed or Windows style, start by that.
54156     new_path=`cmd //c echo $path`
54157   fi
54158 
54159 
54160   input_path="$new_path"
54161   # Check if we need to convert this using DOS-style short mode. If the path
54162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54163   # take no chances and rewrite it.
54164   # Note: m4 eats our [], so we need to use [ and ] instead.
54165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54166   if test "x$has_forbidden_chars" != x; then
54167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54169   fi
54170 
54171 
54172   windows_path="$new_path"
54173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54174     unix_path=`$CYGPATH -u "$windows_path"`
54175     new_path="$unix_path"
54176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54178     new_path="$unix_path"
54179   fi
54180 
54181   if test "x$path" != "x$new_path"; then
54182     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54184 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54185   fi
54186 
54187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54189 
54190     else
54191       # We're on a unix platform. Hooray! :)
54192       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54193       has_space=`$ECHO "$path" | $GREP " "`
54194       if test "x$has_space" != x; then
54195         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54196 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54197         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54198       fi
54199 
54200       # Use eval to expand a potential ~
54201       eval path="$path"
54202       if test ! -f "$path" && test ! -d "$path"; then
54203         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54204       fi
54205 
54206       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54207     fi
54208   fi
54209 
54210 
54211   # Only process if variable expands to non-empty
54212 
54213   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54214     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54215 
54216   # Input might be given as Windows format, start by converting to
54217   # unix format.
54218   path="$POTENTIAL_FREETYPE_LIB_PATH"
54219   new_path=`$CYGPATH -u "$path"`
54220 
54221   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54222   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54223   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54224   # "foo.exe" is OK but "foo" is an error.
54225   #
54226   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54227   # It is also a way to make sure we got the proper file name for the real test later on.
54228   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54229   if test "x$test_shortpath" = x; then
54230     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54231 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54232     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54233   fi
54234 
54235   # Call helper function which possibly converts this using DOS-style short mode.
54236   # If so, the updated path is stored in $new_path.
54237 
54238   input_path="$new_path"
54239   # Check if we need to convert this using DOS-style short mode. If the path
54240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54241   # take no chances and rewrite it.
54242   # Note: m4 eats our [], so we need to use [ and ] instead.
54243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54244   if test "x$has_forbidden_chars" != x; then
54245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54249       # Going to short mode and back again did indeed matter. Since short mode is
54250       # case insensitive, let's make it lowercase to improve readability.
54251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54252       # Now convert it back to Unix-style (cygpath)
54253       input_path=`$CYGPATH -u "$shortmode_path"`
54254       new_path="$input_path"
54255     fi
54256   fi
54257 
54258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54259   if test "x$test_cygdrive_prefix" = x; then
54260     # As a simple fix, exclude /usr/bin since it's not a real path.
54261     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54263       # a path prefixed by /cygdrive for fixpath to work.
54264       new_path="$CYGWIN_ROOT_PATH$input_path"
54265     fi
54266   fi
54267 
54268 
54269   if test "x$path" != "x$new_path"; then
54270     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54272 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54273   fi
54274 
54275     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54276 
54277   path="$POTENTIAL_FREETYPE_LIB_PATH"
54278   has_colon=`$ECHO $path | $GREP ^.:`
54279   new_path="$path"
54280   if test "x$has_colon" = x; then
54281     # Not in mixed or Windows style, start by that.
54282     new_path=`cmd //c echo $path`
54283   fi
54284 
54285 
54286   input_path="$new_path"
54287   # Check if we need to convert this using DOS-style short mode. If the path
54288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54289   # take no chances and rewrite it.
54290   # Note: m4 eats our [], so we need to use [ and ] instead.
54291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54292   if test "x$has_forbidden_chars" != x; then
54293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54295   fi
54296 
54297 
54298   windows_path="$new_path"
54299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54300     unix_path=`$CYGPATH -u "$windows_path"`
54301     new_path="$unix_path"
54302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54304     new_path="$unix_path"
54305   fi
54306 
54307   if test "x$path" != "x$new_path"; then
54308     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54310 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54311   fi
54312 
54313   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54314   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54315 
54316     else
54317       # We're on a unix platform. Hooray! :)
54318       path="$POTENTIAL_FREETYPE_LIB_PATH"
54319       has_space=`$ECHO "$path" | $GREP " "`
54320       if test "x$has_space" != x; then
54321         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54322 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54323         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54324       fi
54325 
54326       # Use eval to expand a potential ~
54327       eval path="$path"
54328       if test ! -f "$path" && test ! -d "$path"; then
54329         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54330       fi
54331 
54332       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54333     fi
54334   fi
54335 
54336 
54337     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54339 $as_echo_n "checking for freetype includes... " >&6; }
54340     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54341 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54342     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54344 $as_echo_n "checking for freetype libraries... " >&6; }
54345     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54346 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54347   fi
54348 
54349               if test "x$FOUND_FREETYPE" != xyes; then
54350 
54351   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54352   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54353   METHOD="well-known location"
54354 
54355   # Let's start with an optimistic view of the world :-)
54356   FOUND_FREETYPE=yes
54357 
54358   # First look for the canonical freetype main include file ft2build.h.
54359   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54360     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54361     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54362     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54363       # Fail.
54364       FOUND_FREETYPE=no
54365     fi
54366   fi
54367 
54368   if test "x$FOUND_FREETYPE" = xyes; then
54369     # Include file found, let's continue the sanity check.
54370     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54371 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54372 
54373     # Reset to default value
54374     FREETYPE_BASE_NAME=freetype
54375     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54376     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54377       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54378           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54379         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54380         # for the .6 version explicitly.
54381         FREETYPE_BASE_NAME=freetype.6
54382         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54383         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54384 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54385       else
54386         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54387 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54388         FOUND_FREETYPE=no
54389       fi
54390     else
54391       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54392         # On Windows, we will need both .lib and .dll file.
54393         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54394           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54395 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54396           FOUND_FREETYPE=no
54397         fi
54398       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54399           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54400         # Found lib in isa dir, use that instead.
54401         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54402         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54403 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54404       fi
54405     fi
54406   fi
54407 
54408   if test "x$FOUND_FREETYPE" = xyes; then
54409 
54410   # Only process if variable expands to non-empty
54411 
54412   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54413     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54414 
54415   # Input might be given as Windows format, start by converting to
54416   # unix format.
54417   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54418   new_path=`$CYGPATH -u "$path"`
54419 
54420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54423   # "foo.exe" is OK but "foo" is an error.
54424   #
54425   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54426   # It is also a way to make sure we got the proper file name for the real test later on.
54427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54428   if test "x$test_shortpath" = x; then
54429     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54430 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54431     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54432   fi
54433 
54434   # Call helper function which possibly converts this using DOS-style short mode.
54435   # If so, the updated path is stored in $new_path.
54436 
54437   input_path="$new_path"
54438   # Check if we need to convert this using DOS-style short mode. If the path
54439   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54440   # take no chances and rewrite it.
54441   # Note: m4 eats our [], so we need to use [ and ] instead.
54442   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54443   if test "x$has_forbidden_chars" != x; then
54444     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54445     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54446     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54447     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54448       # Going to short mode and back again did indeed matter. Since short mode is
54449       # case insensitive, let's make it lowercase to improve readability.
54450       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54451       # Now convert it back to Unix-style (cygpath)
54452       input_path=`$CYGPATH -u "$shortmode_path"`
54453       new_path="$input_path"
54454     fi
54455   fi
54456 
54457   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54458   if test "x$test_cygdrive_prefix" = x; then
54459     # As a simple fix, exclude /usr/bin since it's not a real path.
54460     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54461       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54462       # a path prefixed by /cygdrive for fixpath to work.
54463       new_path="$CYGWIN_ROOT_PATH$input_path"
54464     fi
54465   fi
54466 
54467 
54468   if test "x$path" != "x$new_path"; then
54469     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54470     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54471 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54472   fi
54473 
54474     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54475 
54476   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54477   has_colon=`$ECHO $path | $GREP ^.:`
54478   new_path="$path"
54479   if test "x$has_colon" = x; then
54480     # Not in mixed or Windows style, start by that.
54481     new_path=`cmd //c echo $path`
54482   fi
54483 
54484 
54485   input_path="$new_path"
54486   # Check if we need to convert this using DOS-style short mode. If the path
54487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54488   # take no chances and rewrite it.
54489   # Note: m4 eats our [], so we need to use [ and ] instead.
54490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54491   if test "x$has_forbidden_chars" != x; then
54492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54493     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54494   fi
54495 
54496 
54497   windows_path="$new_path"
54498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54499     unix_path=`$CYGPATH -u "$windows_path"`
54500     new_path="$unix_path"
54501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54503     new_path="$unix_path"
54504   fi
54505 
54506   if test "x$path" != "x$new_path"; then
54507     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54509 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54510   fi
54511 
54512   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54513   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54514 
54515     else
54516       # We're on a unix platform. Hooray! :)
54517       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54518       has_space=`$ECHO "$path" | $GREP " "`
54519       if test "x$has_space" != x; then
54520         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54521 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54522         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54523       fi
54524 
54525       # Use eval to expand a potential ~
54526       eval path="$path"
54527       if test ! -f "$path" && test ! -d "$path"; then
54528         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54529       fi
54530 
54531       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54532     fi
54533   fi
54534 
54535 
54536   # Only process if variable expands to non-empty
54537 
54538   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54539     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54540 
54541   # Input might be given as Windows format, start by converting to
54542   # unix format.
54543   path="$POTENTIAL_FREETYPE_LIB_PATH"
54544   new_path=`$CYGPATH -u "$path"`
54545 
54546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54549   # "foo.exe" is OK but "foo" is an error.
54550   #
54551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54552   # It is also a way to make sure we got the proper file name for the real test later on.
54553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54554   if test "x$test_shortpath" = x; then
54555     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54556 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54557     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54558   fi
54559 
54560   # Call helper function which possibly converts this using DOS-style short mode.
54561   # If so, the updated path is stored in $new_path.
54562 
54563   input_path="$new_path"
54564   # Check if we need to convert this using DOS-style short mode. If the path
54565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54566   # take no chances and rewrite it.
54567   # Note: m4 eats our [], so we need to use [ and ] instead.
54568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54569   if test "x$has_forbidden_chars" != x; then
54570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54574       # Going to short mode and back again did indeed matter. Since short mode is
54575       # case insensitive, let's make it lowercase to improve readability.
54576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54577       # Now convert it back to Unix-style (cygpath)
54578       input_path=`$CYGPATH -u "$shortmode_path"`
54579       new_path="$input_path"
54580     fi
54581   fi
54582 
54583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54584   if test "x$test_cygdrive_prefix" = x; then
54585     # As a simple fix, exclude /usr/bin since it's not a real path.
54586     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54588       # a path prefixed by /cygdrive for fixpath to work.
54589       new_path="$CYGWIN_ROOT_PATH$input_path"
54590     fi
54591   fi
54592 
54593 
54594   if test "x$path" != "x$new_path"; then
54595     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54597 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54598   fi
54599 
54600     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601 
54602   path="$POTENTIAL_FREETYPE_LIB_PATH"
54603   has_colon=`$ECHO $path | $GREP ^.:`
54604   new_path="$path"
54605   if test "x$has_colon" = x; then
54606     # Not in mixed or Windows style, start by that.
54607     new_path=`cmd //c echo $path`
54608   fi
54609 
54610 
54611   input_path="$new_path"
54612   # Check if we need to convert this using DOS-style short mode. If the path
54613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54614   # take no chances and rewrite it.
54615   # Note: m4 eats our [], so we need to use [ and ] instead.
54616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54617   if test "x$has_forbidden_chars" != x; then
54618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54620   fi
54621 
54622 
54623   windows_path="$new_path"
54624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54625     unix_path=`$CYGPATH -u "$windows_path"`
54626     new_path="$unix_path"
54627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54629     new_path="$unix_path"
54630   fi
54631 
54632   if test "x$path" != "x$new_path"; then
54633     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54635 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54636   fi
54637 
54638   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54639   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54640 
54641     else
54642       # We're on a unix platform. Hooray! :)
54643       path="$POTENTIAL_FREETYPE_LIB_PATH"
54644       has_space=`$ECHO "$path" | $GREP " "`
54645       if test "x$has_space" != x; then
54646         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54647 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54648         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54649       fi
54650 
54651       # Use eval to expand a potential ~
54652       eval path="$path"
54653       if test ! -f "$path" && test ! -d "$path"; then
54654         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54655       fi
54656 
54657       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54658     fi
54659   fi
54660 
54661 
54662     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54664 $as_echo_n "checking for freetype includes... " >&6; }
54665     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54666 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54667     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54668     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54669 $as_echo_n "checking for freetype libraries... " >&6; }
54670     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54671 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54672   fi
54673 
54674               fi
54675             fi
54676           fi
54677         fi
54678       fi # end check in well-known locations
54679 
54680       if test "x$FOUND_FREETYPE" != xyes; then
54681 
54682   # Print a helpful message on how to acquire the necessary build dependency.
54683   # freetype is the help tag: freetype, cups, alsa etc
54684   MISSING_DEPENDENCY=freetype
54685 
54686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54687     cygwin_help $MISSING_DEPENDENCY
54688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54689     msys_help $MISSING_DEPENDENCY
54690   else
54691     PKGHANDLER_COMMAND=
54692 
54693     case $PKGHANDLER in
54694       apt-get)
54695         apt_help     $MISSING_DEPENDENCY ;;
54696       yum)
54697         yum_help     $MISSING_DEPENDENCY ;;
54698       port)
54699         port_help    $MISSING_DEPENDENCY ;;
54700       pkgutil)
54701         pkgutil_help $MISSING_DEPENDENCY ;;
54702       pkgadd)
54703         pkgadd_help  $MISSING_DEPENDENCY ;;
54704     esac
54705 
54706     if test "x$PKGHANDLER_COMMAND" != x; then
54707       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54708     fi
54709   fi
54710 
54711         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
54712       fi
54713     fi # end user specified settings
54714 
54715     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
54716     if test "x$FREETYPE_CFLAGS" = x; then
54717 
54718   # Only process if variable expands to non-empty
54719 
54720   if test "x$FREETYPE_INCLUDE_PATH" != x; then
54721     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54722 
54723   # Input might be given as Windows format, start by converting to
54724   # unix format.
54725   path="$FREETYPE_INCLUDE_PATH"
54726   new_path=`$CYGPATH -u "$path"`
54727 
54728   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54729   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54730   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54731   # "foo.exe" is OK but "foo" is an error.
54732   #
54733   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54734   # It is also a way to make sure we got the proper file name for the real test later on.
54735   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54736   if test "x$test_shortpath" = x; then
54737     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54738 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54739     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
54740   fi
54741 
54742   # Call helper function which possibly converts this using DOS-style short mode.
54743   # If so, the updated path is stored in $new_path.
54744 
54745   input_path="$new_path"
54746   # Check if we need to convert this using DOS-style short mode. If the path
54747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54748   # take no chances and rewrite it.
54749   # Note: m4 eats our [], so we need to use [ and ] instead.
54750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54751   if test "x$has_forbidden_chars" != x; then
54752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54753     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54754     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54755     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54756       # Going to short mode and back again did indeed matter. Since short mode is
54757       # case insensitive, let's make it lowercase to improve readability.
54758       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54759       # Now convert it back to Unix-style (cygpath)
54760       input_path=`$CYGPATH -u "$shortmode_path"`
54761       new_path="$input_path"
54762     fi
54763   fi
54764 
54765   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54766   if test "x$test_cygdrive_prefix" = x; then
54767     # As a simple fix, exclude /usr/bin since it's not a real path.
54768     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54769       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54770       # a path prefixed by /cygdrive for fixpath to work.
54771       new_path="$CYGWIN_ROOT_PATH$input_path"
54772     fi
54773   fi
54774 
54775 
54776   if test "x$path" != "x$new_path"; then
54777     FREETYPE_INCLUDE_PATH="$new_path"
54778     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54779 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54780   fi
54781 
54782     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54783 
54784   path="$FREETYPE_INCLUDE_PATH"
54785   has_colon=`$ECHO $path | $GREP ^.:`
54786   new_path="$path"
54787   if test "x$has_colon" = x; then
54788     # Not in mixed or Windows style, start by that.
54789     new_path=`cmd //c echo $path`
54790   fi
54791 
54792 
54793   input_path="$new_path"
54794   # Check if we need to convert this using DOS-style short mode. If the path
54795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54796   # take no chances and rewrite it.
54797   # Note: m4 eats our [], so we need to use [ and ] instead.
54798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54799   if test "x$has_forbidden_chars" != x; then
54800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54801     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54802   fi
54803 
54804 
54805   windows_path="$new_path"
54806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54807     unix_path=`$CYGPATH -u "$windows_path"`
54808     new_path="$unix_path"
54809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54811     new_path="$unix_path"
54812   fi
54813 
54814   if test "x$path" != "x$new_path"; then
54815     FREETYPE_INCLUDE_PATH="$new_path"
54816     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54817 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54818   fi
54819 
54820   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54821   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54822 
54823     else
54824       # We're on a unix platform. Hooray! :)
54825       path="$FREETYPE_INCLUDE_PATH"
54826       has_space=`$ECHO "$path" | $GREP " "`
54827       if test "x$has_space" != x; then
54828         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54829 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54830         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54831       fi
54832 
54833       # Use eval to expand a potential ~
54834       eval path="$path"
54835       if test ! -f "$path" && test ! -d "$path"; then
54836         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54837       fi
54838 
54839       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54840     fi
54841   fi
54842 
54843       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
54844         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
54845       else
54846         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
54847       fi
54848     fi
54849 
54850     if test "x$FREETYPE_LIBS" = x; then
54851 
54852   # Only process if variable expands to non-empty
54853 
54854   if test "x$FREETYPE_LIB_PATH" != x; then
54855     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54856 
54857   # Input might be given as Windows format, start by converting to
54858   # unix format.
54859   path="$FREETYPE_LIB_PATH"
54860   new_path=`$CYGPATH -u "$path"`
54861 
54862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54865   # "foo.exe" is OK but "foo" is an error.
54866   #
54867   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54868   # It is also a way to make sure we got the proper file name for the real test later on.
54869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54870   if test "x$test_shortpath" = x; then
54871     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54872 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54873     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
54874   fi
54875 
54876   # Call helper function which possibly converts this using DOS-style short mode.
54877   # If so, the updated path is stored in $new_path.
54878 
54879   input_path="$new_path"
54880   # Check if we need to convert this using DOS-style short mode. If the path
54881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54882   # take no chances and rewrite it.
54883   # Note: m4 eats our [], so we need to use [ and ] instead.
54884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54885   if test "x$has_forbidden_chars" != x; then
54886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54890       # Going to short mode and back again did indeed matter. Since short mode is
54891       # case insensitive, let's make it lowercase to improve readability.
54892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54893       # Now convert it back to Unix-style (cygpath)
54894       input_path=`$CYGPATH -u "$shortmode_path"`
54895       new_path="$input_path"
54896     fi
54897   fi
54898 
54899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54900   if test "x$test_cygdrive_prefix" = x; then
54901     # As a simple fix, exclude /usr/bin since it's not a real path.
54902     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54904       # a path prefixed by /cygdrive for fixpath to work.
54905       new_path="$CYGWIN_ROOT_PATH$input_path"
54906     fi
54907   fi
54908 
54909 
54910   if test "x$path" != "x$new_path"; then
54911     FREETYPE_LIB_PATH="$new_path"
54912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54913 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54914   fi
54915 
54916     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54917 
54918   path="$FREETYPE_LIB_PATH"
54919   has_colon=`$ECHO $path | $GREP ^.:`
54920   new_path="$path"
54921   if test "x$has_colon" = x; then
54922     # Not in mixed or Windows style, start by that.
54923     new_path=`cmd //c echo $path`
54924   fi
54925 
54926 
54927   input_path="$new_path"
54928   # Check if we need to convert this using DOS-style short mode. If the path
54929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54930   # take no chances and rewrite it.
54931   # Note: m4 eats our [], so we need to use [ and ] instead.
54932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54933   if test "x$has_forbidden_chars" != x; then
54934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54935     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54936   fi
54937 
54938 
54939   windows_path="$new_path"
54940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54941     unix_path=`$CYGPATH -u "$windows_path"`
54942     new_path="$unix_path"
54943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54945     new_path="$unix_path"
54946   fi
54947 
54948   if test "x$path" != "x$new_path"; then
54949     FREETYPE_LIB_PATH="$new_path"
54950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54951 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54952   fi
54953 
54954   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54955   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54956 
54957     else
54958       # We're on a unix platform. Hooray! :)
54959       path="$FREETYPE_LIB_PATH"
54960       has_space=`$ECHO "$path" | $GREP " "`
54961       if test "x$has_space" != x; then
54962         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54963 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54964         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54965       fi
54966 
54967       # Use eval to expand a potential ~
54968       eval path="$path"
54969       if test ! -f "$path" && test ! -d "$path"; then
54970         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54971       fi
54972 
54973       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54974     fi
54975   fi
54976 
54977       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54978         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
54979       else
54980         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
54981       fi
54982     fi
54983 
54984     # Try to compile it
54985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
54986 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
54987     ac_ext=cpp
54988 ac_cpp='$CXXCPP $CPPFLAGS'
54989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54992 
54993     PREV_CXXCFLAGS="$CXXFLAGS"
54994     PREV_LIBS="$LIBS"
54995     PREV_CXX="$CXX"
54996     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
54997     LIBS="$LIBS $FREETYPE_LIBS"
54998     CXX="$FIXPATH $CXX"
54999     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55000 /* end confdefs.h.  */
55001 
55002           #include<ft2build.h>
55003           #include FT_FREETYPE_H
55004           int main () {
55005             FT_Init_FreeType(NULL);
55006             return 0;
55007           }
55008 
55009 _ACEOF
55010 if ac_fn_cxx_try_link "$LINENO"; then :
55011 
55012           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55013 $as_echo "yes" >&6; }
55014 
55015 else
55016 
55017           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55018 $as_echo "no" >&6; }
55019           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
55020 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
55021           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
55022 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
55023 
55024 
55025   # Print a helpful message on how to acquire the necessary build dependency.
55026   # freetype is the help tag: freetype, cups, alsa etc
55027   MISSING_DEPENDENCY=freetype
55028 
55029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55030     cygwin_help $MISSING_DEPENDENCY
55031   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55032     msys_help $MISSING_DEPENDENCY
55033   else
55034     PKGHANDLER_COMMAND=
55035 
55036     case $PKGHANDLER in
55037       apt-get)
55038         apt_help     $MISSING_DEPENDENCY ;;
55039       yum)
55040         yum_help     $MISSING_DEPENDENCY ;;
55041       port)
55042         port_help    $MISSING_DEPENDENCY ;;
55043       pkgutil)
55044         pkgutil_help $MISSING_DEPENDENCY ;;
55045       pkgadd)
55046         pkgadd_help  $MISSING_DEPENDENCY ;;
55047     esac
55048 
55049     if test "x$PKGHANDLER_COMMAND" != x; then
55050       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55051     fi
55052   fi
55053 
55054 
55055           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55056 
55057 
55058 fi
55059 rm -f core conftest.err conftest.$ac_objext \
55060     conftest$ac_exeext conftest.$ac_ext
55061     CXXCFLAGS="$PREV_CXXFLAGS"
55062     LIBS="$PREV_LIBS"
55063     CXX="$PREV_CXX"
55064     ac_ext=cpp
55065 ac_cpp='$CXXCPP $CPPFLAGS'
55066 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55067 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55068 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55069 
55070 
55071     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55072 $as_echo_n "checking if we should bundle freetype... " >&6; }
55073     if test "x$BUNDLE_FREETYPE" = xyes; then
55074       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55075     fi
55076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55077 $as_echo "$BUNDLE_FREETYPE" >&6; }
55078 
55079   fi # end freetype needed
55080 
55081 
55082 
55083 
55084 
55085 
55086 
55087 # Check whether --with-alsa was given.
55088 if test "${with_alsa+set}" = set; then :
55089   withval=$with_alsa;
55090 fi
55091 
55092 
55093 # Check whether --with-alsa-include was given.
55094 if test "${with_alsa_include+set}" = set; then :
55095   withval=$with_alsa_include;
55096 fi
55097 
55098 
55099 # Check whether --with-alsa-lib was given.
55100 if test "${with_alsa_lib+set}" = set; then :
55101   withval=$with_alsa_lib;
55102 fi
55103 
55104 
55105   if test "x$NEEDS_LIB_ALSA" = xfalse; then
55106     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55107         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55108         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55109       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55110 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55111     fi
55112     ALSA_CFLAGS=
55113     ALSA_LIBS=
55114   else
55115     ALSA_FOUND=no
55116 
55117     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55118       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55119     fi
55120 
55121     if test "x${with_alsa}" != x; then
55122       ALSA_LIBS="-L${with_alsa}/lib -lasound"
55123       ALSA_CFLAGS="-I${with_alsa}/include"
55124       ALSA_FOUND=yes
55125     fi
55126     if test "x${with_alsa_include}" != x; then
55127       ALSA_CFLAGS="-I${with_alsa_include}"
55128       ALSA_FOUND=yes
55129     fi
55130     if test "x${with_alsa_lib}" != x; then
55131       ALSA_LIBS="-L${with_alsa_lib} -lasound"
55132       ALSA_FOUND=yes
55133     fi
55134     # Do not try pkg-config if we have a sysroot set.
55135     if test "x$SYSROOT" = x; then
55136       if test "x$ALSA_FOUND" = xno; then
55137 
55138 pkg_failed=no
55139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55140 $as_echo_n "checking for ALSA... " >&6; }
55141 
55142 if test -n "$ALSA_CFLAGS"; then
55143     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55144  elif test -n "$PKG_CONFIG"; then
55145     if test -n "$PKG_CONFIG" && \
55146     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55147   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55148   ac_status=$?
55149   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55150   test $ac_status = 0; }; then
55151   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55152 else
55153   pkg_failed=yes
55154 fi
55155  else
55156     pkg_failed=untried
55157 fi
55158 if test -n "$ALSA_LIBS"; then
55159     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55160  elif test -n "$PKG_CONFIG"; then
55161     if test -n "$PKG_CONFIG" && \
55162     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55163   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55164   ac_status=$?
55165   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55166   test $ac_status = 0; }; then
55167   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55168 else
55169   pkg_failed=yes
55170 fi
55171  else
55172     pkg_failed=untried
55173 fi
55174 
55175 
55176 
55177 if test $pkg_failed = yes; then
55178 
55179 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55180         _pkg_short_errors_supported=yes
55181 else
55182         _pkg_short_errors_supported=no
55183 fi
55184         if test $_pkg_short_errors_supported = yes; then
55185                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55186         else
55187                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55188         fi
55189         # Put the nasty error message in config.log where it belongs
55190         echo "$ALSA_PKG_ERRORS" >&5
55191 
55192         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55193 $as_echo "no" >&6; }
55194                 ALSA_FOUND=no
55195 elif test $pkg_failed = untried; then
55196         ALSA_FOUND=no
55197 else
55198         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55199         ALSA_LIBS=$pkg_cv_ALSA_LIBS
55200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55201 $as_echo "yes" >&6; }
55202         ALSA_FOUND=yes
55203 fi
55204       fi
55205     fi
55206     if test "x$ALSA_FOUND" = xno; then
55207       for ac_header in alsa/asoundlib.h
55208 do :
55209   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55210 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55211   cat >>confdefs.h <<_ACEOF
55212 #define HAVE_ALSA_ASOUNDLIB_H 1
55213 _ACEOF
55214 
55215             ALSA_FOUND=yes
55216             ALSA_CFLAGS=-Iignoreme
55217             ALSA_LIBS=-lasound
55218             DEFAULT_ALSA=yes
55219 
55220 else
55221   ALSA_FOUND=no
55222 
55223 fi
55224 
55225 done
55226 
55227     fi
55228     if test "x$ALSA_FOUND" = xno; then
55229 
55230   # Print a helpful message on how to acquire the necessary build dependency.
55231   # alsa is the help tag: freetype, cups, alsa etc
55232   MISSING_DEPENDENCY=alsa
55233 
55234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55235     cygwin_help $MISSING_DEPENDENCY
55236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55237     msys_help $MISSING_DEPENDENCY
55238   else
55239     PKGHANDLER_COMMAND=
55240 
55241     case $PKGHANDLER in
55242       apt-get)
55243         apt_help     $MISSING_DEPENDENCY ;;
55244       yum)
55245         yum_help     $MISSING_DEPENDENCY ;;
55246       port)
55247         port_help    $MISSING_DEPENDENCY ;;
55248       pkgutil)
55249         pkgutil_help $MISSING_DEPENDENCY ;;
55250       pkgadd)
55251         pkgadd_help  $MISSING_DEPENDENCY ;;
55252     esac
55253 
55254     if test "x$PKGHANDLER_COMMAND" != x; then
55255       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55256     fi
55257   fi
55258 
55259       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55260     fi
55261   fi
55262 
55263 
55264 
55265 
55266 
55267 
55268 # Check whether --with-libffi was given.
55269 if test "${with_libffi+set}" = set; then :
55270   withval=$with_libffi;
55271 fi
55272 
55273 
55274 # Check whether --with-libffi-include was given.
55275 if test "${with_libffi_include+set}" = set; then :
55276   withval=$with_libffi_include;
55277 fi
55278 
55279 
55280 # Check whether --with-libffi-lib was given.
55281 if test "${with_libffi_lib+set}" = set; then :
55282   withval=$with_libffi_lib;
55283 fi
55284 
55285 
55286   if test "x$NEEDS_LIB_FFI" = xfalse; then
55287     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55288         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55289         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55290       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55291 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55292     fi
55293     LIBFFI_CFLAGS=
55294     LIBFFI_LIBS=
55295   else
55296     LIBFFI_FOUND=no
55297 
55298     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55299       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55300     fi
55301 
55302     if test "x${with_libffi}" != x; then
55303       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55304       LIBFFI_CFLAGS="-I${with_libffi}/include"
55305       LIBFFI_FOUND=yes
55306     fi
55307     if test "x${with_libffi_include}" != x; then
55308       LIBFFI_CFLAGS="-I${with_libffi_include}"
55309       LIBFFI_FOUND=yes
55310     fi
55311     if test "x${with_libffi_lib}" != x; then
55312       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55313       LIBFFI_FOUND=yes
55314     fi
55315     # Do not try pkg-config if we have a sysroot set.
55316     if test "x$SYSROOT" = x; then
55317       if test "x$LIBFFI_FOUND" = xno; then
55318         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55319 
55320 pkg_failed=no
55321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55322 $as_echo_n "checking for LIBFFI... " >&6; }
55323 
55324 if test -n "$LIBFFI_CFLAGS"; then
55325     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55326  elif test -n "$PKG_CONFIG"; then
55327     if test -n "$PKG_CONFIG" && \
55328     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55329   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55330   ac_status=$?
55331   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55332   test $ac_status = 0; }; then
55333   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55334 else
55335   pkg_failed=yes
55336 fi
55337  else
55338     pkg_failed=untried
55339 fi
55340 if test -n "$LIBFFI_LIBS"; then
55341     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55342  elif test -n "$PKG_CONFIG"; then
55343     if test -n "$PKG_CONFIG" && \
55344     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55345   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55346   ac_status=$?
55347   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55348   test $ac_status = 0; }; then
55349   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55350 else
55351   pkg_failed=yes
55352 fi
55353  else
55354     pkg_failed=untried
55355 fi
55356 
55357 
55358 
55359 if test $pkg_failed = yes; then
55360 
55361 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55362         _pkg_short_errors_supported=yes
55363 else
55364         _pkg_short_errors_supported=no
55365 fi
55366         if test $_pkg_short_errors_supported = yes; then
55367                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55368         else
55369                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55370         fi
55371         # Put the nasty error message in config.log where it belongs
55372         echo "$LIBFFI_PKG_ERRORS" >&5
55373 
55374         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55375 $as_echo "no" >&6; }
55376                 LIBFFI_FOUND=no
55377 elif test $pkg_failed = untried; then
55378         LIBFFI_FOUND=no
55379 else
55380         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55381         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55383 $as_echo "yes" >&6; }
55384         LIBFFI_FOUND=yes
55385 fi
55386       fi
55387     fi
55388     if test "x$LIBFFI_FOUND" = xno; then
55389       for ac_header in ffi.h
55390 do :
55391   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55392 if test "x$ac_cv_header_ffi_h" = xyes; then :
55393   cat >>confdefs.h <<_ACEOF
55394 #define HAVE_FFI_H 1
55395 _ACEOF
55396 
55397             LIBFFI_FOUND=yes
55398             LIBFFI_CFLAGS=
55399             LIBFFI_LIBS=-lffi
55400 
55401 else
55402   LIBFFI_FOUND=no
55403 
55404 fi
55405 
55406 done
55407 
55408     fi
55409     if test "x$LIBFFI_FOUND" = xno; then
55410 
55411   # Print a helpful message on how to acquire the necessary build dependency.
55412   # ffi is the help tag: freetype, cups, alsa etc
55413   MISSING_DEPENDENCY=ffi
55414 
55415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55416     cygwin_help $MISSING_DEPENDENCY
55417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55418     msys_help $MISSING_DEPENDENCY
55419   else
55420     PKGHANDLER_COMMAND=
55421 
55422     case $PKGHANDLER in
55423       apt-get)
55424         apt_help     $MISSING_DEPENDENCY ;;
55425       yum)
55426         yum_help     $MISSING_DEPENDENCY ;;
55427       port)
55428         port_help    $MISSING_DEPENDENCY ;;
55429       pkgutil)
55430         pkgutil_help $MISSING_DEPENDENCY ;;
55431       pkgadd)
55432         pkgadd_help  $MISSING_DEPENDENCY ;;
55433     esac
55434 
55435     if test "x$PKGHANDLER_COMMAND" != x; then
55436       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55437     fi
55438   fi
55439 
55440       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55441     fi
55442 
55443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55444 $as_echo_n "checking if libffi works... " >&6; }
55445     ac_ext=c
55446 ac_cpp='$CPP $CPPFLAGS'
55447 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55448 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55449 ac_compiler_gnu=$ac_cv_c_compiler_gnu
55450 
55451     OLD_CFLAGS="$CFLAGS"
55452     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55453     OLD_LIBS="$LIBS"
55454     LIBS="$LIBS $LIBFFI_LIBS"
55455     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55456 /* end confdefs.h.  */
55457 #include <ffi.h>
55458 int
55459 main ()
55460 {
55461 
55462           ffi_call(NULL, NULL, NULL, NULL);
55463           return 0;
55464 
55465   ;
55466   return 0;
55467 }
55468 _ACEOF
55469 if ac_fn_c_try_link "$LINENO"; then :
55470   LIBFFI_WORKS=yes
55471 else
55472   LIBFFI_WORKS=no
55473 
55474 fi
55475 rm -f core conftest.err conftest.$ac_objext \
55476     conftest$ac_exeext conftest.$ac_ext
55477     CFLAGS="$OLD_CFLAGS"
55478     LIBS="$OLD_LIBS"
55479     ac_ext=cpp
55480 ac_cpp='$CXXCPP $CPPFLAGS'
55481 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55482 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55483 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55484 
55485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55486 $as_echo "$LIBFFI_WORKS" >&6; }
55487 
55488     if test "x$LIBFFI_WORKS" = xno; then
55489 
55490   # Print a helpful message on how to acquire the necessary build dependency.
55491   # ffi is the help tag: freetype, cups, alsa etc
55492   MISSING_DEPENDENCY=ffi
55493 
55494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55495     cygwin_help $MISSING_DEPENDENCY
55496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497     msys_help $MISSING_DEPENDENCY
55498   else
55499     PKGHANDLER_COMMAND=
55500 
55501     case $PKGHANDLER in
55502       apt-get)
55503         apt_help     $MISSING_DEPENDENCY ;;
55504       yum)
55505         yum_help     $MISSING_DEPENDENCY ;;
55506       port)
55507         port_help    $MISSING_DEPENDENCY ;;
55508       pkgutil)
55509         pkgutil_help $MISSING_DEPENDENCY ;;
55510       pkgadd)
55511         pkgadd_help  $MISSING_DEPENDENCY ;;
55512     esac
55513 
55514     if test "x$PKGHANDLER_COMMAND" != x; then
55515       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55516     fi
55517   fi
55518 
55519       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55520     fi
55521   fi
55522 
55523 
55524 
55525 
55526 
55527   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55528     # Extract the first word of "llvm-config", so it can be a program name with args.
55529 set dummy llvm-config; ac_word=$2
55530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55531 $as_echo_n "checking for $ac_word... " >&6; }
55532 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55533   $as_echo_n "(cached) " >&6
55534 else
55535   if test -n "$LLVM_CONFIG"; then
55536   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55537 else
55538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55539 for as_dir in $PATH
55540 do
55541   IFS=$as_save_IFS
55542   test -z "$as_dir" && as_dir=.
55543     for ac_exec_ext in '' $ac_executable_extensions; do
55544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55545     ac_cv_prog_LLVM_CONFIG="llvm-config"
55546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55547     break 2
55548   fi
55549 done
55550   done
55551 IFS=$as_save_IFS
55552 
55553 fi
55554 fi
55555 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55556 if test -n "$LLVM_CONFIG"; then
55557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55558 $as_echo "$LLVM_CONFIG" >&6; }
55559 else
55560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55561 $as_echo "no" >&6; }
55562 fi
55563 
55564 
55565 
55566     if test "x$LLVM_CONFIG" != xllvm-config; then
55567       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55568     fi
55569 
55570     llvm_components="jit mcjit engine nativecodegen native"
55571     unset LLVM_CFLAGS
55572     for flag in $("$LLVM_CONFIG" --cxxflags); do
55573       if echo "${flag}" | grep -q '^-[ID]'; then
55574         if test "${flag}" != "-D_DEBUG" ; then
55575           if test "${LLVM_CFLAGS}" != "" ; then
55576             LLVM_CFLAGS="${LLVM_CFLAGS} "
55577           fi
55578           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55579         fi
55580       fi
55581     done
55582     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55583     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55584 
55585     unset LLVM_LDFLAGS
55586     for flag in $("${LLVM_CONFIG}" --ldflags); do
55587       if echo "${flag}" | grep -q '^-L'; then
55588         if test "${LLVM_LDFLAGS}" != ""; then
55589           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55590         fi
55591         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55592       fi
55593     done
55594 
55595     unset LLVM_LIBS
55596     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55597       if echo "${flag}" | grep -q '^-l'; then
55598         if test "${LLVM_LIBS}" != ""; then
55599           LLVM_LIBS="${LLVM_LIBS} "
55600         fi
55601         LLVM_LIBS="${LLVM_LIBS}${flag}"
55602       fi
55603     done
55604 
55605 
55606 
55607 
55608   fi
55609 
55610 
55611 
55612 # Check whether --with-libjpeg was given.
55613 if test "${with_libjpeg+set}" = set; then :
55614   withval=$with_libjpeg;
55615 fi
55616 
55617 
55618   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
55619 $as_echo_n "checking for which libjpeg to use... " >&6; }
55620   # default is bundled
55621   DEFAULT_LIBJPEG=bundled
55622   # if user didn't specify, use DEFAULT_LIBJPEG
55623   if test "x${with_libjpeg}" = "x"; then
55624     with_libjpeg=${DEFAULT_LIBJPEG}
55625   fi
55626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
55627 $as_echo "${with_libjpeg}" >&6; }
55628 
55629   if test "x${with_libjpeg}" = "xbundled"; then
55630     USE_EXTERNAL_LIBJPEG=false
55631   elif test "x${with_libjpeg}" = "xsystem"; then
55632     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
55633 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
55634 
55635 else
55636    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
55637 fi
55638 
55639 
55640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
55641 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
55642 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
55643   $as_echo_n "(cached) " >&6
55644 else
55645   ac_check_lib_save_LIBS=$LIBS
55646 LIBS="-ljpeg  $LIBS"
55647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55648 /* end confdefs.h.  */
55649 
55650 /* Override any GCC internal prototype to avoid an error.
55651    Use char because int might match the return type of a GCC
55652    builtin and then its argument prototype would still apply.  */
55653 #ifdef __cplusplus
55654 extern "C"
55655 #endif
55656 char jpeg_CreateDecompress ();
55657 int
55658 main ()
55659 {
55660 return jpeg_CreateDecompress ();
55661   ;
55662   return 0;
55663 }
55664 _ACEOF
55665 if ac_fn_cxx_try_link "$LINENO"; then :
55666   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
55667 else
55668   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
55669 fi
55670 rm -f core conftest.err conftest.$ac_objext \
55671     conftest$ac_exeext conftest.$ac_ext
55672 LIBS=$ac_check_lib_save_LIBS
55673 fi
55674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
55675 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
55676 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
55677   cat >>confdefs.h <<_ACEOF
55678 #define HAVE_LIBJPEG 1
55679 _ACEOF
55680 
55681   LIBS="-ljpeg $LIBS"
55682 
55683 else
55684    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
55685 fi
55686 
55687 
55688     USE_EXTERNAL_LIBJPEG=true
55689   else
55690     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
55691   fi
55692 
55693 
55694 
55695 
55696 
55697 # Check whether --with-giflib was given.
55698 if test "${with_giflib+set}" = set; then :
55699   withval=$with_giflib;
55700 fi
55701 
55702 
55703   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
55704 $as_echo_n "checking for which giflib to use... " >&6; }
55705   # default is bundled
55706   DEFAULT_GIFLIB=bundled
55707   # if user didn't specify, use DEFAULT_GIFLIB
55708   if test "x${with_giflib}" = "x"; then
55709     with_giflib=${DEFAULT_GIFLIB}
55710   fi
55711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
55712 $as_echo "${with_giflib}" >&6; }
55713 
55714   if test "x${with_giflib}" = "xbundled"; then
55715     USE_EXTERNAL_LIBGIF=false
55716   elif test "x${with_giflib}" = "xsystem"; then
55717     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
55718 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
55719 
55720 else
55721    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
55722 fi
55723 
55724 
55725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
55726 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
55727 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
55728   $as_echo_n "(cached) " >&6
55729 else
55730   ac_check_lib_save_LIBS=$LIBS
55731 LIBS="-lgif  $LIBS"
55732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55733 /* end confdefs.h.  */
55734 
55735 /* Override any GCC internal prototype to avoid an error.
55736    Use char because int might match the return type of a GCC
55737    builtin and then its argument prototype would still apply.  */
55738 #ifdef __cplusplus
55739 extern "C"
55740 #endif
55741 char DGifGetCode ();
55742 int
55743 main ()
55744 {
55745 return DGifGetCode ();
55746   ;
55747   return 0;
55748 }
55749 _ACEOF
55750 if ac_fn_cxx_try_link "$LINENO"; then :
55751   ac_cv_lib_gif_DGifGetCode=yes
55752 else
55753   ac_cv_lib_gif_DGifGetCode=no
55754 fi
55755 rm -f core conftest.err conftest.$ac_objext \
55756     conftest$ac_exeext conftest.$ac_ext
55757 LIBS=$ac_check_lib_save_LIBS
55758 fi
55759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
55760 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
55761 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
55762   cat >>confdefs.h <<_ACEOF
55763 #define HAVE_LIBGIF 1
55764 _ACEOF
55765 
55766   LIBS="-lgif $LIBS"
55767 
55768 else
55769    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
55770 fi
55771 
55772 
55773     USE_EXTERNAL_LIBGIF=true
55774   else
55775     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
55776   fi
55777 
55778 
55779 
55780 
55781 
55782 # Check whether --with-libpng was given.
55783 if test "${with_libpng+set}" = set; then :
55784   withval=$with_libpng;
55785 fi
55786 
55787 
55788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
55789 $as_echo_n "checking for which libpng to use... " >&6; }
55790 
55791   # default is bundled
55792   DEFAULT_LIBPNG=bundled
55793   # if user didn't specify, use DEFAULT_LIBPNG
55794   if test "x${with_libpng}" = "x"; then
55795       with_libpng=${DEFAULT_LIBPNG}
55796   fi
55797 
55798   if test "x${with_libpng}" = "xbundled"; then
55799       USE_EXTERNAL_LIBPNG=false
55800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55801 $as_echo "bundled" >&6; }
55802   elif test "x${with_libpng}" = "xsystem"; then
55803 
55804 pkg_failed=no
55805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
55806 $as_echo_n "checking for PNG... " >&6; }
55807 
55808 if test -n "$PNG_CFLAGS"; then
55809     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
55810  elif test -n "$PKG_CONFIG"; then
55811     if test -n "$PKG_CONFIG" && \
55812     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55813   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55814   ac_status=$?
55815   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55816   test $ac_status = 0; }; then
55817   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
55818 else
55819   pkg_failed=yes
55820 fi
55821  else
55822     pkg_failed=untried
55823 fi
55824 if test -n "$PNG_LIBS"; then
55825     pkg_cv_PNG_LIBS="$PNG_LIBS"
55826  elif test -n "$PKG_CONFIG"; then
55827     if test -n "$PKG_CONFIG" && \
55828     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55829   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55830   ac_status=$?
55831   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55832   test $ac_status = 0; }; then
55833   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
55834 else
55835   pkg_failed=yes
55836 fi
55837  else
55838     pkg_failed=untried
55839 fi
55840 
55841 
55842 
55843 if test $pkg_failed = yes; then
55844 
55845 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55846         _pkg_short_errors_supported=yes
55847 else
55848         _pkg_short_errors_supported=no
55849 fi
55850         if test $_pkg_short_errors_supported = yes; then
55851                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
55852         else
55853                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
55854         fi
55855         # Put the nasty error message in config.log where it belongs
55856         echo "$PNG_PKG_ERRORS" >&5
55857 
55858         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55859 $as_echo "no" >&6; }
55860                  LIBPNG_FOUND=no
55861 elif test $pkg_failed = untried; then
55862          LIBPNG_FOUND=no
55863 else
55864         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
55865         PNG_LIBS=$pkg_cv_PNG_LIBS
55866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55867 $as_echo "yes" >&6; }
55868          LIBPNG_FOUND=yes
55869 fi
55870       if test "x${LIBPNG_FOUND}" = "xyes"; then
55871           USE_EXTERNAL_LIBPNG=true
55872           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55873 $as_echo "system" >&6; }
55874       else
55875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55876 $as_echo "system not found" >&6; }
55877           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
55878       fi
55879   else
55880       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
55881   fi
55882 
55883 
55884 
55885 
55886 
55887 # Check whether --with-zlib was given.
55888 if test "${with_zlib+set}" = set; then :
55889   withval=$with_zlib;
55890 fi
55891 
55892 
55893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55894 $as_echo_n "checking for compress in -lz... " >&6; }
55895 if ${ac_cv_lib_z_compress+:} false; then :
55896   $as_echo_n "(cached) " >&6
55897 else
55898   ac_check_lib_save_LIBS=$LIBS
55899 LIBS="-lz  $LIBS"
55900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55901 /* end confdefs.h.  */
55902 
55903 /* Override any GCC internal prototype to avoid an error.
55904    Use char because int might match the return type of a GCC
55905    builtin and then its argument prototype would still apply.  */
55906 #ifdef __cplusplus
55907 extern "C"
55908 #endif
55909 char compress ();
55910 int
55911 main ()
55912 {
55913 return compress ();
55914   ;
55915   return 0;
55916 }
55917 _ACEOF
55918 if ac_fn_cxx_try_link "$LINENO"; then :
55919   ac_cv_lib_z_compress=yes
55920 else
55921   ac_cv_lib_z_compress=no
55922 fi
55923 rm -f core conftest.err conftest.$ac_objext \
55924     conftest$ac_exeext conftest.$ac_ext
55925 LIBS=$ac_check_lib_save_LIBS
55926 fi
55927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55928 $as_echo "$ac_cv_lib_z_compress" >&6; }
55929 if test "x$ac_cv_lib_z_compress" = xyes; then :
55930    ZLIB_FOUND=yes
55931 else
55932    ZLIB_FOUND=no
55933 fi
55934 
55935 
55936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
55937 $as_echo_n "checking for which zlib to use... " >&6; }
55938 
55939   DEFAULT_ZLIB=bundled
55940   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55941     # On macosx default is system...on others default is bundled
55942     DEFAULT_ZLIB=system
55943   fi
55944 
55945   if test "x${ZLIB_FOUND}" != "xyes"; then
55946     # If we don't find any system...set default to bundled
55947     DEFAULT_ZLIB=bundled
55948   fi
55949 
55950   # If user didn't specify, use DEFAULT_ZLIB
55951   if test "x${with_zlib}" = "x"; then
55952     with_zlib=${DEFAULT_ZLIB}
55953   fi
55954 
55955   if test "x${with_zlib}" = "xbundled"; then
55956     USE_EXTERNAL_LIBZ=false
55957     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55958 $as_echo "bundled" >&6; }
55959   elif test "x${with_zlib}" = "xsystem"; then
55960     if test "x${ZLIB_FOUND}" = "xyes"; then
55961       USE_EXTERNAL_LIBZ=true
55962       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55963 $as_echo "system" >&6; }
55964     else
55965       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55966 $as_echo "system not found" >&6; }
55967       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
55968     fi
55969   else
55970     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
55971   fi
55972 
55973 
55974 
55975 
55976 
55977 # Check whether --with-lcms was given.
55978 if test "${with_lcms+set}" = set; then :
55979   withval=$with_lcms;
55980 fi
55981 
55982 
55983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
55984 $as_echo_n "checking for which lcms to use... " >&6; }
55985 
55986   DEFAULT_LCMS=bundled
55987   # If user didn't specify, use DEFAULT_LCMS
55988   if test "x${with_lcms}" = "x"; then
55989       with_lcms=${DEFAULT_LCMS}
55990   fi
55991 
55992   if test "x${with_lcms}" = "xbundled"; then
55993     USE_EXTERNAL_LCMS=false
55994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55995 $as_echo "bundled" >&6; }
55996   elif test "x${with_lcms}" = "xsystem"; then
55997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55998 $as_echo "system" >&6; }
55999 
56000 pkg_failed=no
56001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
56002 $as_echo_n "checking for LCMS... " >&6; }
56003 
56004 if test -n "$LCMS_CFLAGS"; then
56005     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
56006  elif test -n "$PKG_CONFIG"; then
56007     if test -n "$PKG_CONFIG" && \
56008     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56009   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56010   ac_status=$?
56011   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56012   test $ac_status = 0; }; then
56013   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
56014 else
56015   pkg_failed=yes
56016 fi
56017  else
56018     pkg_failed=untried
56019 fi
56020 if test -n "$LCMS_LIBS"; then
56021     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
56022  elif test -n "$PKG_CONFIG"; then
56023     if test -n "$PKG_CONFIG" && \
56024     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56025   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56026   ac_status=$?
56027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56028   test $ac_status = 0; }; then
56029   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56030 else
56031   pkg_failed=yes
56032 fi
56033  else
56034     pkg_failed=untried
56035 fi
56036 
56037 
56038 
56039 if test $pkg_failed = yes; then
56040 
56041 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56042         _pkg_short_errors_supported=yes
56043 else
56044         _pkg_short_errors_supported=no
56045 fi
56046         if test $_pkg_short_errors_supported = yes; then
56047                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56048         else
56049                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56050         fi
56051         # Put the nasty error message in config.log where it belongs
56052         echo "$LCMS_PKG_ERRORS" >&5
56053 
56054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56055 $as_echo "no" >&6; }
56056                 LCMS_FOUND=no
56057 elif test $pkg_failed = untried; then
56058         LCMS_FOUND=no
56059 else
56060         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56061         LCMS_LIBS=$pkg_cv_LCMS_LIBS
56062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56063 $as_echo "yes" >&6; }
56064         LCMS_FOUND=yes
56065 fi
56066     if test "x${LCMS_FOUND}" = "xyes"; then
56067       USE_EXTERNAL_LCMS=true
56068     else
56069       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56070     fi
56071   else
56072     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56073   fi
56074 
56075 
56076 
56077 
56078 
56079 
56080 
56081 
56082 
56083 
56084 
56085   # Setup libm (the maths library)
56086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56087 $as_echo_n "checking for cos in -lm... " >&6; }
56088 if ${ac_cv_lib_m_cos+:} false; then :
56089   $as_echo_n "(cached) " >&6
56090 else
56091   ac_check_lib_save_LIBS=$LIBS
56092 LIBS="-lm  $LIBS"
56093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56094 /* end confdefs.h.  */
56095 
56096 /* Override any GCC internal prototype to avoid an error.
56097    Use char because int might match the return type of a GCC
56098    builtin and then its argument prototype would still apply.  */
56099 #ifdef __cplusplus
56100 extern "C"
56101 #endif
56102 char cos ();
56103 int
56104 main ()
56105 {
56106 return cos ();
56107   ;
56108   return 0;
56109 }
56110 _ACEOF
56111 if ac_fn_cxx_try_link "$LINENO"; then :
56112   ac_cv_lib_m_cos=yes
56113 else
56114   ac_cv_lib_m_cos=no
56115 fi
56116 rm -f core conftest.err conftest.$ac_objext \
56117     conftest$ac_exeext conftest.$ac_ext
56118 LIBS=$ac_check_lib_save_LIBS
56119 fi
56120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56121 $as_echo "$ac_cv_lib_m_cos" >&6; }
56122 if test "x$ac_cv_lib_m_cos" = xyes; then :
56123   cat >>confdefs.h <<_ACEOF
56124 #define HAVE_LIBM 1
56125 _ACEOF
56126 
56127   LIBS="-lm $LIBS"
56128 
56129 else
56130 
56131       { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56132 $as_echo "$as_me: Maths library was not found" >&6;}
56133 
56134 fi
56135 
56136   LIBM=-lm
56137 
56138 
56139   # Setup libdl (for dynamic library loading)
56140   save_LIBS="$LIBS"
56141   LIBS=""
56142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56143 $as_echo_n "checking for dlopen in -ldl... " >&6; }
56144 if ${ac_cv_lib_dl_dlopen+:} false; then :
56145   $as_echo_n "(cached) " >&6
56146 else
56147   ac_check_lib_save_LIBS=$LIBS
56148 LIBS="-ldl  $LIBS"
56149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56150 /* end confdefs.h.  */
56151 
56152 /* Override any GCC internal prototype to avoid an error.
56153    Use char because int might match the return type of a GCC
56154    builtin and then its argument prototype would still apply.  */
56155 #ifdef __cplusplus
56156 extern "C"
56157 #endif
56158 char dlopen ();
56159 int
56160 main ()
56161 {
56162 return dlopen ();
56163   ;
56164   return 0;
56165 }
56166 _ACEOF
56167 if ac_fn_cxx_try_link "$LINENO"; then :
56168   ac_cv_lib_dl_dlopen=yes
56169 else
56170   ac_cv_lib_dl_dlopen=no
56171 fi
56172 rm -f core conftest.err conftest.$ac_objext \
56173     conftest$ac_exeext conftest.$ac_ext
56174 LIBS=$ac_check_lib_save_LIBS
56175 fi
56176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56177 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56178 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56179   cat >>confdefs.h <<_ACEOF
56180 #define HAVE_LIBDL 1
56181 _ACEOF
56182 
56183   LIBS="-ldl $LIBS"
56184 
56185 fi
56186 
56187   LIBDL="$LIBS"
56188 
56189   LIBS="$save_LIBS"
56190 
56191   # Deprecated libraries, keep the flags for backwards compatibility
56192   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56193 
56194 
56195 # Check whether --with-dxsdk was given.
56196 if test "${with_dxsdk+set}" = set; then :
56197   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56198 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56199 fi
56200 
56201 
56202 
56203 
56204 # Check whether --with-dxsdk-lib was given.
56205 if test "${with_dxsdk_lib+set}" = set; then :
56206   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56207 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56208 fi
56209 
56210 
56211 
56212 
56213 # Check whether --with-dxsdk-include was given.
56214 if test "${with_dxsdk_include+set}" = set; then :
56215   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56216 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56217 fi
56218 
56219 
56220   fi
56221 
56222   # Control if libzip can use mmap. Available for purposes of overriding.
56223   LIBZIP_CAN_USE_MMAP=true
56224 
56225 
56226 
56227 
56228 
56229 
56230 
56231 
56232 
56233 
56234 
56235 
56236 
56237 
56238 ###############################################################################
56239 #
56240 # We need to do some final tweaking, when everything else is done.
56241 #
56242 ###############################################################################
56243 
56244 
56245   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56246 
56247 
56248   # The name of the Service Agent jar.
56249   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56250   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56251     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56252   fi
56253 
56254 
56255 
56256     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56257 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56258 
56259     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56260       ENABLE_INTREE_EC=yes
56261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56262 $as_echo "yes" >&6; }
56263     else
56264       ENABLE_INTREE_EC=no
56265       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56266 $as_echo "no" >&6; }
56267     fi
56268 
56269 
56270 
56271 
56272 ###############################################################################
56273 #
56274 # Configure parts of the build that only affect the build performance,
56275 # not the result.
56276 #
56277 ###############################################################################
56278 
56279 
56280   # How many cores do we have on this build system?
56281 
56282 # Check whether --with-num-cores was given.
56283 if test "${with_num_cores+set}" = set; then :
56284   withval=$with_num_cores;
56285 fi
56286 
56287   if test "x$with_num_cores" = x; then
56288     # The number of cores were not specified, try to probe them.
56289 
56290   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56291 $as_echo_n "checking for number of cores... " >&6; }
56292   NUM_CORES=1
56293   FOUND_CORES=no
56294 
56295   if test -f /proc/cpuinfo; then
56296     # Looks like a Linux (or cygwin) system
56297     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56298     FOUND_CORES=yes
56299   elif test -x /usr/sbin/psrinfo; then
56300     # Looks like a Solaris system
56301     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56302     FOUND_CORES=yes
56303   elif test -x /usr/sbin/system_profiler; then
56304     # Looks like a MacOSX system
56305     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56306     FOUND_CORES=yes
56307   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56308     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56309     FOUND_CORES=yes
56310   elif test -n "$NUMBER_OF_PROCESSORS"; then
56311     # On windows, look in the env
56312     NUM_CORES=$NUMBER_OF_PROCESSORS
56313     FOUND_CORES=yes
56314   fi
56315 
56316   if test "x$FOUND_CORES" = xyes; then
56317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56318 $as_echo "$NUM_CORES" >&6; }
56319   else
56320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56321 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
56322     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56323 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56324   fi
56325 
56326   else
56327     NUM_CORES=$with_num_cores
56328   fi
56329 
56330 
56331 
56332   # How much memory do we have on this build system?
56333 
56334 # Check whether --with-memory-size was given.
56335 if test "${with_memory_size+set}" = set; then :
56336   withval=$with_memory_size;
56337 fi
56338 
56339   if test "x$with_memory_size" = x; then
56340     # The memory size was not specified, try to probe it.
56341 
56342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56343 $as_echo_n "checking for memory size... " >&6; }
56344   # Default to 1024 MB
56345   MEMORY_SIZE=1024
56346   FOUND_MEM=no
56347 
56348   if test -f /proc/meminfo; then
56349     # Looks like a Linux (or cygwin) system
56350     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56351     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56352     FOUND_MEM=yes
56353   elif test -x /usr/sbin/prtconf; then
56354     # Looks like a Solaris or AIX system
56355     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56356     FOUND_MEM=yes
56357   elif test -x /usr/sbin/system_profiler; then
56358     # Looks like a MacOSX system
56359     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56360     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56361     FOUND_MEM=yes
56362   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56363     # Windows, but without cygwin
56364     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56365     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56366     FOUND_MEM=yes
56367   fi
56368 
56369   if test "x$FOUND_MEM" = xyes; then
56370     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56371 $as_echo "$MEMORY_SIZE MB" >&6; }
56372   else
56373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56374 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56375     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56376 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56377   fi
56378 
56379   else
56380     MEMORY_SIZE=$with_memory_size
56381   fi
56382 
56383 
56384 
56385   # Provide a decent default number of parallel jobs for make depending on
56386   # number of cores, amount of memory and machine architecture.
56387 
56388 # Check whether --with-jobs was given.
56389 if test "${with_jobs+set}" = set; then :
56390   withval=$with_jobs;
56391 fi
56392 
56393   if test "x$with_jobs" = x; then
56394     # Number of jobs was not specified, calculate.
56395     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56396 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56397     # Approximate memory in GB.
56398     memory_gb=`expr $MEMORY_SIZE / 1024`
56399     # Pick the lowest of memory in gb and number of cores.
56400     if test "$memory_gb" -lt "$NUM_CORES"; then
56401       JOBS="$memory_gb"
56402     else
56403       JOBS="$NUM_CORES"
56404       # On bigger machines, leave some room for other processes to run
56405       if test "$JOBS" -gt "4"; then
56406         JOBS=`expr $JOBS '*' 90 / 100`
56407       fi
56408     fi
56409     # Cap number of jobs to 16
56410     if test "$JOBS" -gt "16"; then
56411       JOBS=16
56412     fi
56413     if test "$JOBS" -eq "0"; then
56414       JOBS=1
56415     fi
56416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56417 $as_echo "$JOBS" >&6; }
56418   else
56419     JOBS=$with_jobs
56420   fi
56421 
56422 
56423 
56424 # Setup arguments for the boot jdk (after cores and memory have been setup)
56425 
56426   ##############################################################################
56427   #
56428   # Specify jvm options for anything that is run with the Boot JDK.
56429   # Not all JVM:s accept the same arguments on the command line.
56430   #
56431 
56432 # Check whether --with-boot-jdk-jvmargs was given.
56433 if test "${with_boot_jdk_jvmargs+set}" = set; then :
56434   withval=$with_boot_jdk_jvmargs;
56435 fi
56436 
56437 
56438   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56439 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
56440 
56441   # Disable special log output when a debug build is used as Boot JDK...
56442 
56443   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56444   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56445   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56446   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56447   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56448   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56449     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56450     JVM_ARG_OK=true
56451   else
56452     $ECHO "Arg failed:" >&5
56453     $ECHO "$OUTPUT" >&5
56454     JVM_ARG_OK=false
56455   fi
56456 
56457 
56458   # Apply user provided options.
56459 
56460   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56461   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56462   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56463   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56464   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56465   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56466     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56467     JVM_ARG_OK=true
56468   else
56469     $ECHO "Arg failed:" >&5
56470     $ECHO "$OUTPUT" >&5
56471     JVM_ARG_OK=false
56472   fi
56473 
56474 
56475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56476 $as_echo "$boot_jdk_jvmargs" >&6; }
56477 
56478   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56479   JAVA_FLAGS=$boot_jdk_jvmargs
56480 
56481 
56482 
56483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56484 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56485 
56486   # Starting amount of heap memory.
56487 
56488   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56489   $ECHO "Command: $JAVA -Xms64M -version" >&5
56490   OUTPUT=`$JAVA -Xms64M -version 2>&1`
56491   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56492   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56493   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56494     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
56495     JVM_ARG_OK=true
56496   else
56497     $ECHO "Arg failed:" >&5
56498     $ECHO "$OUTPUT" >&5
56499     JVM_ARG_OK=false
56500   fi
56501 
56502 
56503   # Maximum amount of heap memory.
56504   # Maximum stack size.
56505   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56506   if test "x$BOOT_JDK_BITS" = "x32"; then
56507     if test "$JVM_MAX_HEAP" -gt "1100"; then
56508       JVM_MAX_HEAP=1100
56509     elif test "$JVM_MAX_HEAP" -lt "512"; then
56510       JVM_MAX_HEAP=512
56511     fi
56512     STACK_SIZE=768
56513   else
56514     # Running a 64 bit JVM allows for and requires a bigger heap
56515     if test "$JVM_MAX_HEAP" -gt "1600"; then
56516       JVM_MAX_HEAP=1600
56517     elif test "$JVM_MAX_HEAP" -lt "512"; then
56518       JVM_MAX_HEAP=512
56519     fi
56520     STACK_SIZE=1536
56521   fi
56522 
56523   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56524   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56525   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56526   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56527   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56528   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56529     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56530     JVM_ARG_OK=true
56531   else
56532     $ECHO "Arg failed:" >&5
56533     $ECHO "$OUTPUT" >&5
56534     JVM_ARG_OK=false
56535   fi
56536 
56537 
56538   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56539   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56540   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
56541   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56542   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56543   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56544     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
56545     JVM_ARG_OK=true
56546   else
56547     $ECHO "Arg failed:" >&5
56548     $ECHO "$OUTPUT" >&5
56549     JVM_ARG_OK=false
56550   fi
56551 
56552 
56553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56554 $as_echo "$boot_jdk_jvmargs_big" >&6; }
56555 
56556   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56557 
56558 
56559   # By default, the main javac compilations use big
56560   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56561 
56562 
56563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56564 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56565 
56566   # Use serial gc for small short lived tools if possible
56567 
56568   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56569   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56570   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56571   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56572   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56573   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56574     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56575     JVM_ARG_OK=true
56576   else
56577     $ECHO "Arg failed:" >&5
56578     $ECHO "$OUTPUT" >&5
56579     JVM_ARG_OK=false
56580   fi
56581 
56582 
56583   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56584   $ECHO "Command: $JAVA -Xms32M -version" >&5
56585   OUTPUT=`$JAVA -Xms32M -version 2>&1`
56586   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56587   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56588   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56589     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56590     JVM_ARG_OK=true
56591   else
56592     $ECHO "Arg failed:" >&5
56593     $ECHO "$OUTPUT" >&5
56594     JVM_ARG_OK=false
56595   fi
56596 
56597 
56598   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56599   $ECHO "Command: $JAVA -Xmx512M -version" >&5
56600   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56601   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56602   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56603   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56604     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56605     JVM_ARG_OK=true
56606   else
56607     $ECHO "Arg failed:" >&5
56608     $ECHO "$OUTPUT" >&5
56609     JVM_ARG_OK=false
56610   fi
56611 
56612 
56613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56614 $as_echo "$boot_jdk_jvmargs_small" >&6; }
56615 
56616   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56617 
56618 
56619   JAVA_TOOL_FLAGS_SMALL=""
56620   for f in $JAVA_FLAGS_SMALL; do
56621     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
56622   done
56623 
56624 
56625 
56626 # Setup smart javac (after cores and memory have been setup)
56627 
56628 
56629 # Check whether --with-sjavac-server-java was given.
56630 if test "${with_sjavac_server_java+set}" = set; then :
56631   withval=$with_sjavac_server_java;
56632 fi
56633 
56634 
56635   if test "x$with_sjavac_server_java" != x; then
56636     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
56637     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
56638     if test "x$FOUND_VERSION" = x; then
56639       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
56640     fi
56641   else
56642     SJAVAC_SERVER_JAVA="$JAVA"
56643   fi
56644 
56645 
56646   if test "$MEMORY_SIZE" -gt "3000"; then
56647 
56648   $ECHO "Check if jvm arg is ok: -d64" >&5
56649   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
56650   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
56651   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56652   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56653   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56654     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
56655     JVM_ARG_OK=true
56656   else
56657     $ECHO "Arg failed:" >&5
56658     $ECHO "$OUTPUT" >&5
56659     JVM_ARG_OK=false
56660   fi
56661 
56662     if test "$JVM_ARG_OK" = true; then
56663       JVM_64BIT=true
56664       JVM_ARG_OK=false
56665     fi
56666   fi
56667 
56668   MX_VALUE=`expr $MEMORY_SIZE / 2`
56669   if test "$JVM_64BIT" = true; then
56670     # Set ms lower than mx since more than one instance of the server might
56671     # get launched at the same time before they figure out which instance won.
56672     MS_VALUE=512
56673     if test "$MX_VALUE" -gt "2048"; then
56674       MX_VALUE=2048
56675     fi
56676   else
56677     MS_VALUE=256
56678     if test "$MX_VALUE" -gt "1500"; then
56679       MX_VALUE=1500
56680     fi
56681   fi
56682   if test "$MX_VALUE" -lt "512"; then
56683     MX_VALUE=512
56684   fi
56685 
56686   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
56687   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
56688   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
56689   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56690   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56691   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56692     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
56693     JVM_ARG_OK=true
56694   else
56695     $ECHO "Arg failed:" >&5
56696     $ECHO "$OUTPUT" >&5
56697     JVM_ARG_OK=false
56698   fi
56699 
56700 
56701 
56702   # Check whether --enable-sjavac was given.
56703 if test "${enable_sjavac+set}" = set; then :
56704   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
56705 else
56706   ENABLE_SJAVAC="no"
56707 fi
56708 
56709   if test "x$JVM_ARG_OK" = "xfalse"; then
56710     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
56711 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
56712     ENABLE_SJAVAC="no"
56713   fi
56714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
56715 $as_echo_n "checking whether to use sjavac... " >&6; }
56716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
56717 $as_echo "$ENABLE_SJAVAC" >&6; }
56718 
56719 
56720   # Check whether --enable-javac-server was given.
56721 if test "${enable_javac_server+set}" = set; then :
56722   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
56723 else
56724   ENABLE_JAVAC_SERVER="yes"
56725 fi
56726 
56727   if test "x$JVM_ARG_OK" = "xfalse"; then
56728     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
56729 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
56730     ENABLE_JAVAC_SERVER="no"
56731   fi
56732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
56733 $as_echo_n "checking whether to use javac server... " >&6; }
56734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
56735 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
56736 
56737 
56738   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
56739     # When using a server javac, the small client instances do not need much
56740     # resources.
56741     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
56742   fi
56743 
56744 
56745 # Setup use of icecc if requested
56746 
56747   # Check whether --enable-icecc was given.
56748 if test "${enable_icecc+set}" = set; then :
56749   enableval=$enable_icecc;
56750 fi
56751 
56752 
56753   if test "x${enable_icecc}" = "xyes"; then
56754 
56755 
56756 
56757   # Publish this variable in the help.
56758 
56759 
56760   if [ -z "${ICECC_CMD+x}" ]; then
56761     # The variable is not set by user, try to locate tool using the code snippet
56762     for ac_prog in icecc
56763 do
56764   # Extract the first word of "$ac_prog", so it can be a program name with args.
56765 set dummy $ac_prog; ac_word=$2
56766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56767 $as_echo_n "checking for $ac_word... " >&6; }
56768 if ${ac_cv_path_ICECC_CMD+:} false; then :
56769   $as_echo_n "(cached) " >&6
56770 else
56771   case $ICECC_CMD in
56772   [\\/]* | ?:[\\/]*)
56773   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56774   ;;
56775   *)
56776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56777 for as_dir in $PATH
56778 do
56779   IFS=$as_save_IFS
56780   test -z "$as_dir" && as_dir=.
56781     for ac_exec_ext in '' $ac_executable_extensions; do
56782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56783     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56785     break 2
56786   fi
56787 done
56788   done
56789 IFS=$as_save_IFS
56790 
56791   ;;
56792 esac
56793 fi
56794 ICECC_CMD=$ac_cv_path_ICECC_CMD
56795 if test -n "$ICECC_CMD"; then
56796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56797 $as_echo "$ICECC_CMD" >&6; }
56798 else
56799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56800 $as_echo "no" >&6; }
56801 fi
56802 
56803 
56804   test -n "$ICECC_CMD" && break
56805 done
56806 
56807   else
56808     # The variable is set, but is it from the command line or the environment?
56809 
56810     # Try to remove the string !ICECC_CMD! from our list.
56811     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
56812     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56813       # If it failed, the variable was not from the command line. Ignore it,
56814       # but warn the user (except for BASH, which is always set by the calling BASH).
56815       if test "xICECC_CMD" != xBASH; then
56816         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
56817 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
56818       fi
56819       # Try to locate tool using the code snippet
56820       for ac_prog in icecc
56821 do
56822   # Extract the first word of "$ac_prog", so it can be a program name with args.
56823 set dummy $ac_prog; ac_word=$2
56824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56825 $as_echo_n "checking for $ac_word... " >&6; }
56826 if ${ac_cv_path_ICECC_CMD+:} false; then :
56827   $as_echo_n "(cached) " >&6
56828 else
56829   case $ICECC_CMD in
56830   [\\/]* | ?:[\\/]*)
56831   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56832   ;;
56833   *)
56834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56835 for as_dir in $PATH
56836 do
56837   IFS=$as_save_IFS
56838   test -z "$as_dir" && as_dir=.
56839     for ac_exec_ext in '' $ac_executable_extensions; do
56840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56841     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56843     break 2
56844   fi
56845 done
56846   done
56847 IFS=$as_save_IFS
56848 
56849   ;;
56850 esac
56851 fi
56852 ICECC_CMD=$ac_cv_path_ICECC_CMD
56853 if test -n "$ICECC_CMD"; then
56854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56855 $as_echo "$ICECC_CMD" >&6; }
56856 else
56857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56858 $as_echo "no" >&6; }
56859 fi
56860 
56861 
56862   test -n "$ICECC_CMD" && break
56863 done
56864 
56865     else
56866       # If it succeeded, then it was overridden by the user. We will use it
56867       # for the tool.
56868 
56869       # First remove it from the list of overridden variables, so we can test
56870       # for unknown variables in the end.
56871       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
56872 
56873       # Check if we try to supply an empty value
56874       if test "x$ICECC_CMD" = x; then
56875         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
56876 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
56877         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56878 $as_echo_n "checking for ICECC_CMD... " >&6; }
56879         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
56880 $as_echo "disabled" >&6; }
56881       else
56882         # Check if the provided tool contains a complete path.
56883         tool_specified="$ICECC_CMD"
56884         tool_basename="${tool_specified##*/}"
56885         if test "x$tool_basename" = "x$tool_specified"; then
56886           # A command without a complete path is provided, search $PATH.
56887           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
56888 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
56889           # Extract the first word of "$tool_basename", so it can be a program name with args.
56890 set dummy $tool_basename; ac_word=$2
56891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56892 $as_echo_n "checking for $ac_word... " >&6; }
56893 if ${ac_cv_path_ICECC_CMD+:} false; then :
56894   $as_echo_n "(cached) " >&6
56895 else
56896   case $ICECC_CMD in
56897   [\\/]* | ?:[\\/]*)
56898   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56899   ;;
56900   *)
56901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56902 for as_dir in $PATH
56903 do
56904   IFS=$as_save_IFS
56905   test -z "$as_dir" && as_dir=.
56906     for ac_exec_ext in '' $ac_executable_extensions; do
56907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56908     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56910     break 2
56911   fi
56912 done
56913   done
56914 IFS=$as_save_IFS
56915 
56916   ;;
56917 esac
56918 fi
56919 ICECC_CMD=$ac_cv_path_ICECC_CMD
56920 if test -n "$ICECC_CMD"; then
56921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56922 $as_echo "$ICECC_CMD" >&6; }
56923 else
56924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56925 $as_echo "no" >&6; }
56926 fi
56927 
56928 
56929           if test "x$ICECC_CMD" = x; then
56930             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
56931           fi
56932         else
56933           # Otherwise we believe it is a complete path. Use it as it is.
56934           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
56935 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
56936           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56937 $as_echo_n "checking for ICECC_CMD... " >&6; }
56938           if test ! -x "$tool_specified"; then
56939             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
56940 $as_echo "not found" >&6; }
56941             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
56942           fi
56943           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
56944 $as_echo "$tool_specified" >&6; }
56945         fi
56946       fi
56947     fi
56948 
56949   fi
56950 
56951 
56952 
56953   if test "x$ICECC_CMD" = x; then
56954     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
56955   fi
56956 
56957 
56958     old_path="$PATH"
56959 
56960     # Look for icecc-create-env in some known places
56961     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
56962 
56963 
56964 
56965   # Publish this variable in the help.
56966 
56967 
56968   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
56969     # The variable is not set by user, try to locate tool using the code snippet
56970     for ac_prog in icecc-create-env
56971 do
56972   # Extract the first word of "$ac_prog", so it can be a program name with args.
56973 set dummy $ac_prog; ac_word=$2
56974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56975 $as_echo_n "checking for $ac_word... " >&6; }
56976 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56977   $as_echo_n "(cached) " >&6
56978 else
56979   case $ICECC_CREATE_ENV in
56980   [\\/]* | ?:[\\/]*)
56981   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56982   ;;
56983   *)
56984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56985 for as_dir in $PATH
56986 do
56987   IFS=$as_save_IFS
56988   test -z "$as_dir" && as_dir=.
56989     for ac_exec_ext in '' $ac_executable_extensions; do
56990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56991     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56993     break 2
56994   fi
56995 done
56996   done
56997 IFS=$as_save_IFS
56998 
56999   ;;
57000 esac
57001 fi
57002 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57003 if test -n "$ICECC_CREATE_ENV"; then
57004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57005 $as_echo "$ICECC_CREATE_ENV" >&6; }
57006 else
57007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57008 $as_echo "no" >&6; }
57009 fi
57010 
57011 
57012   test -n "$ICECC_CREATE_ENV" && break
57013 done
57014 
57015   else
57016     # The variable is set, but is it from the command line or the environment?
57017 
57018     # Try to remove the string !ICECC_CREATE_ENV! from our list.
57019     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
57020     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57021       # If it failed, the variable was not from the command line. Ignore it,
57022       # but warn the user (except for BASH, which is always set by the calling BASH).
57023       if test "xICECC_CREATE_ENV" != xBASH; then
57024         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
57025 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
57026       fi
57027       # Try to locate tool using the code snippet
57028       for ac_prog in icecc-create-env
57029 do
57030   # Extract the first word of "$ac_prog", so it can be a program name with args.
57031 set dummy $ac_prog; ac_word=$2
57032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57033 $as_echo_n "checking for $ac_word... " >&6; }
57034 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57035   $as_echo_n "(cached) " >&6
57036 else
57037   case $ICECC_CREATE_ENV in
57038   [\\/]* | ?:[\\/]*)
57039   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57040   ;;
57041   *)
57042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57043 for as_dir in $PATH
57044 do
57045   IFS=$as_save_IFS
57046   test -z "$as_dir" && as_dir=.
57047     for ac_exec_ext in '' $ac_executable_extensions; do
57048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57049     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57051     break 2
57052   fi
57053 done
57054   done
57055 IFS=$as_save_IFS
57056 
57057   ;;
57058 esac
57059 fi
57060 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57061 if test -n "$ICECC_CREATE_ENV"; then
57062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57063 $as_echo "$ICECC_CREATE_ENV" >&6; }
57064 else
57065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57066 $as_echo "no" >&6; }
57067 fi
57068 
57069 
57070   test -n "$ICECC_CREATE_ENV" && break
57071 done
57072 
57073     else
57074       # If it succeeded, then it was overridden by the user. We will use it
57075       # for the tool.
57076 
57077       # First remove it from the list of overridden variables, so we can test
57078       # for unknown variables in the end.
57079       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57080 
57081       # Check if we try to supply an empty value
57082       if test "x$ICECC_CREATE_ENV" = x; then
57083         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57084 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57086 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57088 $as_echo "disabled" >&6; }
57089       else
57090         # Check if the provided tool contains a complete path.
57091         tool_specified="$ICECC_CREATE_ENV"
57092         tool_basename="${tool_specified##*/}"
57093         if test "x$tool_basename" = "x$tool_specified"; then
57094           # A command without a complete path is provided, search $PATH.
57095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57096 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57097           # Extract the first word of "$tool_basename", so it can be a program name with args.
57098 set dummy $tool_basename; ac_word=$2
57099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57100 $as_echo_n "checking for $ac_word... " >&6; }
57101 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57102   $as_echo_n "(cached) " >&6
57103 else
57104   case $ICECC_CREATE_ENV in
57105   [\\/]* | ?:[\\/]*)
57106   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57107   ;;
57108   *)
57109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57110 for as_dir in $PATH
57111 do
57112   IFS=$as_save_IFS
57113   test -z "$as_dir" && as_dir=.
57114     for ac_exec_ext in '' $ac_executable_extensions; do
57115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57116     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57118     break 2
57119   fi
57120 done
57121   done
57122 IFS=$as_save_IFS
57123 
57124   ;;
57125 esac
57126 fi
57127 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57128 if test -n "$ICECC_CREATE_ENV"; then
57129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57130 $as_echo "$ICECC_CREATE_ENV" >&6; }
57131 else
57132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57133 $as_echo "no" >&6; }
57134 fi
57135 
57136 
57137           if test "x$ICECC_CREATE_ENV" = x; then
57138             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57139           fi
57140         else
57141           # Otherwise we believe it is a complete path. Use it as it is.
57142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57143 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57144           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57145 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57146           if test ! -x "$tool_specified"; then
57147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57148 $as_echo "not found" >&6; }
57149             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57150           fi
57151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57152 $as_echo "$tool_specified" >&6; }
57153         fi
57154       fi
57155     fi
57156 
57157   fi
57158 
57159 
57160 
57161   if test "x$ICECC_CREATE_ENV" = x; then
57162     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57163   fi
57164 
57165 
57166     # Use icecc-create-env to create a minimal compilation environment that can
57167     # be sent to the other hosts in the icecream cluster.
57168     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57169     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57170     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57171 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57172     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57173       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57174           && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57175     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57176       # For clang, the icecc compilerwrapper is needed. It usually resides next
57177       # to icecc-create-env.
57178 
57179 
57180 
57181   # Publish this variable in the help.
57182 
57183 
57184   if [ -z "${ICECC_WRAPPER+x}" ]; then
57185     # The variable is not set by user, try to locate tool using the code snippet
57186     for ac_prog in compilerwrapper
57187 do
57188   # Extract the first word of "$ac_prog", so it can be a program name with args.
57189 set dummy $ac_prog; ac_word=$2
57190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57191 $as_echo_n "checking for $ac_word... " >&6; }
57192 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57193   $as_echo_n "(cached) " >&6
57194 else
57195   case $ICECC_WRAPPER in
57196   [\\/]* | ?:[\\/]*)
57197   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57198   ;;
57199   *)
57200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57201 for as_dir in $PATH
57202 do
57203   IFS=$as_save_IFS
57204   test -z "$as_dir" && as_dir=.
57205     for ac_exec_ext in '' $ac_executable_extensions; do
57206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57207     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57209     break 2
57210   fi
57211 done
57212   done
57213 IFS=$as_save_IFS
57214 
57215   ;;
57216 esac
57217 fi
57218 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57219 if test -n "$ICECC_WRAPPER"; then
57220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57221 $as_echo "$ICECC_WRAPPER" >&6; }
57222 else
57223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57224 $as_echo "no" >&6; }
57225 fi
57226 
57227 
57228   test -n "$ICECC_WRAPPER" && break
57229 done
57230 
57231   else
57232     # The variable is set, but is it from the command line or the environment?
57233 
57234     # Try to remove the string !ICECC_WRAPPER! from our list.
57235     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57236     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57237       # If it failed, the variable was not from the command line. Ignore it,
57238       # but warn the user (except for BASH, which is always set by the calling BASH).
57239       if test "xICECC_WRAPPER" != xBASH; then
57240         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57241 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57242       fi
57243       # Try to locate tool using the code snippet
57244       for ac_prog in compilerwrapper
57245 do
57246   # Extract the first word of "$ac_prog", so it can be a program name with args.
57247 set dummy $ac_prog; ac_word=$2
57248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57249 $as_echo_n "checking for $ac_word... " >&6; }
57250 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57251   $as_echo_n "(cached) " >&6
57252 else
57253   case $ICECC_WRAPPER in
57254   [\\/]* | ?:[\\/]*)
57255   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57256   ;;
57257   *)
57258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57259 for as_dir in $PATH
57260 do
57261   IFS=$as_save_IFS
57262   test -z "$as_dir" && as_dir=.
57263     for ac_exec_ext in '' $ac_executable_extensions; do
57264   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57265     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57267     break 2
57268   fi
57269 done
57270   done
57271 IFS=$as_save_IFS
57272 
57273   ;;
57274 esac
57275 fi
57276 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57277 if test -n "$ICECC_WRAPPER"; then
57278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57279 $as_echo "$ICECC_WRAPPER" >&6; }
57280 else
57281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57282 $as_echo "no" >&6; }
57283 fi
57284 
57285 
57286   test -n "$ICECC_WRAPPER" && break
57287 done
57288 
57289     else
57290       # If it succeeded, then it was overridden by the user. We will use it
57291       # for the tool.
57292 
57293       # First remove it from the list of overridden variables, so we can test
57294       # for unknown variables in the end.
57295       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57296 
57297       # Check if we try to supply an empty value
57298       if test "x$ICECC_WRAPPER" = x; then
57299         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57300 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57302 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57304 $as_echo "disabled" >&6; }
57305       else
57306         # Check if the provided tool contains a complete path.
57307         tool_specified="$ICECC_WRAPPER"
57308         tool_basename="${tool_specified##*/}"
57309         if test "x$tool_basename" = "x$tool_specified"; then
57310           # A command without a complete path is provided, search $PATH.
57311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57312 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57313           # Extract the first word of "$tool_basename", so it can be a program name with args.
57314 set dummy $tool_basename; ac_word=$2
57315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57316 $as_echo_n "checking for $ac_word... " >&6; }
57317 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57318   $as_echo_n "(cached) " >&6
57319 else
57320   case $ICECC_WRAPPER in
57321   [\\/]* | ?:[\\/]*)
57322   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57323   ;;
57324   *)
57325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57326 for as_dir in $PATH
57327 do
57328   IFS=$as_save_IFS
57329   test -z "$as_dir" && as_dir=.
57330     for ac_exec_ext in '' $ac_executable_extensions; do
57331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57332     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57334     break 2
57335   fi
57336 done
57337   done
57338 IFS=$as_save_IFS
57339 
57340   ;;
57341 esac
57342 fi
57343 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57344 if test -n "$ICECC_WRAPPER"; then
57345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57346 $as_echo "$ICECC_WRAPPER" >&6; }
57347 else
57348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57349 $as_echo "no" >&6; }
57350 fi
57351 
57352 
57353           if test "x$ICECC_WRAPPER" = x; then
57354             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57355           fi
57356         else
57357           # Otherwise we believe it is a complete path. Use it as it is.
57358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57359 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57360           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57361 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57362           if test ! -x "$tool_specified"; then
57363             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57364 $as_echo "not found" >&6; }
57365             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57366           fi
57367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57368 $as_echo "$tool_specified" >&6; }
57369         fi
57370       fi
57371     fi
57372 
57373   fi
57374 
57375 
57376 
57377   if test "x$ICECC_WRAPPER" = x; then
57378     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57379   fi
57380 
57381 
57382       cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57383           && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57384     else
57385       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57386     fi
57387     PATH="$old_path"
57388     # The bundle with the compiler gets a name based on checksums. Parse log file
57389     # to find it.
57390     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57391     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57392     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57393 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57394     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57395 
57396     if test "x${COMPILE_TYPE}" = "xcross"; then
57397       # If cross compiling, create a separate env package for the build compiler
57398       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57399 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57400       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57401       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57402         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57403             && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57404       elif test "x${BUILD_CC##*/}" = "xclang"; then
57405         cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57406             && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57407       else
57408         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57409       fi
57410       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57411       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57412       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57413 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57414       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57415           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57416     else
57417       BUILD_ICECC="${ICECC}"
57418     fi
57419 
57420 
57421   fi
57422 
57423 
57424 # Can the C/C++ compiler use precompiled headers?
57425 
57426 
57427   ###############################################################################
57428   #
57429   # Can the C/C++ compiler use precompiled headers?
57430   #
57431   # Check whether --enable-precompiled-headers was given.
57432 if test "${enable_precompiled_headers+set}" = set; then :
57433   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57434 else
57435   ENABLE_PRECOMPH=yes
57436 fi
57437 
57438 
57439   USE_PRECOMPILED_HEADER=1
57440   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57441 $as_echo_n "checking If precompiled header is enabled... " >&6; }
57442   if test "x$ENABLE_PRECOMPH" = xno; then
57443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57444 $as_echo "no, forced" >&6; }
57445     USE_PRECOMPILED_HEADER=0
57446   elif test "x$ICECC" != "x"; then
57447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57448 $as_echo "no, does not work effectively with icecc" >&6; }
57449     USE_PRECOMPILED_HEADER=0
57450   else
57451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57452 $as_echo "yes" >&6; }
57453   fi
57454 
57455   if test "x$ENABLE_PRECOMPH" = xyes; then
57456     # Check that the compiler actually supports precomp headers.
57457     if test "x$TOOLCHAIN_TYPE" = xgcc; then
57458       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57459 $as_echo_n "checking that precompiled headers work... " >&6; }
57460       echo "int alfa();" > conftest.h
57461       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57462       if test ! -f conftest.hpp.gch; then
57463         USE_PRECOMPILED_HEADER=0
57464         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57465 $as_echo "no" >&6; }
57466       else
57467         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57468 $as_echo "yes" >&6; }
57469       fi
57470       rm -f conftest.h conftest.hpp.gch
57471     fi
57472   fi
57473 
57474 
57475 
57476 
57477 # Setup use of ccache, if available
57478 
57479   # Check whether --enable-ccache was given.
57480 if test "${enable_ccache+set}" = set; then :
57481   enableval=$enable_ccache;
57482 fi
57483 
57484 
57485   CCACHE=
57486   CCACHE_STATUS=
57487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57488 $as_echo_n "checking is ccache enabled... " >&6; }
57489   if test "x$enable_ccache" = xyes; then
57490     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57491       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57492 $as_echo "yes" >&6; }
57493       OLD_PATH="$PATH"
57494       if test "x$TOOLCHAIN_PATH" != x; then
57495         PATH=$TOOLCHAIN_PATH:$PATH
57496       fi
57497 
57498 
57499 
57500   # Publish this variable in the help.
57501 
57502 
57503   if [ -z "${CCACHE+x}" ]; then
57504     # The variable is not set by user, try to locate tool using the code snippet
57505     for ac_prog in ccache
57506 do
57507   # Extract the first word of "$ac_prog", so it can be a program name with args.
57508 set dummy $ac_prog; ac_word=$2
57509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57510 $as_echo_n "checking for $ac_word... " >&6; }
57511 if ${ac_cv_path_CCACHE+:} false; then :
57512   $as_echo_n "(cached) " >&6
57513 else
57514   case $CCACHE in
57515   [\\/]* | ?:[\\/]*)
57516   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57517   ;;
57518   *)
57519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57520 for as_dir in $PATH
57521 do
57522   IFS=$as_save_IFS
57523   test -z "$as_dir" && as_dir=.
57524     for ac_exec_ext in '' $ac_executable_extensions; do
57525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57526     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57528     break 2
57529   fi
57530 done
57531   done
57532 IFS=$as_save_IFS
57533 
57534   ;;
57535 esac
57536 fi
57537 CCACHE=$ac_cv_path_CCACHE
57538 if test -n "$CCACHE"; then
57539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57540 $as_echo "$CCACHE" >&6; }
57541 else
57542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57543 $as_echo "no" >&6; }
57544 fi
57545 
57546 
57547   test -n "$CCACHE" && break
57548 done
57549 
57550   else
57551     # The variable is set, but is it from the command line or the environment?
57552 
57553     # Try to remove the string !CCACHE! from our list.
57554     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57555     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57556       # If it failed, the variable was not from the command line. Ignore it,
57557       # but warn the user (except for BASH, which is always set by the calling BASH).
57558       if test "xCCACHE" != xBASH; then
57559         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57560 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57561       fi
57562       # Try to locate tool using the code snippet
57563       for ac_prog in ccache
57564 do
57565   # Extract the first word of "$ac_prog", so it can be a program name with args.
57566 set dummy $ac_prog; ac_word=$2
57567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57568 $as_echo_n "checking for $ac_word... " >&6; }
57569 if ${ac_cv_path_CCACHE+:} false; then :
57570   $as_echo_n "(cached) " >&6
57571 else
57572   case $CCACHE in
57573   [\\/]* | ?:[\\/]*)
57574   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57575   ;;
57576   *)
57577   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57578 for as_dir in $PATH
57579 do
57580   IFS=$as_save_IFS
57581   test -z "$as_dir" && as_dir=.
57582     for ac_exec_ext in '' $ac_executable_extensions; do
57583   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57584     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57585     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57586     break 2
57587   fi
57588 done
57589   done
57590 IFS=$as_save_IFS
57591 
57592   ;;
57593 esac
57594 fi
57595 CCACHE=$ac_cv_path_CCACHE
57596 if test -n "$CCACHE"; then
57597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57598 $as_echo "$CCACHE" >&6; }
57599 else
57600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57601 $as_echo "no" >&6; }
57602 fi
57603 
57604 
57605   test -n "$CCACHE" && break
57606 done
57607 
57608     else
57609       # If it succeeded, then it was overridden by the user. We will use it
57610       # for the tool.
57611 
57612       # First remove it from the list of overridden variables, so we can test
57613       # for unknown variables in the end.
57614       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57615 
57616       # Check if we try to supply an empty value
57617       if test "x$CCACHE" = x; then
57618         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57619 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57620         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57621 $as_echo_n "checking for CCACHE... " >&6; }
57622         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57623 $as_echo "disabled" >&6; }
57624       else
57625         # Check if the provided tool contains a complete path.
57626         tool_specified="$CCACHE"
57627         tool_basename="${tool_specified##*/}"
57628         if test "x$tool_basename" = "x$tool_specified"; then
57629           # A command without a complete path is provided, search $PATH.
57630           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
57631 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
57632           # Extract the first word of "$tool_basename", so it can be a program name with args.
57633 set dummy $tool_basename; ac_word=$2
57634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57635 $as_echo_n "checking for $ac_word... " >&6; }
57636 if ${ac_cv_path_CCACHE+:} false; then :
57637   $as_echo_n "(cached) " >&6
57638 else
57639   case $CCACHE in
57640   [\\/]* | ?:[\\/]*)
57641   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57642   ;;
57643   *)
57644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57645 for as_dir in $PATH
57646 do
57647   IFS=$as_save_IFS
57648   test -z "$as_dir" && as_dir=.
57649     for ac_exec_ext in '' $ac_executable_extensions; do
57650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57651     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57653     break 2
57654   fi
57655 done
57656   done
57657 IFS=$as_save_IFS
57658 
57659   ;;
57660 esac
57661 fi
57662 CCACHE=$ac_cv_path_CCACHE
57663 if test -n "$CCACHE"; then
57664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57665 $as_echo "$CCACHE" >&6; }
57666 else
57667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57668 $as_echo "no" >&6; }
57669 fi
57670 
57671 
57672           if test "x$CCACHE" = x; then
57673             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57674           fi
57675         else
57676           # Otherwise we believe it is a complete path. Use it as it is.
57677           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
57678 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
57679           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57680 $as_echo_n "checking for CCACHE... " >&6; }
57681           if test ! -x "$tool_specified"; then
57682             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57683 $as_echo "not found" >&6; }
57684             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
57685           fi
57686           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57687 $as_echo "$tool_specified" >&6; }
57688         fi
57689       fi
57690     fi
57691 
57692   fi
57693 
57694 
57695 
57696   if test "x$CCACHE" = x; then
57697     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
57698   fi
57699 
57700 
57701       PATH="$OLD_PATH"
57702       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
57703       CCACHE_STATUS="Active ($CCACHE_VERSION)"
57704     else
57705       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57706 $as_echo "no" >&6; }
57707       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
57708 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
57709     fi
57710   elif test "x$enable_ccache" = xno; then
57711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
57712 $as_echo "no, explicitly disabled" >&6; }
57713     CCACHE_STATUS="Disabled"
57714   elif test "x$enable_ccache" = x; then
57715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57716 $as_echo "no" >&6; }
57717   else
57718     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
57719 $as_echo "unknown" >&6; }
57720     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
57721   fi
57722 
57723 
57724 
57725 # Check whether --with-ccache-dir was given.
57726 if test "${with_ccache_dir+set}" = set; then :
57727   withval=$with_ccache_dir;
57728 fi
57729 
57730 
57731   if test "x$with_ccache_dir" != x; then
57732     # When using a non home ccache directory, assume the use is to share ccache files
57733     # with other users. Thus change the umask.
57734     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
57735     if test "x$CCACHE" = x; then
57736       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
57737 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
57738     fi
57739   fi
57740 
57741   if test "x$CCACHE" != x; then
57742 
57743   if test "x$CCACHE" != x; then
57744     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
57745       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
57746           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
57747       if test "x$HAS_BAD_CCACHE" != "x"; then
57748         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
57749       fi
57750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
57751 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
57752       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
57753       PUSHED_FLAGS="$CXXFLAGS"
57754       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
57755       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57756 /* end confdefs.h.  */
57757 
57758 int
57759 main ()
57760 {
57761 
57762   ;
57763   return 0;
57764 }
57765 _ACEOF
57766 if ac_fn_cxx_try_compile "$LINENO"; then :
57767   CC_KNOWS_CCACHE_TRICK=yes
57768 else
57769   CC_KNOWS_CCACHE_TRICK=no
57770 fi
57771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57772       CXXFLAGS="$PUSHED_FLAGS"
57773       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
57774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57775 $as_echo "yes" >&6; }
57776         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
57777 
57778         CCACHE_SLOPPINESS=pch_defines,time_macros
57779       else
57780         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57781 $as_echo "no" >&6; }
57782         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
57783       fi
57784     fi
57785 
57786     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
57787         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
57788 
57789     if test "x$SET_CCACHE_DIR" != x; then
57790       mkdir -p $CCACHE_DIR > /dev/null 2>&1
57791       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
57792     fi
57793   fi
57794 
57795   fi
57796 
57797 
57798 ###############################################################################
57799 #
57800 # And now the finish...
57801 #
57802 ###############################################################################
57803 
57804 # Check for some common pitfalls
57805 
57806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57807     file_to_test="$SRC_ROOT/LICENSE"
57808     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
57809       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
57810     fi
57811   fi
57812 
57813 
57814   # Did user specify any unknown variables?
57815 
57816   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
57817     # Replace the separating ! with spaces before presenting for end user.
57818     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
57819     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
57820 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
57821   fi
57822 
57823 
57824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
57825 $as_echo_n "checking if build directory is on local disk... " >&6; }
57826 
57827   # df -l lists only local disks; if the given directory is not found then
57828   # a non-zero exit code is given
57829   if test "x$DF" = x; then
57830     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57831       # msys does not have df; use Windows "net use" instead.
57832       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
57833       if test "x$IS_NETWORK_DISK" = x; then
57834         OUTPUT_DIR_IS_LOCAL="yes"
57835       else
57836         OUTPUT_DIR_IS_LOCAL="no"
57837       fi
57838     else
57839       # No df here, say it's local
57840       OUTPUT_DIR_IS_LOCAL="yes"
57841     fi
57842   else
57843     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
57844       OUTPUT_DIR_IS_LOCAL="yes"
57845     else
57846       OUTPUT_DIR_IS_LOCAL="no"
57847     fi
57848   fi
57849 
57850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
57851 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
57852 
57853 
57854 
57855   # Check if the user has any old-style ALT_ variables set.
57856   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
57857 
57858   # Before generating output files, test if they exist. If they do, this is a reconfigure.
57859   # Since we can't properly handle the dependencies for this, warn the user about the situation
57860   if test -e $OUTPUT_ROOT/spec.gmk; then
57861     IS_RECONFIGURE=yes
57862   else
57863     IS_RECONFIGURE=no
57864   fi
57865 
57866 
57867 # At the end, call the custom hook. (Dummy macro if no custom sources available)
57868 
57869 
57870 # We're messing a bit with internal autoconf variables to put the config.status
57871 # in the output directory instead of the current directory.
57872 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
57873 
57874 # Create the actual output files. Now the main work of configure is done.
57875 cat >confcache <<\_ACEOF
57876 # This file is a shell script that caches the results of configure
57877 # tests run on this system so they can be shared between configure
57878 # scripts and configure runs, see configure's option --config-cache.
57879 # It is not useful on other systems.  If it contains results you don't
57880 # want to keep, you may remove or edit it.
57881 #
57882 # config.status only pays attention to the cache file if you give it
57883 # the --recheck option to rerun configure.
57884 #
57885 # `ac_cv_env_foo' variables (set or unset) will be overridden when
57886 # loading this file, other *unset* `ac_cv_foo' will be assigned the
57887 # following values.
57888 
57889 _ACEOF
57890 
57891 # The following way of writing the cache mishandles newlines in values,
57892 # but we know of no workaround that is simple, portable, and efficient.
57893 # So, we kill variables containing newlines.
57894 # Ultrix sh set writes to stderr and can't be redirected directly,
57895 # and sets the high bit in the cache file unless we assign to the vars.
57896 (
57897   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
57898     eval ac_val=\$$ac_var
57899     case $ac_val in #(
57900     *${as_nl}*)
57901       case $ac_var in #(
57902       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
57903 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
57904       esac
57905       case $ac_var in #(
57906       _ | IFS | as_nl) ;; #(
57907       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
57908       *) { eval $ac_var=; unset $ac_var;} ;;
57909       esac ;;
57910     esac
57911   done
57912 
57913   (set) 2>&1 |
57914     case $as_nl`(ac_space=' '; set) 2>&1` in #(
57915     *${as_nl}ac_space=\ *)
57916       # `set' does not quote correctly, so add quotes: double-quote
57917       # substitution turns \\\\ into \\, and sed turns \\ into \.
57918       sed -n \
57919         "s/'/'\\\\''/g;
57920           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
57921       ;; #(
57922     *)
57923       # `set' quotes correctly as required by POSIX, so do not add quotes.
57924       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
57925       ;;
57926     esac |
57927     sort
57928 ) |
57929   sed '
57930      /^ac_cv_env_/b end
57931      t clear
57932      :clear
57933      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
57934      t end
57935      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
57936      :end' >>confcache
57937 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
57938   if test -w "$cache_file"; then
57939     if test "x$cache_file" != "x/dev/null"; then
57940       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
57941 $as_echo "$as_me: updating cache $cache_file" >&6;}
57942       if test ! -f "$cache_file" || test -h "$cache_file"; then
57943         cat confcache >"$cache_file"
57944       else
57945         case $cache_file in #(
57946         */* | ?:*)
57947           mv -f confcache "$cache_file"$$ &&
57948           mv -f "$cache_file"$$ "$cache_file" ;; #(
57949         *)
57950           mv -f confcache "$cache_file" ;;
57951         esac
57952       fi
57953     fi
57954   else
57955     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
57956 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
57957   fi
57958 fi
57959 rm -f confcache
57960 
57961 test "x$prefix" = xNONE && prefix=$ac_default_prefix
57962 # Let make expand exec_prefix.
57963 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
57964 
57965 # Transform confdefs.h into DEFS.
57966 # Protect against shell expansion while executing Makefile rules.
57967 # Protect against Makefile macro expansion.
57968 #
57969 # If the first sed substitution is executed (which looks for macros that
57970 # take arguments), then branch to the quote section.  Otherwise,
57971 # look for a macro that doesn't take arguments.
57972 ac_script='
57973 :mline
57974 /\\$/{
57975  N
57976  s,\\\n,,
57977  b mline
57978 }
57979 t clear
57980 :clear
57981 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
57982 t quote
57983 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
57984 t quote
57985 b any
57986 :quote
57987 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
57988 s/\[/\\&/g
57989 s/\]/\\&/g
57990 s/\$/$$/g
57991 H
57992 :any
57993 ${
57994         g
57995         s/^\n//
57996         s/\n/ /g
57997         p
57998 }
57999 '
58000 DEFS=`sed -n "$ac_script" confdefs.h`
58001 
58002 
58003 ac_libobjs=
58004 ac_ltlibobjs=
58005 U=
58006 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
58007   # 1. Remove the extension, and $U if already installed.
58008   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
58009   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
58010   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
58011   #    will be set to the directory where LIBOBJS objects are built.
58012   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
58013   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
58014 done
58015 LIBOBJS=$ac_libobjs
58016 
58017 LTLIBOBJS=$ac_ltlibobjs
58018 
58019 
58020 
58021 : "${CONFIG_STATUS=./config.status}"
58022 ac_write_fail=0
58023 ac_clean_files_save=$ac_clean_files
58024 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
58025 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
58026 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
58027 as_write_fail=0
58028 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58029 #! $SHELL
58030 # Generated by $as_me.
58031 # Run this file to recreate the current configuration.
58032 # Compiler output produced by configure, useful for debugging
58033 # configure, is in config.log if it exists.
58034 
58035 debug=false
58036 ac_cs_recheck=false
58037 ac_cs_silent=false
58038 
58039 SHELL=\${CONFIG_SHELL-$SHELL}
58040 export SHELL
58041 _ASEOF
58042 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58043 ## -------------------- ##
58044 ## M4sh Initialization. ##
58045 ## -------------------- ##
58046 
58047 # Be more Bourne compatible
58048 DUALCASE=1; export DUALCASE # for MKS sh
58049 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58050   emulate sh
58051   NULLCMD=:
58052   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58053   # is contrary to our usage.  Disable this feature.
58054   alias -g '${1+"$@"}'='"$@"'
58055   setopt NO_GLOB_SUBST
58056 else
58057   case `(set -o) 2>/dev/null` in #(
58058   *posix*) :
58059     set -o posix ;; #(
58060   *) :
58061      ;;
58062 esac
58063 fi
58064 
58065 
58066 as_nl='
58067 '
58068 export as_nl
58069 # Printing a long string crashes Solaris 7 /usr/bin/printf.
58070 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58071 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58072 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58073 # Prefer a ksh shell builtin over an external printf program on Solaris,
58074 # but without wasting forks for bash or zsh.
58075 if test -z "$BASH_VERSION$ZSH_VERSION" \
58076     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58077   as_echo='print -r --'
58078   as_echo_n='print -rn --'
58079 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58080   as_echo='printf %s\n'
58081   as_echo_n='printf %s'
58082 else
58083   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58084     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58085     as_echo_n='/usr/ucb/echo -n'
58086   else
58087     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58088     as_echo_n_body='eval
58089       arg=$1;
58090       case $arg in #(
58091       *"$as_nl"*)
58092         expr "X$arg" : "X\\(.*\\)$as_nl";
58093         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58094       esac;
58095       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58096     '
58097     export as_echo_n_body
58098     as_echo_n='sh -c $as_echo_n_body as_echo'
58099   fi
58100   export as_echo_body
58101   as_echo='sh -c $as_echo_body as_echo'
58102 fi
58103 
58104 # The user is always right.
58105 if test "${PATH_SEPARATOR+set}" != set; then
58106   PATH_SEPARATOR=:
58107   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58108     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58109       PATH_SEPARATOR=';'
58110   }
58111 fi
58112 
58113 
58114 # IFS
58115 # We need space, tab and new line, in precisely that order.  Quoting is
58116 # there to prevent editors from complaining about space-tab.
58117 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
58118 # splitting by setting IFS to empty value.)
58119 IFS=" ""        $as_nl"
58120 
58121 # Find who we are.  Look in the path if we contain no directory separator.
58122 as_myself=
58123 case $0 in #((
58124   *[\\/]* ) as_myself=$0 ;;
58125   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58126 for as_dir in $PATH
58127 do
58128   IFS=$as_save_IFS
58129   test -z "$as_dir" && as_dir=.
58130     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58131   done
58132 IFS=$as_save_IFS
58133 
58134      ;;
58135 esac
58136 # We did not find ourselves, most probably we were run as `sh COMMAND'
58137 # in which case we are not to be found in the path.
58138 if test "x$as_myself" = x; then
58139   as_myself=$0
58140 fi
58141 if test ! -f "$as_myself"; then
58142   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58143   exit 1
58144 fi
58145 
58146 # Unset variables that we do not need and which cause bugs (e.g. in
58147 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58148 # suppresses any "Segmentation fault" message there.  '((' could
58149 # trigger a bug in pdksh 5.2.14.
58150 for as_var in BASH_ENV ENV MAIL MAILPATH
58151 do eval test x\${$as_var+set} = xset \
58152   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58153 done
58154 PS1='$ '
58155 PS2='> '
58156 PS4='+ '
58157 
58158 # NLS nuisances.
58159 LC_ALL=C
58160 export LC_ALL
58161 LANGUAGE=C
58162 export LANGUAGE
58163 
58164 # CDPATH.
58165 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58166 
58167 
58168 # as_fn_error STATUS ERROR [LINENO LOG_FD]
58169 # ----------------------------------------
58170 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58171 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58172 # script with STATUS, using 1 if that was 0.
58173 as_fn_error ()
58174 {
58175   as_status=$1; test $as_status -eq 0 && as_status=1
58176   if test "$4"; then
58177     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58178     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58179   fi
58180   $as_echo "$as_me: error: $2" >&2
58181   as_fn_exit $as_status
58182 } # as_fn_error
58183 
58184 
58185 # as_fn_set_status STATUS
58186 # -----------------------
58187 # Set $? to STATUS, without forking.
58188 as_fn_set_status ()
58189 {
58190   return $1
58191 } # as_fn_set_status
58192 
58193 # as_fn_exit STATUS
58194 # -----------------
58195 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58196 as_fn_exit ()
58197 {
58198   set +e
58199   as_fn_set_status $1
58200   exit $1
58201 } # as_fn_exit
58202 
58203 # as_fn_unset VAR
58204 # ---------------
58205 # Portably unset VAR.
58206 as_fn_unset ()
58207 {
58208   { eval $1=; unset $1;}
58209 }
58210 as_unset=as_fn_unset
58211 # as_fn_append VAR VALUE
58212 # ----------------------
58213 # Append the text in VALUE to the end of the definition contained in VAR. Take
58214 # advantage of any shell optimizations that allow amortized linear growth over
58215 # repeated appends, instead of the typical quadratic growth present in naive
58216 # implementations.
58217 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58218   eval 'as_fn_append ()
58219   {
58220     eval $1+=\$2
58221   }'
58222 else
58223   as_fn_append ()
58224   {
58225     eval $1=\$$1\$2
58226   }
58227 fi # as_fn_append
58228 
58229 # as_fn_arith ARG...
58230 # ------------------
58231 # Perform arithmetic evaluation on the ARGs, and store the result in the
58232 # global $as_val. Take advantage of shells that can avoid forks. The arguments
58233 # must be portable across $(()) and expr.
58234 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58235   eval 'as_fn_arith ()
58236   {
58237     as_val=$(( $* ))
58238   }'
58239 else
58240   as_fn_arith ()
58241   {
58242     as_val=`expr "$@" || test $? -eq 1`
58243   }
58244 fi # as_fn_arith
58245 
58246 
58247 if expr a : '\(a\)' >/dev/null 2>&1 &&
58248    test "X`expr 00001 : '.*\(...\)'`" = X001; then
58249   as_expr=expr
58250 else
58251   as_expr=false
58252 fi
58253 
58254 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58255   as_basename=basename
58256 else
58257   as_basename=false
58258 fi
58259 
58260 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58261   as_dirname=dirname
58262 else
58263   as_dirname=false
58264 fi
58265 
58266 as_me=`$as_basename -- "$0" ||
58267 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58268          X"$0" : 'X\(//\)$' \| \
58269          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58270 $as_echo X/"$0" |
58271     sed '/^.*\/\([^/][^/]*\)\/*$/{
58272             s//\1/
58273             q
58274           }
58275           /^X\/\(\/\/\)$/{
58276             s//\1/
58277             q
58278           }
58279           /^X\/\(\/\).*/{
58280             s//\1/
58281             q
58282           }
58283           s/.*/./; q'`
58284 
58285 # Avoid depending upon Character Ranges.
58286 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58287 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58288 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58289 as_cr_digits='0123456789'
58290 as_cr_alnum=$as_cr_Letters$as_cr_digits
58291 
58292 ECHO_C= ECHO_N= ECHO_T=
58293 case `echo -n x` in #(((((
58294 -n*)
58295   case `echo 'xy\c'` in
58296   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
58297   xy)  ECHO_C='\c';;
58298   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58299        ECHO_T=' ';;
58300   esac;;
58301 *)
58302   ECHO_N='-n';;
58303 esac
58304 
58305 rm -f conf$$ conf$$.exe conf$$.file
58306 if test -d conf$$.dir; then
58307   rm -f conf$$.dir/conf$$.file
58308 else
58309   rm -f conf$$.dir
58310   mkdir conf$$.dir 2>/dev/null
58311 fi
58312 if (echo >conf$$.file) 2>/dev/null; then
58313   if ln -s conf$$.file conf$$ 2>/dev/null; then
58314     as_ln_s='ln -s'
58315     # ... but there are two gotchas:
58316     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58317     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58318     # In both cases, we have to default to `cp -pR'.
58319     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58320       as_ln_s='cp -pR'
58321   elif ln conf$$.file conf$$ 2>/dev/null; then
58322     as_ln_s=ln
58323   else
58324     as_ln_s='cp -pR'
58325   fi
58326 else
58327   as_ln_s='cp -pR'
58328 fi
58329 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58330 rmdir conf$$.dir 2>/dev/null
58331 
58332 
58333 # as_fn_mkdir_p
58334 # -------------
58335 # Create "$as_dir" as a directory, including parents if necessary.
58336 as_fn_mkdir_p ()
58337 {
58338 
58339   case $as_dir in #(
58340   -*) as_dir=./$as_dir;;
58341   esac
58342   test -d "$as_dir" || eval $as_mkdir_p || {
58343     as_dirs=
58344     while :; do
58345       case $as_dir in #(
58346       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58347       *) as_qdir=$as_dir;;
58348       esac
58349       as_dirs="'$as_qdir' $as_dirs"
58350       as_dir=`$as_dirname -- "$as_dir" ||
58351 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58352          X"$as_dir" : 'X\(//\)[^/]' \| \
58353          X"$as_dir" : 'X\(//\)$' \| \
58354          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58355 $as_echo X"$as_dir" |
58356     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58357             s//\1/
58358             q
58359           }
58360           /^X\(\/\/\)[^/].*/{
58361             s//\1/
58362             q
58363           }
58364           /^X\(\/\/\)$/{
58365             s//\1/
58366             q
58367           }
58368           /^X\(\/\).*/{
58369             s//\1/
58370             q
58371           }
58372           s/.*/./; q'`
58373       test -d "$as_dir" && break
58374     done
58375     test -z "$as_dirs" || eval "mkdir $as_dirs"
58376   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58377 
58378 
58379 } # as_fn_mkdir_p
58380 if mkdir -p . 2>/dev/null; then
58381   as_mkdir_p='mkdir -p "$as_dir"'
58382 else
58383   test -d ./-p && rmdir ./-p
58384   as_mkdir_p=false
58385 fi
58386 
58387 
58388 # as_fn_executable_p FILE
58389 # -----------------------
58390 # Test if FILE is an executable regular file.
58391 as_fn_executable_p ()
58392 {
58393   test -f "$1" && test -x "$1"
58394 } # as_fn_executable_p
58395 as_test_x='test -x'
58396 as_executable_p=as_fn_executable_p
58397 
58398 # Sed expression to map a string onto a valid CPP name.
58399 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58400 
58401 # Sed expression to map a string onto a valid variable name.
58402 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58403 
58404 
58405 exec 6>&1
58406 ## ----------------------------------- ##
58407 ## Main body of $CONFIG_STATUS script. ##
58408 ## ----------------------------------- ##
58409 _ASEOF
58410 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58411 
58412 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58413 # Save the log message, to keep $0 and so on meaningful, and to
58414 # report actual input values of CONFIG_FILES etc. instead of their
58415 # values after options handling.
58416 ac_log="
58417 This file was extended by OpenJDK $as_me jdk9, which was
58418 generated by GNU Autoconf 2.69.  Invocation command line was
58419 
58420   CONFIG_FILES    = $CONFIG_FILES
58421   CONFIG_HEADERS  = $CONFIG_HEADERS
58422   CONFIG_LINKS    = $CONFIG_LINKS
58423   CONFIG_COMMANDS = $CONFIG_COMMANDS
58424   $ $0 $@
58425 
58426 on `(hostname || uname -n) 2>/dev/null | sed 1q`
58427 "
58428 
58429 _ACEOF
58430 
58431 case $ac_config_files in *"
58432 "*) set x $ac_config_files; shift; ac_config_files=$*;;
58433 esac
58434 
58435 
58436 
58437 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58438 # Files that config.status was made for.
58439 config_files="$ac_config_files"
58440 
58441 _ACEOF
58442 
58443 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58444 ac_cs_usage="\
58445 \`$as_me' instantiates files and other configuration actions
58446 from templates according to the current configuration.  Unless the files
58447 and actions are specified as TAGs, all are instantiated by default.
58448 
58449 Usage: $0 [OPTION]... [TAG]...
58450 
58451   -h, --help       print this help, then exit
58452   -V, --version    print version number and configuration settings, then exit
58453       --config     print configuration, then exit
58454   -q, --quiet, --silent
58455                    do not print progress messages
58456   -d, --debug      don't remove temporary files
58457       --recheck    update $as_me by reconfiguring in the same conditions
58458       --file=FILE[:TEMPLATE]
58459                    instantiate the configuration file FILE
58460 
58461 Configuration files:
58462 $config_files
58463 
58464 Report bugs to <build-dev@openjdk.java.net>.
58465 OpenJDK home page: <http://openjdk.java.net>."
58466 
58467 _ACEOF
58468 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58469 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58470 ac_cs_version="\\
58471 OpenJDK config.status jdk9
58472 configured by $0, generated by GNU Autoconf 2.69,
58473   with options \\"\$ac_cs_config\\"
58474 
58475 Copyright (C) 2012 Free Software Foundation, Inc.
58476 This config.status script is free software; the Free Software Foundation
58477 gives unlimited permission to copy, distribute and modify it."
58478 
58479 ac_pwd='$ac_pwd'
58480 srcdir='$srcdir'
58481 AWK='$AWK'
58482 test -n "\$AWK" || AWK=awk
58483 _ACEOF
58484 
58485 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58486 # The default lists apply if the user does not specify any file.
58487 ac_need_defaults=:
58488 while test $# != 0
58489 do
58490   case $1 in
58491   --*=?*)
58492     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58493     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58494     ac_shift=:
58495     ;;
58496   --*=)
58497     ac_option=`expr "X$1" : 'X\([^=]*\)='`
58498     ac_optarg=
58499     ac_shift=:
58500     ;;
58501   *)
58502     ac_option=$1
58503     ac_optarg=$2
58504     ac_shift=shift
58505     ;;
58506   esac
58507 
58508   case $ac_option in
58509   # Handling of the options.
58510   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58511     ac_cs_recheck=: ;;
58512   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58513     $as_echo "$ac_cs_version"; exit ;;
58514   --config | --confi | --conf | --con | --co | --c )
58515     $as_echo "$ac_cs_config"; exit ;;
58516   --debug | --debu | --deb | --de | --d | -d )
58517     debug=: ;;
58518   --file | --fil | --fi | --f )
58519     $ac_shift
58520     case $ac_optarg in
58521     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58522     '') as_fn_error $? "missing file argument" ;;
58523     esac
58524     as_fn_append CONFIG_FILES " '$ac_optarg'"
58525     ac_need_defaults=false;;
58526   --he | --h |  --help | --hel | -h )
58527     $as_echo "$ac_cs_usage"; exit ;;
58528   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58529   | -silent | --silent | --silen | --sile | --sil | --si | --s)
58530     ac_cs_silent=: ;;
58531 
58532   # This is an error.
58533   -*) as_fn_error $? "unrecognized option: \`$1'
58534 Try \`$0 --help' for more information." ;;
58535 
58536   *) as_fn_append ac_config_targets " $1"
58537      ac_need_defaults=false ;;
58538 
58539   esac
58540   shift
58541 done
58542 
58543 ac_configure_extra_args=
58544 
58545 if $ac_cs_silent; then
58546   exec 6>/dev/null
58547   ac_configure_extra_args="$ac_configure_extra_args --silent"
58548 fi
58549 
58550 _ACEOF
58551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58552 if \$ac_cs_recheck; then
58553   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58554   shift
58555   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58556   CONFIG_SHELL='$SHELL'
58557   export CONFIG_SHELL
58558   exec "\$@"
58559 fi
58560 
58561 _ACEOF
58562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58563 exec 5>>config.log
58564 {
58565   echo
58566   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58567 ## Running $as_me. ##
58568 _ASBOX
58569   $as_echo "$ac_log"
58570 } >&5
58571 
58572 _ACEOF
58573 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58574 _ACEOF
58575 
58576 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58577 
58578 # Handling of arguments.
58579 for ac_config_target in $ac_config_targets
58580 do
58581   case $ac_config_target in
58582     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58583     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58584     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58585     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58586     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58587 
58588   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58589   esac
58590 done
58591 
58592 
58593 # If the user did not use the arguments to specify the items to instantiate,
58594 # then the envvar interface is used.  Set only those that are not.
58595 # We use the long form for the default assignment because of an extremely
58596 # bizarre bug on SunOS 4.1.3.
58597 if $ac_need_defaults; then
58598   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58599 fi
58600 
58601 # Have a temporary directory for convenience.  Make it in the build tree
58602 # simply because there is no reason against having it here, and in addition,
58603 # creating and moving files from /tmp can sometimes cause problems.
58604 # Hook for its removal unless debugging.
58605 # Note that there is a small window in which the directory will not be cleaned:
58606 # after its creation but before its name has been assigned to `$tmp'.
58607 $debug ||
58608 {
58609   tmp= ac_tmp=
58610   trap 'exit_status=$?
58611   : "${ac_tmp:=$tmp}"
58612   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58613 ' 0
58614   trap 'as_fn_exit 1' 1 2 13 15
58615 }
58616 # Create a (secure) tmp directory for tmp files.
58617 
58618 {
58619   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58620   test -d "$tmp"
58621 }  ||
58622 {
58623   tmp=./conf$$-$RANDOM
58624   (umask 077 && mkdir "$tmp")
58625 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
58626 ac_tmp=$tmp
58627 
58628 # Set up the scripts for CONFIG_FILES section.
58629 # No need to generate them if there are no CONFIG_FILES.
58630 # This happens for instance with `./config.status config.h'.
58631 if test -n "$CONFIG_FILES"; then
58632 
58633 
58634 ac_cr=`echo X | tr X '\015'`
58635 # On cygwin, bash can eat \r inside `` if the user requested igncr.
58636 # But we know of no other shell where ac_cr would be empty at this
58637 # point, so we can use a bashism as a fallback.
58638 if test "x$ac_cr" = x; then
58639   eval ac_cr=\$\'\\r\'
58640 fi
58641 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
58642 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
58643   ac_cs_awk_cr='\\r'
58644 else
58645   ac_cs_awk_cr=$ac_cr
58646 fi
58647 
58648 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
58649 _ACEOF
58650 
58651 
58652 {
58653   echo "cat >conf$$subs.awk <<_ACEOF" &&
58654   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
58655   echo "_ACEOF"
58656 } >conf$$subs.sh ||
58657   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58658 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
58659 ac_delim='%!_!# '
58660 for ac_last_try in false false false false false :; do
58661   . ./conf$$subs.sh ||
58662     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58663 
58664   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
58665   if test $ac_delim_n = $ac_delim_num; then
58666     break
58667   elif $ac_last_try; then
58668     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58669   else
58670     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
58671   fi
58672 done
58673 rm -f conf$$subs.sh
58674 
58675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58676 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
58677 _ACEOF
58678 sed -n '
58679 h
58680 s/^/S["/; s/!.*/"]=/
58681 p
58682 g
58683 s/^[^!]*!//
58684 :repl
58685 t repl
58686 s/'"$ac_delim"'$//
58687 t delim
58688 :nl
58689 h
58690 s/\(.\{148\}\)..*/\1/
58691 t more1
58692 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
58693 p
58694 n
58695 b repl
58696 :more1
58697 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58698 p
58699 g
58700 s/.\{148\}//
58701 t nl
58702 :delim
58703 h
58704 s/\(.\{148\}\)..*/\1/
58705 t more2
58706 s/["\\]/\\&/g; s/^/"/; s/$/"/
58707 p
58708 b
58709 :more2
58710 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58711 p
58712 g
58713 s/.\{148\}//
58714 t delim
58715 ' <conf$$subs.awk | sed '
58716 /^[^""]/{
58717   N
58718   s/\n//
58719 }
58720 ' >>$CONFIG_STATUS || ac_write_fail=1
58721 rm -f conf$$subs.awk
58722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58723 _ACAWK
58724 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
58725   for (key in S) S_is_set[key] = 1
58726   FS = ""
58727 
58728 }
58729 {
58730   line = $ 0
58731   nfields = split(line, field, "@")
58732   substed = 0
58733   len = length(field[1])
58734   for (i = 2; i < nfields; i++) {
58735     key = field[i]
58736     keylen = length(key)
58737     if (S_is_set[key]) {
58738       value = S[key]
58739       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
58740       len += length(value) + length(field[++i])
58741       substed = 1
58742     } else
58743       len += 1 + keylen
58744   }
58745 
58746   print line
58747 }
58748 
58749 _ACAWK
58750 _ACEOF
58751 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58752 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
58753   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
58754 else
58755   cat
58756 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
58757   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
58758 _ACEOF
58759 
58760 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
58761 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
58762 # trailing colons and then remove the whole line if VPATH becomes empty
58763 # (actually we leave an empty line to preserve line numbers).
58764 if test "x$srcdir" = x.; then
58765   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
58766 h
58767 s///
58768 s/^/:/
58769 s/[      ]*$/:/
58770 s/:\$(srcdir):/:/g
58771 s/:\${srcdir}:/:/g
58772 s/:@srcdir@:/:/g
58773 s/^:*//
58774 s/:*$//
58775 x
58776 s/\(=[   ]*\).*/\1/
58777 G
58778 s/\n//
58779 s/^[^=]*=[       ]*$//
58780 }'
58781 fi
58782 
58783 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58784 fi # test -n "$CONFIG_FILES"
58785 
58786 
58787 eval set X "  :F $CONFIG_FILES      "
58788 shift
58789 for ac_tag
58790 do
58791   case $ac_tag in
58792   :[FHLC]) ac_mode=$ac_tag; continue;;
58793   esac
58794   case $ac_mode$ac_tag in
58795   :[FHL]*:*);;
58796   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
58797   :[FH]-) ac_tag=-:-;;
58798   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
58799   esac
58800   ac_save_IFS=$IFS
58801   IFS=:
58802   set x $ac_tag
58803   IFS=$ac_save_IFS
58804   shift
58805   ac_file=$1
58806   shift
58807 
58808   case $ac_mode in
58809   :L) ac_source=$1;;
58810   :[FH])
58811     ac_file_inputs=
58812     for ac_f
58813     do
58814       case $ac_f in
58815       -) ac_f="$ac_tmp/stdin";;
58816       *) # Look for the file first in the build tree, then in the source tree
58817          # (if the path is not absolute).  The absolute path cannot be DOS-style,
58818          # because $ac_f cannot contain `:'.
58819          test -f "$ac_f" ||
58820            case $ac_f in
58821            [\\/$]*) false;;
58822            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
58823            esac ||
58824            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
58825       esac
58826       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
58827       as_fn_append ac_file_inputs " '$ac_f'"
58828     done
58829 
58830     # Let's still pretend it is `configure' which instantiates (i.e., don't
58831     # use $as_me), people would be surprised to read:
58832     #    /* config.h.  Generated by config.status.  */
58833     configure_input='Generated from '`
58834           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
58835         `' by configure.'
58836     if test x"$ac_file" != x-; then
58837       configure_input="$ac_file.  $configure_input"
58838       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
58839 $as_echo "$as_me: creating $ac_file" >&6;}
58840     fi
58841     # Neutralize special characters interpreted by sed in replacement strings.
58842     case $configure_input in #(
58843     *\&* | *\|* | *\\* )
58844        ac_sed_conf_input=`$as_echo "$configure_input" |
58845        sed 's/[\\\\&|]/\\\\&/g'`;; #(
58846     *) ac_sed_conf_input=$configure_input;;
58847     esac
58848 
58849     case $ac_tag in
58850     *:-:* | *:-) cat >"$ac_tmp/stdin" \
58851       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
58852     esac
58853     ;;
58854   esac
58855 
58856   ac_dir=`$as_dirname -- "$ac_file" ||
58857 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58858          X"$ac_file" : 'X\(//\)[^/]' \| \
58859          X"$ac_file" : 'X\(//\)$' \| \
58860          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
58861 $as_echo X"$ac_file" |
58862     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58863             s//\1/
58864             q
58865           }
58866           /^X\(\/\/\)[^/].*/{
58867             s//\1/
58868             q
58869           }
58870           /^X\(\/\/\)$/{
58871             s//\1/
58872             q
58873           }
58874           /^X\(\/\).*/{
58875             s//\1/
58876             q
58877           }
58878           s/.*/./; q'`
58879   as_dir="$ac_dir"; as_fn_mkdir_p
58880   ac_builddir=.
58881 
58882 case "$ac_dir" in
58883 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
58884 *)
58885   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
58886   # A ".." for each directory in $ac_dir_suffix.
58887   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
58888   case $ac_top_builddir_sub in
58889   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
58890   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
58891   esac ;;
58892 esac
58893 ac_abs_top_builddir=$ac_pwd
58894 ac_abs_builddir=$ac_pwd$ac_dir_suffix
58895 # for backward compatibility:
58896 ac_top_builddir=$ac_top_build_prefix
58897 
58898 case $srcdir in
58899   .)  # We are building in place.
58900     ac_srcdir=.
58901     ac_top_srcdir=$ac_top_builddir_sub
58902     ac_abs_top_srcdir=$ac_pwd ;;
58903   [\\/]* | ?:[\\/]* )  # Absolute name.
58904     ac_srcdir=$srcdir$ac_dir_suffix;
58905     ac_top_srcdir=$srcdir
58906     ac_abs_top_srcdir=$srcdir ;;
58907   *) # Relative name.
58908     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
58909     ac_top_srcdir=$ac_top_build_prefix$srcdir
58910     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
58911 esac
58912 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
58913 
58914 
58915   case $ac_mode in
58916   :F)
58917   #
58918   # CONFIG_FILE
58919   #
58920 
58921 _ACEOF
58922 
58923 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58924 # If the template does not know about datarootdir, expand it.
58925 # FIXME: This hack should be removed a few years after 2.60.
58926 ac_datarootdir_hack=; ac_datarootdir_seen=
58927 ac_sed_dataroot='
58928 /datarootdir/ {
58929   p
58930   q
58931 }
58932 /@datadir@/p
58933 /@docdir@/p
58934 /@infodir@/p
58935 /@localedir@/p
58936 /@mandir@/p'
58937 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
58938 *datarootdir*) ac_datarootdir_seen=yes;;
58939 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
58940   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
58941 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
58942 _ACEOF
58943 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58944   ac_datarootdir_hack='
58945   s&@datadir@&$datadir&g
58946   s&@docdir@&$docdir&g
58947   s&@infodir@&$infodir&g
58948   s&@localedir@&$localedir&g
58949   s&@mandir@&$mandir&g
58950   s&\\\${datarootdir}&$datarootdir&g' ;;
58951 esac
58952 _ACEOF
58953 
58954 # Neutralize VPATH when `$srcdir' = `.'.
58955 # Shell code in configure.ac might set extrasub.
58956 # FIXME: do we really want to maintain this feature?
58957 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58958 ac_sed_extra="$ac_vpsub
58959 $extrasub
58960 _ACEOF
58961 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58962 :t
58963 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
58964 s|@configure_input@|$ac_sed_conf_input|;t t
58965 s&@top_builddir@&$ac_top_builddir_sub&;t t
58966 s&@top_build_prefix@&$ac_top_build_prefix&;t t
58967 s&@srcdir@&$ac_srcdir&;t t
58968 s&@abs_srcdir@&$ac_abs_srcdir&;t t
58969 s&@top_srcdir@&$ac_top_srcdir&;t t
58970 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
58971 s&@builddir@&$ac_builddir&;t t
58972 s&@abs_builddir@&$ac_abs_builddir&;t t
58973 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
58974 $ac_datarootdir_hack
58975 "
58976 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
58977   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58978 
58979 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
58980   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
58981   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
58982       "$ac_tmp/out"`; test -z "$ac_out"; } &&
58983   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58984 which seems to be undefined.  Please make sure it is defined" >&5
58985 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58986 which seems to be undefined.  Please make sure it is defined" >&2;}
58987 
58988   rm -f "$ac_tmp/stdin"
58989   case $ac_file in
58990   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
58991   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
58992   esac \
58993   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58994  ;;
58995 
58996 
58997 
58998   esac
58999 
59000 done # for ac_tag
59001 
59002 
59003 as_fn_exit 0
59004 _ACEOF
59005 ac_clean_files=$ac_clean_files_save
59006 
59007 test $ac_write_fail = 0 ||
59008   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
59009 
59010 
59011 # configure is writing to config.log, and then calls config.status.
59012 # config.status does its own redirection, appending to config.log.
59013 # Unfortunately, on DOS this fails, as config.log is still kept open
59014 # by configure, so config.status won't be able to write to it; its
59015 # output is simply discarded.  So we exec the FD to /dev/null,
59016 # effectively closing config.log, so it can be properly (re)opened and
59017 # appended to by config.status.  When coming back to configure, we
59018 # need to make the FD available again.
59019 if test "$no_create" != yes; then
59020   ac_cs_success=:
59021   ac_config_status_args=
59022   test "$silent" = yes &&
59023     ac_config_status_args="$ac_config_status_args --quiet"
59024   exec 5>/dev/null
59025   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
59026   exec 5>>config.log
59027   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59028   # would make configure fail if this is the last instruction.
59029   $ac_cs_success || as_fn_exit 1
59030 fi
59031 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59032   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59033 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59034 fi
59035 
59036 
59037 # After AC_OUTPUT, we need to do final work
59038 
59039 
59040   # Try to move config.log (generated by autoconf) to the configure-support directory.
59041   if test -e ./config.log; then
59042     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59043   fi
59044 
59045   # Rotate our log file (configure.log)
59046   if test -e "$OUTPUT_ROOT/configure.log.old"; then
59047     $RM -f "$OUTPUT_ROOT/configure.log.old"
59048   fi
59049   if test -e "$OUTPUT_ROOT/configure.log"; then
59050     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59051   fi
59052 
59053   # Move configure.log from current directory to the build output root
59054   if test -e ./configure.log; then
59055     echo found it
59056     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59057   fi
59058 
59059   # Make the compare script executable
59060   $CHMOD +x $OUTPUT_ROOT/compare.sh
59061 
59062 
59063 # Finally output some useful information to the user
59064 
59065   # Finally output some useful information to the user
59066 
59067   printf "\n"
59068   printf "====================================================\n"
59069   if test "x$no_create" != "xyes"; then
59070     if test "x$IS_RECONFIGURE" != "xyes"; then
59071       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59072     else
59073       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59074     fi
59075   else
59076     if test "x$IS_RECONFIGURE" != "xyes"; then
59077       printf "A configuration has been successfully checked but not created\n"
59078     else
59079       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59080     fi
59081   fi
59082   if test "x$CONFIGURE_COMMAND_LINE" != x; then
59083     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59084   else
59085     printf "using default settings.\n"
59086   fi
59087 
59088   printf "\n"
59089   printf "Configuration summary:\n"
59090   printf "* Debug level:    $DEBUG_LEVEL\n"
59091   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59092   printf "* JDK variant:    $JDK_VARIANT\n"
59093   printf "* JVM variants:   $with_jvm_variants\n"
59094   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59095 
59096   printf "\n"
59097   printf "Tools summary:\n"
59098   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59099     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59100   fi
59101   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59102   if test "x$TOOLCHAIN_VERSION" != "x"; then
59103     print_version=" $TOOLCHAIN_VERSION"
59104   fi
59105   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59106   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59107   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59108 
59109   printf "\n"
59110   printf "Build performance summary:\n"
59111   printf "* Cores to use:   $JOBS\n"
59112   printf "* Memory limit:   $MEMORY_SIZE MB\n"
59113   if test "x$CCACHE_STATUS" != "x"; then
59114     printf "* ccache status:  $CCACHE_STATUS\n"
59115   fi
59116   printf "\n"
59117 
59118   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59119     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59120     printf "will result in longer build times.\n"
59121     printf "\n"
59122   fi
59123 
59124   if test "x$FOUND_ALT_VARIABLES" != "x"; then
59125     printf "WARNING: You have old-style ALT_ environment variables set.\n"
59126     printf "These are not respected, and will be ignored. It is recommended\n"
59127     printf "that you clean your environment. The following variables are set:\n"
59128     printf "$FOUND_ALT_VARIABLES\n"
59129     printf "\n"
59130   fi
59131 
59132   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59133     printf "WARNING: Your build output directory is not on a local disk.\n"
59134     printf "This will severely degrade build performance!\n"
59135     printf "It is recommended that you create an output directory on a local disk,\n"
59136     printf "and run the configure script again from that directory.\n"
59137     printf "\n"
59138   fi
59139 
59140   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59141     printf "WARNING: The result of this configuration has overridden an older\n"
59142     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59143     printf "proper build. Failure to do so might result in strange build problems.\n"
59144     printf "\n"
59145   fi
59146 
59147   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59148     printf "WARNING: The result of this configuration was not saved.\n"
59149     printf "You should run without '--no-create | -n' to create the configuration.\n"
59150     printf "\n"
59151   fi
59152 
59153 
59154 
59155   # Locate config.log.
59156   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59157     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59158   elif test -e "./config.log"; then
59159     CONFIG_LOG_PATH="."
59160   fi
59161 
59162   if test -e "$CONFIG_LOG_PATH/config.log"; then
59163     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59164     if test $? -eq 0; then
59165       printf "The following warnings were produced. Repeated here for convenience:\n"
59166       # We must quote sed expression (using []) to stop m4 from eating the [].
59167       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59168       printf "\n"
59169     fi
59170   fi
59171